Created
April 16, 2024 15:08
-
-
Save MarieComet/dd8e7f3869232ef5becaadd082089e02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Automattic\WooCommerce\Blocks\Package; | |
/* | |
Plugin Name: Remove WooCommerce patterns | |
Version: 1.0.0 | |
Plugin URI: https://mariecomet.fr/ | |
Description: Remove all WooCommerce patterns | |
Author: Marie Comet | |
Author URI: https://mariecomet.fr/ | |
Contributors: rahe, chaton666, beapi | |
/** | |
* Remove WooCommerce patterns | |
* | |
* @return void | |
*/ | |
function prefix_remove_wc_patterns(): void { | |
remove_action( | |
'init', | |
[ | |
Package::container()->get( \Automattic\WooCommerce\Blocks\BlockPatterns::class ), | |
'register_block_patterns' | |
] | |
); | |
} | |
add_action( 'woocommerce_blocks_loaded', 'prefix_remove_wc_patterns' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice ! Thank you ! 🙏