Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Fix saving of postmeta in scheduled changesets #375

Merged
merged 2 commits into from Nov 14, 2017

Conversation

westonruter
Copy link
Contributor

@westonruter westonruter commented Nov 14, 2017

When a scheduled changeset publishes via WP Cron, the Customizer will bootstrap after the init action. In the course of normal Customizer bootstrapping, it happens at the plugins_loaded action. Because postmeta currently is registered at the init action, this means that the postmeta will not get registered during WP Cron because the Customizer will bootstrap after init.

This is also a problem for changesets that get published via WP-CLI, since init also is done before wp post update $changeset_post_id --post_status=publish.

In the Customizer the way to reproduce the problem is:

  1. Open Customizer
  2. Open a post to edit.
  3. Change the post title
  4. Change the featured image
  5. Schedule the changes to go live.
  6. At the scheduled time, the post title change is published whereas the featured image change is not.

@westonruter westonruter changed the base branch from develop to master November 14, 2017 02:05
@westonruter westonruter merged commit be5f816 into master Nov 14, 2017
@westonruter westonruter deleted the fix/scheduled-postmeta branch November 14, 2017 03:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant