Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alex Polonski

    (@alex3493)

    You are right. I didn’t expect that tribe_get_events() function (a standard approach to getting events from Events Calendar) allowed unpublished events to pass through. I haven’t found a filter for event (post) status in their documentation.
    I can propose a workaround:
    Locate includes/helper.php file in Events Calendar Bridge plugin folder. Find code like this (around line 143):

    // If no posts let's bail
    if ( empty( $posts ) ) {
    	continue;
    }

    and change it to:

    // discard unpublished events
    $posts = array_filter($posts, function($p) {
    	return $p->post_status == 'publish';
    });
    
    // If no posts let's bail
    if ( empty( $posts ) ) {
    	continue;
    }

    Please, let me know if it works.

    Thread Starter Eric C

    (@fferic)

    Perfect! That fixes it. Thank you for the quick reply!

    Plugin Author Alex Polonski

    (@alex3493)

    I have published new plugin version (1.2) with “publish status filter” fix. It is safe to update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Countdown includes events that are set to draft.’ is closed to new replies.