latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Best hook for upgrade/downgrade processing

Home Forums Community Forum Unofficial Extensions/Hacks Best hook for upgrade/downgrade processing

This topic contains 0 replies, has 1 voice. Last updated by  Mojpoj 3 years, 11 months ago.

Topic Author Topic
Posted: Saturday Jan 26th, 2013 at 10:32 am #39692
Mojpoj
Username: mojpoj

I need to hook into S2 for integration with wp-types.

I’m offering three levels on my site

Free – Completely free registration
Gold – Paid $xx / Mo
Platinum – Paid $xx / Mo

For the free users, I’m hooking into the WP user_register hook, and it works fine. It adds 10 custom-type posts (in draft mode) to the DB and then the new user can edit those posts and make them published. This is working.

If a user pays for a membership, I want to perform a function after the user makes a payment based on the sub they pay for (gold or platinum). So my function will add X number more posts in draft mode, and user can then edit those.

If a user pays to go from Gold to Platinum, again, need a function to add X number more posts.

If a user downgrades, Platinum -> gold/free. Or from Gold -> free. Then I need to delete/lock X number of posts.

So… now that you have an idea of what I’m trying to do, my question is… which hook is best to use for upgrades from free to paid? And which hook would be best for downgrades, keeping in mind EOT? If the user paid for platinum, but downgrades to Gold/Free, they should NOT lose their posts until EOT.

Hope this is clear.

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.