Skip to content

Commit

Permalink
Remove any stale 'delayed' meta from the users subscriptions on update
Browse files Browse the repository at this point in the history
  • Loading branch information
mattallan committed Nov 29, 2024
1 parent efa6dc7 commit f37fdc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/class-wc-subscriptions-change-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ public static function update_all_payment_methods_from_subscription( $subscripti
continue;
}

// Clear any stale _delayed_update_payment_method_all meta existing on the users other subscriptions if it exists.
$user_subscription->delete_meta_data( '_delayed_update_payment_method_all' );

self::update_payment_method( $user_subscription, $new_payment_method, $payment_meta_table );

$user_subscription->set_requires_manual_renewal( false );
Expand Down

0 comments on commit f37fdc6

Please sign in to comment.