diff --git a/bootstrap.php b/bootstrap.php index b1bcf2d5..2fde13d0 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -38,7 +38,7 @@ function() { 'id' => 'hostgator', 'file' => HOSTGATOR_PLUGIN_FILE, 'brand' => get_option( 'mm_brand', 'hostgator' ), - 'region' => get_option( 'hg_region', 'US' ), + 'region' => strtoupper( get_option( 'hg_region', 'US' ) ), 'install_date' => get_option( 'hg_plugin_install_date', false ), ) ); @@ -50,7 +50,7 @@ function() { if ( get_option( 'mm_brand', false ) && get_option( 'hg_region', false ) ) { $nfd_module_container->set( 'marketplace_brand', - get_option( 'mm_brand', false ) . '_' . get_option( 'hg_region', false ) + get_option( 'mm_brand', false ) . '_' . strtoupper( get_option( 'hg_region', false ) ) ); } diff --git a/src/app/util/helpers.js b/src/app/util/helpers.js index 27dfc7f9..51ca7126 100644 --- a/src/app/util/helpers.js +++ b/src/app/util/helpers.js @@ -142,7 +142,7 @@ export const comingSoonAdminbarToggle = ( comingSoon ) => { */ export const getRegionValue = () => { const brand = NewfoldRuntime.sdk.plugin.brand; - const region = NewfoldRuntime.sdk.plugin.region; + const region = NewfoldRuntime.sdk.plugin.region.toUpperCase(); // bail if not hostgator-latam brand if ( brand !== 'hostgator-latam' ){ @@ -151,16 +151,15 @@ export const getRegionValue = () => { // qualify region setting and return region code switch ( region ) { case 'BR': - return region; - break; case 'MX': case 'CO': case 'CL': return region; break; + case 'US': case false: default: - return ''; + return 'default'; } };