Cookies should only be set in wp-admin, avoid setting when doing ajax requests since that is seen as an admin request as well.
This commit is contained in:
parent
badb135bd6
commit
e22a024473
|
@ -43,6 +43,11 @@ class WC_Tracks_Client {
|
|||
* @return void
|
||||
*/
|
||||
public static function maybe_set_identity_cookie() {
|
||||
// Do not set on AJAX requests.
|
||||
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bail if cookie already set.
|
||||
if ( isset( $_COOKIE['tk_ai'] ) ) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue