diff --git a/changelog/fix-express-payment-buttons-on-blocks-pay-for-order-page b/changelog/fix-express-payment-buttons-on-blocks-pay-for-order-page new file mode 100644 index 00000000000..07cb90d6afa --- /dev/null +++ b/changelog/fix-express-payment-buttons-on-blocks-pay-for-order-page @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Display express payment buttons on checkout blocks pay-for-order page diff --git a/client/payment-request/index.js b/client/payment-request/index.js index e8432ad0f5b..2eb36640050 100644 --- a/client/payment-request/index.js +++ b/client/payment-request/index.js @@ -21,7 +21,10 @@ import { getPaymentRequest, displayLoginConfirmation } from './utils'; jQuery( ( $ ) => { // Don't load if blocks checkout is being loaded. - if ( wcpayPaymentRequestParams.has_block ) { + if ( + wcpayPaymentRequestParams.has_block && + ! wcpayPaymentRequestParams.is_pay_for_order + ) { return; } diff --git a/includes/class-wc-payments-payment-request-button-handler.php b/includes/class-wc-payments-payment-request-button-handler.php index d5308734d4c..edaee0bfc44 100644 --- a/includes/class-wc-payments-payment-request-button-handler.php +++ b/includes/class-wc-payments-payment-request-button-handler.php @@ -532,8 +532,9 @@ public function should_show_payment_request_button() { } // Cart total is 0 or is on product page and product price is 0. + // Exclude pay-for-order pages from this check. if ( - ( ! $this->is_product() && 0.0 === (float) WC()->cart->get_total( 'edit' ) ) || + ( ! $this->is_product() && ! $this->is_pay_for_order_page() && 0.0 === (float) WC()->cart->get_total( 'edit' ) ) || ( $this->is_product() && 0.0 === (float) $this->get_product()->get_price() ) ) {