Title: Remove plan from user in php
Last modified: May 11, 2022

---

# Remove plan from user in php

 *  Resolved [emilian0](https://wordpress.org/support/users/emilian0/)
 * (@emilian0)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/remove-plan-from-user-in-php/)
 * I need to remove a plan from user by code.
    Is there an action to achieve it?
   Thanks.

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

 *  Plugin Author [reputeinfosystems](https://wordpress.org/support/users/reputeinfosystems/)
 * (@reputeinfosystems)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/remove-plan-from-user-in-php/#post-15643178)
 * Hello,
 * I am sorry I am not getting what exactly you are trying to achieve here. Could
   you please explain with more deails? It would be great if you can share some 
   screenshots as well to understand it better.
 * Thanks,
 *  Thread Starter [emilian0](https://wordpress.org/support/users/emilian0/)
 * (@emilian0)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/remove-plan-from-user-in-php/#post-15643649)
 * Simply I wanted to cancel a plan (for example plan 1) from the current user by
   an action or something else using php code.
    I didn’t find anything similar in
   your hooks documentation. Then I read your code and I found this trick working,
   if used after the plugin loaded.
 * global $arm_subscription_plans;
    $ret=$arm_subscription_plans>arm_ajax_stop_user_subscription(
   get_current_user_id(),1);
 * Perhaps there’s a cleaner solution.
    Let me know, thanks.
 *  Plugin Author [reputeinfosystems](https://wordpress.org/support/users/reputeinfosystems/)
 * (@reputeinfosystems)
 * [4 years ago](https://wordpress.org/support/topic/remove-plan-from-user-in-php/#post-15668993)
 * Hello,
 * I am sorry for the delay in reply.
 * Yes, you can use arm_ajax_stop_user_subscription() function according to your
   requirements from the php code.
 * Thanks

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

The topic ‘Remove plan from user in php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/armember-membership_1a2538.svg)
 * [ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup](https://wordpress.org/plugins/armember-membership/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/armember-membership/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/armember-membership/)
 * [Active Topics](https://wordpress.org/support/plugin/armember-membership/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/armember-membership/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/armember-membership/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [reputeinfosystems](https://wordpress.org/support/users/reputeinfosystems/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/remove-plan-from-user-in-php/#post-15668993)
 * Status: resolved