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>

Author: Kieran Barnes

Kieran is a PHP developer with 15 years commercial experience. Specialist in WordPress, CakePHP, CubeCart and all things PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *