Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbrocks/5200e2eee937f709401eb8012d25211e to your computer and use it in GitHub Desktop.
Save pbrocks/5200e2eee937f709401eb8012d25211e to your computer and use it in GitHub Desktop.
Tell PMPro to look in the pages folder of this plugin for PMPro page templates.
<?php
/**
* Tell PMPro to look in the pages directory of this plugin for PMPro page templates.
*
* Add this code to your Customizations plugin.
*
* Make sure that there is a /paid-memberships-pro/pages/ directory in the plugin directory with your templates in it.
*/
function my_pmpro_pages_custom_template_path( $default_templates ) {
$default_templates[] = dirname( __FILE__ ) . '/paid-memberships-pro/pages/checkout.php';
return $default_templates;
}
add_filter( 'pmpro_pages_custom_template_path', 'my_pmpro_pages_custom_template_path' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment