PHP 5.2+ compatibility - don’t use array dereferencing.

This commit is contained in:
Jeff Stieler 2017-05-30 22:56:26 -06:00
parent e7672d6572
commit 0293884660
1 changed files with 2 additions and 1 deletions

View File

@ -313,9 +313,10 @@ class WC_Admin_Addons {
*/
public static function output_wcs_banner_block( $block = null ) {
$is_active = is_plugin_active( 'woocommerce-services/woocommerce-services.php' );
$location = wc_get_base_location();
if (
'US' !== wc_get_base_location()['country'] ||
'US' !== $location['country'] ||
$is_active ||
! current_user_can( 'install_plugins' ) ||
! current_user_can( 'activate_plugins' )