Prevent PHP `doing_it_wrong` warnings in extend-cart-checkout-block package (#52195)
This commit is contained in:
parent
fa2ce01246
commit
cf8b0d5a1a
|
@ -18,9 +18,17 @@
|
|||
*
|
||||
* @package {{namespace}}
|
||||
*/
|
||||
add_action( 'woocommerce_blocks_loaded',
|
||||
|
||||
add_action(
|
||||
'init',
|
||||
function () {
|
||||
register_block_type_from_metadata( __DIR__ . '/build/js/checkout-newsletter-subscription-block' );
|
||||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
'woocommerce_blocks_loaded',
|
||||
function () {
|
||||
require_once __DIR__ . '/{{slug}}-blocks-integration.php';
|
||||
add_action(
|
||||
'woocommerce_blocks_cart_block_registration',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Prevent doing_it_wrong warnings while registering the example block.
|
|
@ -4,7 +4,7 @@ module.exports = {
|
|||
npmDevDependencies: [
|
||||
'@woocommerce/dependency-extraction-webpack-plugin',
|
||||
'@woocommerce/eslint-plugin',
|
||||
'@wordpress/prettier-config',
|
||||
'@wordpress/prettier-config@2.25.13',
|
||||
'@wordpress/scripts',
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue