Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /*
  2. * Adds the Payment Request button (Apple Pay) on the checkout page then moves it to after the customer details.
  3. * Replace `woocommerce_checkout_after_customer_details` with wherever you want to
  4. */
  5.  
  6. add_filter( 'wc_stripe_show_payment_request_on_checkout', '__return_true' );
  7.  
  8. remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
  9. remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
  10.  
  11. add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
  12. add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement