Skip to content

Commit

Permalink
rename UPE checkout to WC_Payments_Checkout for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Dec 20, 2023
1 parent ce1de59 commit 3ea8609
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions includes/class-wc-payment-gateway-wcpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions includes/class-wc-payments-blocks-payment-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Class WC_Payments_UPE_Checkout
* Class WC_Payments_Checkout
*
* @package WooCommerce\Payments
*/
Expand All @@ -25,9 +25,9 @@


/**
* WC_Payments_UPE_Checkout
* WC_Payments_Checkout
*/
class WC_Payments_UPE_Checkout {
class WC_Payments_Checkout {

/**
* WC Payments Gateway.
Expand Down
12 changes: 6 additions & 6 deletions includes/class-wc-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use WCPay\Payment_Methods\Afterpay_Payment_Method;
use WCPay\Session_Rate_Limiter;
use WCPay\Database_Cache;
use WCPay\WC_Payments_UPE_Checkout;
use WCPay\WC_Payments_Checkout;
use WCPay\WooPay\Service\Checkout_Service;
use WCPay\Core\WC_Payments_Customer_Service_API;
use WCPay\Constants\Payment_Method;
Expand Down Expand Up @@ -263,7 +263,7 @@ class WC_Payments {
/**
* WC Payments Checkout
*
* @var WC_Payments_UPE_Checkout
* @var WC_Payments_Checkout
*/
private static $wc_payments_checkout;

Expand Down Expand Up @@ -397,7 +397,7 @@ public static function init() {
include_once __DIR__ . '/class-logger.php';
include_once __DIR__ . '/class-session-rate-limiter.php';
include_once __DIR__ . '/class-wc-payment-gateway-wcpay.php';
include_once __DIR__ . '/class-wc-payments-upe-checkout.php';
include_once __DIR__ . '/class-wc-payments-checkout.php';
include_once __DIR__ . '/payment-methods/class-cc-payment-gateway.php';
include_once __DIR__ . '/payment-methods/class-upe-payment-gateway.php';
include_once __DIR__ . '/payment-methods/class-upe-split-payment-gateway.php';
Expand Down Expand Up @@ -552,7 +552,7 @@ public static function init() {
}

self::$card_gateway = self::get_payment_gateway_by_id( 'card' );
self::$wc_payments_checkout = new WC_Payments_UPE_Checkout( self::get_gateway(), self::$woopay_util, self::$account, self::$customer_service, self::$fraud_service );
self::$wc_payments_checkout = new WC_Payments_Checkout( self::get_gateway(), self::$woopay_util, self::$account, self::$customer_service, self::$fraud_service );

self::$card_gateway->init_hooks();
self::$wc_payments_checkout->init_hooks();
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions includes/payment-methods/class-upe-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Class WC_Payments_UPE_Checkout_Test
* Class WC_Payments_Checkout_Test
*
* @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;
Expand All @@ -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;

Expand Down Expand Up @@ -130,7 +130,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() {
Expand Down

0 comments on commit 3ea8609

Please sign in to comment.