mirror of
https://github.com/10h30/woo-viet.git
synced 2026-07-11 18:56:13 +09:00
Improve calling the cron job queryDR, avoid adding the note 2 times to the order
Issue: OnePay Gateway - For the type return, the $order->add_order_note() run 2 times #19
This commit is contained in:
@@ -145,11 +145,13 @@ class WooViet {
|
||||
|
||||
// Add the action to check the cron job for handling queryDR
|
||||
// It's not possible to add in the class "WooViet_OnePay_Domestic_Hook" because it's NOT always loadded
|
||||
if ( defined( 'DOING_CRON' ) and DOING_CRON ) {
|
||||
$this->WooViet_OnePay_Domestic_Hook = new WooViet_OnePay_Domestic();
|
||||
add_action( 'wooviet_handle_onepay_querydr', array(
|
||||
$this->WooViet_OnePay_Domestic_Hook,
|
||||
'handle_onepay_querydr'
|
||||
), 10, 1 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user