This topic has 7 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #202728
     abu117
    Participant

    First, a little background:

    1. When I first set up this site, I set up three paid levels: VIP, Gold, and Bronze  (Members > Membership Levels)
    2. Later, I changed the VIP Level to be Free and allowed signups
    3. The Gold and Bronze still had pricing attached, but I disabled the signups option
    4. When I had a new signup, I would go to the site backend and to users and manually edited each and every users Membership Level to be VIP and to not expire.

    My plan was to add the different membership levels (paying) once I reached a certain amount of members.  I have since changed my mind and I plan to FOREVER offer the site for free to all members with no restrictions. So, here are my questions:

    1. Is there a way to automatically make it so that any new signups are automatically signed up as a VIP status?
    2. And, if there is a way, can I be assured that my existing 1,200+ members will retain their current status?

    I was thinking of going into the Sweetdate > Memberships and unchecking all the levels to restrict, but still restricting “not logged in” or “Not members” only. Would this accomplish the same thing?

    Thanks for any help on this 🙂  I am tired of editing everyones membership after they sign up 🙂

    Abe

    #202777
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #202917
     Radu
    Moderator

    Hi,

    I think this it’s all that you need

    COPY CODE
    
    
    //Disables the pmpro redirect to levels page when user tries to register
    add_filter("pmpro_login_redirect", "__return_false");
    function my_pmpro_default_registration_level($user_id) {
    	//Give all members who register membership level 1
    	pmpro_changeMembershipLevel(1, $user_id);
    }
    add_action('user_register', 'my_pmpro_default_registration_level');
    

    So all users that signup from now will have by default the membership with ID 1, the current users shouldn’t be affected since it’s used user_register hook.

    In any case do a database backup before running the script to be sure 100% that will not affect the existing users.

    Changing the settings in theme options -> memberships -> will be applied for all users !

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #202920
     abu117
    Participant

    I’m assuming this goes in the child theme functions.php file? Do I add it just before the ?>

    Abe

      Existing functions.php in child theme

    :

    <?php
    /**
    * @package WordPress
    * @subpackage Sweetdate
    * @author SeventhQueen <themesupport@seventhqueen.com>
    * @since Sweetdate 1.0
    */

    /**
    * Sweetdate Child Theme Functions
    * Add extra code or replace existing functions
    */

    ?>

    #202982
     Radu
    Moderator

    custom code will be added after

    /**
    * Sweetdate Child Theme Functions
    * Add extra code or replace existing functions
    */

    the code here

    ?>

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #203013
     abu117
    Participant

    Nope, that didn’t work. It still shows a membership level of “none” under users. And when a new user logs in, it shows an “Upgrade Account” under their username.

    Should I be changing the number 1 in here to read “5” instead

    pmpro_changeMembershipLevel(1, $user_id); to instead be pmpro_changeMembershipLevel(5, $user_id);

    Since under Memberships > Membership Levels it shows ID #5 as VIP?

    Thanks,

    Abe

    #203017
     abu117
    Participant

    disregard that last message – I tried it with ID “5” and it worked – thanks so much 🙂

    #203073
     Radu
    Moderator

    Great
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?