• Resolved luizlobao

    (@luizlobao)


    In my check out page fields like STREET ADDRESS/ POSTCODE/ TOWN/ PROVINCE are appearing like (OPTIONAL). How can I put them as a mandatory field * ?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Same here. Although they are marked as required, the Woocommerce default configuration seem to overwrite plugin configuration.

    I reported this back in April and have yet to see a fix. As an interim you could add the following to your functions.php file:

    /* WooCommerce Checkout Manager plugin failure re mandatory fields */
    add_filter( ‘woocommerce_default_address_fields’, ‘customise_postcode_fields’ );
    function customise_postcode_fields( $address_fields ) {
    $address_fields[‘address_1’][‘required’] = true;
    $address_fields[‘city’][‘required’] = true;
    $address_fields[‘state’][‘required’] = true;
    $address_fields[‘postcode’][‘required’] = true;

    return $address_fields;
    }
    /* end */

    Thread Starter luizlobao

    (@luizlobao)

    @gaffercanberra
    thanks!
    the plugin should make an update solving this issue…

    I’ve tried using this workaround, but it’s not working for me. I can see the initial fields showing the *, but then the page finishes loading and those form fields seem to disappear and the ones left showing on the screen aren’t maintaining their “required” status. Any suggestions? The site is https://mathsp.com.

    @gaffercanberra: Thanks a lot for the workaround. *thumpsUp*
    @ryse: Try revisting the apostrophes in gafferCanberra’s code. In my case I had to replace them and now it is working just fine.

    Nevertheless a statement by the plugin owner would be highly appreciated as well.

    I meant to send this days ago. Thank you so much!! It was the single quotes.

    I have same problem,
    is there any solution?

    Plugin Author quadlayers

    (@quadlayers)

    hello guys
    can you please test update 4.5.3?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘mandatory fields’ is closed to new replies.