Site logo

Archived topic

Can't remove cart totals via hook

5 replies · Started by Mathias on November 9, 2018

Viewing posts 1–6 of 6

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?

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.

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

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.

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. :-)

Glad to hear you got it resolved :)

This archived topic is closed to new replies.