[Gelöst] WooCommerce Views conditional output not working
Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.
Problem:
The issue here is that the user wanted to use the woocommerce views shortcodes in our views conditional shortcode.
Solution:
To get this to work all that is needed is to add it to our views Third-party shortcode arguments. This option can be found in Toolset -> Settings -> Frontend.
From here you can add the shortcode name "wpv-woo-productcategory-images" This should resolve your issue of the shortcode not working in the conditionals.
This support ticket is created vor 5 Jahre, 2 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.
I want to display something, if [wpv-woo-productcategory-images] is empty.
[wpv-woo-productcategory-images] doesn't exist in conditional output selector.
So i tried to manually insert the field in the condition like below, but it is not working either.
I don't need to verify if the field is empty anymore, because i agreed with the client that they must fill out the field, because i couldn't get it to work and it took too much time.
I suggest you make a WP installation with WooCommerce, Views and WooCommerce Views, and try to verify it. You cannot verify if the [wpv-woo-productcategory-images] field is empty or not empty. "eq" or "ne" both returns nothing.
Given that the shortcode is generated by woocommerce views it is an expected outcome. It is because the [wpv-woo-productcategory-images] shortcode isn't a part of the views core plugin.
To get this to work all that is needed is to add it to our views Third-party shortcode arguments. This option can be found in Toolset -> Settings -> Frontend.
From here you can add the shortcode name "wpv-woo-productcategory-images" This should resolve your issue of the shortcode not working in the conditionals.
Thank you Shane. I'm kind of surprised that since it is a WooCommerce Views shotcode, that it didn't work with Views.
Didn't think about adding it from the settings page.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.