Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function custom_remove_from_free_subscription( $tosub_id, $tolevel_id, $to_order, $user_id ) {
- // check for the subscription id
- if( $tosub_id == 3 ) {
- // It's the one we are interested in
- // Get the member
- $member = new M_Membership( $user_id );
- // Check they are on the free subscription
- if( $member->on_sub( 5 ) ) {
- // Remove the subscription
- $member->drop_subscription( 5 );
- }
- }
- }
- add_action( 'membership_add_subscription', 'custom_remove_from_free_subscription', 10, 4 ));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement