diff --git a/includes/compat/class-wc-stripe-subscriptions-legacy-sepa-token-update.php b/includes/compat/class-wc-stripe-subscriptions-legacy-sepa-token-update.php index 9925537a4..c6cc78ad0 100644 --- a/includes/compat/class-wc-stripe-subscriptions-legacy-sepa-token-update.php +++ b/includes/compat/class-wc-stripe-subscriptions-legacy-sepa-token-update.php @@ -129,7 +129,7 @@ private function set_subscription_updated_payment_method( WC_Subscription $subsc // Bail out, if the source object isn't expected to be migrated. eg Card sources are not migrated. if ( isset( $source_object->type ) && 'card' === $source_object->type ) { - throw new \Exception( sprintf( 'Skipping migration of subscription #%d. Source is a card.', $subscription->get_id() ) ); + throw new \Exception( sprintf( 'Skipping migration of Source for subscription #%d. Source is a card.', $subscription->get_id() ) ); } // Bail out if the src_ hasn't been migrated to pm_ yet. diff --git a/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php b/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php index 498248b8e..5270c1643 100644 --- a/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php +++ b/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php @@ -334,12 +334,6 @@ function ( $id ) { // Confirm the subscription's payment method remains the same. $this->assertEquals( $pm_id, $subscription->get_meta( self::SOURCE_ID_META_KEY ) ); - - // Confirm a note is added when the Source wasn't migrated to PaymentMethods. - $this->assertEquals( - 'Stripe Gateway: A Source is used for renewals but could not be updated to PaymentMethods. Reason: The subscription is not using a Stripe Source for renewals.', - $notes[0]->content - ); } public function test_maybe_update_subscription_legacy_payment_method_adds_note_when_source_not_migrated() { @@ -367,12 +361,6 @@ function ( $id ) { // Confirm the subscription's payment method remains the same. $this->assertEquals( $source_id, $subscription->get_meta( self::SOURCE_ID_META_KEY ) ); - - // Confirm a note is added when the Source wasn't migrated to PaymentMethods. - $this->assertEquals( - 'Stripe Gateway: A Source is used for renewals but could not be updated to PaymentMethods. Reason: The Source has not been migrated to PaymentMethods on the Stripe account.', - $notes[0]->content - ); } /**