Change the total title on the order received page order overview in WooCommerce

Change the total title on the order received page order overview in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'gettext', 'wc_translate_woocommerce_strings', 9999, 3 );
  
function wc_translate_woocommerce_strings( $translated, $untranslated, $domain ) {
   if ( ! is_admin() && 'woocommerce' === $domain ) {
      switch ( $translated ) {
         case 'Total:':
            $translated = 'Whatever:';
            break;
      }
   }   
   return $translated;
}
1 Like