1

I want to change the text at the checkout page below the returning customer bar, namely "If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing & Shipping section.".

The text seems to be present in: plugins\woocommerce\i18n\languages\woocommerce.pot and plugins\woocommerce\templates\checkout\form-login.php

I know I can simply adjust the text in those files; but if WooCommerce gets updated it will be overwritten.

Is there a way to change this text with hooks, although the text doesn't appear in my theme?

I don't want to use a plugin for this if possible.

M--
  • 25,431
  • 8
  • 61
  • 93
Mooiman
  • 13
  • 2
  • 5

2 Answers2

2

When Overriding Woocommerce templates via a child theme (or a theme) you will not loose any changes when Woocommerce plugin is updated.

So in your case, as explained on the comment of the template checkout\form-login.php you will have to copy this file to your child theme:

/**
 * Checkout login form
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php.

Woocommerce templates are made to be overridden via a child theme (or theme)

See: WooCommerce action hooks and overriding templates

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
-1

While working on a custom theme, you can achieve this functionality by copying same template to your-theme/woocommerce/checkout/form-login.php.

Now you can update plugin without losing the changes.

Prem Sagar
  • 147
  • 2
  • 8
  • Welcome. SO is designed so that useful answers should be upvoted, NOT duplicated. In this case, the post has less info than the accepted answer, and adds nothing. Additionally, it reads more like a Comment than a complete, self contained Answer, as defined by SO guidelines. Edit, if you can add new, useful information or consider deleting. Left as is, the platform may delete this post, as "not an Answer". Notice how the accepted answer has follow up links to documentation, and example code – SherylHohman Mar 17 '21 at 03:15