Skip to content

Commit

Permalink
removing unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
ReArmel committed Oct 15, 2024
1 parent a2f1c1f commit 5f48dbb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
17 changes: 0 additions & 17 deletions src/Model/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,23 +570,6 @@ public static function getRecurrenceCycle()
return null;
}

/**
* @return boolean
*/
public static function getPaymentOrigin()
{
if (!self::hasSubscriptionPlugin()) {
return null;
}
if (wcs_cart_contains_renewal()) {
return "subsequent";
}
if (\WC_Subscriptions_Cart::cart_contains_subscription()) {
return "first";
}
return null;
}

/**
* @return boolean
*/
Expand Down
3 changes: 1 addition & 2 deletions tests/Model/CheckoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ public function testProcessWithTdsAuthenticatedCreditCardPaymentMethodShouldSetA
$subscriptionMock = Mockery::mock('alias:Woocommerce\Pagarme\Model\Subscription');
$subscriptionMock->shouldReceive('getRecurrenceCycle')
->andReturnNull();

$subscriptionMock = Mockery::mock('alias:Woocommerce\Pagarme\Model\Subscription');

$subscriptionMock->shouldReceive('getPaymentOrigin')
->andReturnNull();

Expand Down

0 comments on commit 5f48dbb

Please sign in to comment.