mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix ApplePay token update
This commit is contained in:
parent
8d82e51506
commit
0cf3f946c6
2 changed files with 7 additions and 2 deletions
|
@ -105,8 +105,13 @@ class VaultingModule implements ModuleInterface {
|
|||
return $tokens;
|
||||
}
|
||||
|
||||
$is_post = isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST';
|
||||
|
||||
// Exclude ApplePay tokens from payment pages.
|
||||
if ( is_checkout() || is_cart() || is_product() ) {
|
||||
if (
|
||||
( is_checkout() || is_cart() || is_product() )
|
||||
&& ! $is_post // Don't check on POST so we have all payment methods on form submissions.
|
||||
) {
|
||||
foreach ( $tokens as $index => $token ) {
|
||||
if ( $token instanceof PaymentTokenApplePay ) {
|
||||
unset( $tokens[ $index ] );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue