Trying to move Apple Pay on product page causes critical error
-
Hi there,
I’ve spent the last few hours trying to figure out how to ‘unhook’ the Apple / Google pay button from the product page and ‘rehook’ it somewhere else.
Checking through the forum lots of people have tried this with success, however, every time I try to add the snippet it causes a critical error on my website.
Here is the most recent code snippet I have tried…
remove_action( ‘woocommerce_after_add_to_cart_quantity’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 );
add_action( ‘woocommerce_after_add_to_cart_button’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 100 );
Ideally I would like to rehook it to a custom hook which is ‘tdc_move_apple_pay’ but I can’t even get it work with someone else’s code at the moment.
Do you have any ideas on what may be causing this?
The topic ‘Trying to move Apple Pay on product page causes critical error’ is closed to new replies.