Wordpress Plugin Feature Ideas

This is a neat idea. It must be noted that when a user ends his/her patronage at Patreon, the role would be synced to to WP only after the user logs in or visits (if logged in) your WP site next time.

This is because the plugin does not run a regular cron to sync patrons.

That’s a good note…any features that require visiting the site to access rewards wouldn’t be effected much, since visiting the site and logging in would trigger the removal of the role.

But if you were to build something that automatically delivered rewards (like integration with a third-party delivery system—BookFunnel, for instance) the developer would have to be aware of that limitation.

CAN you trigger a refresh of the User connection on cron run? Even if the plugin didn’t do it automatically by default, but provided a hook that could be called by another plugin, that would at least allow such an integration to be developed.

Yes, using the code in the plugin you should be able to do it. All you need to do is to have a code that checks for user meta that patrons have in wp_usermeta, and feed the users to the relevant plugin fuctions via a cron.

However syncing as such would fail if the patron has an expired or deleted oauth token, so its not very reliable

You could do it using your creator’s access token however, by calling campaign related functions.

So if I wanted to make something reusable, I could expose a settings field in a plugin or theme for the site builder to add their Creator access token, then call that field in whatever function I’m using to refresh user information… but this would check every patron? Or only logged in patrons?

So if I wanted to make something reusable, I could expose a settings field in a plugin or theme for the site builder to add their Creator access token, then call that field in whatever function I’m using to refresh user information

Yep.

but this would check every patron? Or only logged in patrons?

That could check all patrons. But, for large campaigns, this would mean thousands and thousands of requests to the api and it would cause load (cpu, io) on the local web hosting infra and also could be a consideration at the api (rate limits etc) in future.

Please add multi author feature, so any author can setup their own Patreon.

Thanks!