Don't filter tokens on changing payment method of a subscription

This commit is contained in:
Akeda Bagus 2025-08-27 23:37:01 +07:00
parent f6b26a33ac
commit 93398c95b7
No known key found for this signature in database
GPG key ID: B21A9FC4B7761412

View file

@ -128,6 +128,10 @@ class VaultingModule implements ServiceModule, ExtendingModule, ExecutableModule
return $tokens;
}
if ( isset( $_GET['change_payment_method'] ) && is_wc_endpoint_url( 'order-pay' ) ) {
return $tokens;
}
$is_post = isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST';
// Exclude ApplePay tokens from payment pages.