We haven’t seen anyone add input fields to the payment part of the checkout page. New fields for the Billing or Shipping address is pretty straightforward and works the same as you would add the fields without this plugin.
Were you thinking of tying it to a saved shipping or billing address but it would be part of the payment method form?
If you do need any additional hooks to accomplish this feel free to let us know or just open a Pull Request with whatever hook you need. https://github.com/hallme/woo-address-book
Thank you for your answer. I hope you understood me correctly. Yes, the field I added is part of the payment/checkout form.
Just like “Address”. For example, this could be: “Alternate address,Business address etc.”.
I’m thinking of integrating this new input with your plugin. Therefore, this new field must also be registered in the address book.
Below is an example:
Stackoverflow
I’m not sure I understand.
Are you looking to add a whole address section besides the default “Billing” and “Shipping” address? That would have its own address selector on checkout?
Or just add 1 single field that would be tied to either the “Billing” or “Shipping” address selector?
If that is the case then adding the field to the billing or shipping address fields is the easiest option. It will automatically be included in the address book for that address.
You will want to use either the woocommerce_billing_fields or woocommerce_shipping_fields filter to do that.
See my reply to this thread which includes an example of adding a field to the Billing.
https://ww.wp.xz.cn/support/topic/custom-fields-not-working-13/
I got it, I didn’t know that. Thank you. I wish you good work.