WooCommerce Cheatsheet


Updated 2022-08-15

Add to cart URLs with redirects

WooCommerce has a lot of powerful built in features for adding products to the cart and redirecting elsewhere afterward, but I always have a heck of a time finding them in the documentation. Here are the most useful:

Note: If you cart or checkout page has a non-standard slug, you’ll need to change /cart or /checkout above. Also, generally for this to work you must check the “Enable AJAX add to cart buttons on archives” option under WooCommerce –> Settings –> Products -> General and disable “Redirect to the cart page after successful addition”.

Hiding a single product from search & catalog

On the product edit page in the classic editor, there is a Catalog Visibility option in the Publish meta box. You can set this to Hidden to hide a product from the catalog and search. This meta option is not visible in the Block editor yet, but you can toggle the option under the Quick Edit menu on the all products screen in wp-admin.