Merge pull request #27148 from woocommerce/fix/dont-request-translations-with-no-locales
Don't request empty locales list for plugin translations.
This commit is contained in:
commit
d5bedd82b2
|
@ -191,6 +191,11 @@ class WC_Helper_Updater {
|
||||||
$locales = apply_filters( 'plugins_update_check_locales', $locales );
|
$locales = apply_filters( 'plugins_update_check_locales', $locales );
|
||||||
$locales = array_unique( $locales );
|
$locales = array_unique( $locales );
|
||||||
|
|
||||||
|
// No locales, the respone will be empty, we can return now.
|
||||||
|
if ( empty( $locales ) ) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
// Scan local plugins which may or may not have a subscription.
|
// Scan local plugins which may or may not have a subscription.
|
||||||
$plugins = WC_Helper::get_local_woo_plugins();
|
$plugins = WC_Helper::get_local_woo_plugins();
|
||||||
$active_woo_plugins = array_intersect( array_keys( $plugins ), get_option( 'active_plugins', array() ) );
|
$active_woo_plugins = array_intersect( array_keys( $plugins ), get_option( 'active_plugins', array() ) );
|
||||||
|
|
Loading…
Reference in New Issue