Remove the WooCommerce Version Meta Tag
Stops WooCommerce adding its version number to your page source, so bots scanning for outdated stores learn a little less.
Opens WPIDE on
Code
add_action( 'init', function () {
remove_filter( 'get_the_generator_html', 'wc_generator_tag', 10 );
remove_filter( 'get_the_generator_xhtml', 'wc_generator_tag', 10 );
} );
Notes
Purely cosmetic for security; keep WooCommerce updated as well.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.