Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Remove WooCommerce Generator Tag
function my_woocommerce_loaded_function() {
global $woocommerce;
// remove WC generator tag from <head>
remove_action( 'wp_head', array( $woocommerce, 'generator' ) );
}
// called only after woocommerce has finished loading
add_action( 'woocommerce_init', 'my_woocommerce_loaded_function' );
@bobbravo2

This comment has been minimized.

Show comment Hide comment
@bobbravo2

bobbravo2 Sep 25, 2013

Good find. I was trying to hook it on wp_head. Thanks!

Good find. I was trying to hook it on wp_head. Thanks!

@gerbenvandijk

This comment has been minimized.

Show comment Hide comment
@gerbenvandijk

gerbenvandijk Jan 15, 2014

Thanks!

Thanks!

@kieranbarnes

This comment has been minimized.

Show comment Hide comment
@kieranbarnes

kieranbarnes Feb 11, 2014

2.1 changes the action to

remove_action( 'wp_head', 'wc_generator_tag' );

2.1 changes the action to

remove_action( 'wp_head', 'wc_generator_tag' );

@saas786

This comment has been minimized.

Show comment Hide comment
@saas786

saas786 Feb 13, 2014

Thanks.

saas786 commented Feb 13, 2014

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment