We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce5fd3f commit 074f577Copy full SHA for 074f577
src/blocks/pricing-table/index.js
@@ -77,7 +77,17 @@ export const settings = {
77
78
// Reload when changes are made to access plans.
79
$( document ).one( 'llms-access-plans-updated', function() {
80
+
81
+ // Replacing the block with a duplicate of itself so we can reload the block from the server.
82
dispatch( 'core/editor' ).replaceBlock( props.clientId, createBlock( name ) );
83
84
+ // This will save the updates to the post content that appear as a result of the replacement.
85
+ // Since I can't seem to figure out how to prevent the change from being triggered we have to duplicate a save.
86
+ // which is gross. I know it's gross. It works though....
87
+ setTimeout( function() {
88
+ dispatch( 'core/editor' ).savePost();
89
+ }, 500 );
90
91
} );
92
93
return (
0 commit comments