kylephillips / favorites

Simple and flexible favorite buttons for any WordPress post type.
https://favoriteposts.com
224 stars 85 forks source link

Remove favorite status after logging out #123

Open graylaurenm opened 5 years ago

graylaurenm commented 5 years ago

Goal: Since we've disabled unauthenticated users, we'd like to ensure posts don't show as favorited once the user logs out.

Steps to replicate: (On https://dinnerthendessert.com – not one I'm working on, just a live site I've replicated the issue on.)

  1. Save a recipe
  2. Recipe not saved; trigger login form
  3. Login
  4. Page refreshes; navigate to post and save
  5. Log out
  6. Page refreshes; navigate to post and recipe still in saved state

What is happening: After logging out, the posts still shows to the user as "saved".

What I expected to happen: All posts in an unsaved state, until I log in again, then fetch user meta.

Device & browser I'm you using: Tested in Chrome, Version 76.0.3809.100 (Official Build) (64-bit), both profiled and incognito.