LLMS_Order::set_status( string $status )

Update the status of an order


Parameters Parameters

$status

(string) (Required) Status name, accepts unprefixed statuses.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/models/model.llms.order.php

	public function set_status( $status ) {

		if ( false === strpos( $status, 'llms-' ) ) {
			$status = 'llms-' . $status;
		}

		if ( array_key_exists( $status, llms_get_order_statuses( $this->get( 'order_type' ) ) ) ) {
			$this->set( 'status', $status );
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.2.0 Prefer array_key_exists( $key, $keys ) over in_array( $key, array_keys( $assoc_array ) ).
3.8.0
3.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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