Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created May 31, 2017 09:14
Show Gist options
  • Save corsonr/b029c4aca53cc22930b6079b868cb1fa to your computer and use it in GitHub Desktop.
Save corsonr/b029c4aca53cc22930b6079b868cb1fa to your computer and use it in GitHub Desktop.
WooCommerce: move Apple Pay button below customer details form
<?php // Do not include this if already open! Code goes in theme functions.php.
/*
* Removes Apple Pay button on the checkout page.
*/
remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 1 );
remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 2 );
/*
* Adds Apple Pay button on the checkout page, below customers details, and inverse button/separator order.
*/
add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 1 );
add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 2 );
@Laurent-Zenphoto
Copy link

HI,

When I put the code in functions.php, I have a blank page !

Laurent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment