public function getEventByOriginalId($id)
    {
        $args = array(
            'meta_query' => array(
                array(
                    'key' => '_event_manager_id',
                    'value' => $id,
                ),
            ),
            'post_type' => $this->post_type,
            'posts_per_page' => '1',
        );

        $events = get_posts($args);

        if (is_wp_error($events) || !isset($events[0]->ID)) {
            return false;
        }

        return $events[0]->ID;
    }
public function getEventByOriginalId($id)
    {
        $args = array(
            'meta_query' => array(
                array(
                    'key' => '_event_manager_id',
                    'value' => $id,
                ),
            ),
            'post_type' => $this->post_type,
            'posts_per_page' => '1',
        );

        $events = get_posts($args);

        if (is_wp_error($events) || !isset($events[0]->ID)) {
            return false;
        }

        return $events[0]->ID;
    }
public function getEventByOriginalId ( $ id ) { $ args = array ( 'meta_query' => array ( array ( 'key' => '_event_manager_id' , 'value' => $ id , ) , ) , 'post_type' => $ this -> post_type , 'posts_per_page' => '1' , ) ; $ events = get_posts ( $ args ) ; if ( is_wp_error ( $ events ) || ! isset ( $ events [ 0 ] -> ID ) ) { return false ; } return $ events [ 0 ] -> ID ; }
Find an event by it's original id
@param int $id Event ID
@return Int|bool
Find an event by it s original id