• Resolved hadleytrev

    (@hadleytrev)


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Igor H

    (@ihereira)

    Hello there,

    how to ‘unhook’ the Apple / Google pay button from the product page and ‘rehook’ it somewhere else.

    I understand you would like to move Apple Pay button, I am assuming you want to move it to another part of the same product page, is this correct?

    * To get a better idea, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. 

    * Share a copy of any fatal error log found under WooCommerce > System Status > Logs (if any).

    Thank you.

    Thread Starter hadleytrev

    (@hadleytrev)

    Thank you for coming back to me Igor, I ended up using jQuery to move the button, so, happy to close this thread now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Trying to move Apple Pay on product page causes critical error’ is closed to new replies.