LLMS_AJAX_Handler::persist_tracking_events( array $request )

AJAX handler for persisting tracking events.


Parameters Parameters

$request

(array) (Required) $_POST data.


Top ↑

Return Return

(array|WP_Error)


Top ↑

Source Source

File: includes/class.llms.ajax.handler.php

	public static function persist_tracking_events( $request ) {

		if ( empty( $request['llms-tracking'] ) ) {
			return new WP_Error( 'error', __( 'Missing tracking data.', 'lifterlms' ) );
		}

		$success = LLMS()->events()->store_tracking_events( wp_unslash( $request['llms-tracking'] ) );

		if ( ! is_wp_error( $success ) ) {
			$success = array(
				'success' => true,
			);
		}

		return $success;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.14 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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