How do I modify each instance of setcookie?

I installed the SameSite plug-in which mimics the default PHP setcookie behavior and adds the additional parameter (samesite) to the cookie. I set the plug-in configuration in wp-config.php with: define( ‘WP_SAMESITE_COOKIE’, ‘None’ ); By setting the configuration of samesite=None, browsers will not enforce SameSite rules that are used to prevent CSRF. From the Mozilla blog: … Read more

Rest Api WordPress

Check caching/plugins interference Try using: jQuery.ajax({ type: ‘POST’, url : obj_php.ajax_url_login, beforeSend: function (xhr) { xhr.setRequestHeader(‘X-WP-Nonce’, obj_php.nonce); }, Check that nonce is actually set correctly in the hidden form field and when submitting check the payload in dev console, make sure the key/value match i.e, nonce_check: e7chadas0d Lastly, double check you have it setup according … Read more

WordPress keep logged in after browser close

You can use the following 2 filter hooks add_filter(‘auth_cookie_expiration’, ‘auth_cookie_expiration_filter_5587’); function auth_cookie_expiration_filter_5587() { return YEAR_IN_SECONDS * 5; } and: add_filter(‘auth_cookie_expiration’, function () { return YEAR_IN_SECONDS * 5; });