diff --git a/includes/class-wc-payment-gateway-wcpay.php b/includes/class-wc-payment-gateway-wcpay.php index d7a3a433e42..f3f81601e90 100644 --- a/includes/class-wc-payment-gateway-wcpay.php +++ b/includes/class-wc-payment-gateway-wcpay.php @@ -3614,12 +3614,12 @@ public static function is_current_page_settings() { * Isolated as a separate method in order to be available both * during the classic checkout, as well as the checkout block. * - * @deprecated use WC_Payments_UPE_Checkout::get_payment_fields_js_config instead. + * @deprecated use WC_Payments_Checkout::get_payment_fields_js_config instead. * * @return array */ public function get_payment_fields_js_config() { - wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_UPE_Checkout::get_payment_fields_js_config' ); + wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_Checkout::get_payment_fields_js_config' ); return WC_Payments::get_wc_payments_checkout()->get_payment_fields_js_config(); } diff --git a/includes/class-wc-payments-blocks-payment-method.php b/includes/class-wc-payments-blocks-payment-method.php index b9908dad952..8172cab1438 100644 --- a/includes/class-wc-payments-blocks-payment-method.php +++ b/includes/class-wc-payments-blocks-payment-method.php @@ -7,7 +7,7 @@ use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType; use WCPay\Fraud_Prevention\Fraud_Prevention_Service; -use WCPay\WC_Payments_UPE_Checkout; +use WCPay\WC_Payments_Checkout; use WCPay\WooPay\WooPay_Utilities; /** @@ -24,7 +24,7 @@ class WC_Payments_Blocks_Payment_Method extends AbstractPaymentMethodType { /** * WC Payments Checkout * - * @var WC_Payments_UPE_Checkout + * @var WC_Payments_Checkout */ private $wc_payments_checkout; diff --git a/includes/class-wc-payments-upe-checkout.php b/includes/class-wc-payments-checkout.php similarity index 99% rename from includes/class-wc-payments-upe-checkout.php rename to includes/class-wc-payments-checkout.php index 94cf5d8f2f0..9851a2ea0c2 100644 --- a/includes/class-wc-payments-upe-checkout.php +++ b/includes/class-wc-payments-checkout.php @@ -1,6 +1,6 @@ init_hooks(); self::$wc_payments_checkout->init_hooks(); @@ -1182,9 +1182,9 @@ public static function get_gateway() { } /** - * Returns the WC_Payments_UPE_Checkout instance + * Returns the WC_Payments_Checkout instance * - * @return WC_Payments_UPE_Checkout gateway instance + * @return WC_Payments_Checkout gateway instance */ public static function get_wc_payments_checkout() { return self::$wc_payments_checkout; diff --git a/includes/payment-methods/class-upe-payment-gateway.php b/includes/payment-methods/class-upe-payment-gateway.php index a8cfbbfced1..b1ba28589b6 100644 --- a/includes/payment-methods/class-upe-payment-gateway.php +++ b/includes/payment-methods/class-upe-payment-gateway.php @@ -854,7 +854,7 @@ public function is_proper_intent_used_with_order( $order, $intent_id_from_reques * @return array */ public function get_payment_fields_js_config() { - wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_UPE_Checkout::get_payment_fields_js_config' ); + wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_Checkout::get_payment_fields_js_config' ); return WC_Payments::get_wc_payments_checkout()->get_payment_fields_js_config(); } @@ -1111,7 +1111,7 @@ private function validate_order_id_received_vs_intent_meta_order_id( WC_Order $o * @return array */ private function get_enabled_payment_method_config() { - wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_UPE_Checkout::get_enabled_payment_method_config' ); + wc_deprecated_function( __FUNCTION__, '5.0.0', 'WC_Payments_Checkout::get_enabled_payment_method_config' ); return WC_Payments::get_wc_payments_checkout()->get_enabled_payment_method_config(); } diff --git a/src/Internal/DependencyManagement/DelegateContainer/LegacyContainer.php b/src/Internal/DependencyManagement/DelegateContainer/LegacyContainer.php index 5a1c09ca36c..bf4854a70ba 100644 --- a/src/Internal/DependencyManagement/DelegateContainer/LegacyContainer.php +++ b/src/Internal/DependencyManagement/DelegateContainer/LegacyContainer.php @@ -89,11 +89,11 @@ private function get_wcpay_woopay_tracker_instance() { } /** - * Returns the WC_Payments_UPE_Checkout instance. + * Returns the WC_Payments_Checkout instance. * - * @return \WCPay\WC_Payments_UPE_Checkout + * @return \WCPay\WC_Payments_Checkout */ - private function get_wcpay_wc_payments_upe_checkout_instance() { + private function get_wcpay_wc_payments_checkout_instance() { return WC_Payments::get_wc_payments_checkout(); } diff --git a/src/Internal/DependencyManagement/DelegateContainer/REAMDE.md b/src/Internal/DependencyManagement/DelegateContainer/REAMDE.md index f998ffcd18e..f1819e4913b 100644 --- a/src/Internal/DependencyManagement/DelegateContainer/REAMDE.md +++ b/src/Internal/DependencyManagement/DelegateContainer/REAMDE.md @@ -41,7 +41,7 @@ This is a list of the currently supported legacy classes by the container. - `WCPay\Core\Mode` - `WC_Payment_Gateway_WCPay` - `WCPay\WooPay_Tracker` -- `WCPay\WC_Payments_UPE_Checkout` +- `WCPay\WC_Payments_Checkout` - `WCPay\Database_Cache` - `WC_Payments_Account` - `WC_Payments_API_Client` diff --git a/tests/unit/src/Internal/DependencyManagement/DelegateContainer/LegacyContainerTest.php b/tests/unit/src/Internal/DependencyManagement/DelegateContainer/LegacyContainerTest.php index e690599d0c5..584785b4621 100644 --- a/tests/unit/src/Internal/DependencyManagement/DelegateContainer/LegacyContainerTest.php +++ b/tests/unit/src/Internal/DependencyManagement/DelegateContainer/LegacyContainerTest.php @@ -40,7 +40,7 @@ public function available_classes_provider() { [ \WCPay\Core\Mode::class ], [ \WC_Payment_Gateway_WCPay::class ], [ \WCPay\WooPay_Tracker::class ], - [ \WCPay\WC_Payments_UPE_Checkout::class ], + [ \WCPay\WC_Payments_Checkout::class ], [ \WCPay\Database_Cache::class ], [ \WC_Payments_Account::class ], [ \WC_Payments_API_Client::class ], diff --git a/tests/unit/test-class-wc-payments-upe-checkout.php b/tests/unit/test-class-wc-payments-upe-checkout.php index e10ae9630f6..26142380aa5 100644 --- a/tests/unit/test-class-wc-payments-upe-checkout.php +++ b/tests/unit/test-class-wc-payments-upe-checkout.php @@ -5,7 +5,7 @@ * @package WooCommerce\Payments\Tests */ -use WCPay\WC_Payments_UPE_Checkout; +use WCPay\WC_Payments_Checkout; use PHPUnit\Framework\MockObject\MockObject; use WCPay\Constants\Payment_Method; use WCPay\Payment_Methods\UPE_Split_Payment_Gateway; @@ -22,16 +22,16 @@ use WCPay\Payment_Methods\Sofort_Payment_Method; /** - * Class WC_Payments_UPE_Checkout_Test + * Class WC_Payments_Checkout_Test * * @package WooCommerce\Payments\Tests */ -class WC_Payments_UPE_Checkout_Test extends WP_UnitTestCase { +class WC_Payments_Checkout_Test extends WP_UnitTestCase { /** * Holds the object, which will be tested. * - * @var WC_Payments_UPE_Checkout + * @var WC_Payments_Checkout */ private $system_under_test; @@ -126,7 +126,7 @@ function ( $output ) { } ); - $this->system_under_test = new WC_Payments_UPE_Checkout( $this->mock_wcpay_gateway, $this->mock_woopay_utilities, $this->mock_wcpay_account, $this->mock_customer_service, $this->mock_fraud_service ); + $this->system_under_test = new WC_Payments_Checkout( $this->mock_wcpay_gateway, $this->mock_woopay_utilities, $this->mock_wcpay_account, $this->mock_customer_service, $this->mock_fraud_service ); } public function tear_down() {