• Resolved dalibormo

    (@dalibormo)


    Hi, great plugin.
    I use your Cart based percentage discount to add a discount when the cart Subtotal is higher than added value, and everything works perfectly. The thing is that I have to export all my orders as xml so I need Percentage discount value in PHP to print it in my XML.

    I get the other data from the order in XML like:
    $order = wc_get_order( $order_id );
    $billing_phone = $order->get_billing_phone();
    $billing_email = $order->get_billing_email();
    and so on.
    Now I need to set the Percentage discount value in my XML. I set the discount to 10 percent if the subtotal is greater than 500, so I need this data->10.

    Can I get that data from wc_get_order() function, or in any other way?

    Thank you very much.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get Percentage Value in PHP’ is closed to new replies.