Skip to content

Commit

Permalink
Set end_date as start_date for 1-day events.
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Sep 21, 2023
1 parent d82ab0e commit 5424875
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ 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;
if ( empty( $end_date ) ) {
// 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 ");
Expand Down

0 comments on commit 5424875

Please sign in to comment.