diff --git a/functions.php b/functions.php index 96e88ad04..34dfa8abc 100644 --- a/functions.php +++ b/functions.php @@ -7,7 +7,9 @@ require_once __DIR__ . '/vendor/autoload.php'; if (!defined('WP_ENV')) { - define('WP_ENV', 'production'); + define('WP_ENV', function_exists('wp_get_environment_type') ? wp_get_environment_type() : 'production'); +} elseif (!defined('WP_ENVIRONMENT_TYPE')) { + define('WP_ENVIRONMENT_TYPE', WP_ENV); } // Check if the required plugins are installed and activated.