• Resolved stephanierose

    (@stephanierose)


    Hello, many customers forget to put both their street name and house number in one field. its so awful to have to contact them all the time, plus, at times our emails just lands in the spam and customer waits ages and only comes to us angry. i have a code which doesnt work on Woocommerce Blocks, goal is to add a house number field on woocommerce blocks and make both street and number required. i have this code for a start but it doesnt function on wblocks. Please help us with our burden.

    add_filter( ‘woocommerce_default_address_fields’, ‘custom_override_default_checkout_fields’, 10, 1 );
    function custom_override_default_checkout_fields( $address_fields ) {
    $address_fields[‘address_2’][‘placeholder’] = __( ‘dssfsd’, ‘woocommerce’ );

    return $address_fields;
    }

Viewing 1 replies (of 1 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @stephanierose,

    I would suggest switching to using the shortcode checkout form from the checkout block. That way you can customize the form using filters. For the time being, customizing the block checkout is quite a bit more involved so that’s why I’d suggest using the woocommerce_checkout shortcode instead.

    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Create House Number Field’ is closed to new replies.