-
-
Save itsjusteileen/5898e0fb462bc1128ac9e9d585eaee28 to your computer and use it in GitHub Desktop.
Use jQuery to move a Sponsored Seats field on the Checkout page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
$('#pmpro_extra_seats').appendTo($('#other_discount_code_p').parent()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: PMPro Customizations | |
* Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
* Description: Customizations for positioning Sponsored Seats field on the checkout page. Add this php file and .js file to Customizations plugin's folder. | |
* Version: .1 | |
* Author: Paid Memberships Pro | |
* Author URI: https://www.paidmembershipspro.com | |
*/ | |
add_action( 'wp_enqueue_scripts', 'enqueueing_just_on_checkout_page' ); | |
function enqueueing_just_on_checkout_page() { | |
global $pmpro_pages; | |
wp_register_script( 'move-something', plugins_url( 'move-something.js', __FILE__ ), array( 'jquery' ), '1.2' ); | |
if ( is_page( $pmpro_pages['checkout'] || $pmpro_pages['confirmation'] ) ) { | |
wp_enqueue_script( 'move-something' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment