Skip to content

Commit

Permalink
Remove tests which confirm order note was added
Browse files Browse the repository at this point in the history
  • Loading branch information
james-allan committed Oct 31, 2024
1 parent d4ab45c commit e825e0c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
);
}

/**
Expand Down

0 comments on commit e825e0c

Please sign in to comment.