How to change text of shipping address and billing address on order recieved page of woocommerce checkout?

I am using woocommerce for create shop in wordpress. i had change text of billing details to shipping details and vice versa through following code

function wc_custom_addresses_labels( $translated_text, $text, $domain )
{
    switch ( $translated_text )
    {
        case 'Billing Address' : /* Front-end */
            $translated_text = __( 'Shipping Address', 'woocommerce' );
            break;

        case 'Billing Details' : // Back-end 
            $translated_text = __( 'Shipping Detail', 'woocommerce' );
            break;

        case 'Ship to a different address?' : 
            $translated_text = __( 'Bill to a different address?', 'woocommerce' );
            break;

        case 'Shipping Details' : // Back-end 
            $translated_text = __( 'Billing Detail', 'woocommerce' );
            break;
    }
    return $translated_text;
}
add_filter( 'gettext', 'wc_custom_addresses_labels', 20, 3 );

But after this on order recieved page

Read More

Billing detail and shipping details had same text and that is shipping address
you can check here – http://screencast.com/t/BKOYuAg48W

Related posts

Leave a Reply

1 comment