llms_get_order_statuses( string $order_type = 'any' )

Retrieve an array of registered and available LifterLMS Order Post Statuses


Description Description


Parameters Parameters

$order_type

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

Default value: 'any'


Top ↑

Return Return

(array)


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'] );
		break;

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

	return apply_filters( 'llms_get_order_statuses', $statuses, $order_type );

}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: