mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Delete WC payment token if it does not exist for user
This commit is contained in:
parent
2c8aecde76
commit
4f9800079f
2 changed files with 3 additions and 0 deletions
|
@ -256,6 +256,7 @@ class RenewalHandler {
|
|||
$customer_tokens = $this->payment_tokens_endpoint->payment_tokens_for_customer( $customer_id );
|
||||
foreach ( $wc_tokens as $token ) {
|
||||
if ( ! in_array( $token->get_token(), $customer_tokens, true ) ) {
|
||||
$token->delete();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue