File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,17 @@ public static function get_banner_type_to_display( $status = array() ) {
291291 $ status ['should_display_contextual_banner ' ] = true ;
292292 }
293293
294+ // Fallback for non-US stores if contextual banner flag is not set
295+ if ( isset ( $ status ['tos_accepted ' ] ) && $ status ['tos_accepted ' ] &&
296+ ( ! isset ( $ status ['should_display_after_cxn_banner ' ] ) || ! $ status ['should_display_after_cxn_banner ' ] ) &&
297+ ( ! isset ( $ status ['should_display_contextual_banner ' ] ) || ! $ status ['should_display_contextual_banner ' ] )
298+ ) {
299+ $ is_us_store = ( isset ( $ status ['store_country ' ] ) && 'US ' === $ status ['store_country ' ] );
300+ if ( ! $ is_us_store ) {
301+ return 'after_cxn_non_us ' ;
302+ }
303+ }
304+
294305 // Priority 3: Contextual banners (if standard "after connection" is done or was not applicable,
295306 // TOS is accepted, and the contextual flag is set - either previously or by the block above).
296307 if ( isset ( $ status ['should_display_contextual_banner ' ] ) && $ status ['should_display_contextual_banner ' ] ) {
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ public static function get_option_names( $type = 'compact' ) {
5151 'predefined_packages ' ,
5252 'shipping_methods_migrated ' ,
5353 'should_display_nux_after_jp_cxn_banner ' ,
54+ 'should_display_nux_contextual_banner ' ,
5455 'needs_tax_environment_setup ' ,
5556 'banner_ppec ' ,
5657 );
You can’t perform that action at this time.
0 commit comments