Hi! thanks for your interest in Patreon WordPress.
The best approach for developing addons for PW would be to use its hooks and filters:
Using these, you can hook into the functions of PW and integrate it with your own code. Then these can be used to modify/enhance PW functions, or use PW functions as helpers to your own functions.
As an example, check out features of Patron Pro addon for PW, which has been out for a while, and is used in numerous sites next to Patreon WordPress:
It hooks into PW functions to enhance its content gating logic, provide customization options for gated post interface, provide additional functionality like sneak peeks for gated posts, provide gating by date, age and other useful features. All are done by using hooks or filters, and in rare case, overriding a PW feature when necessary.
Incidentally, you can also create addons for Patron Pro addon above! - All its functions can be hooked to / filtered, and you can use Patron Pro’s features.
…
Basically addon development is generally all about hooks and filters. It makes development a bit slower and a bit more complicated, but it keeps your addon compatible with the parent plugin through updates.
I didn’t find hook and filters in the official documentation for the plugin.
I take advantage of your kindness to ask one more thing: I suppose I can use hooks and filters also in my custom theme, is it right? I am much more skilled in theme development.
Of course - any hook or filter can be used from within any piece of code that runs inside WP. Be a theme, or plugin.
We have a special bit of code for people who need to lock a particular part of their theme - because the_content is not applied in header, footer or columns or anywhere else outside the post content. This code can be used to lock any part of any theme, or any part of a WP website:
Thank you for your reply, you are very kind and your documentation is so much useful.
Is there a directory or repository where I can find all the docs you are linking to me in Dropbox Paper, so that I don’t have to ask (and you don’t have to reply) for it one by one?
Hi Ozgur! As promised, I’m working with the Patreon Plugin and I’ve got some questions for you.
As premise, I tell you that would not be a problem to buy the Pro Plugin, but I think that it would not solve my problems.
QUESTION N. 1
Reading the very useful documentation you send me I’ve seen that you use classes as “Patreon_Wordpress::getUserPatronage()” (if I make mistakes explaining, sorry, as I said I’m learning). Is there a list for that classes and their use?
QUESTION N. 2
Let’s assume I have the following tiers on Patreon
A - 10$
B - 20$
C - 20$
D - 30$
E - 40$
(Note that B and C are both 20$).
Is it possible to make a part of a post visible only for B and E (not A, C, D)? How could I do that?