Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created September 12, 2012 19:41
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mikejolley/3709371 to your computer and use it in GitHub Desktop.
Save mikejolley/3709371 to your computer and use it in GitHub Desktop.
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
Copy link

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

@gerbenvandijk
Copy link

Thanks!

@kb6673
Copy link

kb6673 commented Feb 11, 2014

2.1 changes the action to

remove_action( 'wp_head', 'wc_generator_tag' );

@saas786
Copy link

saas786 commented Feb 13, 2014

Thanks.

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