This seems to be the offending Memberpress function
// Template selection
public static function template_include($template) {
global $post, $wp_query;
if(!is_singular()) { return $template; }
if(isset($post) && is_a($post, 'WP_Post') && $post->post_type == MeprProduct::$cpt) {
$product = new MeprProduct($post->ID);
$new_template = $product->get_page_template();
}
if(isset($new_template) && !empty($new_template)) { return $new_template; }
return $template;
}
Edit:
Actually I was able to get a Memberpress Registration page loading by slightly modifying the code @mecanographik wrote:
add_filter('template_include', function ($template) {
global $post;
if(isset($post) && is_a($post, 'WP_Post')) {
$default_template = locate_template( array( 'template-custom.blade.php' ) );
if ( '' != $default_template
&& '' == $post->page_template // Only when page_template is not set
){
//return $default_template;
$template = $default_template;
}
}
return $template;
}, 99);