• I am trying to use WP-API to get and set favorites for a post. I have created a REST endpoint to get favourites for a user using the plugin function get_user_favourites. But I also need an endpoint to set a favorite for a user. I see a function to get HTML button, but not directly set count for a specific post for a specific user. Any way to get around this situation?

The topic ‘Helper function to update favourite count’ is closed to new replies.