\WP_Stager_Integration\Event::get_past_events(int $limit = 10): array[]

Description

Gets past events.

Parameters:

ParameterTypeDescription
$limit int The maximum number of events to return.

Returns:

array[] List of raw Stager event arrays.

Information

Fileclass-event.php line 622

Full Code

/**
 * Gets past events.
 *
 * @param int $limit   The maximum number of events to return.
 *
 * @return array[] List of raw Stager event arrays.
 */
public static function get_past_events( $limit = 10 ) {

    // Type casting
    $limit = (int) $limit;

    // Get data
    $now = time();

    return self::get_events_within_date_range( null, $now, $limit );
}

💡 If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration

🎁 Limited offer: Use code WELCOME26 to get your first month for free!