Using WooCommerce Subscriptions you get a “Thank you” message after purchasing a subscription product which says:

Your subscription will be activated when payment clears. View the status of your subscription in your account.

Do you know that you can change this text to the that best matches your style/site?

To do so, open the file functions.php located in wp-content/themes/your-theme-name/ and add this code at the end of it:

8 replies
  1. simi
    simi says:

    Hi,

    Tried to add this to my functions.php file, right at the bottom – however this was the result after I copied the code to the file – the page said:

    Parse error: syntax error, unexpected end of file in /home//public_html//wp-content/themes/***/functions.php on line 963

    ( * = hidden from public)

    Please advise on solution.

    [I have latest WP & WooSubscription 2.0.5]

    Regards.

    Reply
  2. Simi
    Simi says:

    FOUND SOLUTION :

    wp-content/plugins/Subscriptionsv2.0.5/includes/class-wc-subscriptions-order.php

    Press Command/Control F on your keyboard and search : ‘Your subscription’ – and you’re able to rename :

    ‘Your subscription will be activated when payment clears. View the status of your subscription in your account’.

    Reply
  3. flo_itvolcano
    flo_itvolcano says:

    simi, that’s not a sollution because it’ll be overwritten on next plugin update.

    the code above (besides a typo) has an error. it is missing ; at the end of add_filter( ‘woocommerce_subscriptions_thank_you_message’, ‘custom_subscription_thank_you’)

    So it should be add_filter( ‘woocommerce_subscriptions_thank_you_message’, ‘custom_subscription_thank_you’); instead

    Reply
  4. Aron
    Aron says:

    Hey Nicola,

    Great blog, I’ve actually landed on your site a few times now with my searches and have used a few of your scripts already, however this one doesnt seem to be working for me. Initially, it was simply throwing me an error, so I added the semi-colon at the very end and cleared the error, however now it has simply removed the default message (“Your subscription will be activated when payment clears. View the status of your subscription in your account.”) altogether.

    I would really like to resolve this if you have any ideas for me. Thanks in advance!

    Reply
  5. Drew
    Drew says:

    This code just needs a simicolon at the end, thats the only problem. The line:

    add_filter( ‘woocommerce_subscriptions_thank_you_message’, ‘custom_subscription_thank_you’)

    Should be:

    add_filter( ‘woocommerce_subscriptions_thank_you_message’, ‘custom_subscription_thank_you’);

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You have to agree to the comment policy.