Using Membership and Directory together?

if you use paypal or 2CO, do you still need to setup the subscription plans and how do you control the payment options, also through subscription plans or the payment gateway?

We also have Directory and I want to limit the number of listings each level can create using Membership. How would I combine the two plugins so that they work together.

Thanks for your help.

  • aecnu
    • WP Unicorn

    Greetings thevillageblog,

    Thank you for the great questions.

    if you use paypal or 2CO, do you still need to setup the subscription plans and how do you control the payment options, also through subscription plans or the payment gateway?

    Yes you need to setup the subscription plans and they control the payment terms.

    We also have Directory and I want to limit the number of listings each level can create using Membership. How would I combine the two plugins so that they work together.

    There is no feature that I am aware of that allows Membership to control the number of listings in Directory and is by no sense of the word intended use.

    The only way I am aware of to control how many listings is using the credit system within Directory.

    Being that I certainly do not know everything and the fact I want to help, I will see if I can get the lead developer @Arnold in here with his invaluable insight into this plugin for his advice/advise for us and to confirm what I am saying above if I am right and if not where I am wrong.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Arnold
    • El Macho WP

    Hi @thevillageblog

    You can customize most any way you like by using the Directory plugins "directory_full_access" filter. If this filter returns true you give authorization to enter Listings. So you can write whatever logic you want in the filter to check the level, status and number of post.

    function allow_directory_filter($allow = false){
    
      //Whatever logic to decide whether they should have access.
      if(current_member_level( $level_for_listings) ) $allow = true;
    
      return $allow;
    }
    add_filter('directory_full_access', 'allow_directory_filter');

    There are several tests you can use

    current_user_is_member()
    current_user_on_level($level_id)
    current_user_on_subscription($sub_id)

  • thevillageblog
    • Site Builder, Child of Zeus

    Hello @Arnold,
    thank you for your reply. Unfortunately I am still learning to work with PHP, so I am a little lost.

    1. which file would I add/change this code?

    2. the $level_id and $sub_id, are they the names of each level and sub level like "Level 1", "Level 2"? Do I place them inside the ()?

    3. where do i set the number of allowed postings per level or subscription?

    Also if I am using membership to control the payment gateway then what do I do with the payments and payment type tabs in Directory?

    Thanks for your help.

  • thevillageblog
    • Site Builder, Child of Zeus

    Dear @aecnu, aka Joe,

    Although Arnold gave me a possible solution to my quandary I didn't get an answer on my last question;

    Also if I am using membership to control the payment gateway then what do I do with the payments and payment type tabs in Directory?

    Could you tell me?

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.