Refresh a Metabox in the WordPress Block Editor

The WordPress block editor shows registered metaboxes under the post / page content, but since it does not reload the webpage when saving content, metaboxes are not refreshed or reloaded when you save a draft or publish the post / page.

If your metabox needs to be refreshed, to show the new saved content (like the WPSSO Core or JSM Show Post Metadata plugins, for example), you need to add a change listener in javascript and refresh your metabox (using an ajax call) after the block editor has finished saving the metaboxes.

Continue reading