Hide status button when disabled via filter

This commit is contained in:
Mike Jolley 2018-02-14 17:00:43 +00:00
parent ebc8ff0737
commit 7ae0f6c274
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller {
);
// Jetpack does the image resizing heavy lifting so you don't have to.
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
if ( ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) || ! apply_filters( 'woocommerce_background_image_regeneration', ! is_multisite() ) ) {
unset( $tools['regenerate_thumbnails'] );
}