LLMS_Order_Generator::create()

Creates a new pending order.


Return Return

(WP_Error|LLMS_Order)


Top ↑

Source Source

File: includes/class-llms-order-generator.php

	protected function create() {

		$order = new LLMS_Order( $this->get_order_id() );

		// If there's no id we can't proceed, return an error.
		if ( ! $order->get( 'id' ) ) {
			return $this->error(
				self::E_CREATE_ORDER,
				__( 'There was an error creating your order, please try again.', 'lifterlms' )
			);
		}

		$order->init( $this->get_user_data(), $this->plan, $this->gateway, $this->coupon );

		return $order;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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