Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

expired memberships

  • Brenda
    Brenda
    Newbie 33 points
    March 14, 2016 at 4:50 pm

    Is there a way to have an expired membership not go into their account area until they renew it? As it sits now, all expired memberships have access to their account area. I totally don’t want that, they should have to renew their membership first; as I have account links to other stuff I prefer not to allow them to use without renewing their membership.

    I don’t want their account to be deleted; as they will have to renew it, and that’s a lot of work for them. Is there perhaps another membership plugin that works well with Premiumpress Themes? Setting to pending doesn’t change things, no matter what I do, they get to access their expired account.

    Brenda

  • Brenda
    Brenda
    Newbie 33 points
    March 14, 2016 at 4:52 pm

    Oh, one other thing, the advertising spots, if they choose one, pay for it, and it expires, they can renew it without paying for another spot. I know its beta, but that’s an issue that needs address too..


  • maximiliano
    Newbie 2 points
    May 6, 2017 at 4:59 am

    HELLO

    I HAVE THE SAME PROBLEM

    THERE’S A SOLUTION ?


  • maximiliano
    Newbie 2 points
    May 6, 2017 at 4:59 am

    PLEASE

  • Anthony
    Anthony
    Senior Member 336 points
    March 19, 2019 at 2:33 am

    Never has been addressed as we still have this issue. Anyone have suggestions as it seems this is a huge flaw in the micro jobs and such themes. Anyone?

  • JamesD
    JamesD
    Super Guru 1,345 points
    March 19, 2019 at 9:18 pm

    Hello All,

    Try adding this to your _functions.php and see if it helps:

    /**
     *
     * Restrict login if no active membership
     *
     * Fired by authenticate action hook.
     *
     * @access public
     *
     * @param WP_Object $user
     * @param string $username
     * @param string $password
     * @return object (either WP_Object or WP_Error)
     */
    add_filter( 'authenticate', 'check_active_account', 30, 3);
    function check_active_account($user, $username, $password) {
        global  $CORE;
        $subs = get_user_meta($user->ID, 'wlt_subscription',true);
        if(is_array($subs)){
            $validate_sub = $CORE->date_timediff($subs['date_expires'],'');
            $expired = $validate_sub['expired'];
            // Display message why denied
            return ($expired)?new WP_Error( 'broke', __( "Membership Not Active", "premiumpress" ) ):$user;
        }
    }

    Note: Test it to make sure it covers the situations you need. It may need to be tweaked.

  • Anthony
    Anthony
    Senior Member 336 points
    March 20, 2019 at 7:50 pm

    Thank you where do we add it in that file?

  • JamesD
    JamesD
    Super Guru 1,345 points
    March 20, 2019 at 10:18 pm

    @Anthony
    If you’re referring to the code for the _functions.php then just put it at the bottom above the closing PHP tag ?>.

  • Anthony
    Anthony
    Senior Member 336 points
    March 21, 2019 at 12:49 am

    Thanks James LOL but when you say closing PHP Tag ?> Where is that?

    We guess you mean the last ?> symbol at bottom of script which is <?php echo $name; ?>’; }

    Exactly where do you mean? Sorry as shared we are not coders and this does not clarify where to cut and paste this patch? below it before the } before the ‘; between the ‘: and } or????? there is additional code after the final closing php tag as you call it or ?> but no more ?> symbols….

  • JamesD
    JamesD
    Super Guru 1,345 points
    March 21, 2019 at 1:30 am

    Where is that?

    Yes, at the very bottom of the page (see image for example).

    Attachments:
    You must be logged in to view attached files.
  • Anthony
    Anthony
    Senior Member 336 points
    March 21, 2019 at 5:51 pm

    Thanks we can not locate that file _functions.php in our MJ 8.9.7

  • JamesD
    JamesD
    Super Guru 1,345 points
    March 21, 2019 at 11:27 pm

    Hello Anthony

    Thanks we can not locate that file _functions.php in our MJ 8.9.7

    As stated in another post, all of the answers I’ve responded to refer strictly to v9 themes,

  • Anthony
    Anthony
    Senior Member 336 points
    March 22, 2019 at 1:16 am

    Yes we got that and THANK YOU so much sir. We just replied to that post.

    Just can not figure out which file to add your code / patch / hook supplied to force people to renew their memberships upon expiration or was that ti stop them form logging in. Then the question is how do they renew if they can nit login? lol We do not see a _function.php file in MJ 8.9.7. :–(

    Shocked this is not a HUGE issue with Mark and the team. It defeats the purpose of memberships and the theme in general. Are we wrong here? https://www.premiumpress.com/forums/topic/micro-job-memberships-must-be-free/

  • Anthony
    Anthony
    Senior Member 336 points
    March 22, 2019 at 2:50 am

    Thanks so much again. if anyone else has suggestions on this renewal of membership issues there are several of us in need of a solution for expired memberships in MJ. This is just crazy that a theme does not force membership renewal once expired NOR give the admin a heads-up via email when the member expires. Are we missing something here from you other users? Do users really get a free membership after it expires until they click the renew button in good faith and make payment? Really?

  • JamesD
    JamesD
    Super Guru 1,345 points
    March 22, 2019 at 3:44 am

    @Anthony
    I seriously doubt there is or will be further development with any of pre version 9 themes. For reasons I’ve stated earlier.

    Good news is that it would be a similar process as v9 using a slightly altered function to place in the _functions.php file.

    However, if you like I could create a plugin to handle this for you. I’m assuming there may be other v8 users that need something similar. Could even add settings if needed, but I would need to know what setting and it’s purpose (.e. depending on the membership be able to select a particular page to be redirected to… etc). Would require all setting considerations you would like before I begin though.

    Note: The plugin shouldn’t use any more resources than needed, so there won’t be too much, if any, difference using the plugin or adding the changes manually.

Viewing 15 posts - 1 through 15 (of 31 total)