LLMS_Form_Handler::submit( array $posted_data, string $location, array $args = array() )

Form submission handler


Parameters Parameters

$posted_data

(array) (Required) User-submitted form data.

$location

(string) (Required) Form location ID.

$args

(array) (Optional) Additional arguments passed to the short-circuit filter.

Default value: array()


Top ↑

Return Return

(int|WP_Error) WP_User ID on success, error object on failure.


Top ↑

Source Source

File: includes/forms/class-llms-form-handler.php

		// Make sure the user id cannot be forced by user submission.
		unset( $posted_data['user_id'] );

		return $this->submit_fields( $posted_data, $location, $fields, $action );

	}

	/**
	 * Form fields submission
	 *
	 * @since 5.0.0
	 * @since 5.1.0 Added "lifterlms_user_${action}_required_data" filter, to filter the required fields validity of the form submission.
	 *
	 * @param array   $posted_data User-submitted form data.
	 * @param string  $location    Form location ID.
	 * @param array[] $fields      Array of LifterLMS Form Fields.
	 * @param string  $action      User action to perform.
	 * @return int|WP_Error WP_User ID on success, error object on failure.
	 */
	public function submit_fields( $posted_data, $location, $fields, $action ) {

		/**
		 * Run an action immediately prior to user registration or update.
		 *


Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Remove invisible fields from when loading the checkout form.
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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