Site logo

[Support request] Can't remove cart totals via hook

Home Forums Support [Support request] Can't remove cart totals via hook

Home Forums Support Can't remove cart totals via hook

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #722875
    Mathias

    Hi,

    I am trying to remove the “total section” on the cart page that I have beautifully marked with red here:
    Total Section

    I have tried to do so with the following:

    remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cart_totals', 10 );

    added to my functions.php in my child theme. However, nothing happens. It is still there.

    Can you help?

    #723152
    David
    Staff
    Customer Support

    Hi there,

    It sounds like the child theme is not configured correctly. I tested it using the Code Snippets Plugin and it does work.

    One thing to note, it also removes the Proceed to Checkout button, which may not be what you’re after.

    #723343
    Mathias

    Hi David

    I use the GP child theme, so I don’t know about whether it is configured correctly. Can you elaborate/help?

    I know that it also removes the checkout button. I plan to add a new one myself. Thanks for pointing it out though!

    Best,
    Mathias

    #723349
    David
    Staff
    Customer Support

    Can you try the code snippets plugin and see if that works. If it doesn’t then something else is getting in the way. If it does then i can look at the child function.

    #724961
    Mathias

    Hi David,

    It works perfectly using the Code Snippets plugin, so that’s weird.

    What do you need from me to look at the child functions? Is there a way I can share the file without it being shown to everyone here?

    Edit: I got it to properly now. Not sure why. 🙂

    #725158
    David
    Staff
    Customer Support

    Glad to hear you got it resolved 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.