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.

Function Hook Custom Capability Updates

Home Forums Community Forum Function Hook Custom Capability Updates

This topic contains 3 replies, has 3 voices. Last updated by  Charles 4 years, 9 months ago.

Topic Author Topic
Posted: Thursday Mar 1st, 2012 at 5:03 pm #6924

Is there a hook / filter that fires when someone’s custom capability changes?

I need to run some code each time someone is either added to the membership, or adds a custom capability.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Mar 13th, 2012 at 1:52 pm #8027
Ian Henghes
Username: iaeon

Did you find an answer to this question yourself Charles? Looking for some pointers myself on hooks specifically ow to grab the content of a changed field (such as custom capability) do some processing and save output to another field in the same record.

Posted: Tuesday Mar 13th, 2012 at 3:36 pm #8036
David Welch
Username: dwbiz05

Are the changes in custom capabilities being done after payment or are you manually changing them in the admin form?

Dave

Posted: Wednesday Mar 14th, 2012 at 6:50 pm #8180

No Ian, I didn’t find an S2Member answer. Essentially we wanted to determine the custom capability that was being purchased once the member had completed the purchase process. What we ended up doing was tacking on a querystring parameter to the end of the thank you page redirect url inside the purchase button short code.

On the thank you page we grab the parameter value and use it in our code. We created a separate plugin that runs via a short code that is placed on the thank you page. The plugin grabs the parameter value and does the other processing we wanted.

So basically we bypassed the S2Member API and went old school on it.

Hope that helps.

Viewing 3 replies - 1 through 3 (of 3 total)

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.