Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created June 29, 2020 07:46
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 andrewlimaza/371850f89d146664c32e1efa06d02557 to your computer and use it in GitHub Desktop.
Save andrewlimaza/371850f89d146664c32e1efa06d02557 to your computer and use it in GitHub Desktop.
Remove PMPro Series filter for posts to use default restricted content messages.
<?php
/**
* Remove PMPro Series (This post belongs to series X) message. Show default content restriction instead.
* Follow this guide to add code to your WordPress site: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_remove_series_filter() {
remove_filter( 'pmpro_non_member_text_filter', 'pmpros_pmpro_text_filter' );
remove_filter( 'pmpro_not_logged_in_text_filter', 'pmpros_pmpro_text_filter' );
}
add_action( 'init', 'my_pmpro_remove_series_filter' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment