mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Do not return stored tokens in meta but call the endpoint each time
This commit is contained in:
parent
179b1b2b81
commit
5afbfb0e3b
4 changed files with 3911 additions and 8 deletions
|
@ -223,9 +223,8 @@ class SmartButton implements SmartButtonInterface {
|
|||
|
||||
$tokens = $payment_token_repository->all_for_user_id( 1 );
|
||||
if ( $tokens && $this->tokens_contains_card( $tokens ) ) {
|
||||
|
||||
$output = sprintf(
|
||||
'<select id="saved-credit-card" name="saved_credit_card"><option value="">%s</option>',
|
||||
'<p class="form-row form-row-wide"><label>Or select a saved Credit Card payment</label><select id="saved-credit-card" name="saved_credit_card"><option value="">%s</option>',
|
||||
esc_html__( 'Choose a saved payment', 'woocommerce-paypal-payments' )
|
||||
);
|
||||
foreach ( $tokens as $token ) {
|
||||
|
@ -238,7 +237,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
);
|
||||
}
|
||||
}
|
||||
$output .= '</select>';
|
||||
$output .= '</select></p>';
|
||||
|
||||
$default_fields['saved-credit-card'] = $output;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue