LLMS_Form_Handler::submit_error( WP_Error $error, array $posted_data, string $action )

Ensure all errors objects encountered during form submission are filterable.


Parameters Parameters

$error

(WP_Error) (Required) Error object.

$posted_data

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

$action

(string) (Required) Form action, either "registration" or "update".


Top ↑

Return Return

(WP_Error)


Top ↑

Source Source

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

	protected function submit_error( $error, $posted_data, $action ) {

		/**
		 * Filter the error return when the insert/update fails.
		 *
		 * The dynamic portion of this hook, `$action`, can be either "registration" or "update".
		 *
		 * @since 3.0.0
		 * @since 5.0.0 Moved from `LLMS_Person_Handler::insert_data()`.
		 *
		 * @param WP_Error $error       Error object.
		 * @param array    $posted_data Array of user-submitted data.
		 * @param string   $action      Submission action, either "registration" or "update"!
		 */
		return apply_filters( "lifterlms_user_{$action}_failure", $error, $posted_data, $action );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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