Forked from andrewlimaza/pmpro-open-comments-non-members.php
Last active
April 8, 2021 18:22
-
-
Save travislima/e2a8ec1eae51c8014de20e1e99b67456 to your computer and use it in GitHub Desktop.
Open comments so anyone may read them
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 | |
/** | |
* 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
This recipe is included in the blog post on "Display Comments on a Members-Only Post to Non-Members" at Paid Memberships Pro here: https://www.paidmembershipspro.com/display-comments-of-a-member-only-blog-post-to-non-members/