mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Do not schedule check saved payment if subscription behavior when fail is capture auth
This commit is contained in:
parent
2e814c8d38
commit
ac31130649
1 changed files with 7 additions and 0 deletions
|
@ -53,6 +53,13 @@ trait ProcessPaymentTrait {
|
||||||
* @param int $customer_id The customer ID.
|
* @param int $customer_id The customer ID.
|
||||||
*/
|
*/
|
||||||
protected function schedule_saved_payment_check( int $wc_order_id, int $customer_id ): void {
|
protected function schedule_saved_payment_check( int $wc_order_id, int $customer_id ): void {
|
||||||
|
if (
|
||||||
|
$this->config->has( 'subscription_behavior_when_vault_fails' )
|
||||||
|
&& $this->config->get( 'subscription_behavior_when_vault_fails' ) === 'capture_auth'
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
as_schedule_single_action(
|
as_schedule_single_action(
|
||||||
time() + ( 1 * MINUTE_IN_SECONDS ),
|
time() + ( 1 * MINUTE_IN_SECONDS ),
|
||||||
'woocommerce_paypal_payments_check_saved_payment',
|
'woocommerce_paypal_payments_check_saved_payment',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue