[Gelöst] Display view results only for simple product type
Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.
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 vor 5 Jahre, 11 Monate. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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.