diff --git a/staging_mail_disable.php b/staging_mail_disable.php index 9cad02f..aef89a3 100644 --- a/staging_mail_disable.php +++ b/staging_mail_disable.php @@ -10,7 +10,7 @@ License: MINE-all-mine */ -$constant_requirements = ['WP_ENVIRONMENT_TYPE'=>'staging']; +$constant_requirements = ['WP_ENVIRONMENT_TYPE'=>'staging','dev','development','sandbox']; $plugins = ['fluent-smtp/fluent-smtp.php']; //Loop through our constants requirements diff --git a/wp-staging-plugin-disabler.php b/wp-staging-plugin-disabler.php index 32aad5c..d5e6173 100644 --- a/wp-staging-plugin-disabler.php +++ b/wp-staging-plugin-disabler.php @@ -12,7 +12,7 @@ License: MINE-all-mine require_once(ABSPATH . 'wp-admin/includes/plugin.php'); -$constant_requirements = ['WP_ENVIRONMENT_TYPE'=>'staging']; +$constant_requirements = ['WP_ENVIRONMENT_TYPE'=>'staging','dev','development','sandbox']; $plugins = ['fluent-smtp/fluent-smtp.php']; //Loop through our constants requirements @@ -22,6 +22,7 @@ foreach($constant_requirements as $constant => $requirement) { //Our constant requirement is meet. Plugins need to be disabled deactivate_plugins($plugins); + add_filter('pre_wp_mail', 'staging_mail_disabler'); break; // We only need one constant requirement to be meet } }