I am a happy user of GDMail Queue lite, except that the queue filter seems not to be working now. I have the following code:
defined( 'ABSPATH' ) || exit;
add_filter('gdmaq_mailer_add_to_queue', 'custom__gdmaq_mailer_add_to_queue', 10, 3);
function custom__gdmaq_mailer_add_to_queue($add, $email, $type) {
error_log("Queue tuning $add: " + $add?"true":"false" + " type: " + $type + " subject: ", $email->subject);
$to_queue_types = array('bbpress_new_topic_in_forum', 'bbpress_new_reply_in_topic', 'bbpress_topic_edit', 'bbpress_reply_edit', 'buddypress_messages-unread');
if ((in_array($type, $to_queue_types)) ||
(strncmp($email->subject, '[Ovni Owners] new post notification', 35) == 0) ||
(strncmp($email->subject, '[Ovni Owners] There is a new comment to', 35) == 0)){
$add = true;
}
else {
$add = false;
}
return $add;
}
Note I have a print to log statement at the beginning – the rest is irrelevant to this query. I am not seeing anything in the log.
I do see other logging using this technique. I am seeing emails processed by GD Mail Queue, either being queued or not but without the help of this filter being called. It used to work – methinks.
Can you advise, please?
- The topic ‘gdmaq_mailer_add_to_queue filter not being called?’ is closed to new replies.