From e26379a86c4d0d627210f8fba347286c8eb4f740 Mon Sep 17 00:00:00 2001 From: ren <18050944+renintw@users.noreply.github.com> Date: Thu, 21 Sep 2023 01:11:36 +0800 Subject: [PATCH] Set end_date as start_date for 1-day events. --- .../includes/debrief-survey/cron.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php b/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php index 48682144a9..9b35ca4e96 100644 --- a/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php +++ b/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php @@ -125,8 +125,8 @@ function is_time_to_send_email( $email_id ) { $end_date = $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0]; if ( ! isset( $end_date ) ) { - log( 'WordCamp missing end date', $email_id, $wordcamp_post ); - return false; + // Some sites that are only 1-day events will only have the start date. + $end_date = $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0]; } $date = new \DateTime("@$end_date ");