mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Add create payment token for credit card (work in progress)
This commit is contained in:
parent
da4388c507
commit
1783467af4
5 changed files with 157 additions and 3 deletions
|
@ -111,7 +111,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
$tokens = $payment_token_repository->all_for_user_id( $subscription->get_customer_id() );
|
||||
if ( $tokens ) {
|
||||
$subscription_id = $subscription->get_id();
|
||||
$latest_token_id = end( $tokens )->id() ?: '';
|
||||
$latest_token_id = end( $tokens )->id() ? end( $tokens )->id() : '';
|
||||
update_post_meta( $subscription_id, 'payment_token_id', $latest_token_id, true );
|
||||
}
|
||||
} catch ( RuntimeException $error ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue