Support » Plugin: WooCommerce Stripe Payment Gateway » ApplePay button not showing on checkout page

  • Resolved iamganesh

    (@iamganesh)


    Hello,

    I have set up the stripe as a payment gateway for my woocommerce site.
    It also includes the Apple Pay option for payment.
    I’ve checked and observed that the apple pay button is showing on the cart page, not on checkout page.

    Is there any way to show it on the checkout page?

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Doug – a11n

    (@dougaitken)

    Automattic Happiness Engineer

    Hey there @iamganesh

    Yes, this is possible with some filters and actions available to you – https://docs.woocommerce.com/document/stripe/#section-26

    It has been removed from the default functionality as it increases customer confusion since the Checkout fields have no relation to the Payment Request buttons (Apple Pay, Google Pay, Microsoft Pay, etc) so if a customer has not used them on the Product page or Cart page, adding to the Checkout page doesn’t bring any improvements.

    add_filter( 'wc_stripe_show_payment_request_on_checkout', '__return_true' );

    Using that in your functions.php file will add the Payment Request button to the Checkout page – by default it will show below the Notices area.

    This code snippet shows the Payment Request button on the Checkout page and places it at the end after all content:

    /*
    * Adds then moves Apple Pay button on the checkout page.
    */
    
    add_filter( 'wc_stripe_show_payment_request_on_checkout', '__return_true' );
    
    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_after_checkout_form', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 2 );
    add_action( 'woocommerce_after_checkout_form', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 1 );

    I hope this helps, have a great day!

    Thanks,

    Plugin Support Elvira K

    (@treibalen)

    Hi there @iamganesh,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ApplePay button not showing on checkout page’ is closed to new replies.