LLMS_Order_Generator::commit_user()

Registers or updates the user from the submitted data.


Return Return

(integer|WP_Error) Returns the WP_User ID on success or an error object.


Top ↑

Source Source

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

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
protected function commit_user() {
 
    $args = array(
        'plan' => $this->plan,
    );
 
    $user_id = get_current_user_id() ?
        llms_update_user( $this->data, 'checkout', $args ) :
        llms_register_user( $this->data, 'checkout', true, $args );
 
    if ( ! is_wp_error( $user_id ) ) {
        $this->student = llms_get_student( $user_id );
    }
 
    return $user_id;
 
}


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.