Skip to content

Instantly share code, notes, and snippets.

@espiat
Forked from dougaitken/move_stripeprbutton.php
Created December 20, 2021 21:25
Show Gist options
  • Save espiat/1e70ed6a45691af6a9c36067c769736e to your computer and use it in GitHub Desktop.
Save espiat/1e70ed6a45691af6a9c36067c769736e to your computer and use it in GitHub Desktop.
Moving the WooCommerce Stripe Payment Request buttons below the add to cart 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