BuddyDev

Search

Auto Friendship pro – Not working with Memberpress / role

  • Participant
    Level: Initiated
    Posts: 7
    Andrew Thomas on #40772

    Hi! Hope you’re well.

    We have auto friendship pro set up to create a friendship when user joins a new Memberpress membership and their role is updated. We’ve recently added a ‘free trial’ to our Memberpress membership but now auto friendship is no longer able to make the connection, even though the new role is created.

    Please can you assist? Thank you!

  • Participant
    Level: Initiated
    Posts: 12
    Cofud on #40774

    H

    • This reply was modified 2 years, 5 months ago by Cofud.
  • Participant
    Level: Initiated
    Posts: 7
    Andrew Thomas on #40776

    Hello again, Copying in my correspondence with Memberpress for reference:

    ME: We have been using Memberpress to assign a user role for suscribers to a new membership. The addition of this new role then triggers another plugin (Auto Friendship Pro) to create an automatic friendship connection in Buddypress.

    We have tried to add a free trial to our membership, but have noticed that doing so stops the friendship connection being made.. The new role is added successfully however.

    It appears this is an issue that falls between the two plugins, and while I understand you’ll be unable to give tech support on another plugin, would it be possible for you to explain what the addition of a trial is changing in the background, so we can try to get to the bottom of the issue?

    MEMBERPRESS: My best guess is that their plugin is developed to look only for a transaction, and that it is failing to look for the trial period “payment”.

    They need to make sure it’s looking for that.

    Our developer resources can be found here: https://docs.memberpress.com/category/215-developer-resources

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #40782

    Hi Andrew,
    I am sorry to hear about it.

    It seems there is some redirect or something else in MemberPress causing it(if the roles are changing).

    Here is our sample code

    
    		add_action( 'set_user_role', array( $this, 'on_role_update' ) );
    		add_action( 'add_user_role', array( $this, 'on_role_update' ) );
    
    

    If there is a role addition to user or updation of role for the user, we do not check what value it is, we call the friendship list conditions.

    There are 2 possibilities:-

    1. There was no change in user role(which does not seem like the case as you have mentioned)
    2. or there is a redirect at higher priority attached to these actions and that prevents our code from running.

    Please show them my reply and let me know their suggestions(I will be happy to change the priority of our call but I do not know if there is any redirect is happening and at what priority that is happening).

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Andrew Thomas on #40787

    Hi Brajesh,

    Thanks for your response – much appreciated!

    I’ll pass on your message to Memberpress and get back to you shortly.

    Cheers again

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #40805

    Thank you. I am looking forward to their reply.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Andrew Thomas on #40891

    Hello again,

    Hope you’re well.

    Here is the response from Memberpress:

    “I tested out code on my test site and made sure that even with a trial (meaning no transaction at first) the role does get added. And we are not hooking into either of the functions they mentioned. So it isn’t MemberPress that is causing the redirect.”

    So unfortunately we still have a problem. Auto Friendship Pro works fine when there is no trial set, but stops working when a trial is added.

    Can you think of any other way around this? Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #40897

    Hi Andrew,
    Is there any way that I can look at MemberPress code. I need access to the code and how to configure the trial(If you have a staging site, please share access details).

    Since our plugin is working on role change, I am not sure what is causing. I can debug and will be able to provide a reason as well as solution after that.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Andrew Thomas on #40899

    Hi again,

    We’ve also spotted that the connection fails when a Memberpress coupon code is used and no payment is taken. So both scenarios may point to the idea that no transaction is taking place?

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #40907

    Hi Andrew,
    In our case, we do not depend on MemberPress directly. Our code work by hooking into role change as well as well as BuddyPress activation.

    If I can see their code, I will hev a better idea why the role based triggers are not running.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved