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

admin-ajax.php 500 error on variation delete

Erik Schade

Hello,

I’m having a problem where deleting a product variation doesn’t update the page and throws an admin-ajax.php 500 error in console. Refreshing the page shows that the variation was deleted.

This issue occurs on wordpress.com. It did not occur on my development host (Nexcess).

When I disable Variation Swatches for WooCommerce (as well as the Pro plugin), the issue is gone.

I’ve recorded the process here if it helps: https://www.loom.com/share/2803a2c747ec460d88943d61fd0afa49

Please login to the site using the link in Additional Info. Please use “Test Product” to test deleting variations.

Thanks,
Erik

Hakik Zaman

Hi Erik,

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

Please add the below snippet using the Code Snippets plugin. I have already reported this issue to our development team. Please be patient, I will inform you here once a new update will be ready, 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);

Thank You