add_action( 'wp_head', 'resource_registered', 30, 2 );
function resource_registered( $entry_id, $form_id ) {
$cookie_value = 'abc' // some logic here to set the value of the cookie
setcookie( 'user_status', $cookie_value, time() + 31556926, '/' );
}
}
]]>
https://www.wpbeginner.com/wp-tutorials/how-to-set-get-and-delete-wordpress-cookies-like-a-pro/
]]>function resource_registered($entry_id, $form_id) {
$value = true;
setcookie('returning_user', $value, time() + 31556926, '/');
}
if (isset($_COOKIE['returning_user']) && $_COOKIE['returning_user'] == true) {
// do stuff if cookie is set
}
]]>