llms_get_possible_order_statuses( LLMS_Order $order )

Get the possible statuses of a given order.


Parameters Parameters

$order

(LLMS_Order) (Required) The LLMS_Order instance.


Top ↑

Return Return

(array[])


Top ↑

Source Source

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

 *
 * @since 5.4.0
 *
 * @param LLMS_Order $order The LLMS_Order instance.
 * @return array[]
 */
function llms_get_possible_order_statuses( $order ) {

	$is_recurring = $order->is_recurring();
	$statuses     = llms_get_order_statuses( $is_recurring ? 'recurring' : 'single' );

	// Limit the possible status for recurring orders whose product ID doesn't exist anymore.
	if ( $is_recurring && ! llms_get_post( $order->get( 'product_id' ) ) ) {
		unset( $statuses['llms-active'] );
		unset( $statuses['llms-on-hold'] );
		unset( $statuses['llms-pending'] );


Top ↑

Changelog Changelog

Changelog
Version Description
5.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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