Prevent Ajax filter without selected options from calling all products
-
Great plugin!
I want to use it for a Woocommerce-Shop with membership function.If I activate Ajax for the filter function and don’t choose any options for restriction (e.g. product categories or product tags), all articles of the shop will be called – even those that should be visible for members only.
I am aware that you can’t adapt your product filter for all other Woocommerce plugins (including the official extension Woocommerce-Memberships https://woocommerce.com/products/woocommerce-memberships/ I use). On the other hand, an Ajax filter is useless if it does not filter (because no options are selected).
My question:
Is there a way to disable the display of all products using the Ajax filter function?a) By displaying a message: ‘You have not made a selection’, or
b) by adapting the Ajax product search query in such a way that it excludes products with certain characteristics (view-restricted by membership-plan).Many thanks for any comments.
Frank
- The topic ‘Prevent Ajax filter without selected options from calling all products’ is closed to new replies.