diff --git a/changelog/chore-remove-woopayments-dev-test-mode-calls b/changelog/chore-remove-woopayments-dev-test-mode-calls new file mode 100644 index 00000000000..0215265352c --- /dev/null +++ b/changelog/chore-remove-woopayments-dev-test-mode-calls @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +chore: remove deprecated is_in_dev_mode() and is_in_test_mode() methods diff --git a/includes/class-wc-payment-gateway-wcpay.php b/includes/class-wc-payment-gateway-wcpay.php index 136a8eaa4b6..f795a7514b7 100644 --- a/includes/class-wc-payment-gateway-wcpay.php +++ b/includes/class-wc-payment-gateway-wcpay.php @@ -4507,34 +4507,6 @@ public function find_duplicates() { return $this->duplicate_payment_methods_detection_service->find_duplicates(); } - // Start: Deprecated functions. - - /** - * Check the defined constant to determine the current plugin mode. - * - * @deprecated 5.6.0 - * - * @return bool - */ - public function is_in_dev_mode() { - wc_deprecated_function( __FUNCTION__, '5.6.0', 'WC_Payments::mode()->is_dev()' ); - return WC_Payments::mode()->is_dev(); - } - - /** - * Returns whether test_mode or dev_mode is active for the gateway - * - * @deprecated 5.6.0 - * - * @return boolean Test mode enabled if true, disabled if false - */ - public function is_in_test_mode() { - wc_deprecated_function( __FUNCTION__, '5.6.0', 'WC_Payments::mode()->is_test()' ); - return WC_Payments::mode()->is_test(); - } - - // End: Deprecated functions. - /** * Determine whether redirection is needed for the non-card UPE payment method. * diff --git a/tests/unit/test-class-wc-payment-gateway-wcpay.php b/tests/unit/test-class-wc-payment-gateway-wcpay.php index b97fad22eea..b638c07e6dd 100644 --- a/tests/unit/test-class-wc-payment-gateway-wcpay.php +++ b/tests/unit/test-class-wc-payment-gateway-wcpay.php @@ -3444,41 +3444,6 @@ public function is_woopay_falsy_value_provider() { ]; } - /** - * @expectedDeprecated is_in_dev_mode - */ - public function test_is_in_dev_mode() { - $mode = WC_Payments::mode(); - - $mode->dev(); - $this->assertTrue( $this->card_gateway->is_in_dev_mode() ); - - $mode->live_mode_onboarding(); - $this->assertFalse( $this->card_gateway->is_in_dev_mode() ); - - $mode->live(); - $this->assertFalse( $this->card_gateway->is_in_dev_mode() ); - } - - /** - * @expectedDeprecated is_in_test_mode - */ - public function test_is_in_test_mode() { - $mode = WC_Payments::mode(); - - $mode->dev(); - $this->assertTrue( $this->card_gateway->is_in_test_mode() ); - - $mode->test_mode_onboarding(); - $this->assertTrue( $this->card_gateway->is_in_test_mode() ); - - $mode->test(); - $this->assertTrue( $this->card_gateway->is_in_test_mode() ); - - $mode->live(); - $this->assertFalse( $this->card_gateway->is_in_test_mode() ); - } - /** * Create a partial mock for WC_Payment_Gateway_WCPay class. *