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 | |
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
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. |
NewerOlder