From 5c4c80079234320021856b3b977860ccc41b1a0d Mon Sep 17 00:00:00 2001 From: Matias Saggiorato Date: Wed, 31 Mar 2021 22:56:23 -0300 Subject: [PATCH] Backport PR #74 and #79 --- .../class-wc-amazon-payments-advanced-multi-currency.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/compats/class-wc-amazon-payments-advanced-multi-currency.php b/includes/compats/class-wc-amazon-payments-advanced-multi-currency.php index 4b0995bf..128e7cf6 100644 --- a/includes/compats/class-wc-amazon-payments-advanced-multi-currency.php +++ b/includes/compats/class-wc-amazon-payments-advanced-multi-currency.php @@ -163,8 +163,8 @@ public static function compatible_plugin( $return_name = false ) { $match = false; if ( 0 === strpos( $definition_name, 'global' ) ) { $global_name = str_replace( 'global_', '', $definition_name ); - global ${$global_name}; - if ( ${$global_name} ) { + + if ( isset( $GLOBALS[ $global_name ] ) && $GLOBALS[ $global_name ] ) { $match = true; } } elseif ( 0 === strpos( $definition_name, 'class' ) ) {