From e343590011d1db9347d630488ba7a96e969b6d61 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Thu, 21 Sep 2023 19:06:37 +0300 Subject: [PATCH] fix(vip-helpers): detect codespace as a non-prod environment (#4873) --- vip-helpers/vip-non-production.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vip-helpers/vip-non-production.php b/vip-helpers/vip-non-production.php index f73e51f0fc..62f87915a4 100644 --- a/vip-helpers/vip-non-production.php +++ b/vip-helpers/vip-non-production.php @@ -13,10 +13,15 @@ function vip_do_non_prod_bar() { } if ( apply_filters( 'vip_show_non_prod_bar', true ) ) : + $environment = constant( 'VIP_GO_APP_ENVIRONMENT' ); + if ( 'local' === $environment && 'true' === getenv( 'CODESPACES' ) ) { + $environment = 'codespaces'; + } + ?>
- +