fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Waitlist not showing on products with 2 attributes

Jaime Roldan

Hi! Thanks for this awesome plugin!

I use Yith WooCommerce Waitlist plugin which enables users to sign-up for e-mail notification when the product is back in stock. It works ok with products that have only one attribute (size):  – here you can see one of products in my shop, the 40 size is out of stock, so there’s a button to sign up on a waiting list (the black one at the bottom).
I have one product with 2 attributes (size and color). For this product if I choose the variation that is out of stock (for example color yellow with size 36)  there’s no waitlist form: Product with 2 variations
The Waitlist plugin works fine if I disable Variation Swatches PRO plugin. When I active only the free plugin, works fine. I guess the problem is in the PRO plugin.

I tested:
– Disable all plugins except woocommerce, waitlish plugin and two variation swatches plugin
– Update all plugins and wordpress core
– I use hello elementor (clean theme)

Thanks for your help!

Hakik Zaman

Hi Jaime,

Thanks for reaching out to us. It is a known issue, I discussed this issue with our development team. They already checked and informed YITH Waitlist plugin has a variable called $current_product. It is protected and can’t be changed from our plugin. We can change the value when the variable is public.

If you check here: class.yith-wcwtl-frontend.php > line number 266, it is returning always false when you are using the Pro version. Because the Pro version is using API fetch system. It would be great if you let the plugin author know about this to keep the variable public.

So, you can add the following snippet to increase the threshold, it will resolve your issue:

add_filter( 'woocommerce_ajax_variation_threshold', 'woo_variation_swatches_global_ajax_variation_threshold_min', 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_min( $size, $product ){
return 80;
}

I hope the above explanation will help you to understand.

Thank You

Jaime Roldan

Thank you so much! I understand this explanation. With this code snippet, fixed this problem! I’ll write the plugin author about this.

Kind regards,