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

load all JSON translation files correctly #8034

Merged
merged 2 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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