# 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.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, security, head
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-remove-generator-tag/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove the WooCommerce Version Meta Tag" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
