2

Thank you for reading this post. I have been trying to change the "Free Trial" text in Woocommerce Subscriptions. I was able to find code to change "Sign Up Fee" but have not been able to find ability to change this other section.

    function change_subscription_product_string( $subscription_string, $product, $include ){
if( $include['sign_up_fee'] ){
    $subscription_string = str_replace('sign-up fee', '= total price. After intro period subscription will renew monthly.', $subscription_string);
}
return $subscription_string; } add_filter( 'woocommerce_subscriptions_product_price_string', 'change_subscription_product_string', 10, 3 );

The code I have currently created is : "$199.00 for 1 month with a 2-month free trial and a $398.00 = total price. After intro period subscription will renew monthly."

Need to change to "$199.00 for 1 month with a 2-month minimum and a $398.00 = total price. After intro period subscription will renew monthly.

David
  • 21
  • 3
  • Wanted to see if anyone may know of a secondary string that may be able to influence this section? – David Mar 29 '17 at 18:27

1 Answers1

0

I had success with this snippet:

function wc_subscriptions_custom_price_string( $pricestring ) {
    $newprice = str_replace( 'free trial', 'minimum', $pricestring );
    return $newprice;
}
add_filter( 'woocommerce_subscriptions_product_price_string', 'wc_subscriptions_custom_price_string' );
add_filter( 'woocommerce_subscription_price_string', 'wc_subscriptions_custom_price_string' );

from Woo's official woogist github gist account via nicola.blog

squarecandy
  • 4,894
  • 3
  • 34
  • 45