• Resolved industrialtex

    (@industrialtex)


    Hello,

    I was trying out your plugin. Loved the initial impressions. However, I have a few concerns:
    1. How do I change the field “Shipping Phone” to “Mobile Number” as my customer base is more used to the term mobile number. Further, could we change the text appearing below the shipping phone, ie, “Only used for shipping-related questions” to a custom text.

    2. Could we add custom validation for Shipping Phone for the say 10 digits. Currently, I am seeing that even a single digit is accepted as a valid entry.

    3. Could you please have efficient compatibility with SMS-OTP plugins like Digits, so that the mobile number could be further validated as being genuine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Install Checkout Field Editor and Manager for WooCommerce

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @industrialtex,

    1. As mentioned by Alex, the easiest way to change the checkout fields attributes would be to use a plugin such as “Checkout Fields Editor for WooCommerce – by ThemeHigh” as this is currently the plugin with better compatibility with Fluid Checkout.

    Otherwise, if you prefer to do it via PHP code, you can use the code snippet below, making the necessary changes:

    /**
     * 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'] = __( '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, check our article:
    How to safely add code snippets to your WooCommerce website

    2. It is possible to add custom validation, however, it requires a good knowledge of JavaScript and some digging into the code as we currently do not have the documentation for this.

    We have a feature planned for our PRO version to use an international phone number component that will minimize this problem. Although, we currently do not have plans to force a certain number of digits on it.

    3. We have contacted the Digits plugin team, however, they are not willing to collaborate on adding compatibility with it. We currently do not own a copy of the Digits plugin and we do not have the budget to purchase plugins in order to add compatibility.

    I hope you understand.

    I’m closing this topic for now. If you need further assistance, please reply to this topic.

    Best,
    Diego

    Thread Starter industrialtex

    (@industrialtex)

    @diegoversiani
    Looks like the digits plugin is working naturally after some tweak to the Fluid checkout settings. I hope it continues to work like the initial impressions. ??

    Will try out the options suggested by you in this first issue. If required will reach out again.

    Thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Field Name & Validation’ is closed to new replies.