• Resolved lex1278

    (@lex1278)


    Hi

    I successfully used your plugin to customize some of the checkout fields on my site but I encountered a problem with the State field. I want it to be mandatory and although the setting is visible in the admin panel, on my website the field is still optional.

    What can I do to fix it?

    Thanks
    Alex

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    By default, the required property of the address fields will get changed based on the country selected.

    Using the below hook, the required property will be set as per the admin settings.

    add_filter(‘thwcfd_address_field_override_required’,’__return_true’);

    You need to add the above hook in your theme’s functions.php.

    We hope this will help ??

    Thank you!

    I have a similar issue: despite adding you hook in functions.php, the address, postcode and town label say optional even if in the backend I set them as mandatory?

    Any solution?

    Thanks in advance

    Thread Starter lex1278

    (@lex1278)

    @themehigh thanks for your answer.

    I added the hook but the situation in the same.

    Although, there is a slight change. Now, after the checkout page refresh, for o brief second, the State field appears to be mandatory. Butm by the end of the page load it is still optional.

    What can I do more?

    @vainucleo me too! did you manage to sort this? Need to get it fixed ASAP.

    Thanks a tonne!

    STREET ADDRESS (OPTIONAL)

    TOWN / CITY (OPTIONAL)

    STATE / COUNTY (OPTIONAL)

    POSTCODE / ZIP (OPTIONAL)

    PHONE (OPTIONAL)

    any updates guys?

    Plugin Author ThemeHigh

    (@themehigh)

    We have fixed this issue in the latest version of our plugin. Please update the plugin to its latest version and verify.

    We hope this will help ??

    Thank you!

    Thread Starter lex1278

    (@lex1278)

    In my case nothing changed, except that the brief glitch, I told you about in my previous message, disappeared. I tried both with the hook you recommended for functions.php and without. Nothing changes, the State field is always optional.

    Plugin Author ThemeHigh

    (@themehigh)

    @lex1278 Could you please open a ticket from our website? Our technical team will be able to help you.

    Thank you!

    I confirm that also in my case nothing changed after the update, mandatory fields still show the “optional” label ??

    Thread Starter lex1278

    (@lex1278)

    @themehigh I just submitted the ticket on your site. Looking forward for good news. ??

    This seems to be directly related to the country. If I change to United States, it is compulsory, If I change to New Zealand, it is not complusory

    Plugin Author ThemeHigh

    (@themehigh)

    @lex1278 @vainucleo @yourfishfinder We believe that the hook that we have provided in our initial update is not working due to the single quotes used in it. While copying the hook the single quotes might be changed.

    Could you please add the below hook in your theme’s functions.php and verify once again.

    add_filter(‘thwcfd_address_field_override_required’,’__return_true’);

    If the issue still persists, please remove the single quotes and provide (retype) it once again.

    We hope this will solve the issue.

    Thank you!

    • This reply was modified 6 years, 4 months ago by ThemeHigh.
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Mandatory State Field – not mandatory’ is closed to new replies.