Forked from strangerstudios/my_pmpro_pages_custom_template_path.php
Last active
September 19, 2018 21:29
-
-
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.
This file contains hidden or 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 | |
/** | |
* 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