How to Change WooCommerce Registration Successful Text

Change WooCommerce Registration Successful TextDo you want to change the WooCommerce registration successful text? The main aim of this post is to provide a solution for you to achieve this.

It is important to inform a user if their registration was successful. The best way to do this is to display a success message on the registration page, once the details are saved.

If you run a professional registration based online store, we recommend that you display a custom success message after successful submission. It is worth mentioning that users feel prioritized when they know an authorized site owner is monitoring them.

How to Change WooCommerce Registration Successful Text

To achieve this, you need some basic coding skills. This is because we will be using a custom PHP code snippet. Yes, you can use a plugin, but if they are many, they may end up bloating your site.

Additionally, using custom snippets is a safe way to make changes on your site. We will also explain each step in detail, to make it easy for beginners to implement this solution.

Let us get right into it.

Steps to Change WooCommerce Registration Successful Text

Before using this solution, it is important to note that this is a WordPress notice and it’s generated most of the time with sprintf() function (partial text + variables). You can check if you get partially an extract of this sentence using stripos() php function in the condition. You will have to make different tries, to get it to work.

Here are the simple steps you need to follow:

  1. Log into your WordPress site and access the Dashboard as the admin user.
  2. From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file where we will add the function that will change the WooCommerce registration successful message.
  3. Add the following code to the php file:
[php]  add_filter( ‘gettext’, ‘customizing_specific_text_in_woocommerce’, 10, 2 );

function customizing_specific_text_in_woocommerce( $customized_text, $targeted_text, $domain )

{

    // Set Here an extract of the text to replace:

    $text_to_find = ‘be notified upon approval of your account’;

    if ( stripos( strtolower( $targeted_text ), ‘$text_to_find’ ) !== false && is_account_page() ) {

        // Set here your replacement text.

        $customized_text = __(‘My custom text goes here.’, $domain);

    }

    return $customized_text;

}
[/php]

Conclusion

By now, you should be able to change the WooCommerce registration successful text. It is important to change it and add a professional success message. This will alert users if their registration was successful.

If you need additional functionality on the registration page, you can use a plugin or consult a qualified WordPress developer.

We hope that this tutorial helped to solve your problem.

Similar Articles

  1. How to Send Email on Status Change In WooCommerce