Skip to content

Commit

Permalink
Add support for bundled product price in Block handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec committed Jun 18, 2024
1 parent 3061687 commit 7860b3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const getProductFieldObject = ( product, quantity ) => {
...getProductCategories( product ),
quantity: product.quantity ?? quantity,
price: formatPrice(
product.prices.price,
// Use line total for bundled products, if available.
product.totals?.line_total || product.prices.price,
product.prices.currency_minor_unit
),
...variantData,
Expand Down

0 comments on commit 7860b3c

Please sign in to comment.