strangerstudios / pmpro-events

Offer members-only events using popular events plugins and Paid Memberships Pro.
https://www.paidmembershipspro.com/add-ons/events-for-members-only/
8 stars 10 forks source link

Undefined variable $event in The Events Calendar module #29

Closed dparker1005 closed 3 years ago

dparker1005 commented 4 years ago

Notice: Undefined variable: event in /site/wp-content/plugins/pmpro-events/modules/the-events-calendar.php on line 137

Should fix this by passing $event as a second parameter into the pmpro_events_tribe_events_excerpt_filter() function here: https://github.com/strangerstudios/pmpro-events/blob/e8b5197092964d507e00f741b4efa1c1525d862a/modules/the-events-calendar.php#L130-L149

Filter code from The Events Calendar docs:

/**
 * Filter the event excerpt used in various views.
 *
 * @param string  $excerpt
 * @param WP_Post $post
 */
$excerpt = apply_filters( 'tribe_events_get_the_excerpt', wpautop( $excerpt ), $post );

https://docs.theeventscalendar.com/reference/functions/tribe_events_get_the_excerpt/

andrewlimaza commented 3 years ago

Fixed, releasing in new update soon! :)

Thanks for the helpful issue here. Made it a breeze!