Created
July 5, 2018 17:06
-
-
Save bernattorras/68200807142ffe9688efe5cc8c398ac2 to your computer and use it in GitHub Desktop.
Function to add extra month intervals to the subscription editor page
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 to add extra month intervals to the subscription editor page | |
**/ | |
add_filter('woocommerce_subscription_period_interval_strings', 'add_extra_month_intervals', 10, 1); | |
function add_extra_month_intervals($intervals){ | |
foreach ( range( 7, 12 ) as $i ) { | |
$intervals[$i] = "every ".$i."th"; | |
} | |
return $intervals; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment