WordPress.org

Ready to get started?Download WordPress

Forums

Paid Memberships Pro
[resolved] other registration plugin on WP, but using paid membership pro (11 posts)

  1. jaycee1981
    Member
    Posted 2 years ago #

    Hello!

    Im using paid membership pro to protent only ONE content of my site, not the whole WP site.

    You know the paid membership pro using his own regiatration page.

    Well, since im using paid membership pro, visitors don't want to register, than before i was using the default registration method on WP.

    I think it is because when they go to the register they see my prices of my protected content(although the registration to the site is FREE) and they change their mind and don't register:-(

    My question is may I use any other registration plugin to wp registration, where my users don't see the prices on registration only when they click on the protected content?

    http://wordpress.org/extend/plugins/paid-memberships-pro/

  2. strangerstudios
    Member
    Plugin Author

    Posted 2 years ago #

    jaycee, some options:

    1. There is a hook to disable/alter how/when PMPro redirects the login or registration page. pmpro_login_redirect Code like this will disable that:

    function my_pmpro_login_redirect($login)
    {
    return false;
    }
    add_filter("pmpro_login_redirect", "my_pmpro_login_redirect");

    2. You can also create templates to override the levels page or checkout page.

    3. You can also link directly to a free membership level by passing ?level=1 (or whatever the level id is) this will pass the pricing page.

    Hope this helps.

  3. jaycee1981
    Member
    Posted 2 years ago #

    Sorry for the late reply, I was busy. Thanks for your answer.

    I've already read it several times, but sill complicated me a little bit :-)

    But if you can write down to me what should I do step by step I can do it!

    Would you be so kind as to write down what files I need to open and re-write, please?

    The aim is that registration to my site would be simple for visitors and without any price listing (because regiatration is free on my site)BUT when the registered member go to my protectect content then there will be price listing

    If you have free time for me, please help me. Thank you very much!

    Ps: I have to tell you that I really like your plugin very very useful for everyone who needs paid content!

  4. strangerstudios
    Member
    Plugin Author

    Posted 2 years ago #

    Jaycee, can you link to your site and let me know exactly what you want to happen?

    I think the easiest thing for you to do would be to replace any link in your site or theme that goes to the registration page (wp-login.php?action=register), which redirects to the level page, to a link that goes directly to your free level checkout. Which would be something like:

    /membership-checkout/?level=1 (change that to the id of your free level)

  5. jaycee1981
    Member
    Posted 2 years ago #

    Hi!

    Thanks for your reply! Your idea is great, I just did it on my log in widget/register and on the default wp-login.php.

    Now still have one problem. My downloads page (it is paid content with Paid Membership pro) - when you click on Downloads - > /membership-levels/ is loaded.

    In this point you can see all of my levels(paid)+ Trial level (free) including site registration too(Free) :-(

    How can I do that listing only paid levels here? WITHOUT site registration level?

  6. strangerstudios
    Member
    Plugin Author

    Posted 2 years ago #

    You can use our hook pmpro_levels_array to remove levels from the levels page.

    Here is some code to do that:
    http://www.paidmembershipspro.com/2012/01/hide-free-levels-from-the-membership-levels-page/

    (I've left that post public for a few days, but will move it behind the pay wall at some point. I try to do mostly "can do" answers and bug fixes on the WP forums... and answer any "how to" questions on the paid support forums.)

  7. jaycee1981
    Member
    Posted 2 years ago #

    The code you've given on link is works, but this code is hide the trial level (Free) too.

    you can see the following levels if someone click on my Downloads page (which is hidden content for non-subscribed users):

    -Site registration (FREE) - registering to the site - get news,topics and everything on the site EXCEPT downloads page

    - Trial (FREE) - for downloads, expire in 2 days

    - One week access to downloads (PAID)

    - One month access to downloads (Paid)

    - Three months access to downloads (paid)

    And What I want to do is that if someone goes to Downloads:

    - Trial (FREE) - for downloads, expire in 2 days

    - One week access to downloads (PAID)

    - One month access to downloads (Paid)

    - Three months access to downloads (paid)

    But now with your code my TRial Free level is also will be removed, but I want it to stay there.

    Any solution?

    Thanks in advanced!

  8. strangerstudios
    Member
    Plugin Author

    Posted 2 years ago #

    To fix this update this line in the gist code:

    if(!pmpro_isLevelFree($level))

    to something like:

    if(!in_array($level, array(1,2)))

    where 1,2 are the ids of the levels you want to hide.

  9. jaycee1981
    Member
    Posted 2 years ago #

    Hello again!

    I tried but did not work :-(

    Site registration level ID : 2

    I just want to hide this one.

    `function my_pmpro_levels_array($levels)
    {
    $newlevels = array();

    foreach($levels as $level)
    {
    if(!in_array($level, array(2)))
    $newlevels[] = $level;
    }

    return $newlevels;
    }
    add_filter("pmpro_levels_array", "my_pmpro_levels_array");

    Is it the right code?

    If I use this, site goes down/crash

    (I don't have levels with ID 1 )

  10. strangerstudios
    Member
    Plugin Author

    Posted 2 years ago #

    That ` at the beginning of your code might be the problem.

    I had another error in my tweak. It should be $level->id instead of $level in the check.

    Here is the exact code for you. I won't be replying to this thread anymore. Good luck.

    function my_pmpro_levels_array($levels)
    {
    	$newlevels = array();
    
    	foreach($levels as $level)
    	{
    		if(!in_array($level->id, array(2)))
    			$newlevels[] = $level;
    	}
    
    	return $newlevels;
    }
    add_filter("pmpro_levels_array", "my_pmpro_levels_array");
  11. jaycee1981
    Member
    Posted 2 years ago #

    Thanks for your fast respond, it works !!!!

    Thank you so so much for your help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic