diff --git a/staging_mail_disable.php b/staging_mail_disable.php new file mode 100644 index 0000000..9cad02f --- /dev/null +++ b/staging_mail_disable.php @@ -0,0 +1,27 @@ +'staging']; +$plugins = ['fluent-smtp/fluent-smtp.php']; + +//Loop through our constants requirements +foreach($constant_requirements as $constant => $requirement) +{ + if (constant($constant) === $requirement) + { + add_filter('pre_wp_mail', 'staging_mail_disabler'); + } +} + +function staging_mail_disabler() { + return false; +} \ No newline at end of file diff --git a/wp-staging-plugin-disabler.php b/wp-staging-plugin-disabler.php index 4025338..32aad5c 100644 --- a/wp-staging-plugin-disabler.php +++ b/wp-staging-plugin-disabler.php @@ -25,4 +25,3 @@ foreach($constant_requirements as $constant => $requirement) break; // We only need one constant requirement to be meet } } -