OK, figured out my own problem. In case anyone else stumbles across this and has similar issues:
The problem was due to incomplete/incorrect implementation of SSL. I had recently moved everything to SSL (and setup both wp-config and .htaccess to force use of https).
This created a problem for some links to pages that were not updated to include the ‘s’ in https. WP would still display the page correctly, but the cookies would break, therefore causing the incorrect return of is_user_logged_in().
The solution was embarrassingly simple: update the links to https.
Related Posts:
- Should wordpress_logged_in cookie exist while logged out?
- How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?
- WordPress authentication cookie and ajax calls
- Detect if authentication is set to “remember” a user being logged on
- Can I “protect” a page with a form asking for an email address?
- Cookie is not set
- Logged In cookie gets saved but not Auth cookie
- PHP – setcookie(); not working
- Automatic WordPress Login of Logged In ClickFunnels User
- How to validate a user from ouside wordpress/php?
- How to share cookies and sessions between domain and subdomain?
- why does WordPress need two cookies for auth/login
- Is it possible to transfer a WordPress session to a different browser via query string?
- How does REST API cookie authentication work in WP 4.7?
- Place a cookie when a specific page has been viewed?
- How to detect a user that is not logged in
- How to change cookie name
- Using wp_set_auth_cookie for custom user account system
- Keep Users Logged In As Long As I Like
- Using JWT to authenticate a user with an external system?
- WP_Http_Cookie destroys cookie value through urldecode()
- Worpdress PHPSESSID / EU law
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Get restrict content by submitting Gravity Forms
- Website Loads Twice Unnecessarily
- Security error WP 4.0 + WP phpBB Bridge [closed]
- Hide/Show content based on cookie
- how to update current logged user username
- Rest API authentication issue when called from fetch request in bundle.js
- Serving Cookies From A Different Domain or Sub-Domain
- Restricting access to content
- Can’t GET draft posts via REST API from headless frontend
- Making a Custom Post type only visible to non-users via a specific link
- How does the “authentication unique keys and salts” feature work?
- Deleting cookie to logout
- Set authentication cookies to be shorter but then extend with every page load
- Show greetings on first time visitors?
- Unset a Cookie on Successful Gravity Forms form Submission [closed]
- How set a cookie from PHP and get it without refresh
- Why wordpress cookies name contains HASH
- Cookie only detected when visitor is logged in
- Change the user is logged in cookie name
- Disconnect automattically after X minutes
- can we share user login in 2 wordpress installs in 2 subdomains on one server? [duplicate]
- Modifying request $_COOKIE
- How to save generated JWT token to cookies on login?
- SSO autologin WordPress + Ajax
- Block google maps from loading until user agrees to cookies with Elementor
- User Session and Stored Cookies not get removed
- Need help setting cookies with multiple value [closed]
- How to setup cookie free domain for wp-includes?
- After logout browser’s back button into twenty sixteen theme profile
- COOKIE_ID with username appended
- Setting Cookies For Form Autofill
- What are your thoughts on overriding the PHP builtin setcookie() function to control whether or not WP creates cookies
- Issues with set cookie
- How to set a Cookie-Free Domain with WordPress?
- Is it possible to use cookie-free domains in WordPress?
- Passing cookies when using wp_remote_get
- Set Short Automatic Logout Time for One User
- Auto log in hook is requiring a page refresh
- WordPress Post Voting – Vote once per IP on entire site
- How to change WordPress cookies to be session-only
- wordpress can’t read a cookie?
- Do I need a Cookie consent on a basic WordPress site?
- Set cookie with taxonomy name
- Where is function to prevents non logged users access wp-admin?
- Best method to show modal only once
- Cookie with referral URL [closed]
- How to keep a variable in COOKIE or GET query string?
- Cookie Details Requested
- Multiple issues with Ajax login function due to browsers and cookies
- Log in user using WordPress REST API
- can you help review CCCP (Conditional Cookie Content Post) and help to create a block?
- COOKIE_DOMAIN chaos
- Setup cookie on Chrome even without HTTPS
- PHP cookie control does not work correctly
- Setting a Custom Cookie in WordPress only for Logged In Customer/User (non-admin)
- Authentication between two different sites using the WordPress login cookie
- How are sites using wordpress hiding wordpress cookies that have “wp” or “wordpress” in the cookie name?
- Use WP cookie to authentificate user on an external app
- Correct user session/cookie handling with external site connection in wordpress
- The same session information for peer users on two different WordPress servers
- Checking for cookies returns correct result only inside Elementor Editor
- Automatically Log Out UserX when visiting WooCommerceStore
- Entirely Cookieless WordPress?
- When ever wordpress home page refreshes the code is not reading the cookie as set anymore
- detect referr page
- Looking to load a different template part on every load/refresh
- Capture and display users name
- Why isn’t my cookie setting in my function?
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- Users are required to login to my site. How define user.member boolean, its permissions, and conditionally display/handle behavior based on it
- set cookies or let system know a user has been on site
- Opening protected page with cookie?
- Use WordPress engine for user registration and management
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- WordPress keep logged in after browser close
- Rest Api WordPress
- WordPress Network / Multisite login to one site allow access to all