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

Fatal error clearing cache for variations

David Law

We have an issue with the latest version of this plugin during a product sync script we have – it has worked fine for years on all previous versions of the plugin.

The issue is in the file: /woo-variation-swatches/includes/class-woo-variation-swatches-manage-cache.php

The error occurred on version 2.0.16 and also on 2.0.18

I can confirm the correct variation ID is being passed to this method but wc_get_product($variation_id) is returning FALSE for some reason. As there is no check to ensure a valid object is returned a fatal error occurs when trying to use $variation_product->get_parent_id();

Can you add some checking to ensure a valid product object is returned otherwise return out of the method.

Hakik Zaman

Hi David,

Thanks for reaching out to us. I have sent this information to our development team.

I hope they will find a solution and release a new update soon.

Thanks for your patience.