Merge branch 'pr/19257'
This commit is contained in:
commit
7cb2e11c01
|
@ -43,7 +43,7 @@ class WC_Regenerate_Images {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not required when Jetpack Photon is in use.
|
// Not required when Jetpack Photon is in use.
|
||||||
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
|
if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'photon' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class WC_Regenerate_Images {
|
||||||
// See if the image size has changed from our settings.
|
// See if the image size has changed from our settings.
|
||||||
if ( ! self::image_size_matches_settings( $data, $size ) ) {
|
if ( ! self::image_size_matches_settings( $data, $size ) ) {
|
||||||
// If Photon is running we can just return false and let Jetpack handle regeneration.
|
// If Photon is running we can just return false and let Jetpack handle regeneration.
|
||||||
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
|
if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'photon' ) ) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// If we get here, Jetpack is not running and we don't have the correct image sized stored. Try to return closest match.
|
// If we get here, Jetpack is not running and we don't have the correct image sized stored. Try to return closest match.
|
||||||
|
|
Loading…
Reference in New Issue