• Resolved Kerfred

    (@kerfred)


    Congratulations for your useful plugin.

    A good improvement would be to prevent the emails from sending. It is useful for example for development sites that don’t want to send email to real customers.
    Would it be possible to add this feature in a future version?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author JWardee

    (@wardee)

    Hi @kerfred, you could do this without a plugin, because wp_mail is considered a “pluggable” function you can override it with something like:

    // Your theme's functions.php
    function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) {  
    
        return true;
    }

    I’ve not tested the snippet but it should be enough to get you started. I hope that helps!

    Thread Starter Kerfred

    (@kerfred)

    Thank you for the tip.

    But I still think it would be a good thing to include this feature in the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent emails from sending’ is closed to new replies.