afragen / local-development

WordPress plugin to provide local development message for selected plugins/themes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set WP_ENVIRONMENT_TYPE does't work for WP 5.5.1+

cheh opened this issue · comments

Unrortenantly, this feature doesn't work for WP 5.5.1+ if entirouments are configured on LocalWP .

Whenever I try to set environment type, it will be forced to local:

Screen.Capture.on.2022-08-16.at.11-28-10.mov

But it works precisely for WP 5.5.
I guess the issue is related to changes that were made in 5.5.1 for the wp_get_environment_type() function.

LocalWP: v6.4.2
OS: macOS
PHP: 5.6

P.S. It would be great if WP < 5.5 were supported as well.
It might be required to add the wp_get_environment_type() function with function_exists() for backward compatibility, but it seems not a bug deal 😉

This is because LocalWP sets this constant in one of its startup files.

This plugin checks to see if the constant is defined and if it is it uses that value.

https://community.localwp.com/t/dont-define-wp-environment-type/24587