The discussion is about syncing avatars from Discourse to WordPress automatically. Shauny initially asked how to achieve this, as they want to use Discourse’s avatar system instead of WordPress’. Shauny later found a solution using Webhooks and shared the general steps:
creating a Discourse webhook that posts to a PHP file when a profile is updated,
saving the avatar URL as a custom meta field in WordPress, and
updating the WordPress code to return the meta field as the user avatar. jrgong and jrgong asked Shauny to share the code snippets used, to add to the WP/SSO documentation or community tutorials, which Shauny agreed to do once they have access to their computer.
I’ve tried searching but find topics about doing this the other way round but not this way…
My WordPress website is a DiscourseConnect Provider to my Discourse forum, so people log into the forum with their WordPress account.
I used to have it so you went to the website to update your avatar, using a plugin, and it uploaded that to Discourse, but I’d like to switch this around because the Discourse avatar stuff is so much nicer. I’d like it so the website grabbed the avatar from the Discourse forum on login, or whenever it changes.