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']); |