woocommerce / pinterest-for-woocommerce

A native Pinterest integration for WooCommerce. Development is managed by Ventures.
https://woo.com/products/pinterest-for-woocommerce/
GNU General Public License v3.0
22 stars 9 forks source link

v5: Order value is calculated incorrectly in checkout #946

Closed adarshakb closed 4 months ago

adarshakb commented 4 months ago

Describe the bug:

The value is defined as "Total value of the event. Accepted as a string in the request; it will be parsed into a double. For example, if there are two items in a checkout event, the value should be the total price. We recommend to use pre-tax, pre-shipping value"

Steps to reproduce:

  1. Add items to cart
  2. checkout
  3. Check the value

Expected behavior:

$40

Actual behavior:

$160

Additional details:

This looks to be sent correctly in CAPI

2024-03-18T22:29:17+00:00 Debug Sending Pinterest Conversions API event Checkout with a payload: {"event_id":"checkout65f8c03d50265","custom_data":{"currency":"USD","value":"40.00","content_ids":["15"],"contents":[{"id":"15","item_price":"10","quantity":4}],"num_items":4},"event_name":"checkout","action_source":"web","event_time":1710800957,"event_source_url":"https:\/\/joyfully-chief-kingdom.jurassic.ninja\/checkout\/order-received\/17","partner_name":"ss-woocommerce","user_data":{"client_ip_address":"130.41.57.11","client_user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/122.0.0.0 Safari\/537.36"},"language":"en"}

Screenshot 2024-03-18 at 3 29 41 PM

ecgan commented 4 months ago

I can reproduce the issue. The following screenshot shows that my checkout total is USD 36.00 (USD 18.00 * 2 units), but the Pinterest tag helper shows "Value: 72", which should be "Value: 36":

image