• Resolved Nikodemsky

    (@nikodemsky)


    I need to add custom (and required) text field for specific shipping method in Woocommerce, that will be validated and will be visible in admin order pages and emails. It needs to be visible in cart AND in checkout page.

    I have made my own little customization based on answer from: https://stackoverflow.com/a/63195406/2375074 – it’s basically what i want, but the solution is for select input field and i need simple text field.

    The problem is that the validation from my code doesn’t work properly(it always shows empty error) and i have no information about that field in admin pages or emails.

    I would really appreciate if someone could point me to right direction with my code.

    https://pastebin.com/XEdyeq6j

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support nicw.a11n

    (@nicw)

    Hi @nikodemsky

    There are a number of plugins which can be used to add fields to checkout pages, both paid and free.

    However, if you wish to continue with your own code, this is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`

    Seems we’ve not had additional inputs on this thread. Thus, we encourage you to make use of the above resources.

    I’ll go ahead and mark the thread as resolved but please feel free to create a new thread if you have further questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom field for shipping method in Woocommerce’ is closed to new replies.