• Resolved shawfactor

    (@shawfactor)


    I need to be able to run a custom process on all events that have past.

    Is there a hook or similar that runs when an eevent is past that I could attach a function too?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey there @shawfactor!

    Thanks for reaching out.

    Would tribe_is_past_event work for what you’re trying to do?

    Here’s a link to our functions list that are related to this one → https://p.tri.be/n2NooC

    Hope that helps!

    Thread Starter shawfactor

    (@shawfactor)

    No I’m after a hook, ie an action or a filter that processes all events that have passed.

    What you sent me is a function. So of no help unless I have to write my own process I guess…

    Yeah, you would need to filter the_posts or utilize that function.

    function tribe_past_events_er ($post_object) {
    	$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'past') ? true : false;
    	if(tribe_is_past() || $past_ajax) {
    		
    
    	}
    	return $post_object;
    }
    add_filter('the_posts', 'tribe_past_events_er', 100);

    Hey there,

    Since this thread has been inactive for a while, I’m going to go ahead and mark it as resolved. Don’t hesitate to create a new thread any time you help again!

    Ed ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there a hook’ is closed to new replies.