• Resolved noname

    (@casahova)


    Good day,

    Is it possible to rename shipping phone on the checkout form to something else like contact number or phone number etc?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @casahova,

    Yes. You can use the code snippet below to change the shipping phone field label and description.

    /**
     * Change shipping phone field label.
     */
    function fluidcheckout_change_shipping_phone_label( $fields ) {
    	// Bail if shipping phone not available
    	if ( ! array_key_exists( 'shipping_phone', $fields ) ) { return $fields; }
    	
    	$fields[ 'shipping_phone' ]['label'] = __( 'Contact phone', 'your-text-domain' );
    	
    	// Uncomment the line below to change the field description
    	// $fields[ 'shipping_phone' ]['description'] = __( 'Your best phone number', 'your-text-domain' );
    	
    	// Uncomment the line below to remove the field description
    	// $fields[ 'shipping_phone' ]['description'] = null;
    	
    	return $fields;
    }
    add_filter( 'woocommerce_shipping_fields', 'fluidcheckout_change_shipping_phone_label', 10 );

    If you are unsure about how to add the code snippet to your website, check our article:
    How to safely add code snippets to your WooCommerce website

    Best,
    Diego

    Thread Starter noname

    (@casahova)

    Hi diego,

    Thanks for the code, and yes it works! Appreciate it!

    • This reply was modified 2 years, 11 months ago by noname.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change shipping phone title to contact number’ is closed to new replies.