內容簡介
總結:WooCommerce Hide Prices Until Login or Region 外掛可幫助店主控制誰能看到價格並添加商品到購物車中,適用於批發商店、受限內容或地區特定的定價政策。
1. 這個 WordPress 外掛的主要功能是什麼?
- WooCommerce Hide Prices Until Login or Region 外掛可幫助店主控制誰能看到價格並添加商品到購物車中,適用於批發商店、受限內容或地區特定的定價政策。
2. 使用開發者功能時,應該如何設置插件以觸發隱藏價格訊息?
- 設置 $GLOBALS['hpulr_force_hide'] = true 後再呼叫 HPULR_Price_Handler::filter_price(),即可觸發免費插件的隱藏價格訊息。
3. 請列舉一些主要功能有哪些?
- 隱藏非登入使用者的價格
- 禁用訪客的「加到購物車」功能
- 基於地理位置的可見性(按許可的國家)
- 基於使用者角色的可見性(1.2.0 版本新增)
- 支援自訂訊息並支援 {login_url}
- 登入後將使用者重新導回商品
- 直接整合到 WooCommerce 設定中
- 產品級別自訂訊息覆蓋(精簡版)
- 管理員預覽行為的測試模式
- 支援所有產品類型(簡單、變動等)
- 集中式儲存和消毒(1.2.1 版本新增)
- 與高級附加元件兼容(例如:基於分類的隱藏)
外掛標籤
開發者團隊
② 後台搜尋「Hide Product Prices Until Login – for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
WooCommerce Hide Prices Until Login or Region helps store owners control who can see prices and add products to their cart. Useful for wholesale stores, restricted content, or region-specific pricing policies.
Developer Features
This plugin supports integrations with premium extensions via a global override flag and centralized architecture:
Set $GLOBALS['hpulr_force_hide'] = true before calling HPULR_Price_Handler::filter_price() to trigger the free plugin’s hidden price message
Inject premium settings using hpulr_additional_settings filter
Automatically save premium and custom fields via centralized update hook
Sanitize both free and premium fields with centralized filter sanitize_all_options
🎯 Key Features:
– Hide prices for non-logged-in users
– Disable Add to Cart for guests
– Geolocation-based visibility (by allowed countries)
– User role-based visibility (NEW in 1.2.0)
– Custom message with {login_url} support
– Redirects users back to the product after login
– Integrated directly into WooCommerce settings
– Per-product custom message override (Lite)
– Test mode for admin previewing behavior
– Supports all product types (simple, variable, etc.)
– Centralized saving and sanitization (NEW in 1.2.1)
– Compatible with premium add-ons (e.g., category-based hiding)
License
This plugin is licensed under the GPLv2 or later.
