Skip to content

Commit

Permalink
Fix the incorrect quantity value when sending checkout event tracki…
Browse files Browse the repository at this point in the history
…ng for issue #342.
  • Loading branch information
eason9487 committed Dec 26, 2023
1 parent 7d1a9ea commit d11c908
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/src/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export const trackCheckoutStep =
}

trackEvent( step === 0 ? 'begin_checkout' : 'checkout_progress', {
items: storeCart.cartItems.map( getProductFieldObject ),
items: storeCart.cartItems.map( ( item ) =>
getProductFieldObject( item, item.quantity )
),
coupon: storeCart.cartCoupons[ 0 ]?.code || '',
currency: storeCart.cartTotals.currency_code,
value: formatPrice(
Expand Down

0 comments on commit d11c908

Please sign in to comment.