LLMS_Events::store_cookie()
Store event data saved in the tracking cookie.
Return Return
(void)
Source Source
File: includes/class-llms-events.php
public function store_cookie() { if ( wp_doing_ajax() && ! empty( $_POST['llms-tracking'] ) ) {// phpcs:ignore: WordPress.Security.NonceVerification.Missing -- Nonce verified in `$this->store_tracking_events()` method. return; } // Bail if no `llms-tracking` cookie. if ( empty( $_COOKIE['llms-tracking'] ) ) { return; } $this->store_tracking_events( wp_unslash( $_COOKIE['llms-tracking'] ) ); // phpcs:ignore: WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized via $this->sanitize_raw_event(). // Cookie reset. llms_setcookie( 'llms-tracking', '', time() - 60, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, llms_is_site_https() && is_ssl() ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.3.1 | Set a secure cookie when possible. |
3.37.14 | Moved most of the logic into store_tracking_events() method. Bail if we're sending the tracking events via ajax. |
3.36.0 | Introduced. |