diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index e0f793ce..86ea28f4 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -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 */ diff --git a/tests/Model/CheckoutTest.php b/tests/Model/CheckoutTest.php index aeb545f0..e9579ce8 100644 --- a/tests/Model/CheckoutTest.php +++ b/tests/Model/CheckoutTest.php @@ -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();