mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Move create wc card payment method to helper class
This commit is contained in:
parent
018b497611
commit
f081fc2392
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue