• Resolved hwamart

    (@hwamart)


    Trying to remove the payment request button on the cart page using the following code as per the documentation. Adding this as a snippet rather than in the function.php itself but it’s crashing my site. Should this still work or is it outdated?

    remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
    remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey there @hwamart

    Adding this as a snippet rather than in the function.php itself but it’s crashing my site.
    Should this still work or is it outdated?

    It is best to add it to your child theme’s functions.php but to confirm that is the same code I have on a test site and it 100% works for me – the Payment Request buttons aren’t on the Cart page but they are on the product pages.

    Thanks,

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @hwamart

    I’ve double checked my snippet and adding it to the functions.php file does not crash my test site so it looks like something else is at play here, especially if you’re adding it to something like Code Snippets and it is crashing your site.

    I will mark this as Resolved for now, but please do open a new one if you need any more help!

    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove payment request button from cart page’ is closed to new replies.