Skip to content

Commit

Permalink
fix(event): force rsvp date, #769 (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Mar 25, 2022
1 parent e5ec8da commit 76768c1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,16 @@ function remove_wp_block_library_css() {
wp_dequeue_style( 'wp-block-library-theme' );
}
add_action( 'wp_enqueue_scripts', 'remove_wp_block_library_css', 100 );

// em-event.php 585: apply_filters( 'em_event_load_postdata', $this );.

/**
* Force RSVP date as the end date
*
* @param object $event EM Event.
*/
add_filter( 'em_event_load_postdata', 'mozilla_force_rsvp_end', 10, 2 );
function mozilla_force_rsvp_end( $event ) {
$event->event_rsvp_date = $event->event_end_date;
return $event;
}

0 comments on commit 76768c1

Please sign in to comment.