• Resolved bg000331

    (@bg000331)


    Hi,
    with the latest release the express checkout buttons are now showing back on top of the page.
    The code below is not working anymore. Anyone has an idea on how to move the button back above the Payment section?

    Thanks,
    Lukas

    /* Move Google and Apple Pay to bottom of the page */
    remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 ); //removes the button

    remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_separator_html’ ), 2 ); // removes the separator under button

    add_action( ‘woocommerce_review_order_before_payment’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 ); // adds the button before payments

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @bg000331,

    The behavior of the express checkout buttons may have changed due to recent updates. Since custom code is outside our support scope, I recommend consulting a developer to adjust your implementation.

    You might also find help in our WooCommerce Community Slack channel, where other developers share insights: https://woocommerce.com/community-slack/

    Thank you.

    The new plugin logic uses the WC_Stripe_Express_Checkout_Element class instead of WC_Stripe_Payment_Request for express checkout buttons. The code will look like this:

    remove_action('woocommerce_checkout_before_customer_details', array(WC_Stripe_Express_Checkout_Element::instance(), 'display_express_checkout_button_html'), 1);
    add_action('woocommerce_review_order_before_payment', array(WC_Stripe_Express_Checkout_Element::instance(), 'display_express_checkout_button_html'), 1);

    Zee

    (@doublezed2)

    Hello Andrii Ivaniura,

    Thank you for your message.
    I appreciate your contribution here.

    Have a great day!

    Thread Starter bg000331

    (@bg000331)

    Thanks for your help!

    Plugin Support Feten L. a11n

    (@fetenlakhal)

    Hi there,

    I’m going to mark this as resolved.

    If you have a few minutes, we’d love if you could leave us a review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/

    Thread Starter bg000331

    (@bg000331)

    Hi,
    unfortunately the latest plugin broke this.
    I have tried to find a solution but its not working. Any hints what could be wrong?

    add_action(‘woocommerce_review_order_before_payment’, array(WC_Stripe_Express_Checkout_Element::instance(), ‘display_express_checkout_button_html’), 1);

    Thanks

    Hi @bg000331,

    Thank you for getting back to us and for sharing the update. I completely understand how important this is for your website setup. However, since your request involves custom code, it falls outside the scope of our official support.

    That said, I recommend reaching out to the WooCommerce Community on Slack: https://woocommerce.com/community-slack/. There, other developers may be able to offer suggestions or workarounds.

    If you have any other questions, feel free to reach out again or start a new thread if you have other issues.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Express Checkout Buttons’ is closed to new replies.