Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Translate WooCommerce Label
- * @version 1.0
- */
- add_filter( 'mycred_parse_tags_general', 'mycred_pro_woo_translations' );
- function mycred_pro_woo_translations( $string ) {
- if ( $string == 'woocommerce_mycred_total_label' ) {
- // Get the translation in use
- $locale = get_locale();
- // If Italian, replace TOTALLABEL with something in Italian
- if ( $locale == 'it_IT' )
- $string = str_replace( 'woocommerce_mycred_total_label', 'Totale Ordine in %plural%', $string );
- // Else some other language
- else
- $string = str_replace( 'woocommerce_mycred_total_label', 'Order Total in %plural%', $string );
- }
- return $string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement