Conditions for variable products

Hi @alexander

I am struggling to display different Add to cart buttons on Product loopers, based on various condition. It is starting to look like a bug.

I have a link to the product if the product is out of stock, and also a pre-order button if the product has a Pre-order category.

I also need an “Add to cart” button on elements that are simple products, and the “Select options” button on Variable products. That is the default WooCommerce behavior.

I have tried Product type > IS > Variable, and also Product (has) > has > Attributes. Nothing is working.

On top of that, I am getting an error warning: inside one of the columns.

: No rule matching function for wc_product_type in /home/customer/www/xxx/public_html/wp-content/themes/pro/cornerstone/includes/classes/common/class-condition-matcher.php

This is the same website from the other thread with credentials.

The same Global Block is displaying the product overlay throughout the website. I have tested this on simpler WooCommerce out-of-the-box install as well, and I’m getting the same issue: both the error and the fact that the button is not shown no matter what product type I choose.

Hi @Misho,

I can confirm that condition isn’t working as it should be. I’ll look into that for the release.

1 Like

@Misho, got this one sorted out. The condition will work in the next release.

1 Like