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 | |
| /* Checks to see if a registration is happening after a given date; if so, prevent registration and stop new signups for the level/no longer display the level on the levels page | |
| */ | |
| global $pmproml_start_date, $pmproml_end_date, $pmproml_limited_level_id; | |
| $pmproml_limited_level_id = array( 1, 2, 4 ); // change to the ID of the limited-time membership level | |
| $pmproml_start_date = "2019/04/01"; // change to the date registration starts, in YYYY/MM/DD format | |
| $pmproml_end_date = "2019/04/30"; // change to the date registration ends, in YYYY/MM/DD format |
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 | |
| /** | |
| * Prevent oembeds from running on the PMPro Member Directory Add On pages. | |
| * | |
| * This may be helpful if any external or social URLs are listed on the directory | |
| * or profile page. | |
| * | |
| * Can clear oembed cache with steps here: https://siteorigin.com/clearing-oembed-cache/ | |
| * | |
| * You can add this recipe to your site by creating a custom plugin |
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 | |
| /** | |
| * Redirects all non-members from the forums page. | |
| * | |
| * This recipe requires bbPress and Paid Memberships Pro plugins. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ |
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 | |
| /** | |
| * Automatically delete user when their approval is denied. | |
| * Add this code to your site by following: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function pmpro_approvals_delete_member_on_deny( $user_id, $level_id ) { | |
| wp_delete_user( $user_id ); | |
| } | |
| add_action( 'pmpro_approvals_after_deny_member', 'pmpro_approvals_delete_member_on_deny', 10, 2 ); |
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 | |
| // Copy from below here... | |
| /** | |
| * Have users update their billing information in Stripe Customer Portal. | |
| * | |
| * NOTE: Before using Stripe Customer Portal, you must first enable it by saving the | |
| * customer portal settings page here: | |
| * https://dashboard.stripe.com/settings/billing/portal (For live mode) |
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 | |
| /** | |
| * Do not sent recurring payment reminder email to specified levels. | |
| * | |
| * This may be useful to stop sending reminder emails for short | |
| * billing term recurring payment membership levels. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. |
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 | |
| /** | |
| * Restrict post access to specific user IDs or user Roles. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function restrict_specific_posts_to_specific_users( $hasaccess, $thepost, $theuser, $post_membership_levels ) { |
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
| .pmpro-checkout .pmpro_form { | |
| display: -ms-grid; | |
| display: grid; | |
| grid-column-gap: 1em; | |
| -ms-grid-columns: 1 1em 1; | |
| grid-template-columns: 1 1; | |
| grid-template-areas: | |
| "message message" | |
| "pricing pricing" | |
| "user address" |
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 //do not copy | |
| /** | |
| * This recipe will provide a basic implementation of the hCAPTCHA library on the checkout page. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ |
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 // do not copy this line. | |
| /** | |
| * When using WooCommerce and our Manager Role Add On, this will allow our Manager role to see the Admin Bar | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |