fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

Fatal error when trying to permanently delete product

When permanently deleting a variable product from the recycle bin we received a fatal error message

Can you help us?

Um erro do tipo E_ERROR foi causado na linha 148 do arquivo /home/customer/www/boutiquefit.com.br/public_html/wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-manage-cache.php. Mensagem de erro: Uncaught Error: Call to a member function get_parent_id() on bool in /home/customer/www/boutiquefit.com.br/public_html/wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-manage-cache.php:148

Stack trace:

#0 /home/customer/www/boutiquefit.com.br/public_html/wp-includes/class-wp-hook.php(308): Woo_Variation_Swatches_Manage_Cache->clear_cache_on_product_modify(24978)

#1 /home/customer/www/boutiquefit.com.br/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)

#2 /home/customer/www/boutiquefit.com.br/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

#3 /home/customer/www/boutiquefit.com.br/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variable-data-store-cpt.php(676): do_action(‘woocommerce_del…’, 24978)

#4 /home/customer/www/boutiquefit.com.br/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(224): WC_Product_Variable_Data_Store_CPT->delete_variations(24976, true)

#5 /home/cus

Rezwan Shiblu

Hi there,

Thanks for reaching out to us. We are sorry for the inconvenience.

Please add the below snippet using the Code Snippets plugin. I have already informed the issue to our development team. They are working on this issue. Once I get an update I will let know here. Till then use the below snippet:

add_action('woo_variation_swatches_manage_cache_loaded', function( $woo_variation_swatches_manage_cache_loaded ){
remove_action( 'woocommerce_delete_product_variation', array( $woo_variation_swatches_manage_cache_loaded, 'clear_cache_on_product_modify' ) );
}, 10, 1);

Thanks in advance for your patience.

Hello.

 

Thanks for the answer.

 

Unfortunately it didn’t work, is there anything else we can do?

 

Regards,

Alessandro

Rezwan Shiblu

Hi there,

Could you please check now?

Let me know if this worked now.

Thanks.