How to change the price string in YITH WooCommerce Subscriptions

I’ve followed Woocommerces tutorial below from Nicola Mustone
Woo Ninja @ Automattic to change the price string in WooCommerce Subscriptions. It works great! I have recently switch plugin to YITH WooCommerce Subscription as I need to have a certain functionality that I could get it from the former plugin.

The previous code which allow me to change strings of free trial or/and a sign-up fee and use str_replace to change the words of the other parts of the string, like in the example from the author:

function wc_subscriptions_custom_price_string( $pricestring ) {
$pricestring = str_replace( 'every 3 months', 'per season', $pricestring );
$pricestring = str_replace( 'sign-up fee', 'initial payment', $pricestring );

return $pricestring;

}
add_filter( ‘woocommerce_subscriptions_product_price_string’, ‘wc_subscriptions_custom_price_string’ );
add_filter( ‘woocommerce_subscription_price_string’, ‘wc_subscriptions_custom_price_string’ );

My question is:

  • How can I apply this to the new YITH WooCommerce Subscription.

I have search everywhere and wondering if someone knew or have done the same on here to help me out.

thank you in advance

Read more here: How to change the price string in YITH WooCommerce Subscriptions

Leave a Reply

Your email address will not be published. Required fields are marked *