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

Commit 9a3c684

Browse files
committed
consider price ranges on current price
1 parent 36af9c1 commit 9a3c684

File tree

2 files changed

+6
-0
lines changed
  • assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price

2 files changed

+6
-0
lines changed

assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const Block = ( {
1818
attributes,
1919
context,
2020
rawPrice,
21+
minPrice,
22+
maxPrice,
2123
currency,
2224
}: Props ): JSX.Element | null => {
2325
const { className } = attributes;
@@ -51,6 +53,8 @@ const Block = ( {
5153
price={
5254
isDescendentOfSingleProductTemplate ? pricePreview : rawPrice
5355
}
56+
minPrice={ minPrice }
57+
maxPrice={ maxPrice }
5458
/>
5559
);
5660
};

assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/edit.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const CurrentPriceEdit = ( { attributes, context }: Props ): JSX.Element => {
3333
currency,
3434
context,
3535
rawPrice: currentPrice,
36+
minPrice: product?.prices?.price_range?.min_amount,
37+
maxPrice: product?.prices?.price_range?.max_amount,
3638
priceType: 'current',
3739
};
3840
return (

0 commit comments

Comments
 (0)