Selling Health Supplement Online

Inspired Health is an online business that sells health supplements. On their sale pages, they intend to keep some specific products visible but cannot be purchased by unauthorized customers. The best practice is to protect the add-to-cart button with a password form. In other words, if someone comes to buy these products, they’ll need to input correct passwords.

 ppwp-inspired-health

In the past, their site was built with Shopify. Unfortunately, instead of only hiding the add-to-cart button, they had to shield the whole shop since there was no built-in function to meet their desires. This was what their landing page looked like:

 ppwp-protect-product-page-example

After careful consideration, they decided to move their stores to WooCommerce – an open-source eCommerce platform built for WordPress.

Putting their belief in our team and our products, they reached out to us asking if we could assist in displaying their specific WooCommerce products while protecting the add-to-cart button with passwords. Considering the deadline of moving the store to WooCommerce is fast approaching, their urgent needs for that feature have accordingly increased.

Thoroughly understanding their demands, we developed a custom code to protect the add-to-cart button at the drop of a hat. It seamlessly integrates with our Password Protect WordPress Pro plugin and WooCommerce extension to password protect the Add to Cart button in WooCommerce.

When receiving the result, he gave us a generous compliment on the  effort and quick process:

“The plugin looks good and does meet my requirement.”

Now, let’s see a step-by-step guide on how we’ve helped our dear customers to fulfill their needs.

Step 1: Password Protect WooCommerce Products

Plugin requires:

Go to Password Protect WordPress > General from your admin dashboard. Simply select the “Products” type from the Post Type Protection drop-down list and save your changes.

ppwp-password-protect-custom-post-type

Navigate to “Products” in your WordPress navigation menu and choose products that you intend to hide their add-to-cart button.

 ppwp-choose-products-to-protect

Once you’re done, the whole page will be covered under a password form by default.

 ppwp-protected-product-page

Step 2: Hide WooCommerce Add-to-Cart Button by a Custom Code

Go to your (child) theme’s functions.php file, simply add the code snippet to protect the add-to-cart button only.

At this point, the protected product remains visible to everyone while only those who have a password can buy this product.

 ppwp-hide-woo-add-to-cart-button

That’s it!

Does this function is what you are looking for?

Install our PPWP Pro plugin and WooCommerce Integration now!