• Hello, with version 1.5.0, every hour cron reports this:

    array ()
    

    Regards

    • This topic was modified 5 years, 7 months ago by Carret.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi carret! How can I check my cron reports? The reminder emails are not working on my site for some weeks now, and I assume it will be the same problem.

    Thread Starter Carret

    (@carret)

    Hi Fsanya.

    I have disabled the internal cron of WordPress and use cron from the hosting. My hosting sends me if there is an error.

    In this case the plugin in the file:
    yith-woocommerce-review-reminder/includes/class-ywrr-schedule.php

    has the line:

    error_log (print_r ($ orders, true));

    with what I get the result although there is no error.

    I have made an arrangement for me in the hourly_schedule() function and now the reminders email are send.

    
    public function hourly_schedule() {
      global $wpdb;
    
      $number = get_option( 'ywrr_hourly_send_number' );
    
      // FIX
      $number = 10;
      // FIX
    
      $orders = $wpdb->get_results( $wpdb->prepare( "
      SELECT	order_id,
    		order_date,
    		request_items
      FROM	{$wpdb->prefix}ywrr_email_schedule
      WHERE	mail_status = 'pending' AND scheduled_date <= %s
      ORDER BY	id DESC
      LIMIT		{$number}
      ", current_time( 'mysql' ) ) );
    
      //error_log(print_r($orders, true));
    

    Only I added $number=10; and commented error_log (print_r ($ orders, true)); to not receive notices. With this every hour a maximum of 10 emails are sent out of those that are pending.

    Checking the code I see that only emails are sent if there are 12 reminders or more pending. If there are less, they will never be sent.

    $number = round($count / 24);

    $number is the maximum number of emails that will be sent every hour. And it is recalculated once every 24 hours.

    If there are 11 pending reminders or less then the email will stop, as long as there are no more completed orders that are 7 days old or more.

    Wow, thank you very much! I made the modification you suggested and now all the queued emails are sent out (even for orders made 1 month ago). You are a lifesaver! Hopefully soon YITH team will solve this bug officially for good.

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,
    Thank you very much for the feedbacks, we will check about this issue and as soon as possible we will release a new update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Every hour cron reports this: array ()’ is closed to new replies.