[Resolved] Editing Woocommerce Checkout page

Home Forums Support [Resolved] Editing Woocommerce Checkout page

Home Forums Support Editing Woocommerce Checkout page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #488811
    Neil

    Hi,

    I’m trying to find a way to remove the mandatory phone number on the WC checkout. Before I look into plugins or trying to edit the code, I wondered if there is anything in GP that allows me to do this.

    Neil.

    #488918
    Leo
    Staff
    Customer Support

    Hi there,

    No unfortunately there isn’t.

    Maybe give this a shot: https://gist.github.com/cryptexvinci/60413e92d6305e27559a1828b14d5490

    If not I’d contact WooCommerce support before looking for a plugin solution or edit the code – they should be able to help you out πŸ™‚

    #489223
    Neil

    Thanks Leo, I’ll take a look.

    #489552
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

    #489560
    Neil

    For future reference (or if anyone else is looking to do the same), I used the following code snippet to make the phone number optional instead of mandatory.

    add_filter( 'woocommerce_billing_fields' , 'custom_optional_woo_checkout_phone' );
         
    	function custom_optional_woo_checkout_phone( $address_fields ) {
    	
    		$address_fields['billing_phone']['required'] = false;
    
    		return $address_fields;
    	}
    
    #489613
    Leo
    Staff
    Customer Support

    Thanks for sharing πŸ™‚

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