i trying trigger function when order completed. using code:
add_action('woocommerce_order_status_completed', array($this, 'payment_complete' ), 1);
and function:
public function payment_complete($order_id) { $this->generate_order_file($order_id); }
this function meant generate order file, it's not being called @ all. tried getting add message error log,
i using woocommerce order status control plugin, , orders automatically changing complete upon payment. yet reason woocommerce_order_status_completed action isn't triggering.
i can recommend using query monitor - https://wordpress.org/plugins/query-monitor/ - see hooks have fired on page.
Comments
Post a Comment