Support » Plugin: WooCommerce » Change Phone label

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, @reycasper21

    Add this snippet in your theme’s functions.php

    
    add_filter( 'woocommerce_checkout_fields', 'rt_checkout_phone_label_override' );
    
    function rt_checkout_phone_label_override( $fields ){
        
        $fields['billing']['billing_phone']['label'] = 'Custom phone label';
       
        return $fields;
    }
    Casper

    (@reycasper21)

    Thanks @rafsuntaskin it’s working – Thank you. By the way my other problem is how to change the “Shipping Calculator” text in the cart page? I been using this code

    add_filter( ‘gettext’, ‘woocommerce_text_strings’, 20, 3 );
    function woocommerce_text_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case ‘shipping calculator’ :
    $translated_text = __( ‘Calculate Shipping’, ‘woocommerce’ );
    break;
    }
    return $translated_text;
    }

    But its now working

    You are welcome 🙂

    I think it’s called Calculate shipping now.

    You can try this text in your existing code instead of ‘shipping calculator’.

    Or you may edit the template by copying it to inside your theme’s woocommerce folder.

    This is the template :
    /plugins/woocommerce/templates/cart/shipping-calculator.php

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.