diff --git a/changelog/fix-express-pay-pay-for-order-page b/changelog/fix-express-pay-pay-for-order-page new file mode 100644 index 00000000000..c90c305e91e --- /dev/null +++ b/changelog/fix-express-pay-pay-for-order-page @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Show Google Pay/Apple Pay buttons in the Pay for Order page diff --git a/includes/class-wc-payments-payment-request-button-handler.php b/includes/class-wc-payments-payment-request-button-handler.php index 02a0848727b..99a193ec303 100644 --- a/includes/class-wc-payments-payment-request-button-handler.php +++ b/includes/class-wc-payments-payment-request-button-handler.php @@ -381,8 +381,6 @@ public function display_pay_for_order_page_html( $order ) { ]; wp_localize_script( 'WCPAY_PAYMENT_REQUEST', 'wcpayPaymentRequestPayForOrderParams', $data ); - - $this->display_payment_request_button_html(); } /** @@ -531,6 +529,11 @@ public function should_show_payment_request_button() { return false; } + // Order total doesn't matter for Pay for Order page. Thus, this page should always display payment buttons. + if ( $this->is_pay_for_order_page() ) { + return true; + } + // Cart total is 0 or is on product page and product price is 0. // Exclude pay-for-order pages from this check. if (