mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Do not run migration if empty key by default
This commit is contained in:
parent
f382ec4bd8
commit
73be9a11d9
1 changed files with 6 additions and 0 deletions
|
@ -236,6 +236,12 @@ class VaultingModule implements ModuleInterface {
|
|||
$timestamp = time();
|
||||
|
||||
foreach ( $customers as $id ) {
|
||||
$metadata_exist = metadata_exists( 'user', $id, 'ppcp-vault-token' );
|
||||
$skip_empty_key_migration = apply_filters( 'ppcp_skip_payment_tokens_empty_key_migration', true );
|
||||
if ( ! $metadata_exist && ! $skip_empty_key_migration ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function already exist in WooCommerce
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue