Network Text Change via Branding Plugin

Hi

I'm using the WPMU branding plugin and in particular the text change function

But although my first rule is working which is replacing my "Return to Shop" text with "Return to Events". My next rule is not working :slight_frown:

I want to change the wording in my checkout page when customers need to log in from

If you are a new customer, please proceed to the Billing & Shipping section.

to

If you are a new customer, please register via the main menu above.

But it's not working :slight_frown:

Is there an future proof(ish) way of getting this to work? I dont want to alter the woocommerce main files and I will create a template in my child theme if necessary but wondering why the text change isn't working

Thanks
Kieran

  • Rupok

    Hi Kieran,

    I want to change the wording in my checkout page when customers need to log in from

    I just checked in my test site with WooCommerce and Ultimate Branding Text Change module, it's working absolutely fine in my test site. I tried to change a text in checkout page and it's changing the text without any issue. I've multiple rules and all are working. So there is no bug in this plugin regarding this module and this is your site specific issue.

    As your first rule is working, second should work too. I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Kieran,

    I guess it's not possible to add HTML into the change

    Yes, you are right. Text change module doesn't support HTML yet. It just supports plain text.

    You don't need to change any plugin core file for providing users with a link to register. You can simply do that with jQuery. Changing plugin core file is not a good idea because every time the plugin will update, all your modification will be gone and you have to edit those again. Rather changing text with jQuery is safe.

    Can you please give me the exact HTML code you want to show there and exactly which line to replace? Would you mind allowing Support Access so we can inspect that element, test our code and provide your working jQuery code?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Kieran

    Hi Rupok,

    Thanks for the reply. I've granted support access. On the checkout page there is a line of text which states

    If you have shopped with us before, please enter your details in the boxes below. If you are a new customer, please proceed to the Billing & Shipping section.

    It appears after you click on "click here to login" link. I'd like to replace with

    Existing customers please log in below. New Customers can register <span style="color: #0000ff;"><a href="https://eawarringtonsportsandsocial.com/my-account/profile/register/">here</a></span>

    Thanks!
    Kieran

  • Ash

    Hello Kieran

    Please try the following code:

    add_action( 'wp_footer', function() {
        ?>
        <script type="text/javascript">
        jQuery(function($){
            $( '.woocommerce-checkout form.login p:first-child' ).html( 'Existing customers please log in below. New Customers can register <span><a style="color: #0000ff; href="https://eawarringtonsportsandsocial.com/my-account/profile/register/">here</a></span>' );
        });
        </script>
        <?php
    } );

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    I have made a little tweak, style on span won't work on a tag, so I added the style in a tag directly. You can modify if you want.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Kieran

    Hi Ash

    Thanks for this! It didn't work with the code you sent but it did work with below

    add_action( 'wp_footer', function() {
        ?>
        <script type="text/javascript">
        jQuery(function($){
            $( '.woocommerce-checkout form.login p:first-child' ).html( 'Existing customers please log in below. New Customers can register <span style="color: #0000ff;"><a style="color: #0000ff;" href="https://eawarringtonsportsandsocial.com/my-account/profile/register/">here</a></span>' );
        });
        </script>
        <?php
    } );

    Thanks!
    Kieran

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.