THN Require Login To View Prices
Hides WooCommerce prices for logged-out users and disables purchasing until login.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/thenahidul/thn-hide-prices/archive/refs/heads/main.zipReadme
THN Login To View Prices
Contributors: thenahidul
Tags: woocommerce, prices, login, hide price, private store
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Hide WooCommerce prices and disable purchasing for logged-out users. Prices and purchasing options appear normally after login.
Description
This plugin hides WooCommerce product prices from visitors.
Logged-out users will see a simple message telling them to log in to view product pricing.
What the plugin does:
- Replaces price HTML with a login message
- Removes numeric price values from product data for guests
- Disables purchasing until a user is logged in
- Works with simple and variable products
- Lightweight and developer friendly
This is helpful for wholesale stores, membership shops, or any site that requires users to log in before viewing prices.
Installation
- Upload the plugin folder
thn-hide-pricesto/wp-content/plugins/ - Activate the plugin in the WordPress admin dashboard
- Make sure WooCommerce is installed and active
- Log out to confirm prices are hidden
No configuration needed.
Frequently Asked Questions
Will this hide prices for all products?
Yes, it affects all WooCommerce product types by default.
Can logged-out visitors still see product pages?
Yes. They can browse products but cannot see prices or purchase.
Can I customize the message?
Yes. The login message is filtered through woocommerce_get_price_html and uses standard WordPress translation functions.
Changelog
1.0.0
- Initial release
- Hide price HTML
- Hide numeric price values
- Disable purchasing for guests
Upgrade Notice
1.0.0
First stable release.