How do I reset a transient when updating a widget’s value?
The simplest thing to do is simply delete the transient when the username is updated. Then the next time get_json() is run it will see that the transient is not set, just as if it had expired, and retrieve the data and save the transient again. So inside the update() method of your widget class … Read more