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
<?php | |
function my_add_pmpro_state_abbrev( $states ) | |
{ | |
// Canadian province abbreviations | |
$provinces = array( | |
"AB", | |
"BC", | |
"MB", | |
"NB", |
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_add_cols_header($order_ids) { | |
ob_start(); ?> | |
<th>Discount Code</th><?php | |
return ob_get_clean(); | |
} | |
add_filter('pmpro_orders_extra_cols_header', 'my_pmpro_add_cols_header'); | |
function my_pmpro_add_cols_body($order) { |
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 | |
//we have to put everything in a function called on init, so we are sure Register Helper is loaded | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
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
//we have to put everything in a function called on init, so we are sure Register Helper is loaded | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; | |
} | |
//define the fields | |
$fields = array(); |
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 pmpro_my_get_paying_member_ids() | |
{ | |
global $pmpro_levels; | |
global $wpdb; | |
$user_ids = array(); | |
$paying_levels = array(); | |
foreach( $pmpro_levels as $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
/** Accepts a level ID and returns all categories protected by that level(id) **/ | |
function pmpro_getCategoriesForLevel($level_id) | |
{ | |
global $wpdb; | |
$sql = "SELECT category_id FROM {$wpdb->pmpro_memberships_categories} WHERE membership_id = %d"; | |
$sql = $wpdb->prepare($sql, $level_id); | |
return $wpdb->get_results($sql); | |
} |
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 | |
global $gateway, $pmpro_review, $skip_account_fields, $pmpro_paypal_token, $wpdb, $current_user, $pmpro_msg, $pmpro_msgt, $pmpro_requirebilling, $pmpro_level, $pmpro_levels, $tospage, $pmpro_show_discount_code, $pmpro_error_fields; | |
global $discount_code, $username, $password, $password2, $bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail, $bconfirmemail, $CardType, $AccountNumber, $ExpirationMonth,$ExpirationYear; | |
/** | |
* Filter to set if PMPro uses email or text as the type for email field inputs. | |
* | |
* @since 1.8.4.5 | |
* | |
* @param bool $use_email_type, true to use email type, false to use text type |
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 VAT for Austria | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: PMPro: VAT for Austria | |
Version: .1 | |
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() |
OlderNewer