feat(wordpress): store suggested publish date directly in WP draft
Reserve the publish slot before creating the WP draft so the scheduled_publish_at timestamp is available when building the post payload. WordPress receives the `date` field (e.g. 2026-03-24T09:00:00) which sets the scheduled publish time on the draft. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e9c472b722
commit
970f509ad4
2 changed files with 11 additions and 5 deletions
|
|
@ -335,6 +335,9 @@ def publish_article_draft(article: dict[str, Any]) -> tuple[int, str | None]:
|
|||
payload["excerpt"] = excerpt
|
||||
if featured_media_id:
|
||||
payload["featured_media"] = featured_media_id
|
||||
scheduled_at = article.get("scheduled_publish_at")
|
||||
if scheduled_at:
|
||||
payload["date"] = scheduled_at # e.g. "2026-03-24T09:00:00"
|
||||
|
||||
wp_post_id = article.get("wp_post_id")
|
||||
tag_ids = _resolve_wp_tag_ids(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue