I have an environment variable that is set in wp-config.php, but it is not being picked by the plugin code. However, if I return variable itself in the plugin, it works fine. What am I missing?
// code in wp-config.php
define('MY_ENV_VARIABLE', 'some_string');
// code in my_plugin.php
function get_my_env_variable() {
return getenv('MY_ENV_VARIABLE');
//if I return "some_string" here instead, code works fine but not the getenv()
}