Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kevdevleaf

    (@kevdevleaf)

    Thanks Juan

    I tried the approach you suggested, but _ywgc_amount_total is coming through as empty. However, your answer helped me debug further, and I found that the ‘price’ key within the metadata has the correct value. We’ll use this instead of the attribute price from the product object. Thanks for your help!

    Thread Starter kevdevleaf

    (@kevdevleaf)

    Hi Juan, thanks for your response!

    We’re using the gift card price in the order data to send it to GA4 for tracking.
    I do the following to get the order’s data and then the items from the order.
    $order = wc_get_order( $order_id );
    $order_items = $order->get_items();


    We loop through each item in the order $order_items, but when we get to a gift card, the price isn’t right.
    The total value of the order is correct. However, is the gift card item itself that shows the wrong price.

    Given this, should I still try the steps you mentioned?

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)