diff --git a/packages/js/extend-cart-checkout-block/$slug.php.mustache b/packages/js/extend-cart-checkout-block/$slug.php.mustache index 1a4c7ba296b..3efbb916321 100644 --- a/packages/js/extend-cart-checkout-block/$slug.php.mustache +++ b/packages/js/extend-cart-checkout-block/$slug.php.mustache @@ -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', diff --git a/packages/js/extend-cart-checkout-block/changelog/fix-enqueue-styles-extend-cart-checkout-block b/packages/js/extend-cart-checkout-block/changelog/fix-enqueue-styles-extend-cart-checkout-block new file mode 100644 index 00000000000..678a8b6c2da --- /dev/null +++ b/packages/js/extend-cart-checkout-block/changelog/fix-enqueue-styles-extend-cart-checkout-block @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Prevent doing_it_wrong warnings while registering the example block. diff --git a/packages/js/extend-cart-checkout-block/index.js b/packages/js/extend-cart-checkout-block/index.js index 325e7711b22..28f6aa8637e 100644 --- a/packages/js/extend-cart-checkout-block/index.js +++ b/packages/js/extend-cart-checkout-block/index.js @@ -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', ], },