Quantcast
Channel: Satollo » All Posts
Viewing all articles
Browse latest Browse all 2460

Reply To: Mails not being sent at all

$
0
0

Hello,
i had the same problem, it shows “next run” in minus seconds… actually it happend always after some time plugin was activated. i created some quick fix, which seems work, but i am not sure if it is correct:

just put it in functions.php

function wp_cron_schedules($schedules) {
$schedules['mailer'] = array(
‘interval’ => 300, // seconds
‘display’ => ‘Mailer’
);
return $schedules;
}

add_filter(‘cron_schedules’, ‘wp_cron_schedules’);

if (wp_next_scheduled(‘mailer_send’) == 0) {
wp_clear_scheduled_hook(‘mailer_send’);
wp_schedule_event(time() + 900, ‘mailer’, ‘mailer_send’);
}


Viewing all articles
Browse latest Browse all 2460

Trending Articles