sergefcleantalk
Forum Replies Created
-
Why did you mark the issue as resolved without consensus?
Hello
Thank you for your reply.There may be a small misunderstanding about how pre_wp_mail is used.
Current situation
In mail-handler.php around line 103, SureMail applies the filter:
$pre_wp_mail = apply_filters( ‘pre_wp_mail’, null, $atts );
That runs inside <code class=””>MailHandler::process_mail() and checks whether another plugin has already short-circuited the call. It does not add apre_wp_mailcallback for SureMail itself.Why SureMail’s handler often never runs
Insuremails.php(around lines 55–69), SureMail only defineswp_mailwhen it doesn’t already exist. In standard WordPress, pluggable loads before plugins, so when SureMail loads,wp_mailusually already exists. In that case, SureMail never defines its ownwp_mail, so <code class=””>MailHandler::handle_mail() (and logging) never runs. SureMail’s behaviour therefore still depends on plugin load order.Proposed fix
Add apre_wp_mailfilter whenwp_mailalready exists so SureMail can intercept all calls. Keep the currentwp_maildefinition only for the rare case when it doesn’t exist.With this approach, SureMail’s MailHandler and logging run regardless of plugin load order.
More details and a full example are in this gist: https://gist.github.com/svfcode/790f2dc6e6f4aab0688e9f58dce92d4bBest regards
- This reply was modified 2 weeks, 6 days ago by sergefcleantalk.
Forum: Developing with WordPress
In reply to: Early sanitizationThanks for your reply.
Forum: Plugins
In reply to: [AMP] How do I get a compatibility icon for a plugin?Hello
It’s been 4 months, but we haven’t heard from you and our plugins haven’t appeared on your list.
Could you tell me the reason?