Line 1 Address error upon upgrading to 9.7
-
Upon upgrading to version 9.7, new users are unable to complete the checkout process. Upon entering all requisite shipping and billing information, when following error is returned for new customers shortly after the system automatically creates their account on woocommerce ” (woo is configured to automatically create an account is one does not yet exist). Payment failed: Missing required customer field: address->line1 Order status changed from Pending payment to Failed.”
Upon examining the stripe dashboard, the payment intent from the transaction is never passed to stripe for authentication, not is the customer created in stripe. The order does appear in woo but with a ‘failed’ status. The address information does appear in the failed order as well as the customer information in woo that is created upon clicking the submit button. It is as if the information is not parsed to the payment instructions after the customer creation in woo.
We rolled back the version to 9.6 so we can continue taking orders, and it works fine so something was introduced in version 9.7 that creates this issue.
-
This topic was modified 4 months, 2 weeks ago by
domagron.
-
This topic was modified 4 months, 2 weeks ago by
-
Thanks for reporting this @domagron. We are not sure why you are seeing this error for what looks like a valid situation. Might you be in a position to give us access to a staging site or similar so the development team can investigate this further?
We can also look into adding some logging to get a better sense for what is going awry for this situation, so please let us know if you’d prefer to do something less intrusive.
How may i confidentially get you log in credentials for the staging site?
@domagron, you can do so by opening a support ticket via WooCommerce.com, or you can reach out to me directly on the WooCommerce Slack instance (https://woocommerce.com/community-slack/) or via the WordPress.org Slack instance (https://make.wordpress.org/chat/), where I am also using
daledupreezas my handle.To avoid sending anything in the clear, you can also use a tool like https://quickforget.com/ to temporarily store the actual credentials so you are only sharing the link and not the password.
Thanks. I opened a ticket directly on the WooCommerce site. The automatic engineer , Autumn has the ticket and log in credentials.
@daledupreez While I know you have the best of intentions, forum policy is that you not ask users for admin or server access. Users on the forums are not your customers, they’re your open source collaborators, and requesting that kind of access can put you and them at high risk.
If they are paying customers (such as people who bought a premium service/product from you) then by all means, direct them to your official customer support system. But in all other cases, you need to help them here on the forums.
Thankfully are other ways to get information you need:*Ask the user to install the Health Check plugin and get the data that way.
*Ask for a link to the http://pastebin.com/ or https://gist.github.com log of the user’s web server error log.
*Ask the user to create and post a link to their phpinfo(); output.
*Walk the user through enabling WP_DEBUG and how to log that output to a file and how to share that file.
*Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again (the Health Check plugin can do this without impacting any site visitors).
*Ask the user for the step-by-step directions on how they can reproduce the problem.You get the idea.
We know volunteer support is not easy, and this guideline can feel needlessly restrictive. It’s actually there to protect you as much as end users. Should their site be hacked or have any issues after you accessed it, you could be held legally liable for damages. In addition, it’s difficult for end users to know the difference between helpful developers and people with malicious intentions. Because of that, we rely on plugin developers and long-standing volunteers (like you) to help us and uphold this particular guideline.
When you help users here and in public, you also help the next person with the same problem.
@daledupreez I seemed to have narrowed down when the problem occurs. If I allow guest checkouts, the payments instructions get passed to stripe. It is when I require an account by ‘unchecking’ the box “enable guest checkout (recommended)’ does the failure occur in 9.7. I wll also pass the info along to Autumn by the ticket
Hi @domagron,
Great job running additional conflict tests and sharing your findings with us. Since you’ve already opened a support ticket on WooCommerce.com and are receiving assistance there, it’s best to continue the conversation through that channel to avoid any confusion.
However, if you’re eventually redirected back to the forum, feel free to return here, provide a summary of the troubleshooting steps you’ve taken, and we’ll take it from there. For now, I’ll go ahead and mark this thread as resolved.
Thanks for the guidance, @moderator!
I’ll work to avoid requesting server access in future — I was mostly over-eager to get to the bottom of the problem, and I had forgotten to link in a GitHub issue that includes a system status report from the affected system: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/4524.
Regardless, I will aim to help as openly and non-intrusively as possible moving forward.
@domagron, I’ve been trying to reproduce the error today without any success, and I know that this logic from the Stripe payment gateway is tied into the billing address fields, so I am wondering whether you could (re)test with the following plugins disabled (ideally individually and together, but it may be easiest to disable them all and then see what happens):
- WooCommerce Address Book from CrossPeak Software
- Checkout Field Editor for WooCommerce from ThemeHigh
It would also be really helpful if you could clarify whether you are seeing the issue with new customers or already-logged-in customers (or both), as the code paths are somewhat different.
Apologies. I went through the steps of deactivating the plugins one by one but must have missed this. I can confirm also that this appears to the be issue. That being said, that you for looking into this.
Hi @domagron,
Thanks for checking back in and for taking the time to test the plugins individually. I just want to clarify, based on your last message, are you confirming that deactivating one of the plugins resolved the issue with the Stripe payment error in version 9.7?
If so, it would be helpful to know which specific plugin was causing the conflict so we can document it and look into a possible compatibility improvement going forward.
Looking forward to your confirmation!
It was WooCommerce Address Book from CrossPeak Software
Hi @domagron,
I understand how much effort you’ve put into isolating the issue, and I really appreciate you following up with your results. Since this has now been narrowed down to a conflict with the WooCommerce Address Book plugin by CrossPeak Software, I’d recommend reaching out to their support team to let them know about the incompatibility with Stripe version 9.7, especially when guest checkout is disabled. They’ll be in the best position to look into their integration and possibly provide a patch or workaround.
Also, if the Stripe payment gateway has been helpful for your store and you appreciate the support you’ve received, we’d be truly grateful if you could leave a quick 5-star review here: https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/#new-post. It helps us a lot and encourages the team to keep improving.
All the best as you continue running your store smoothly!
Just to follow up on this thread, I’ve gone ahead and submitted a bug report in the WooCommerce Address Book repository: https://github.com/crosspeaksoftware/woo-address-book/issues/168
This problem still exists, but I’ve found the solution.
In version 9.7, the validate_create_customer_request method was added in includes/class-wc-stripe-customer.php on line 219.
This function retrieves the required fields from the get_create_customer_required_fields method, which gets its data from:
WC_Checkout::instance()->get_checkout_fields( ‘billing’ );By default, every billing field is required, except for the company and billing_address_2 fields. That includes the phone number field.
So, if the customer leaves out any field (except company and address 2), the checkout will fail. The data won’t even be sent to the Stripe API.
Another issue is that not every WooCommerce order requires a billing address. For example, I run a digital product store and don’t need to collect address information.
In the get_create_customer_required_fields method, there’s a condition that checks if the user is on the “Add Payment Method” page:
// If we are on the add payment method page, we need to check just for the email field.
if ( $is_add_payment_method_page ) {
return [
'email' => true,
];
}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.
There are two ways to fix this:
Use the wc_stripe_create_customer_required_fields filter to override the required fields.Use the woocommerce_billing_fields filter to customize which fields are required.
https://developer.woocommerce.com/docs/code-snippets/customising-checkout-fields/
You must be logged in to reply to this topic.