Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter ponnus

    (@ponnus)

    Thankyou for the reply.

    While looking through the code of ‘create_order’ api endpoint, I found that the webhook for applying coupon is called there.
    do_action( 'woocommerce_order_add_coupon', $this->id, $item_id, $code, $discount_amount, $discount_amount_tax );
    in add_coupon(). But i didn’t find the add_action(‘woocommerce_order_add_coupon’,…). Can you tell me where should I write this action definition so that it shouldn’t get overwritten when updating woocommerce.

    Thank you

Viewing 1 replies (of 1 total)