Hi, while going through the plugin’s code, I noticed the Patreon user details are only updated while the user is browsing the website (the updatePatreonUser call at the wp_head action). This is ideal for post reading but if I want to give a perk to a user (even if not connected for a while), the latest status might be wrong (in case the subscription was cancelled) and will assign perks to unsubscribed users with outdated information.
- November: the user links the Wordpress and Patreon (with an active subscription) accounts. The status is active_patron.
- December: the status remains the same as November.
- January: the user logs in the status is updated but stays as active_patron.
- February: the user cancels the subscription but doesn’t log in. The status remains as active_patron.
- March: even if the user cancelled the subscription the status remains as active_patron since the details were not updated.
- April: the user logs in and the status is updated to former_patron.
I’m looking to be able to assign the perks corresponding to December, January and February but don’t want to the user to keep receiving the perks for March (in April the status would be updated and would not receive anything).
Is there any option to sync the user statuses without having to iterate through all the users and calling a modified updatePatreonUser function? In case that’s the only option, what should be the right amount of API calls to avoid spamming?
Please feel free to correct me if I’m wrong.