Console Errors when the New Product Editor is enabled (#39027)
* Bootstrap server side block definitions * Add changelog file * Revert action priority to its prev value * Check if unstable__bootstrapServerSideBlockDefinitions function exists before call it
This commit is contained in:
parent
c9d4324b43
commit
98b9670848
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Bootstrap server side block definitions
|
|
@ -720,6 +720,11 @@ class Init {
|
|||
// not be the product edit page (it mostly likely isn't).
|
||||
if ( PageController::is_admin_page() ) {
|
||||
$screen->is_block_editor( true );
|
||||
|
||||
wp_add_inline_script(
|
||||
'wp-blocks',
|
||||
'wp.blocks && wp.blocks.unstable__bootstrapServerSideBlockDefinitions && wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue