Created
December 19, 2021 15:54
-
-
Save ideadude/10af79dced804674b7f48f211a53c534 to your computer and use it in GitHub Desktop.
Hide the expiration text on the levels page with PMPro.
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 | |
/** | |
* Hide the expiration text on the levels page with PMPro. | |
* Add this code into a custom plugin or code snippet. | |
*/ | |
function my_hide_expiration_text_on_levels_page( $text ) { | |
global $pmpro_pages; | |
if ( ! empty( $pmpro_pages['levels'] && is_page( $pmpro_pages['levels'] ) ) ) { | |
$text = ''; | |
} | |
return $text; | |
} | |
add_filter( 'pmpro_level_expiration_text', 'my_hide_expiration_text_on_levels_page' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment