• Resolved Daniel Watrous

    (@dwatrous)


    Everything appears to be green, but when I activate it shows a message:
    “Another plugin did override wp-mail function. Please de-activate the other plugin if you want WP SES to work properly.”

    When I refresh the plugin page, it shows not activated. I wasn’t sure what plugin was defining wp-mail, so I ran found where you decide whether to show me that message https://github.com/wp-plugins/wp-ses/blob/master/wp-ses.php#L642 and did the following grep on my entire wordpress installation:

    grep -R “function\s*wp_mail”
    wp-content/plugins/wp-ses/wp-ses.php: function wp_mail($to, $subject, $message, $headers = ”, $attachments = ”) {
    wp-includes/pluggable.php:function wp_mail( $to, $subject, $message, $headers = ”, $attachments = array() ) {

    It is defined in two places, once in pluggable.php and once in your plugin. I don’t find any other declarations for this function. I glanced at https://github.com/WordPress/WordPress/blob/master/wp-includes/pluggable.php. Is there a race between pluggable.php and your plugin?

    Any ideas to help me resolve this and activate?

    https://www.ads-software.com/plugins/wp-ses/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Daniel Watrous

    (@dwatrous)

    I just activated logging and see that it is seeing the wp_mail defined in pluggable.php

    1464324935 Start Logging
    1464324939 2 Verified Identities.
    1464324939 Sender Ok
    1464324939 Normal activation
    1464324942 ERROR wp_mail override by another plugin !!
    1464324942 Then deactivating plugin
    1464324942 wp_mail already defined in /home/user/public_html/wp-includes/pluggable.php
    1464324942 2 Verified Identities.
    1464324942 Sender Ok
    1464324948 2 Verified Identities.
    1464324948 Sender Ok

    Thread Starter Daniel Watrous

    (@dwatrous)

    I discovered that another plugin called require_once for pluggable.php, causing it to load earlier than it otherwise would and breaking your plugin. I’ll find a way to fix the other plugin so it doesn’t call pluggable too early.

    Plugin Contributor Sylvain Deaure

    (@sylvaindeaure)

    Yep, you got it !

    pluggable.php should not be manually required. It’s loaded later on by wp.
    If included by a plugin, it breaks all pluggable functions for others plugins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Another plugin did override wp-mail function. Please de-activate the other plugi’ is closed to new replies.