0

We want to create a coupon for customers after a order is completed. Unfortunately the action hook seems to not be fired.

Any idea why this doesn't do it's job?

add_action('woocommerce_order_status_changed', 'so_status_completed', 10, 3);    
function so_status_completed($order_id, $old_status, $new_status) {
    //do stuff
}

Need to get the code running after the admin sets the order to completed in the backend.

boehmo
  • 1
  • 1

0 Answers0