I'm using Paid Memberships Pro plugin on my site and its showing content that should be hidden.
It looks like the issue is that PMP is running their check to see if a post is restricted to members before page builder’s content is rendered. That means that once page builder’s content is rendered, it’s overriding PMP’s login/register form.
The reason this is happening is because PMP’s check is happening at an earlier priority of 5 whereas the default is 10…
add_filter('the_content', 'pmpro_membership_content_filter', 5);
I changed the priority to 15 as described here:
https://www.wpbeaverbuilder.com/support/q/paid-memberships-pro/
but it still doesnt work!
Here is the code I tried:
/*
Tell PMPro to filter the_content a bit later.
This will sometimes fix issues where theme or plugin elements (e.g. videos)
are not being filtered by PMPro. Note that this sometimes will cause
some things (e.g. share links) to be filtered that you don't want to be
filtered... and sometimes edits to the theme or a child theme are
required to get the desired effect.
Add this to your active theme's fucntions.php or a custom plugin.
*/
function my_init_change_pmpro_content_filter_priority()
{
remove_filter('the_content', 'pmpro_membership_content_filter', 5);
add_filter('the_content', 'pmpro_membership_content_filter', 15);
}
add_action('init', 'my_init_change_pmpro_content_filter_priority');