LLMS_Order_Generator::generate( string $user_action = self::UA_COMMIT )
Generates an order.
Description Description
Uses data submitted during class construction and performs all necessary validations. If validations pass, creates the order.
Parameters Parameters
- $user_action
-
(string) (Optional) The user action, accepts
LLMS_Order_Generator::UA_COMMIT
orLLMS_Order_Generator::UA_VALIDATE
.Default value: self::UA_COMMIT
Return Return
(WP_Error|LLMS_Order)
Source Source
File: includes/class-llms-order-generator.php
public function generate( $user_action = self::UA_COMMIT ) { $validate = $this->validate(); if ( is_wp_error( $validate ) ) { return $validate; } if ( self::UA_COMMIT === $user_action ) { $user = $this->commit_user(); if ( is_wp_error( $user ) ) { return $user; } } return $this->create(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |