IPN for s2member

You should be able to use wp_remote_post() for that task. wp_remote_post( ‘http://example.com/s2m/?s2member_paypal_notify=1&s2member_paypal_proxy=LocalGate&s2member_paypal_proxy_verification=905e5a3c73480046f4354946788b8ea1’ ,array( ‘method’ => ‘POST’ ,’timeout’ => 30 ,’redirect’ => 5 ,’user-agent’ => ‘my-app/1.0′ ,’blocking’ => true ,’compress’ => false ,’sslverify’ => false ) ); Note that all $args (the 2nd argument/array) have default options. You can read more about it in the Codex.

Changing second user role while updating/downgrading membership level – s2member [closed]

I found a solution. Here it is: //Update Roles automatically when Membership Level changes function rb_update_user_role( $user_id) { $user = new WP_User( $user_id ); $user_meta=get_userdata($user_id); $all_role = $user_meta->roles; foreach ($all_role as $role_value){ if ($role_value === ‘vendor’){ $user->remove_role( ‘vendor’ ); } if ($role_value === ‘customer’){ $user->remove_role( ‘customer’ ); } if ($role_value === ‘s2member_level1’){ $user->remove_role( ‘s2member_level1’ ); … Read more

tech