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 | |
/* | |
* To add 'Next Billing Date' to Members List | |
*/ | |
//Add 'Next Billing Date' Column to Members List Header | |
function my_pmpro_memberslist_extra_cols_header($theusers) | |
{ | |
?> | |
<th><?php _e('Next Billing Date', 'pmpro');?></th> | |
<?php |
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
//Add 'City' Column to Users List Header | |
function pmpro_manage_users_columns($columns) { | |
$columns['city'] = 'City'; | |
return $columns; | |
} | |
add_filter('manage_users_columns', 'pmpro_manage_users_columns'); | |
//Add 'City' Column to Users List Rows | |
function pmpro_manage_users_custom_column($value, $column_name, $user_id) { | |
$theuser = get_userdata( $user_id ); |
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 // do no include in Customizations Plugin | |
/** | |
* When registering, add the member to a specific membership level | |
* | |
* @param integer $user_id | |
*/ | |
// Disables the pmpro redirect to levels page when user tries to register | |
add_filter( 'pmpro_login_redirect', '__return_false' ); |
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 | |
/* | |
Plugin Name: PMPro Customizations | |
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for my Paid Memberships Pro Setup | |
Version: .1 | |
Author: Paid Memberships Pro | |
Author URI: https://www.paidmembershipspro.com | |
*/ |
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 | |
/** | |
* Redirect all non-admin user's after they login to your website's home page. | |
* Documentation for login_redirect filter - https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect | |
* Visit https://yoohooplugins.com for more tutorials. | |
*/ | |
function yh_redirect_after_login( $redirect_to, $request, $user ) { | |
if ( isset( $user->roles ) && is_array( $user->roles ) ) { |
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
/* | |
Redirect the Membership Account page to the bbPress User Profile. | |
*/ | |
function my_pmpro_bbpress_profile_template_redirect() | |
{ | |
global $pmpro_pages, $current_user; | |
//make sure PMPro is active | |
if(empty($pmpro_pages)) | |
return; |
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
jQuery(document).ready(function($){ | |
$('#pmpro_extra_seats').appendTo($('#other_discount_code_p').parent()); | |
}); |
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
function my_pmpro_members_list_csv_default_columns($default_columns) | |
{ | |
$new_default_columns = array(); | |
$remove = array('pmpro_bfirstname', 'pmpro_blastname', 'pmpro_baddress1', 'pmpro_baddress2', 'pmpro_bcity', 'pmpro_bstate', 'pmpro_bzipcode', 'pmpro_bcountry', 'pmpro_bphone'); | |
foreach($default_columns as $key => $value) | |
{ | |
if(!in_array($value[1], $remove)) | |
$new_default_columns[] = $value; | |
} |
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 | |
/** | |
* Plugin Name: PMPro Customizations | |
* Author: Paid Memberships Pro | |
* Description: Custom Fields for PMPro Registration Process. Install along with Register Helper Add On. | |
*/ | |
function initialize_pmprorh_fields() { | |
// don't break if Register Helper is not loaded | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { |