Last active
November 29, 2018 17:18
-
-
Save jrick1229/def3e5700182c44d01eaf6a7f95cb751 to your computer and use it in GitHub Desktop.
Extend the expiration options for subscriptions
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 | |
function eg_extend_subscription_expiration_options( $subscription_lengths ) { | |
$subscription_lengths['year'][10] = wcs_get_subscription_period_strings( 10, 'year' ); | |
$subscription_lengths['year'][20] = wcs_get_subscription_period_strings( 20, 'year' ); | |
$subscription_lengths['month'][48] = wcs_get_subscription_period_strings( 48, 'month' ); | |
return $subscription_lengths; | |
} | |
add_filter( 'woocommerce_subscription_lengths', 'eg_extend_subscription_expiration_options' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment