From 452051089f127a5b5f8c33cad4a2d39adfc7b7f7 Mon Sep 17 00:00:00 2001 From: frosso Date: Fri, 15 Nov 2024 14:51:44 +0100 Subject: [PATCH] chore: rename wrapper from payment-request to ECE --- .../chore-payment-request-to-express-checkout-wrapper-name | 4 ++++ client/checkout/express-checkout-buttons.scss | 4 ++-- client/tokenized-payment-request/button-ui.js | 2 +- ...ss-wc-payments-express-checkout-button-display-handler.php | 2 +- ...ss-wc-payments-express-checkout-button-display-handler.php | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 changelog/chore-payment-request-to-express-checkout-wrapper-name diff --git a/changelog/chore-payment-request-to-express-checkout-wrapper-name b/changelog/chore-payment-request-to-express-checkout-wrapper-name new file mode 100644 index 00000000000..a8471227c9c --- /dev/null +++ b/changelog/chore-payment-request-to-express-checkout-wrapper-name @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +chore: rename wrapper from payment-request to express-checkout diff --git a/client/checkout/express-checkout-buttons.scss b/client/checkout/express-checkout-buttons.scss index b20ac8a5be8..be3e02845d8 100644 --- a/client/checkout/express-checkout-buttons.scss +++ b/client/checkout/express-checkout-buttons.scss @@ -1,4 +1,4 @@ -.wcpay-payment-request-wrapper { +.wcpay-express-checkout-wrapper { margin-top: 1em; width: 100%; clear: both; @@ -21,7 +21,7 @@ } // This fixes width calculation issues inside the iframe for blocks and shortcode pages. -.wcpay-payment-request-wrapper, +.wcpay-express-checkout-wrapper, .wc-block-components-express-payment__event-buttons { .StripeElement iframe { max-width: unset; diff --git a/client/tokenized-payment-request/button-ui.js b/client/tokenized-payment-request/button-ui.js index 88a3095a745..b0ca818d213 100644 --- a/client/tokenized-payment-request/button-ui.js +++ b/client/tokenized-payment-request/button-ui.js @@ -9,7 +9,7 @@ const paymentRequestButtonUi = { getElements: () => { return jQuery( - '.wcpay-payment-request-wrapper,#wcpay-express-checkout-button-separator' + '.wcpay-express-checkout-wrapper,#wcpay-express-checkout-button-separator' ); }, diff --git a/includes/express-checkout/class-wc-payments-express-checkout-button-display-handler.php b/includes/express-checkout/class-wc-payments-express-checkout-button-display-handler.php index 319c28b89a6..f83d0e7a646 100644 --- a/includes/express-checkout/class-wc-payments-express-checkout-button-display-handler.php +++ b/includes/express-checkout/class-wc-payments-express-checkout-button-display-handler.php @@ -138,7 +138,7 @@ public function display_express_checkout_buttons() { $separator_starts_hidden = ! $should_show_woopay; if ( $should_show_woopay || $should_show_payment_request || $should_show_express_checkout_button ) { ?> -
+
express_checkout_helper->is_pay_for_order_page() || $this->is_pay_for_order_flow_supported() ) { $this->platform_checkout_button_handler->display_woopay_button_html(); diff --git a/tests/unit/test-class-wc-payments-express-checkout-button-display-handler.php b/tests/unit/test-class-wc-payments-express-checkout-button-display-handler.php index 98f7469de84..515fe7b3f73 100644 --- a/tests/unit/test-class-wc-payments-express-checkout-button-display-handler.php +++ b/tests/unit/test-class-wc-payments-express-checkout-button-display-handler.php @@ -278,7 +278,7 @@ public function test_display_express_checkout_buttons_all_disabled() { ob_start(); $this->express_checkout_button_display_handler->display_express_checkout_buttons(); - $this->assertStringNotContainsString( 'wcpay-payment-request-wrapper', ob_get_contents() ); + $this->assertStringNotContainsString( 'wcpay-express-checkout-wrapper', ob_get_contents() ); ob_end_clean(); }