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 4472fb1067e..7d9fece536d 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 @@ -126,7 +126,7 @@ public function display_express_checkout_buttons() { $separator_starts_hidden = ! $should_show_woopay; if ( $should_show_woopay || $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 aa3d819faa1..0437525e3ca 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 @@ -250,7 +250,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(); }