0

Woocommerce just launched an update (3.0) with transactional emails being send with a CRON-job. This causes troubles to a lot of sites because their server isn't accepting it. And so is mine.

Users with problems: https://wordpress.org/support/topic/emails-not-being-sent-out-2/#post-9006383

There is a workaround to disable this new way of sending emails, but I realy want to go forward and do it as supposed (with the CRON-job).

Workaround: https://gist.github.com/mikejolley/16ca078f5c74b401e6ba210644e3173d

I'm on a VPS (CentOS 7 with DirectAdmin) and have full control. I'm wondering how I can enable this on my server. A direction to search to also helps.

Thanks,

Ruben

Ruben
  • 11
  • 3

1 Answers1

0

The most likely reason seems to be people disabling the WP CRON feature somehow. Check your wp-config for a line like this:

define('DISABLE_WP_CRON', true);

removing it should enable WP_CRON. If the cron jobs are not running or get any kind of error message, it can be difficult to see what is happening. That is why there is a plugin to debug it:

wordpress.org/plugins/debug-bar-cron 

install this plugin and see if the cron jobs are running and what errors they are generating. WP CRON jobs should run as the same user as any other request.

But, here is the biggest problem you might have: WP CRON jobs don't run if your wp site isn't getting any hits. Yeah, so if you have an idle site that gets an order once every day or two, the email may just sit and never get sent. If your site isn't busy enough to ensure the cron jobs will run, you are better disabling it (although, you could set up an outside service, even a CentOS based crontab job, to hit the site every 5-10 minutes)

Garr Godfrey
  • 8,257
  • 2
  • 25
  • 23