mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Merge pull request #173 from woocommerce/PCP-110-make-orders-skip-status-on-hold-
Do not send customer email when order status is on hold
This commit is contained in:
commit
29d0ddb379
1 changed files with 12 additions and 0 deletions
|
@ -135,6 +135,18 @@ class WcGatewayModule implements ModuleInterface {
|
||||||
$endpoint->handle_request();
|
$endpoint->handle_request();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_filter(
|
||||||
|
'woocommerce_email_recipient_customer_on_hold_order',
|
||||||
|
function( $recipient, $order ) {
|
||||||
|
if ( $order->get_payment_method() === PayPalGateway::ID || $order->get_payment_method() === CreditCardGateway::ID ) {
|
||||||
|
$recipient = '';
|
||||||
|
}
|
||||||
|
return $recipient;
|
||||||
|
},
|
||||||
|
10,
|
||||||
|
2
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue