• Resolved 19db

    (@19db)


    For some reason, i cannot make the apple/google pay button to show in the order pay page (checkout/order-pay/).

    im using this snippet to move the pay button in the checkout page and it works well for the regular checkout page, but the buttons dont show in the order pay page.

    if ( class_exists( 'WC_Stripe_Payment_Request' ) ) {
        remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
        remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
    
        add_action( 'woocommerce_review_order_before_payment', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
    }

    Can you help with this? Thank you in advance

    • This topic was modified 11 months, 2 weeks ago by 19db.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @19db,

    The code snippet you’ve shared will correctly remove and add actions for the payment request button on the regular checkout page. However, the order-pay page is in a different context and may not be called the same hooks as the regular checkout page.

    You could try using the woocommerce_before_checkout_form action hook instead, as this hook is used on both the regular checkout and order-pay pages.

    Please note that writing or providing custom code is not within the scope of our support policy. If you are still having problems, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter 19db

    (@19db)

    That hook worked, thank you very much!

    Hi @19db,

    Thanks for getting back to us. I’m glad to know you were able to resolve the issue with the help of my colleague’s suggestion. Just so you know – we will now close this ticket as solved. If you have any other questions or issues, please feel free to open a new ticket and we’ll be happy to assist you.

    Thank you for choosing WooCommerce and have a great day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pay buttons dont show in order pay page’ is closed to new replies.