/* Setup Level 3 to start next Monday and end the following Monday Requires PMPro 1.8.9 or higher. Add this code to your active theme's functions.php or a custom plugin. */ //startdate function my_pmpro_checkout_start_date($enddate, $user_id, $level) { if($level->id == 3) $startdate = "'" . date('Y-m-d', strtotime('next Monday', current_time('timestamp'))) . "'"; return $startdate; } add_action('pmpro_checkout_start_date', 'my_pmpro_checkout_start_date', 10, 3); //enddate function my_pmpro_checkout_end_date($enddate, $user_id, $level, $startdate) { if($level->id == 3 && $level->expiration_number > 0) $enddate = "'" . date("Y-m-d", strtotime("+ " . $level->expiration_number . " " . $level->expiration_period, strtotime(trim($startdate,"'")) )) . "'"; return $enddate; } add_action('pmpro_checkout_end_date', 'my_pmpro_checkout_end_date', 10, 4);