WordPress.org

Support

Support » Plugins and Hacks » Can i maintain my favourites before & after login

Can i maintain my favourites before & after login

Viewing 4 replies - 1 through 4 (of 4 total)
  • I just wrote an extension for this plugin to automatically maintain favorites on login.

    _____

    add_action('wp_login', 'move_favorites_to_db');
    
    function move_favorites_to_db() {
    	$favorite_post_ids = wpfp_get_user_meta();
    
    	$favoriteIDs = array_keys(wpfp_get_cookie());
    	foreach($favoriteIDs as $favorite) {
    		wpfp_do_add_to_list($favorite);
    	}
    }
    dylanhthomas

    @dylanhthomas

    Where do you put this code? I tried it in the main plugin file and my functions file, and it did not work.

    Thanks!

    Did anyone else figure out how to get this working?

    I am trying at the moment. Will post results if succeed.

    Honestly, I think it should be a setting in this plugin for this. Because now, when favorites are not maintained after login, we break the flow for the visitor. It is highly inefficient to make visitors mark their favorite posts once more.

    Dear author, please consider helping us, or updating plugin with this feature.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can i maintain my favourites before & after login’ is closed to new replies.