• Right now if I click on the paypal button on a membership level, the checkout page for paypal opens in the same tab so I get redirected away from my website. How can I edit the code so that a new tab will open up and a user can still see the website in its own tab and the checkout screen on another tab? I tried editing the paypal code on checkout.php but had no effect.

    Here’s what it looks like in the file:

    <span id="pmpro_submit_span">
                                  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    				<input type="hidden" name="confirm" value="1" />
    				<input type="hidden" name="token" value="<?php echo esc_attr($pmpro_paypal_token)?>" />
    				<input type="hidden" name="gateway" value="<?php echo esc_attr($gateway); ?>" />
    				<input type="submit" class="pmpro_btn pmpro_btn-submit-checkout" value="<?php _e('Complete Payment', 'pmpro');?> &raquo;" /> </form>
    			</span>
    
    		<?php } else { ?>								
    
    			<?php
    				$pmpro_checkout_default_submit_button = apply_filters('pmpro_checkout_default_submit_button', true);
    				if($pmpro_checkout_default_submit_button)
    				{
    				?>
    				<span id="pmpro_submit_span">
                                           <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    					<input type="hidden" name="submit-checkout" value="1" />
    					<input type="submit" class="pmpro_btn pmpro_btn-submit-checkout" value="<?php if($pmpro_requirebilling) { _e('Submit and Check Out', 'pmpro'); } else { _e('Submit and Confirm', 'pmpro');}?> &raquo;" />				</form>
    				</span>

    https://www.ads-software.com/plugins/paid-memberships-pro/

Viewing 1 replies (of 1 total)
  • Thread Starter Zardon

    (@zardon)

    Resolved.

    Got help from a fellow member in the WP Membership site group: https://www.facebook.com/groups/membersitemastermind/66626490683538

    At the top of checkout.php, is there a line of code like this:

    <form id="pmpro_form" class="pmpro_form" action="<?php if(!empty($_REQUEST['review'])) echo pmpro_url("checkout", "?level=" . $pmpro_level->id); ?>" method="post">
    
    If so, try replacing with:
    
    <form id="pmpro_form" class="pmpro_form" action="<?php if(!empty($_REQUEST['review'])) echo pmpro_url("checkout", "?level=" . $pmpro_level->id); ?>" method="post" target="_blank">
Viewing 1 replies (of 1 total)
  • The topic ‘Paypal button opening up in new tab?’ is closed to new replies.