Skip to content

Commit

Permalink
Merge pull request #1959 from woocommerce/do-not-save-customer-id-met…
Browse files Browse the repository at this point in the history
…a-if-vault-v3

Do not save customer id in meta if vault v3 enabled
  • Loading branch information
Dinamiko authored Jan 16, 2024
2 parents dd6293c + 6174ace commit a979ec2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/ppcp-vaulting/src/VaultingModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public function run( ContainerInterface $container ): void {
$subscription_helper = $container->get( 'wc-subscriptions.helper' );
add_action(
'woocommerce_created_customer',
function( int $customer_id ) use ( $subscription_helper ) {
function( int $customer_id ) use ( $subscription_helper, $container ) {
if ( $container->has( 'save-payment-methods.eligible' ) && $container->get( 'save-payment-methods.eligible' ) ) {
return;
}

$session = WC()->session;
if ( ! $session ) {
return;
Expand Down

0 comments on commit a979ec2

Please sign in to comment.