Hi @digimarkup,
Thanks for sharing your input—glad to hear you found a workaround that helped. Just to clarify, the issue has already been addressed here: https://github.com/crosspeaksoftware/woo-address-book/issues/168, and a patch should be released soon.
If you have any questions, feel free to drop a comment on the GitHub issue. Really appreciate your contribution!
Thanks for the feedback, @digimarkup! Please feel free to suggest a cleaner way to handle this in the Stripe plugin as well if you think we can do this more simply.
This logic also needs to be applied when an admin manually creates an order and sends it to the customer. Manually created orders do not display billing fields during checkout.
digimarkup – comment
Just to be clear, are you wanting this handling to be part of the Stripe plugin itself? Please feel free to share your thoughts in this thread, or create an issue in our GitHub repo at https://github.com/woocommerce/woocommerce-gateway-stripe/. Most of the code involved in this area is new in 9.7, and we are very open to feedback and suggestions to make things better.
Thanks for the reply @daledupreez I don’t think this needs to be handled within the Stripe plugin, since the wc_stripe_create_customer_required_fields filter is already available. I believe WooCommerce should make it easier to define which billing fields are required. Just made that comment in case anyone else runs into a similar issue and is looking for a solution.
@digimarkup, thanks for the clarification — I really appreciate your detailed explanation. Since this functionality seems more within Woo’s scope, the best approach would be to submit it as a feature request here: https://woocommerce.com/feature-requests/woocommerce/
Just to add to this for the sake of anyone else finding this thread:
I’ve had this exact issue on a site today (running the latest version of the Stripe Gateway plugin – 9.9.1) but we’re not using the address book plugin mentioned earlier so it’s unrelated to that.
Our setup is as follows: guest checkout is disabled and users must be logged in to view the checkout page. Existing customers (with woo address meta already saved to their profile) have been able to checkout fine but newly registered user accounts with no address meta are getting this ‘Missing required customer field: address->line1’ error, even when the checkout form field has been populated and it’s value is present within the submitted POST data. I suspect there’s some sort of hook timing issue going on maybe?
As a quick fix I’ve hooked into ‘woocommerce_before_checkout_process’ with a priority of 1 and I’m saving the posted billing field values to the user meta, which has resolved the issue. Hopefully this is helpful to anyone else experiencing the same! I’m not really sure why it’s reading the address data from the user meta but not the posted form data though…
Hi @prescotttt
Thank you for sharing these details and your workaround. Our developers are already aware of this issue and are working on a fix. We’re hopeful it will be resolved in a future release as mention here https://github.com/crosspeaksoftware/woo-address-book/issues/168