Support » Plugin: Fluid Checkout for WooCommerce - Lite » Change Email address text field description

  • Resolved allancaeg

    (@allancaeg)


    At the moment, below the email field, there’s this text:

    “Order and tracking number will be sent to this email address.”

    Love this copywriting but we don’t email the tracking number like this text promises.

    What’s an easy way to change this description text? 🙂

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

    (@diegoversiani)

    Hi @allancaeg,

    You can use the code snippet below to change the email field description, just copy/pasting it will remove the field description, however, there is an example of how to change the text to something else.

    /**
     * Change billing email field description.
     */
    function fluidcheckout_change_billing_email_field_description( $fields ) {
    	// Bail if billing email has been disabled
    	if ( ! array_key_exists( 'billing_email', $fields ) ) { return $fields; }
    	
    	// Change description
    	// $fields[ 'billing_email' ][ 'description' ] = __( 'The email field description here.', 'your-text-domain' );
    	
    	// Remove description
    	$fields[ 'billing_email' ][ 'description' ] = null;
    	
    	return $fields;
    }
    add_filter( 'woocommerce_billing_fields', 'fluidcheckout_change_billing_email_field_description', 300 );

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

    Best,
    Diego

    Thread Starter allancaeg

    (@allancaeg)

    Thank you!! Removing it works great.

    I’d also want to try swapping the description copywriting.

    Would like to ask what ‘your-text-domain’ stands for. When I entered the value, it broke the site so I’m wary about experimenting. hehe.

    Is that straight up the site’s domain?

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @allancaeg,

    The text-domain is a string used by PHP/WordPress to identify what translation file should be used to get a translation for that text.

    If you are adding this code to a child-theme or a customization plugin, you should replace your-text-domain with the actual text-domain used by the child-theme or plugin.

    If you are adding it as a code snippet through the Code Snippet plugin, as suggested by our article, you can leave this as is and change only the actual text that will be displayed.

    In case you have a multi-language website, you’ll need to add this code to a child-theme or custom plugin in order to be able to translate the sentence.

    Best,
    Diego

    Thread Starter allancaeg

    (@allancaeg)

    That worked, thank you!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Email address text field description’ is closed to new replies.