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

Commit

Permalink
load all JSON translation files correctly (#8034)
Browse files Browse the repository at this point in the history
Co-authored-by: Saad Tarhi <[email protected]>
  • Loading branch information
senadir and tarhi-saad authored Jan 2, 2023
1 parent 32d4605 commit bff4b96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/BlockTypes/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ protected function register_block_type_assets() {
parent::register_block_type_assets();
$chunks = $this->get_chunks_paths( $this->chunks_folder );
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
$shared_chunks = [];
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks, $shared_chunks ) );
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/BlockTypes/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ public static function include_token_id_with_payment_methods( $list_item, $token
protected function register_block_type_assets() {
parent::register_block_type_assets();
$chunks = $this->get_chunks_paths( $this->chunks_folder );
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
$vendor_chunks = $this->get_chunks_paths( 'vendors--checkout-blocks' );
$shared_chunks = [ 'cart-blocks/cart-express-payment--checkout-blocks/express-payment-frontend' ];
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks, $shared_chunks ) );
}

/**
Expand Down

0 comments on commit bff4b96

Please sign in to comment.