Move create wc card payment method to helper class

This commit is contained in:
Emili Castells Guasch 2024-01-08 14:39:44 +01:00
parent 018b497611
commit f081fc2392

View file

@ -132,6 +132,13 @@ class WooCommercePaymentTokens {
$token->set_card_type( $brand );
}
try {
$token->save();
} catch ( Exception $exception ) {
$this->logger->error(
"Could not create WC payment token card for customer {$customer_id}. " . $exception->getMessage()
);
}
$token->save();
}
}