-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove any existing subscriptions before adding a new save metaboxes sub to prevent multiple saves #17522
Remove any existing subscriptions before adding a new save metaboxes sub to prevent multiple saves #17522
Conversation
…sub to prevent multiple saves
Have just left as draft for now as want to a bit more testing of it tomorrow. |
…sub to prevent multiple saves (#17522)
…sub to prevent multiple saves (#17522)
@glendaviesnz Great work! 🥳🎉🎉🎉 You have just made a lot of ACF users very happy indeed. |
no worries, @elliotcondon, turned out to be a pretty easy fix. I am pretty new to contributing sorry, so not sure how the release cycle is working for WP 5.3 - @youknowriad do you know the answer to that? |
yes, this will be included in WordPress 5.3, you can check with beta2, it's already there. |
Description
Currently multiple calls to setAvailableMetaBoxesPerLocation() action causes multiple AJAX requests to post.php to be made as each call initiates a new store subscription. This change removes any existing subscription before adding a new one to ensure only one sub is in play at a time.
How has this been tested?
wp.data.dispatch( 'core/edit-post' ).setAvailableMetaBoxesPerLocation( {"side":[],"normal":[{"id":"postcustom","title":"Custom Fields"}],"advanced":[]} );
Types of changes
Fixes #14759
Checklist: