Make sure WP_ENVIRONMENT_TYPE is defined before checking the value (https://github.com/woocommerce/woocommerce-admin/pull/8133)

This commit is contained in:
Moon 2022-01-11 22:48:20 -08:00 committed by GitHub
parent a0ffceec06
commit 29d4e96114
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class MailchimpScheduler {
* @return mixed
*/
public function make_request( $store_email ) {
if ( 'development' === constant( 'WP_ENVIRONMENT_TYPE' ) ) {
if ( true === defined( 'WP_ENVIRONMENT_TYPE' ) && 'development' === constant( 'WP_ENVIRONMENT_TYPE' ) ) {
$subscribe_endpoint = self::SUBSCRIBE_ENDPOINT_DEV;
} else {
$subscribe_endpoint = self::SUBSCRIBE_ENDPOINT;