Last active
March 22, 2018 23:27
-
-
Save ideadude/0a4473180e52f95efb9d48f93921bb1c to your computer and use it in GitHub Desktop.
Remove the default the_content filter added to membership level descriptions and confirmation messages in Paid Memberships Pro
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
/** | |
* Remove the default the_content filter added to membership level descriptions | |
* and confirmation messages in PMPro. | |
* These filters will sometimes cause infinite loop conflicts, e.g. when using | |
* page builders like Site Origin. | |
* Add this code to a custom plugin. | |
*/ | |
function remove_pmpro_level_description_and_confirmation_filters() { | |
remove_filter( 'the_content', 'pmpro_level_description' ); | |
remove_filter( 'pmpro_level_description', 'pmpro_pmpro_level_description' ); | |
remove_filter( 'the_content', 'pmpro_confirmation_message' ); | |
remove_filter( 'pmpro_confirmation_message', 'pmpro_pmpro_level_description' ); | |
} | |
add_action( 'init', 'remove_pmpro_level_description_and_confirmation_filters' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment