×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Ruhul Amin
Added: Mar 12, 2021 5:55 PM
Modified: Feb 1, 2022 8:26 PM
Views: 4761
Tags: no tags
  1. function change_update_cart_text_solution( $translated_text, $text, $domain ) {
  2.     if ( domain == 'woocommerce' ) {
  3.         switch ( $translated_text ) {
  4.             case 'Cart totals':
  5.                $translated_text = __( 'kurv i alt', 'woocommerce' );
  6.                 break;
  7.             case 'Update cart':
  8.                 $translated_text = __( 'opdater kurv', 'woocommerce' );
  9.                 break;          
  10.         }
  11.     }
  12.  
  13.     return $translated_text;
  14. }
  15.  
  16. add_filter( 'gettext', 'change_update_cart_text_solution', 20, 3 );