Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bernattorras/68200807142ffe9688efe5cc8c398ac2 to your computer and use it in GitHub Desktop.
Save bernattorras/68200807142ffe9688efe5cc8c398ac2 to your computer and use it in GitHub Desktop.
Function to add extra month intervals to the subscription editor page
<?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