get( \Automattic\WooCommerce\Blocks\BlockPatterns::class ); try { remove_action( 'init', array( $bp, 'register_block_patterns' ) ); } catch ( \Throwable $e ) { unset( $e ); // Method missing on this WC version — safe to ignore. } try { remove_action( 'init', array( $bp, 'register_ptk_patterns' ) ); } catch ( \Throwable $e ) { unset( $e ); // Method missing on this WC version — safe to ignore. } } catch ( \Throwable $e ) { unset( $e ); // DI miss — safe to ignore. } if ( in_array( $mode, array( 'blocks', 'keep-styles', 'all', 'nuclear' ), true ) ) { try { $btc = \Automattic\WooCommerce\Blocks\Package::container() ->get( \Automattic\WooCommerce\Blocks\BlockTypesController::class ); remove_action( 'init', array( $btc, 'register_blocks' ) ); } catch ( \Throwable $e ) { unset( $e ); // DI miss — safe to ignore. } } } ); }