Merge branch 'pr/19257'

This commit is contained in:
Mike Jolley 2018-03-07 11:18:53 +00:00
commit 7cb2e11c01
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class WC_Regenerate_Images {
}
// 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;
}
@ -84,7 +84,7 @@ class WC_Regenerate_Images {
// See if the image size has changed from our settings.
if ( ! self::image_size_matches_settings( $data, $size ) ) {
// 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;
} else {
// If we get here, Jetpack is not running and we don't have the correct image sized stored. Try to return closest match.