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: Prorated initial membership payment | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Will prorate the membership payment from today until the 1st of the next month. | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com> | |
Author URI: http://www.eighty20results.com/thomas-sjolshagen | |
*/ |
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_action( "pmpro_after_change_membership_level", "e20r_cancel_at_end_of_period", 10, 2 ); | |
add_filter( "pmpro_email_body", "e20r_email_body_for_cancel_msg", 10, 2 ); | |
/** | |
* Change cancellation to set expiration date for next payment instead of cancelling immediately. | |
* Assumes monthly membership levels. | |
* Assumes orders are generated for each payment (i.e. your webhooks/etc are setup correctly). | |
* | |
* @param (int) $level_id -- The membership levelId we're changing | |
* @param (int) $user_id -- The member we're changing levels for. |
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
/* | |
Keep members start dates at checkout, even if switching levels. | |
*/ | |
function custom_pmpro_checkout_start_date($date, $user_id, $level) | |
{ | |
global $wpdb; | |
// Comment this out if you want to use the users registration date (Warning: Registration date may not contain data...) | |
$sqlQuery = "SELECT UNIX_TIMESTAMP(startdate) FROM $wpdb->pmpro_memberships_users WHERE user_id = '" . esc_sql($user_id) . "' ORDER BY id LIMIT 1"; | |
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 Preserve Startdate | |
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/ | |
Description: Customization to preserve initial membership signup (startdate) value. | |
Version: 1.0 | |
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com> | |
Author URI: https://eighty20results.com/thomas-sjolshagen/ | |
*/ | |
/* |
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
/* | |
Change cancellation to set expiration date et expiration date to be the end of the current month, instead of cancelling immediately. | |
Assumes orders are generated for each payment (i.e. your webhooks/etc are setup correctly). | |
*/ | |
//give users their level back with an expiration | |
function e20r_pmpro_after_change_ml($level_id, $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 | |
/* | |
Plugin Name: PMPro Expire New Memberships Next Year | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customization to expire new membership sign-ups on Jan 1 the year after, the year after this one. | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com> | |
Author URI: https://eighty20results.com/thomas-sjolshagen/ | |
*/ | |
function pmpro_next_year_expiration($level) |
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 Custom Renew Button interval | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customization to let admin specify how early to show the renew button. | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com> | |
Author URI: https://eighty20results.com/thomas-sjolshagen/ | |
*/ |
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: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for Paid Memberships Pro | |
Version: .2 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.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 | |
/* | |
Plugin Name: Register Helper - Extra fields | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Extra registration fields | |
Version: .1 | |
Author: Thomas Sjolshagen - PMPro Support | |
Author URI: http://www.strangerstudios.com/ | |
*/ | |
function my_pmprorh_extra_fields_init() |
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/BuddyPress members only access | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Limit access to BuddyPress pages/components for non-members. | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com> | |
Author URI: http://www.eighty20results.com/thomas-sjolshagen | |
*/ |