are you put the code inside the init action?
-
This reply was modified 4 years, 6 months ago by wprock.
I entered the code exactly like this:
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
I do not know what “inside the init action” means, sorry.
I am talking this
add_action( 'init', 'paulc_disable_image_regeneration_process' );
function paulc_disable_image_regeneration_process() {
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
}
Code v1
added to functionality plugin, nothing happened, thumbnails still regenerated.
added to theme functions.php file, nothing happened, thumbnails still regenerated.
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
—
Code v2:
added to functionality plugin: nothing happened, thumbnails still regenerated.
added to theme functions.php file, crashed site, white screen on WP admin and site
add_action( 'init', 'paulc_disable_image_regeneration_process' );
function paulc_disable_image_regeneration_process() {
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
}
—
Server Information
Apache Version: 2.4.41
PHP Version: 5.6.40
Website
PHP version: 7.3
—
Thanks for trying to help!