mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Allow credit card gateway to use saved credit cards
This commit is contained in:
parent
38d1b1ad9d
commit
fd7dfaf13b
10 changed files with 229 additions and 16 deletions
|
@ -58,6 +58,24 @@ class SubscriptionModule implements ModuleInterface {
|
|||
10,
|
||||
2
|
||||
);
|
||||
|
||||
/*
|
||||
add_action('woocommerce_init', function () use($container) {
|
||||
$api = $container->get('api.endpoint.payment-token' );
|
||||
try {
|
||||
$tokens = $api->for_user(1);
|
||||
|
||||
for($i = 0; $i < count($tokens); $i++) {
|
||||
$api->delete_token($tokens[$i]);
|
||||
}
|
||||
|
||||
$a = 1;
|
||||
} catch (RuntimeException $exception) {
|
||||
$a = 1;
|
||||
}
|
||||
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue