link type subscription to user account type pro

hi,

URGENT!
Is there a way to make the 'User account type pro' plugin get the information for the 'defining field' through the 'Membership' plugin, by the selected subscription?

  • Patrick
    • Support Monkey

    Hi there @olaf

    Welcome to the forums, glad to have you aboard!

    That would require somehow associating the subscription to whatever BuddyPress x-profile field you have selected for the "defining" field in "User account type pro".

    That would require a custom query to the database & a custom function to link the data to the field.

    I'm not quite sure how to do that, but perhaps my colleagues @Ashok or @Vaughan would be able to point you in the right direction.

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    This would definitely require custom coding i'm afraid. I do not know the other plugin you are referring to, so you might need to explain the 'defining' field more.

    You can grab the users subscription plan name using the below code, if you have a developer who could do the custom work for you.

    substitute get_current_user_id() if you want to grab the level of a different user, the below code would get the subscription plan of the current user.

    $user_id = get_current_user_id();
    $user = Membership_Plugin->factory()->get_member($user_id);
    $subs = $user->get_subscription_ids();
    
    if(is_array($subs)) {
        $sub = array_pop($subs);
        $subscription = new Membership_Model_Subscription($sub));
        echo $subscription->sub_name();
    }

    Hope this helps

  • olaf
    • Flash Drive

    Thanks for the quick response.

    With 'User account type pro' you can make conditional fields, therefore creating a different registration form per sort user/member. it is a buddypress add on. I had buddypress override the registration form of membership.

    The 'defining field' defines the 'profile field group' being showed. The problem I'm having is therefore at the registration process of membership. the guest are not yet registrered.

  • Hoang Ngo
    • Code Slayer

    Hi @olaf,

    I hope you are well today.

    It seem like the add-on "User account type pro" is a premium add-on, so i will need more information to have a closer look.

    Can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Best Regards
    Hoang

  • olaf
    • Flash Drive

    I've just filled in the contact form. what I should say at forehand is that buddypress user account type pro is not compatible with wordpress 3.8.1 but I thought that I could use parts of their code to for the conditional fields at registration.

  • olaf
    • Flash Drive

    maybe if I explain my intentions it would be clearer what I'm trying to achieve. I'm trying to create multiple registration forms in the membership plugin. I did some searching and found out that membership doesn't support that (yet, I hope it does is a near future). However, the buddypress user account type did that for the buddypress registration. I just thought that multiple registration forms were possible if I could link these two plugins together.

    • Ash
      • WordPress Hacker

      Hi @olaf

      I am afraid you can't link those two plugins. What you can do is to set a default level for registered user and then send them to subscription page so that they can choose their desired subscription.

      Also looking for @Hoang Ngo for his valuable opinion on this.

      Cheers
      Ash

  • Hoang Ngo
    • Code Slayer

    Hi @olaf,

    I hope you are well today.

    So as I understand, your aim is create many register form base on many scenario ?
    Example you have a level called "Student", and when guest chose this level, the system will show a register form.

    Similar to that, when guest chose another level like "Teacher", the system will show another register form

    Please advise,

    Best Regards
    Hoang

  • Hoang Ngo
    • Code Slayer

    Hi @olaf,

    Unfortunately I don't have a chance to check your add-on for now, so I don't know how it work, but if your add-on support condition, so after visitor clicked on the subscription picker, you can get the subscription_id by $_GET['subscription'], and i think you can use that parameter for the condition.

    Hope this information will help

    Best Regards
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.