Skip to content

Instantly share code, notes, and snippets.

@harishankerr
Last active September 3, 2022 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harishankerr/17ce97201f45b2363dd50148a61cc1eb to your computer and use it in GitHub Desktop.
Save harishankerr/17ce97201f45b2363dd50148a61cc1eb to your computer and use it in GitHub Desktop.
WooCommerce Stripe: Move Apple Pay Button to the bottom of the checkout page
/*
* 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment