Ability to hook into adding custom fields to checkout #5736
-
We really need a way to add custom fields to the checkout block. I think this is one big thing holding it back |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @nickfmc, thanks for raising the issue. You can currently add custom fields to the checkout by adding a new inner block to the address area, and render an input inside of it. We do something similar in this test plugin to render a checkout box for subscribing to a newsletter. You can follow the same format to add custom fields elsewhere on the Checkout block. |
Beta Was this translation helpful? Give feedback.
-
We all know blocks and react are the brand new world of WordPress and WooCommerce, but a lot of developers will desist from developing for WooCommerce if they're not given tools to easily customize, for example, the checkout. Adding a custom field to the regular checkout is as easy as using a filter like There should be an easier way for developers to register simple custom checkout fields and have WooCommerce render them without having to touch on React of even explicitly having to go to the block editor and add that field manually. |
Beta Was this translation helpful? Give feedback.
-
Hi - closing this discussion in favour of https://github.com/woocommerce/woocommerce-blocks/discussions/11173 where we will discuss the feature as we work on it. It'll be better to focus all communication in a single discussion, rather than the few we have open right now for this. Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @nickfmc, thanks for raising the issue. You can currently add custom fields to the checkout by adding a new inner block to the address area, and render an input inside of it. We do something similar in this test plugin to render a checkout box for subscribing to a newsletter. You can follow the same format to add custom fields elsewhere on the Checkout block.