Home / Archive / MemberPress: Move PayPal Smart Pay Buttons
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Move PayPal Smart Pay Buttons

Move the PayPal Smart Pay Buttons under the checkboxes for accepting Terms of Service and the Privacy Policy. Note: All elements on the account and registration pages are their own divs. So, if you find the id or class of a specific element div, you can use this same method to move around elements on the registration and account page.

Code Preview
php
<?php
//Alternatively, you can use the wp_head hook instead. Wp_footer works best if using ReadyLaunch(tm)
function mepr_move_paypal_smart_buttons() { ?>
	<script>
        ( function( $ ) {
            $( document ).ready( function() {
                var tos = $( '.mepr_tos' );
                var prp = $( '#mepr_agree_to_privacy_policy1' ).parent().parent();
                var payments = $( '.mepr-payment-methods-wrapper' );
                if( null != tos && null != payments ) {
                    tos.insertBefore( payments );
                }
                if( null != prp && null != payments ) {
                    prp.insertBefore( payments );
                }
            });
        })( jQuery );
	</script>
<?php }
add_action( 'wp_footer', 'mepr_move_paypal_smart_buttons', 10 );

Comments

Add a Comment