I'm trying to display a container based on multiple different conditions using Toolset's Conditional Logic system, but it doesn't appear to be working in the manner I expected it to. Here are the conditional arguments I'm trying to work with.
I want the container to be displayed if the current post fulfills any one of these conditions. If none of these conditions are met, then the container should not be displayed.
- If the post body is populated OR
- If the WooCommerce product is a Variable Product, determined by the product_type taxonomy with the value "variable" OR
- If the [wpv-view name="style-size-chart-content"] view does not output an empty value
This is how I currently have my conditional arguments marked up:
[wpv-conditional if="( wpv_conditional_post_has_content() eq '1' ) OR ( CONTAINS(#(product_type),'variable') ) OR ( '[wpv-view name='style-size-chart-content']' ne '' )"] [...] [/wpv-conditional]
I tried changing the OR condition to AND, which displays the container if all of those conditions are met and hides the container if they aren't all met, which is not what I'm looking for.
As it is currently configured, the container still displays when none of those conditions are met:
hidden link
and displays when one or all of the conditions are met:
hidden link
Which means the conditional arguments aren't appearing to do anything.
As an aside, I do have the wpv_condtional_post_has_content() function registered with the Front-end Content "Functions inside conditional evaluations" settings and have confirmed that this argument on its own is functional.
I'm wondering if it has something to do with my argument that utilizes the view, which the preview in the Gutenberg Blocks editor shows the output as `OR (' ' ne'')` (see attachment). If this is what the output on the frontend looks like, is there a way to work around this?
I'm sure I'm doing something wrong, though as far as I can tell, my syntax is correct since the AND conditions appear to work. Any help in this matter would be greatly appreciated. Thanks in advance!