Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Change the Member’s User Role After a Specific Membership Subscription Cancelation
The code automatically changes the member's user role once the subscription is canceled. This will be applied only for canceled subscriptions to the specific membership.
The code needs to be adjusted by changing the dummy membership ID of 123 within the code with the ID of the actual membership(s). The code needs to be adjusted by changing the membership ID on the following line:
if( 123 != ( int ) $subscription->product_id ) {
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments