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.

PP Pro transaction hook

Home Forums Community Forum PP Pro transaction hook

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Thursday Aug 30th, 2012 at 5:30 pm #23620

I want to add in a hook so that anytime a user purchases a subscription that results in an s2_member_level_2 through 4 a specific function is called.

I’m thinking I need to add a statement like this to my plugin…
add_action(“c_ws_plugin__s2member_pro_paypal_sp_checkout::paypal_sp_checkout”,”some_function”);
but how do I get the user and transaction information once in the “some_function” function?

Can you provide a little code sample to get me started? Thanks!

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Aug 31st, 2012 at 6:39 am #23676

Hi Brett.

Maybe the [hilite mono]set_user_role[/hilite] hook is good for what you need? http://adambrown.info/p/wp_hooks/hook/set_user_role?version=3.4&file=wp-includes/capabilities.php

Posted: Monday Sep 10th, 2012 at 4:50 pm #24773

This worked perfectly. Thanks Cristian!

Posted: Tuesday Sep 11th, 2012 at 7:25 am #24870

Great! :)

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.