Created
November 27, 2018 12:44
-
-
Save kimcoleman/02f42ed72dc874bced9131e36ca31435 to your computer and use it in GitHub Desktop.
Filter the pmpro_pages_custom_template_path later to add our custom file for checkout.php.
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 | |
/* | |
* Filter the pmpro_pages_custom_template_path later to add our custom file for checkout.php. | |
* | |
*/ | |
function pmpro_custom_override_checkout_page( $templates, $page_name, $type, $where, $ext ) { | |
if ( ( $page_name === 'checkout' ) && file_exists( dirname(__FILE__) . '/pmpro-multiple-memberships-per-user/checkout.php' ) ) { | |
array_splice( $templates, 1, 0, dirname(__FILE__) . '/pmpro-multiple-memberships-per-user/checkout.php' ); | |
} | |
return $templates; | |
} | |
add_filter( 'pmpro_pages_custom_template_path', 'pmpro_custom_override_checkout_page', 10, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment