• Ok, so I’m trying to use wp_mail(), get_currentuserinfo() and possibly a couple of other pluggable functions in a plugin I’m writing. This presents a problem because (obviously) the plugin code is loaded before the pluggable functions. Is there any way to get around this?

    S.

Viewing 1 replies (of 1 total)
  • If your plugin is doing something as soon as it’s loaded, then no: there’s no way for you to rely on wp_mail() and get_currentuserinfo(). The functions in pluggable-functions.php are expressly designed to be overriden by plugins, and therefore load after all plugins load.

    If you can reconfigure your plugin to do stuff after pluggable-functions is loaded, you might be better off.

Viewing 1 replies (of 1 total)
  • The topic ‘Using wp_mail in a plugin’ is closed to new replies.