Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created December 19, 2021 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ideadude/10af79dced804674b7f48f211a53c534 to your computer and use it in GitHub Desktop.
Save ideadude/10af79dced804674b7f48f211a53c534 to your computer and use it in GitHub Desktop.
Hide the expiration text on the levels page with PMPro.
<?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