Savan Dholu
Savan Dholu

Reputation: 900

WooCommerce checkout page change Your order details Shipping text

check this image

woocommerce checkout page change Your order details Shipping text label. i want attached image please check it

Upvotes: 1

Views: 3631

Answers (2)

AddWeb Solution Pvt Ltd
AddWeb Solution Pvt Ltd

Reputation: 21691

You can try this to resolve your issue:

Put this code in your theme's function.php file.

add_filter('ngettext', 'translate_shipping');

function translate_shipping($translated) {
  $translated = str_ireplace('Shipping', 'Your Custom Text', $translated);
  return $translated;
}

Upvotes: 1

LoicTheAztec
LoicTheAztec

Reputation: 254483

You can use the WordPress gettex() function that will replace the concerned text in checkout page:

add_filter( 'gettext', 'customizing_checkout_text', 10, 3 );
function customizing_checkout_text( $translated_text, $untranslated_text, $domain )
{
    if ( $untranslated_text == 'Shipping' && is_checkout() ) {
        $translated_text = __( 'Here goes your custom text', $domain );
    }
    return $translated_text;
}

This code goes in function.php file of your active child theme (or theme) or also in any plugin file.

Upvotes: 3

Related Questions