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

Commit

Permalink
consider price ranges on current price
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed Jun 12, 2023
1 parent 36af9c1 commit 9a3c684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const Block = ( {
attributes,
context,
rawPrice,
minPrice,
maxPrice,
currency,
}: Props ): JSX.Element | null => {
const { className } = attributes;
Expand Down Expand Up @@ -51,6 +53,8 @@ const Block = ( {
price={
isDescendentOfSingleProductTemplate ? pricePreview : rawPrice
}
minPrice={ minPrice }
maxPrice={ maxPrice }
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const CurrentPriceEdit = ( { attributes, context }: Props ): JSX.Element => {
currency,
context,
rawPrice: currentPrice,
minPrice: product?.prices?.price_range?.min_amount,
maxPrice: product?.prices?.price_range?.max_amount,
priceType: 'current',
};
return (
Expand Down

0 comments on commit 9a3c684

Please sign in to comment.