From eef4749d978752d69ecf064c81ed87fdab88ab18 Mon Sep 17 00:00:00 2001 From: Seghir Nadir Date: Fri, 23 Aug 2024 12:37:33 +0200 Subject: [PATCH] Ensure translation is loaded for new shared file in Checkout Block (#50892) * Ensure translation is loaded for new shared file * add other files * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions --- .../50892-fix-translation-not-loading-for-new-shared-file | 4 ++++ plugins/woocommerce/src/Blocks/AssetsController.php | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 plugins/woocommerce/changelog/50892-fix-translation-not-loading-for-new-shared-file diff --git a/plugins/woocommerce/changelog/50892-fix-translation-not-loading-for-new-shared-file b/plugins/woocommerce/changelog/50892-fix-translation-not-loading-for-new-shared-file new file mode 100644 index 00000000000..93287f6d3df --- /dev/null +++ b/plugins/woocommerce/changelog/50892-fix-translation-not-loading-for-new-shared-file @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Ensure translation is fully loaded for certain parts of Checkout block. \ No newline at end of file diff --git a/plugins/woocommerce/src/Blocks/AssetsController.php b/plugins/woocommerce/src/Blocks/AssetsController.php index 1bb55c0f0c1..13236dc8145 100644 --- a/plugins/woocommerce/src/Blocks/AssetsController.php +++ b/plugins/woocommerce/src/Blocks/AssetsController.php @@ -64,11 +64,11 @@ final class AssetsController { $this->api->register_script( 'wc-price-format', 'assets/client/blocks/price-format.js', array(), false ); // Vendor scripts for blocks frontends (not including cart and checkout). - $this->api->register_script( 'wc-blocks-frontend-vendors', $this->api->get_block_asset_build_path( 'wc-blocks-frontend-vendors-frontend' ), array(), false ); + $this->api->register_script( 'wc-blocks-frontend-vendors', $this->api->get_block_asset_build_path( 'wc-blocks-frontend-vendors-frontend' ), array(), true ); // Cart and checkout frontend scripts. - $this->api->register_script( 'wc-cart-checkout-vendors', $this->api->get_block_asset_build_path( 'wc-cart-checkout-vendors-frontend' ), array(), false ); - $this->api->register_script( 'wc-cart-checkout-base', $this->api->get_block_asset_build_path( 'wc-cart-checkout-base-frontend' ), array(), false ); + $this->api->register_script( 'wc-cart-checkout-vendors', $this->api->get_block_asset_build_path( 'wc-cart-checkout-vendors-frontend' ), array(), true ); + $this->api->register_script( 'wc-cart-checkout-base', $this->api->get_block_asset_build_path( 'wc-cart-checkout-base-frontend' ), array(), true ); $this->api->register_script( 'wc-blocks-checkout', 'assets/client/blocks/blocks-checkout.js' ); $this->api->register_script( 'wc-blocks-components', 'assets/client/blocks/blocks-components.js' );