Fix wrong payment method when getting wc payment tokens for card payment

This commit is contained in:
Emili Castells Guasch 2024-03-22 11:04:32 +01:00
parent 16a8c9a313
commit 04be31b065

View file

@ -339,7 +339,7 @@ class RenewalHandler {
$customer_tokens = array();
}
$wc_tokens = WC_Payment_Tokens::get_customer_tokens( $user_id, PayPalGateway::ID );
$wc_tokens = WC_Payment_Tokens::get_customer_tokens( $user_id, CreditCardGateway::ID );
if ( $customer_tokens && empty( $wc_tokens ) ) {
foreach ( $customer_tokens as $customer_token ) {