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 hide any products from the Woo store if the current member | |
| * does not have access to the product with a level restriction | |
| * | |
| * 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 recipe will forward all requests from a temporary webhook URL | |
| * to the current PMPro Stripe Webhook URL | |
| * | |
| * 1. Navigate to Memberships > Settings > Payment Gateway and Edit Settings on the Stripe Gateway | |
| * 2. Disable your webhook - do not create a new one | |
| * 3. Login to your Stripe account, navigate to Webhooks | |
| * 4. Create a new webhook with the URL of https://MYSITE.com/?pmpro-api=stripe_webhook | |
| * 5. For testing purposes, enable all Stripe events |
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 send additional data to Kit to populate custom fields | |
| * | |
| * 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 recipe will add a tag ID to the list of subscriber tags. | |
| * Use the $user object to add this information conditionally | |
| * | |
| * 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 | |
| /** | |
| * Redirect users to login page after logging out of WordPress. | |
| */ | |
| function my_redirect_after_logout_wp(){ | |
| wp_redirect( "/login" ); | |
| exit; | |
| } | |
| add_action('wp_logout','my_redirect_after_logout_wp'); |
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 | |
| /** | |
| * Hook into profile update and send a notification to site admin | |
| * | |
| * @param int $user_id The ID of the user being updated | |
| * @param object $old_user_data The object of the user before it was updated. | |
| * @return void | |
| */ | |
| function my_pmpro_profile_update_notification( $user_id, $old_user_data ) { |
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 show a list of 'overdue' memberships if the level is within a grace period | |
| * | |
| * 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 recipe will redirect a member after checkout to their invoice | |
| * | |
| * 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 | |
| function my_pmpro_members_list_csv_extra_columns( $columns ) { | |
| $columns["member_profile_url"] = "my_extra_column_member_url"; | |
| return $columns; | |
| } | |
| add_filter("pmpro_members_list_csv_extra_columns", "my_pmpro_members_list_csv_extra_columns", 10); |
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 | |
| //Remove the current text we add to PMPro no access message | |
| function mypmpro_remove_original_ec_text(){ | |
| remove_filter( 'pmpro_no_access_message_body', 'pmproec_pmpro_text_filter' ); // PMPro 3.1+ | |
| remove_filter( 'pmpro_non_member_text_filter', 'pmproec_pmpro_text_filter' ); // Pre-PMPro 3.1 | |
| remove_filter( 'pmpro_not_logged_in_text_filter', 'pmproec_pmpro_text_filter' ); // Pre-PMPro 3.1 | |
| } | |
| add_action( 'init' ,'mypmpro_remove_original_ec_text' ); |
NewerOlder