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 20, 2023
1 parent d82ab0e commit e26379a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ");
Expand Down

0 comments on commit e26379a

Please sign in to comment.