Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ipokkel/3bc04a71d1bb9b39906e82c22ec482b6 to your computer and use it in GitHub Desktop.
Save ipokkel/3bc04a71d1bb9b39906e82c22ec482b6 to your computer and use it in GitHub Desktop.
Load content on confirmation or checkout page for PMPro.
<?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