Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 956b604

Browse files
authored
Use Woo Blocks instead Woo core translation within the Checkout order Summary block (#7995)
* Use Woo Blocks instead Woo core translation * Activale previously skipped e2e tests * Adjust loading order of $shared_chunks, $vendor_chunks and $chunks * Revert chunk order of MiniCart.php
1 parent a044e03 commit 956b604

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/BlockTypes/Cart.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ protected function register_block_type_assets() {
250250
parent::register_block_type_assets();
251251
$chunks = $this->get_chunks_paths( $this->chunks_folder );
252252
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
253-
254-
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks ) );
253+
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
255254
}
256255

257256
/**

src/BlockTypes/Checkout.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ protected function register_block_type_assets() {
415415
parent::register_block_type_assets();
416416
$chunks = $this->get_chunks_paths( $this->chunks_folder );
417417
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
418-
$shared_chunks = [ 'cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend' ];
419-
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks, $shared_chunks ) );
418+
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
420419
}
421420

422421
/**

tests/e2e/specs/shopper/cart-checkout/translations.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe( 'Shopper → Cart & Checkout → Translations', () => {
5353
} );
5454

5555
// The translation of WooCommerce Core is taking over translations of WC Blocks. We have to fix this issue https://github.com/woocommerce/woocommerce-blocks/issues/7775 before we can enable this test.
56-
it.skip( 'User can view translated Checkout block', async () => {
56+
it( 'User can view translated Checkout block', async () => {
5757
await shopper.block.goToCheckout();
5858

5959
const contactHeading = await page.$(

0 commit comments

Comments
 (0)