Last active
March 1, 2023 21:54
-
-
Save jrick1229/02fb7f7bcc1e9e6911c4b74fea08a518 to your computer and use it in GitHub Desktop.
Add an extra billing interval to WooCommerce 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 wcs_custom_frequency( $intervals ) { | |
// change the $custom_frequency variable numerical value to what you'd like to add. | |
$custom_frequency = 50; | |
$intervals[$custom_frequency] = sprintf( __( 'every %s', 'my-text-domain' ), WC_Subscriptions::append_numeral_suffix( $custom_frequency ) ); | |
return $intervals; | |
} | |
add_filter( 'woocommerce_subscription_period_interval_strings', 'wcs_custom_frequency' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment