diff --git a/src/BlockTypesController.php b/src/BlockTypesController.php index cde7e79dc89..962d18b2692 100644 --- a/src/BlockTypesController.php +++ b/src/BlockTypesController.php @@ -158,7 +158,7 @@ public function hide_legacy_widgets_with_block_equivalent( $widget_types ) { * @return array */ protected function get_block_types() { - global $wp_version, $pagenow; + global $pagenow; $block_types = [ 'AllReviews', @@ -194,20 +194,10 @@ protected function get_block_types() { 'ProductSummary', 'ProductTagList', 'ProductTitle', + 'MiniCart', + 'MiniCartContents', ]; - /** - * Mini Cart blocks should be available in Site Editor, Widgets and frontend (is_admin function checks this) only. - */ - if ( - ! 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'; - $block_types[] = 'MiniCartContents'; - } - if ( Package::feature()->is_feature_plugin_build() ) { $block_types[] = 'Checkout'; $block_types[] = 'Cart';