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

Problem with plugin and products sync with an ERP

Hi

Trying to figure issues i have with plugin after several attempts

The site is: https://www.cameleon.co.il/

Have the swatches plugin and last week after performance issues we were able to solve the speed partly with an additional own developed small plugin: a screenshot link: https://prnt.sc/haOix7yPgZwK

As said it improved speed but now have a new issue…the site has a plugin to SYNC stock with an ERP, but the swatches plugin and related cache plugin are causing issues that make the process stuck. here is an ERROR log:

 

2022-11-29T11:59:15+00:00 CRITICAL Uncaught Error: Call to a member function get_parent_id() on bool in /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-manage-cache.php:148
Stack trace:
#0 /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-includes/class-wp-hook.php(310): Woo_Variation_Swatches_Manage_Cache->clear_cache_on_product_modify()
#1 /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#2 /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php(274): do_action()
#4 /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(196): WC_Product_Variation_Data_Store_CPT->update()
#5 /home/799380.cloudwaysapps.com/mufecfdkgg/public_ht בקובץ /home/799380.cloudwaysapps.com/mufecfdkgg/public_html/wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-manage-cache.php בשורה 148

Any advice?

 

Comment:

It isn’t the small cache plugin but the swatches plugin – i just isolated the issue

Hakik Zaman

Hi Dan,

Thanks for reaching out to us. Sorry for your inconvenience.

Please add the below snippet using the Code Snippets Plugin:

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

Then try again and let me know if it resolves your issue or not.

Thank You

Hakik Zaman

Hi Dan,

We are working on a new version. Please remove the above snippet after updating the next version.

We really get excited & honored when you use our plugin on your site.

If you found my support helpful, could you please leave your valuable review here: https://wordpress.org/support/plugin/woo-variation-swatches/reviews/?filter=5

Your rating keeps us inspired.

Thank You