• Experimenting with these filters definitely removed the price and the subtotal in the Woocommerce Cart. Now the snippet is deleted, yet the price and the subtotal are still no longer displayed in the Cart!

    add_filter( 'woocommerce_get_price_html', function( $price ) {
    	if ( is_admin() ) return $price;
    
    	return '';
    } );
    
    add_filter( 'woocommerce_cart_item_price', '__return_false' );
    add_filter( 'woocommerce_cart_item_subtotal', '__return_false' );

    The price and subtotal are shown again after the Code Snippets plugin is deactivated. I think is a cache problem, but not with the browser, nor the LiteSpeed Cache that I am using and I also deactivated it, just to check if that caused the problem. It is definitely the Code Snippets that hang onto those filters…\

    Any help, much appreciated!

    Thank you!

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

    I’m also having an issue where some code that I added, and subsequently deactivated, still seems to be there.

    I’m also on Litespeed, but I have deactivated the plugin…. My server uses Lightspeed server.
    It cannot be browser as I’ve done incognito, plus Microsoft edge with the same result..?

    Did you find a solution to this? (Or am I being stupid and the code is running somewhere else on another snippet..??

    cheers, Bruce

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi Bruce,

    If the Code Snippets plugin is no longer active, then the code is definitely running from somewhere else, most likely another plugin or in your theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A filter removes a function even after snippet deleted’ is closed to new replies.