Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jpkarmatech

    (@jpkarmatech)

    I have found a solution myself that works. With the plugin Loco Translate I was able to change the value ‘Taxes’ in the WooCommerce entry ‘Steuern’ to ‘Mehrwertsteuer’, see screenshot: https://www.karmatech.ch/wp-content/uploads/Cart-Block-based-changed-with-LocoTranslate.jpg

    Is there perhaps a simpler method without a plugin?

    Hi @jpkarmatech

    That is correct way to handle it but if you’re fine with custom code then you can use get text function something like this. You can add this code in your active child theme’s function.php file

    function change_taxes_label($translated_text, $text, $domain) {
    if ($domain === 'woocommerce') {
    if ($translated_text === 'Steuern') {
    return 'Mehrwertsteuer';
    }
    }
    return $translated_text;
    }
    add_filter('gettext', 'change_taxes_label', 10, 3);

    Thanks
    Ahir Hemant

    If you make a custom translation file with Loco Translate, you can save it in the normal location or in the custom location. If you save it in the normal location, your custom file will be overwritten by the next translation file update. If you save it in the custom location, you will need to update new strings yourself. Neither method is great.

    It would be better to use Ahir’s code or the Say What? plugin, and leave the default translation alone.

    Thread Starter jpkarmatech

    (@jpkarmatech)

    Hi Ahir Hemant and Majeed Raza

    Thank you for your help!

    • This reply was modified 1 year, 2 months ago by jpkarmatech.
    Zee

    (@doublezed2)

    Hello jpkarmatech,

    Thank you for contacting WooCommerce support.

    I understand that after switching from shortcode-based to Gutenberg block-based cart and checkout pages, the term Mehrwertsteuer (VAT) has been replaced with Steuern (Taxes), and the blocks are locked for editing.

    To confirm, were you able to resolve this problem?
    Please let me know if you need further assistance or have questions.

    I appreciate Ahir Hemant and Majeed Raza for their contribution here.

    Have great day!

    Thread Starter jpkarmatech

    (@jpkarmatech)

    Hi Zubair Zahid

    Thank you, I have been able to resolve the problem with the plugin ‘Say What?’

    best regards

    Hi @jpkarmatech ,

    Thanks for the update.

    I’m so glad to hear that you’ve fixed the issue with the “Say What” plugin!

    If you have a moment, we’d really appreciate it if you could share your experience by leaving us a review: https://wordpress.org/support/plugin/woocommerce/reviews. Your feedback helps us keep improving!

    Please don’t hesitate to create a new topic if you need further assistance.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Block-based card and checkout’ is closed to new replies.