• .. we need the ability to translate “Extra Charges” as displayed on the checkout to any language from backend. Otherwise, it works as it should.

Viewing 1 replies (of 1 total)
  • I need(ed) this too. Ideally it would just have a translation hook, of an apply_filters hook. (pretty please?)

    But in case you had not fixed this on your own yet:

    <?php
    
     add_action("woocommerce_review_order_before_order_total", function () {
          ob_start();
     }, 9); //before the extra charges rule
    
    add_action("woocommerce_review_order_before_order_total", function () {
          $content = ob_get_clean();
          echo str_replace("Extra Charges", "extra kosten", $content);
    
          // You could also replace it with __('Extra Charges','woocommerce') for extra translation possibilities
    
     }, 11); //after the extra charges rule

    It’s not the most elegant solution, but it works.

    • This reply was modified 8 years, 2 months ago by Doeke Norg. Reason: extra functionality in the hook
Viewing 1 replies (of 1 total)
  • The topic ‘Excellent but..’ is closed to new replies.