Skip to content

Instantly share code, notes, and snippets.

@OneStep21
Created July 25, 2019 14:50
Show Gist options
  • Save OneStep21/ad71c6889a397abfeca36663a710ba7a to your computer and use it in GitHub Desktop.
Save OneStep21/ad71c6889a397abfeca36663a710ba7a to your computer and use it in GitHub Desktop.
Moving the WooCommerce Stripe Payment Request buttons and Stripe Payment Request Button Separator below the add to card button.
/* Move Stripe Payment Request Button on product page */
remove_action( 'woocommerce_after_add_to_cart_quantity', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
remove_action( 'woocommerce_after_add_to_cart_quantity', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
add_action( 'woocommerce_after_add_to_cart_button', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 2 );
add_action( 'woocommerce_after_add_to_cart_button', 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