Update: I’ve been digging into Stripe data to see if Stripe wasn’t passing data to the website correctly. In the webhook log on stripe, I can see the ‘charge.succeeded’ event fired and received a 200 response from the webhook. Inside that request, I can see the complete shipping address, name, email, phone number but in WooCommerce none of that information is present.
It also looks like the billing address wasn’t populated correctly from the Stripe data.
-
This reply was modified 9 months, 1 week ago by
lukeseager.
Hi @lukeseager
When WooCommerce processes the checkout flow, validations are performed server side which ensure all required fields have values that are provided for. If any value, like the billing postal code for example, are missing, WooCommerce will show a validation error to the customer. It is impossible for the order to proceed if required fields are missing.
When the Stripe plugin creates the payment intent, it uses the WooCommerce order object to populate things like the shipping address using methods like $order->get_shipping_city(), $order->get_shipping_postcode() etc. What you see in Stripe regarding complete data means the order had all of that data associated with it at the time the order was processed.
That tells me you have an issue in your site setup where a plugin is possibly holding an outdated instance of the WooCommerce order and possibly saving it after the order is completed, resulting in fields like billing and shipping address being over-written.
The Stripe plugin is not responsible for associating the WooCommerce order with checkout page data. It’s responsible for populating the checkout fields if an express payment method is used, however WooCommerce wouldn’t allow the checkout process to proceed if any required field did not have a valid value.
Kind Regards,