-
AuthorPosts
-
February 20, 2018 at 4:35 pm #914882
Hi
This thread is to share a solution to a serious and non-stopped errors that get generated on the host server that required my host (WP Engine) to block admin-ajax.php (this means no more access to site nor wp-admin). This happens when one makes changes to the WooCommerce Thumbnails Product Images or switches theme. This happened to me while I was troubleshooting issues and switched theme and deactivating/reactivating plugins.
This is the nasty non-stop error:
” PHP Warning: Invalid argument supplied for foreach() in /nas/content/live/lysejewelry/wp-content/plugins/woocommerce/includes/abstracts/class-wc-background-process.php on line 101, referer: https://lysetremblayjewelry.ca/wp-admin/admin-ajax.php?action=wp_1_wc_regenerate_images&nonce=21b126e3af ”WooThemes support suggested this thread to read about the many occurrences and tried solution related to this issue:
https://wordpress.org/support/topic/woocommerce-causing-huge-cpu-usage-spike/#post-9994248After working with WP Engine over a 30 minute chat session, they provided the following code snippet that stopped all automatic regeneration of thumbnails:
/* filter added to prevent automatic regeneration of thumbnail images and causing server hikes */ add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
My host suggested that this be added to the theme functions.php and recommended I immediately add it to all of my sites functions.php until your development team add it to the parent theme.
Just thought you may want to take action on resolving this problem.
Thanks
LyseFebruary 20, 2018 at 9:15 pm #915040Hey tremblayly,
We report those to our developers, but I am sure that it is something the WooCommerce team will solve if it is making issues with many different providers
In the mean time you can keep it at functions.php it is just fineBest regards,
BasilisFebruary 21, 2018 at 3:49 am #915169Thank you Basilis
-
AuthorPosts
- You must be logged in to reply to this topic.