llms_get_order_statuses( string $order_type = 'any' )

Retrieve an array of registered and available LifterLMS Order Post Statuses.

Parameters Parameters


(string) (Optional) Filter statuses which are specific to the supplied order type, defaults to any statuses.

Default value: 'any'

Top ↑

Return Return


Top ↑

Source Source

File: includes/functions/llms.functions.order.php

function llms_get_order_statuses( $order_type = 'any' ) {

	$statuses = wp_list_pluck( LLMS_Post_Types::get_order_statuses(), 'label' );

	// Remove types depending on order type.
	switch ( $order_type ) {
		case 'recurring':
			unset( $statuses['llms-completed'] );

		case 'single':
			unset( $statuses['llms-active'] );
			unset( $statuses['llms-expired'] );
			unset( $statuses['llms-on-hold'] );
			unset( $statuses['llms-pending-cancel'] );

	 * Filters the order statuses.
	 * @since Unknown.
	 * @param array[] $statuses   Array of order post status arrays.
	 * @param string  $order_type The type of the order.
	return apply_filters( 'llms_get_order_statuses', $statuses, $order_type );


Top ↑

Changelog Changelog

Version Description
3.19.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.