Created
August 2, 2019 17:04
-
-
Save NickGreen/6c2cc99fa40be18249a1bc53e43429ee to your computer and use it in GitHub Desktop.
Change options strings for subscription products (works for All Products sub options)
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 change_text( $subscription_string, $subscription_details ) { | |
if ($subscription_string == '<span class="subscription-details">every 2 weeks</span>') { | |
$subscription_string = '<span class="subscription-details">Fortnightly</span>'; | |
} | |
if ($subscription_string == '<span class="subscription-details">every month</span>') { | |
$subscription_string = '<span class="subscription-details">Monthly</span>'; | |
} | |
return $subscription_string; | |
} | |
add_filter( 'woocommerce_subscriptions_product_price_string', 'change_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment