Created
February 26, 2020 11:48
-
-
Save BoyetDgte/dc72a2cd0dfe6220e2ac411791574e69 to your computer and use it in GitHub Desktop.
Modify texts in WooCommerce Subscription plugin
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
// change the “for” to "up to for" | |
function change_subscription_product_string( $subscription_string, $product, $include ) { | |
if( $include ){ | |
$subscription_string = str_replace('for', 'for up to', $subscription_string); | |
} | |
return $subscription_string; | |
} | |
add_filter( 'woocommerce_subscriptions_product_price_string', 'change_subscription_product_string', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment