• I am trying to have a paypal upgrade button on my site, but if the user is not logged in and clicks on it I want it to get them to sign in and then go straight to an upgrade paypal form where it allows them to pay the upgrade with paypal visa mastercard etc. so they will have level 2 access??
    can anyone help

    https://wordpress.org/plugins/s2member/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can wrap the paypal button inside a conditional that will only display the button if the user is logged in. I am using exactly this on this page:
    http://scrapbookcampus.com/webinar-thankyou/webinar-thank-you-feb-2014/

    So basically, just put something like this:

    [s2If is_user_logged_in()]
    your paypal button (or even a pro-form)
    [s2If]

    Thread Starter joeydono

    (@joeydono)

    hi thanks, iv done that and now everything has dissapeared, including the user profile bar?
    heres the code:

    <p style="text-align: center;"><span style="font-size: 18pt; font-family: helvetica; color: #ff0000;">€20 Subscription, Gains Access to All Areas</span></p>
    
    <div style="text-align: center;">
    <p style="text-align: center;">[s2Member-PayPal-Button level="2" ccaps="" desc="Silver Member / description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="propsireland.com" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]</p>
    
    </div>
    <p style="text-align: center;"><span style="font-size: 16pt; color: #ff0000;">OR</span></p>
    <p style="text-align: center;"><span style="font-size: 18pt; color: #ff0000;">Sign In & Upgrade Your Existing Account</span></p>
    
    <div style="text-align: center;">[s2If is_user_logged_in()][s2Member-PayPal-Button modify="1" level="2" ccaps="php_if_current_user_canaccess_s2member_level1_" desc="Upgrade Your Account" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="propsireland.com" ta="0" tp="0" tt="D" ra="10" rp="1" rt="Y" rr="1" rrt="" rra="1" image="default" output="button" /]</div>[s2If]

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter joeydono

    (@joeydono)

    at the bottom payal button is the shortcode u said i should put in

    Yes, it looks like what I have. Give that a try with a testing friend to see, or log in and log out (maybe from a different browser) to see what a non-logged in viewer sees, and what is displayed when logged in.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paypal Upgrade button’ is closed to new replies.