[Résolu] Display view results only for simple product type
Ce fil est résolu. Voici une description du problème et la solution proposée.
Problem:
How to display simple products with views or filter view to display simple products
Solution:
"product_type" is the hidden taxonomy used by WooCommerce to store the product type. You need to use view's hook wpv_filter_query in order to query the simple products.
This support ticket is created Il y a 6 années et 6 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
Hello. Thank you for contacting the Toolset support.
Well - as I understand, you only want to display 'simple" products with view - correct? If yes:
"product_type" is the hidden taxonomy used by WooCommerce to store the product type. You need to use view's hook wpv_filter_query in order to query the simple products.
For example - please add following code to your current theme's functions.php file:
Hi Minesh,
thanks for the example of code.
I tried it but the PHP Syntax Check show an error in the code. not sure how to solve it. i tried to close the the first array brackets but I still get an error.