WooCommerce Hide Products

Viewed 16

Out of the box, WooCommerce will create a shop page featuring a catalog of products and the products are accessible through the REST API at /wc/store/products. For my use case this is precisely what I want to avoid: users should not be able to browse the products by any means. Instead I'll use application logic to programmatically add products to the user's cart when appropriate.

My solution would be to

  1. Disable the /wc/store/products REST API
  2. Make sure there's no shop page set under settings

My questions are (1) is this solution is adequate (2) will disabling /wc/store/products have unforeseen consequences?

1 Answers

I found that it's possible to set the catalog visibility of a product as 'hidden' which is an adequate solution for my use case.

Related