Created
May 31, 2017 09:14
-
-
Save corsonr/b029c4aca53cc22930b6079b868cb1fa to your computer and use it in GitHub Desktop.
WooCommerce: move Apple Pay button below customer details form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HI,
When I put the code in functions.php, I have a blank page !
Laurent