• Resolved cutu234

    (@cutu234)


    I would like to change the text above the login form in the toggle box on the checkout page. Changing the language file wouldn’t be update-safe. I could customize the template file, but would prefer a cleaner solution via the functions.php. I tried a gettext filter and several Woocommerce filter hooks, but nothing worked. I would like to change this message:

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

    Seems to be a super trivial task, but I can’t get it to work properly.

    Thank you.

    • This topic was modified 6 days, 12 hours ago by cutu234.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Hi there,

    I understand you’d like to change the text above the login form on the checkout page while keeping the solution update-safe. Please note that we do not provide support for customizations. However, as an exception, you can try using the following code to translate the text:

    // Change button text
    function ts_change_proceed_to_checkout_text($translated_text, $text, $domain) {
    if ($text === 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.') {
    $translated_text = 'custom text'; // Change to your desired text
    }
    return $translated_text;
    }
    add_filter('gettext', 'ts_change_proceed_to_checkout_text', 20, 3);

    If that does not help, I can recommend?WooExperts?and?Codeable.io?as options for getting professional help. Alternatively, you can also ask your development questions in the??WooCommerce Community Slack?as custom code falls outside our usual?scope of support.

    Thank you

    Thread Starter cutu234

    (@cutu234)

    Thank you. A gettext filter is exactly what I tried, but it didn’t work for one reason or another. Maybe a priority problem. Anyway, gettext filters should usually be avoided, since they can have negative impact on performance. For now, I decided to customize the template file. Not the greatest solution for change a text string, but acceptable. It would be awesome, if you could add a hook for this text. Like, for example, the woocommerce_checkout_login_message hook for the text inside the toogle box.

    • This reply was modified 5 days, 14 hours ago by cutu234.
    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @cutu234,

    I understand you’d like this added as a feature, but requests aren’t submitted or considered through the forum. I recommend submitting it as a feature request here: https://woocommerce.com/feature-requests/woocommerce/ for consideration, especially if it gains more votes.

    Additionally, consulting an expert would be a good approach for a long-term solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.