Fix: Mini Cart block isn't available in the Customizer > Widget (https://github.com/woocommerce/woocommerce-blocks/pull/6201)
This commit is contained in:
parent
5415c22251
commit
d5503b6e46
|
@ -190,8 +190,8 @@ final class BlockTypesController {
|
|||
* Mini Cart blocks should be available in Site Editor, Widgets and frontend (is_admin function checks this) only.
|
||||
*/
|
||||
if (
|
||||
'widgets.php' === $pagenow ||
|
||||
'site-editor.php' === $pagenow || ! is_admin() ||
|
||||
! is_admin() ||
|
||||
in_array( $pagenow, [ 'widgets.php', 'customize.php', 'site-editor.php' ], true ) ||
|
||||
! empty( $_GET['page'] ) && 'gutenberg-edit-site' === $_GET['page'] // phpcs:ignore WordPress.Security.NonceVerification
|
||||
) {
|
||||
$block_types[] = 'MiniCart';
|
||||
|
@ -201,7 +201,6 @@ final class BlockTypesController {
|
|||
if ( Package::feature()->is_feature_plugin_build() ) {
|
||||
$block_types[] = 'Checkout';
|
||||
$block_types[] = 'Cart';
|
||||
|
||||
}
|
||||
|
||||
if ( Package::feature()->is_experimental_build() ) {
|
||||
|
|
Loading…
Reference in New Issue