FacetWP – show only upcoming events

<?php

add_filter( 'facetwp_query_args', function( $query_args, $class ) {
    if ( 'events' == $class->template['name'] ) {
        $query_args['meta_query'] = array(
            array(
                'key' => 'date',
                'value' => current_time( 'Ymd' ),
                'compare' => '>=',
            )
        );
    }
    return $query_args;
}, 10, 2 );