Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created March 27, 2018 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewlimaza/fb4655e1d5d463ac8aa5690e18d6465b to your computer and use it in GitHub Desktop.
Save andrewlimaza/fb4655e1d5d463ac8aa5690e18d6465b to your computer and use it in GitHub Desktop.
Open comments so anyone may read them
<?php
/**
* Allows non-members to read comments on restricted posts.
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function make_pmpro_comments_open(){
remove_filter("comments_array", "pmpro_comments_filter", 10, 2);
}
add_action( 'init', 'make_pmpro_comments_open' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment