Created
January 24, 2019 12:11
-
-
Save andrewlimaza/45c4739734c34666e782d032a1368f3e to your computer and use it in GitHub Desktop.
Load content on confirmation or checkout page for PMPro.
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 | |
/** | |
* Load content for specific pages, checkout or confirmation page | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function load_my_script_for_pmpro() { | |
global $pmpro_pages; | |
if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) ) { | |
?> | |
<!-- script or styles go here --> | |
<?php | |
} | |
} | |
add_action( 'wp_head', 'load_my_script_for_pmpro' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment