• 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 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    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);

    Plugin Support Zubair Zahid (woo-hc)

    (@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://www.ads-software.com/support/plugin/woocommerce/reviews/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.