Skip to content

Instantly share code, notes, and snippets.

@BoyetDgte
Created February 26, 2020 11:48
Show Gist options
  • Save BoyetDgte/dc72a2cd0dfe6220e2ac411791574e69 to your computer and use it in GitHub Desktop.
Save BoyetDgte/dc72a2cd0dfe6220e2ac411791574e69 to your computer and use it in GitHub Desktop.
Modify texts in WooCommerce Subscription plugin
// 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