User Exclusive Products

外掛說明

User Exclusive Products lets you restrict any WooCommerce product to one or multiple users.

If a product is exclusive:
– Only selected users (and administrators) can see it.
– Unauthorized visitors cannot see the product in shop, category, tags, search or AJAX live search.
– Direct access to the product URL redirects to the shop page.
– Fully compatible with modern search engines (including FiboSearch).

Perfect for:
– B2B stores
– VIP customer access
– Private product offers
– Client-specific catalogs
– Wholesale deals

🔒 Key Features

  • Restrict product visibility to specific users only
  • Admins are always allowed (cannot be restricted)
  • Product completely hidden from:
    • Shop
    • Category pages
    • Product tags
    • Search results
    • AJAX / live search
    • REST API product queries
  • Lightweight & fast (no bloat)
  • No role management required
  • Simple multiselect user selector (WooCommerce-style)

🧩 Compatibility

This plugin is built with standard WooCommerce filters, making it compatible with most themes.

Tested and working with:
– Botiga / Botiga Pro (AJAX search compatible)
– Storefront
– Astra (front-end compatibility may vary)
– FiboSearch (fully supported)

If you use a theme or plugin with custom product queries, it should still work normally as long as they respect WordPress or WooCommerce APIs.

🎯 No Roles. No Conditions. No Complexity.

This plugin focuses on one thing only:
Restrict WooCommerce products to selected users.

No roles, no categories, no conditions — clean, simple, reliable.

螢幕擷圖

  • Product metabox: Select exclusive users
  • Hidden product behavior (not visible to guests or unauthorized users)

安裝方式

  1. Upload the plugin files to /wp-content/plugins/user-exclusive-products/
  2. Activate the plugin through the “Plugins” menu in WordPress
  3. Edit any WooCommerce product
  4. Use the Exclusive Users box to select which customers can view the product
  5. Leave empty to make the product public

常見問題集

Do users need to be logged in?

Yes. Only logged-in users can be matched with the allowed list.

What happens if a non-authorized user opens the product URL?

They are automatically redirected to the shop page.

Can I restrict by role?

No. This plugin is intentionally simple and only restricts by specific users.

Can I restrict categories or variations?

Not in version 1.0.0. These features may be added later if requested.

Is it compatible with FiboSearch?

Yes, fully compatible. Hidden products never appear in AJAX search results.

Does it work with all themes?

It works with any theme that respects standard WooCommerce queries.
Some custom-built themes may require compatibility tweaks.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈User Exclusive Products〉的開發相關工作。

參與者

〈User Exclusive Products〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈User Exclusive Products〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.2

  • Updated: Tested up to WordPress 7.0

1.0.1

  • Improved: Allowed Users field now uses AJAX search (wc-customer-search) instead of a static list, supporting sites with any number of users without performance impact.
  • Fixed: Renamed the AISP_Exclusif_Products_Category_Users class to AISP_Exclusive_Products_Category_Users for consistency across the codebase.
  • Fixed: Corrected class name casing from AISP_exclusive_Products_* to AISP_Exclusive_Products_* across multiple plugin modules.
  • Fixed: AISP_Exclusive_Products_Category_Users and AISP_Exclusive_Products_Bulk_Actions are now initialized only after confirming WooCommerce is active.
  • Fixed: Replaced the rest_prepare_post hook with rest_prepare_product and rest_prepare_product_variation to properly support WooCommerce product REST endpoints.
  • Fixed: filter_rest_response() now returns a proper WP_Error with HTTP 401/403 responses instead of null when restricted products are requested through the REST API.
  • Fixed: Added the rest_product_query filter alongside rest_post_query to properly intercept WooCommerce REST API product queries.
  • Fixed: Added suppress_filters => true to internal get_posts() calls to prevent recursive filter execution.
  • Fixed: Bulk action transient keys are now scoped per user to prevent collisions when multiple administrators use the interface simultaneously.
  • Added: Plugin constants for version, path, URL, and basename handling (AISP_EP_VERSION, AISP_EP_PATH, AISP_EP_URL, AISP_EP_BASENAME).
  • Added: Admin notice displayed when WooCommerce is not active instead of failing silently.
  • Added: New uninstall.php cleanup routine to remove plugin data, transients, and related cache entries when the plugin is deleted.

1.0.0

  • Initial release