Move Apple/Google Pay to the end of the Checkout page
-
Hi,
I’m using Woocommerce and Woocommerce Blocks in my store.
I added WooCommerce Stripe Payment Gateway and I would like to use Apple & Google Pay options.
However, I don’t want the ApplePay button to appear before everything else in the Checkout page (even before the customer details), I would like it to appear at the end (if possible together with other payment methods available, if not at least after them as a separate button).Do you know how I can achieve something similar?
I’ve already tried the following snippet code (added in my functions.php file) but it’s not working at all.
/* * 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 );
Many thanks in advance.
Francesco
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Move Apple/Google Pay to the end of the Checkout page’ is closed to new replies.