[Snippet] Remove WooCommerce generator tags

Another  security through obscurity post. WooCommerce leaves a generator meta tag showing it’s version number – I don’t like that.
[codesyntax lang=”html4strict”]
<meta name=”generator” content=”WooCommerce 2.0.14″>

Overwrite Woocommerce JS

I recently had to change certain parts of the WooCommerce Javascript. It would be bad to edit the JS provided with the plugin as it would be overwritten by an upgrade. WooCommerce gives us an easy way of having custom templates but no matching, easy way of using custom Javascript.

I had to overwrite some functionality in the add-to-cart.js, so I created a new JS called /js/add-to-cart-kb-custom.js.
 This is how I did it in functions.php Continue reading “Overwrite Woocommerce JS”

WooCommerce – Manually add a product to the cart

You can easily create simple HTML forms to add simple products to the cart within WooCommerce.

[codesyntax lang=”html4strict”]
<form action=”?add-to-cart=<PRODUCT ID>” class=”cart” method=”post” enctype=”multipart/form-data”>
<button type=”submit”>Sign up now</button>
</form>