mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Revert action to re-run migration externally
This commit is contained in:
parent
ba10ef98f3
commit
e38bd8f503
1 changed files with 13 additions and 0 deletions
|
@ -178,6 +178,19 @@ class VaultingModule implements ModuleInterface {
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Allows running migration externally via `do_action('pcp_migrate_payment_tokens')`.
|
||||
*/
|
||||
add_action(
|
||||
'pcp_migrate_payment_tokens',
|
||||
function() use ( $container ) {
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
assert( $logger instanceof LoggerInterface );
|
||||
|
||||
$this->migrate_payment_tokens( $logger );
|
||||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_payment_tokens_migration',
|
||||
function( int $customer_id ) use ( $container ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue