get_all_registered() as $block_type ) { if ( 0 === strpos( $block_type->name, 'core/' ) ) { unregister_block_type( $block_type->name ); } } }, 99 ); // Site-wide only for nuclear: strip the WC Blocks admin asset-data payload. if ( is_admin() ) { add_action( 'woocommerce_blocks_loaded', static function (): void { if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Package' ) ) { return; } try { $asset_data = \Automattic\WooCommerce\Blocks\Package::container() ->get( \Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry::class ); remove_action( 'admin_print_footer_scripts', array( $asset_data, 'enqueue_asset_data' ), 1 ); } catch ( \Throwable $e ) { unset( $e ); // DI miss or hook shape changed on this WC version — safe to ignore. } } ); } }