Skip Navigation

[Resolved] Membership Site with Toolset and Ultimate Membership Pro

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#1182381

Tell us what you are trying to do?
I use Ultimate Membership Pro (UMP) to manage the membership. In UMP I have created 5 membership levels, where one of this is Free and the others are under payments.
So, in the UMP settings, I have setted that when a new user is registered, the system need to add to every new users the Free Level in both of the role "Stato Base". But the level is not assigned to new users. This I think because I use the Toolset Form for the users registration, and not the native UMP registration form.

There is a way to assign the Free Level to every new user with the role "Stato Base"?

Is there any documentation that you are following? No

Is there a similar example that we can see? No

What is the link to your site? hidden link

#1182429

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Francesco,

Thank you for contacting our support forum.

You are correct in that the user role is set by what is assigned in your Toolset Forms.

Is this a role an additional role that is set by your Membership plugin ? Or is it that you want to create your user with the role Stato Base the moment they register?

Please let me know.

Thanks,
Shane

#1182793
UMP-Livelli.png

So, in Access I have setted the two Custom Role "Stato Base" and "Stato VIP".
In UMP I have created 5 payment levels (see the attached image) where one of this is free.
UMP permit to assign a specific Role to every levels.
In my case I have 5 payment levels and 2 Custom Role. One payment level is Free and I need to be assigned automatically to every new users same as the Custom Role "Stato Base". When a user want to buy a level it go the dedicated page where there are the list of all payment level (managed by UMP) and he can choose what he need. In the buying moment UMP assign to user the payment level and the Custom Role "Stato VIP". After, when the level expires or user want to cancel the level subscription, UMP assign to user the Free level and the Custom Role "Stato Base".

Using the Register User generated by Toolset Form, the Free level is not automatically assigned to new users. Using the UMP registration form it work, but I want to use Toolset Form.

Can you help me?

#1183614

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Francesco,

Thanks for the clarity. I believe I understand a bit more.

Try using this code below.

add_action('cred_save_data', 'my_update_user_role',10,2);
function my_update_user_role($post_id, $form_data)
{
    // if a specific form
    if ($form_data['id']==12)
    {
      $user = new WP_User($post_id);
$user->add_role('Stato Base');
    }
}

Add this to your custom code in views by going to Toolset -> Settings -> Custom Code and click Add New.

Then add this custom code, then activate it.

Now you need to change the 12 to the ID of your Toolset form that you are using.

Please let me know if this helps.
Thanks,
Shane