distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Fix: Delay `send_notifications` until after all meta has saved

Open dinhtungdu opened this issue 5 years ago • 1 comments

Description of the Change

Use wp_insert_post instead of save_post to update syndicated posts. wp_insert_post is the last action when updating a post, use it will ensure distributor update remote posts after all meta is saved.

Alternate Designs

Benefits

Possible Drawbacks

Verification Process

Check with Yoast SEO as describe in #399

Checklist:

  • [x] I have read the CONTRIBUTING document.
  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my change.
  • [ ] All new and existing tests passed.

Applicable Issues

Closes #399

Changelog Entry

dinhtungdu avatar Mar 13 '20 09:03 dinhtungdu

Given that we're aiming to cover larger structural changes for Distributor in an upcoming release, it may make more sense to tandem this PR and related issue then.

jeffpaul avatar May 06 '20 19:05 jeffpaul

I'm going to close this off as all of the files it touches are conflicted and with the new minimum requirement bumps it's possible to do this consistently for both the Gutenberg (REST) and classic updates.

peterwilsoncc avatar Sep 12 '22 04:09 peterwilsoncc