Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] fix to user "auto downgrade membership" user tweak

Simple Membership Plugin › Forums › Simple Membership Plugin › fix to user "auto downgrade membership" user tweak

  • This topic has 2 replies, 3 voices, and was last updated 6 years ago by admin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 29, 2020 at 7:48 pm #19970
    quick_dry
    Participant

    The auto_downgrade_membership user tweak in the documentation seems to be a line missing of code, I needed to add this as otherwise you don’t have a $user defined when checking if subscription is expired.

    
    $user=SwpmMemberUtils::get_user_by_id($mId);

    add this somewhere above the line:

    if(SwpmUtils::is_subscription_expired($user) == true){

    I added it directly before the ‘if’ since there isn’t any need to grab the data if you don’t fall into that branch of code.

    March 31, 2020 at 3:32 am #19978
    mbrsolution
    Moderator

    Hi, thank you reaching out to us. I have submitted a message to the developers to investigate further your findings.

    Thank you

    March 31, 2020 at 5:58 am #19984
    admin
    Keymaster

    Thank you. I have updated the example code in the following page:
    https://simple-membership-plugin.com/user-submitted-tweaks-simple-membership/

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy