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 | |
/** | |
* Calculate days remaining for current membership level and add it to new subscription. | |
* Only works for PMPro WooCommerce Integration | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* www.paidmembershipspro.com | |
*/ | |
function pmprowoo_add_days_to_level( $level_array ) { | |
$level_obj = pmpro_getLevel($level_array['membership_id']); |
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 | |
/** | |
* Allow members to only renew if their membership expires in 45 days or less. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function custom_pmpro_is_level_expiring_soon( $r, $level ) { | |
$days = 45; //change number of days before someone is allowed to renew. | |
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 no include in Customizaations Plugin | |
/** | |
* Plugin Name: PMPro Levels Popup | |
* Description: Add Level selection to a popup | |
*/ | |
add_shortcode( 'pmpro-levels2-popup', 'pmpro_levels_select_shortcode2' ); | |
function pmpro_levels_select_shortcode2() { | |
global $wpdb, $pmpro_msg, $pmpro_msgt, $current_user; |
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 | |
/** | |
* Plugin Name: PMPro Profile Fields | |
* | |
* Add PMPro billing fields to the WordPress and BuddyPress user profiles | |
* | |
* You must have installed both Paid Memberships Pro and the PMPro Register Helper plugins | |
* | |
* https://github.com/strangerstudios/pmpro-register-helper | |
*/ |
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
function pmpro_pennsports_gift() { | |
global $pmprogl_gift_levels; | |
$pmprogl_gift_levels = array( | |
// Set level 3 as a "Purchase Gift" membership level to create a gift code for a free level 4 gift. | |
3 => array( // "Purchase Gift" level ID | |
'level_id' => 4, // Membership Level ID of the gift membership level. | |
'initial_payment' => 0, // The initial payment for the gift membership level. | |
'billing_amount' => 0, // The recurring billing amount for the gift membership level.The recurring billing amount for the gift membership level. | |
'cycle_number' => 0, // The number of billing cycles for the gift membership level. |
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 | |
/** | |
* This code will display a renewal reminder notification banner at the top of your website for members whose membership | |
* level will expire within 7 days of the date they visit your site. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Note: When adding to your Customizations Plugin, be careful not to include the opening php tag on line 1 above. | |
*/ | |
function pmpro_mmpu_show_banner_renewal_message() { | |
global $pmpro_pages; |
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 | |
/** | |
* 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' ) ) { |
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
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 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
jQuery(document).ready(function($){ | |
$('#pmpro_extra_seats').appendTo($('#other_discount_code_p').parent()); | |
}); |