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 away from checkout if the secret URL parameter is missing. | |
*/ | |
function my_pmpro_template_url_parameter_at_checkout() { | |
global $pmpro_pages; | |
// Return early if we are not on a PMPro page. | |
if ( empty( $pmpro_pages ) ) { | |
return; |
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 | |
/* | |
* Add membership status to WordPress Users list | |
* | |
* Statuses: https://www.paidmembershipspro.com/documentation/advanced/pmpro-database-structure/#10 | |
* | |
* 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
/* Custom styling for the highlight level of the level comparison table */ | |
/* Apply borders to the highlighted column */ | |
.pmpro_advanced_levels-compare_table th.pmpro_level-highlight, | |
.pmpro_advanced_levels-compare_table td.pmpro_level-highlight { | |
border-left: 6px solid #00d084; | |
border-right: 6px solid #00d084; | |
} | |
/* Add border to the top of the highlighted column */ |
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 | |
/* | |
* Show the Group Leaders expiration for the child in various places on frontend and admin pages in PMPro. | |
* | |
* 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
/** | |
* Change PMPro to not track visits at all | |
* Add this code into a custom plugin or code snippet. | |
*/ | |
function my_pmpro_report_login_wp_visits_only_for_users() { | |
remove_action( 'wp', 'pmpro_report_login_wp_visits' ); | |
} | |
add_action( 'init', 'my_pmpro_report_login_wp_visits_only_for_users' ); |
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
/* Advanced Levels Compare table - add border to highlighted column */ | |
.pmpro_advanced_levels-compare_table thead th.pmpro_level-highlight, | |
.pmpro_advanced_levels-compare_table tbody td.pmpro_level-highlight, | |
.pmpro_advanced_levels-compare_table tfoot td.pmpro_level-highlight { | |
border-left: 6px solid #00d084; | |
border-right: 6px solid #00d084; | |
} | |
#pmpro_levels.pmpro_advanced_levels-compare_table tfoot tr:last-child td.pmpro_level-highlight { | |
border-bottom: 6px solid #00d084; |
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 | |
/** | |
* Customize the registration error message. | |
* | |
* 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 custom_registration_error_message( $errors, $sanitized_user_login, $user_email ) { |
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 | |
/** | |
* Add &pmpropp_chosen_plan=<<plan_id>> in the URL to preselect the payment plan option. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_payment_plan_select_url() { | |
// Only load this on the checkout page. | |
if ( function_exists('pmpro_is_checkout') && !pmpro_is_checkout() ) { | |
return; | |
} |
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. | |
/** | |
* This recipe will allow you to set a default commission when using "Automatically create affiliate code?". | |
* This setting can be found in your level settings. | |
* | |
* For use with Affiliate Add On https://www.paidmembershipspro.com/add-ons/pmpro-lightweight-affiliate-tracking/ | |
* 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/ |