Forked from kimcoleman/elementor_compatibility_for_pmpro.php
Created
March 27, 2018 16:02
-
-
Save greathmaster/6e5e238d7f8219b7768534042d2bdce6 to your computer and use it in GitHub Desktop.
Ensure Paid Memberships Pro compatibility when using the Elementor Page Builder.
This file contains 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 | |
/** | |
* Ensure Paid Memberships Pro compatibility when using the Elementor Page Builder: | |
* https://wordpress.org/plugins/elementor/ | |
* | |
* You must also set a Custom Field on the Membership Checkout page with the key | |
* 'pmpro_default_level' and value of a level ID in order to properly design your | |
* Membership Checkout page using Elementor. | |
*/ | |
function elementor_compatibility_for_pmpro() { | |
// Remove the default the_content filter added to membership level descriptions and confirmation messages in PMPro. | |
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', 'elementor_compatibility_for_pmpro' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment