It is taking 15 seconds or so from the time the user submits their order for purchase, till they receive the thank you page on my WooCommerce site.
WooCommerce 6.0.0 and Wordpress 5.8.3
The other pages on the site load at an acceptable speed, it is only when the user submits the actual order for purchase that I get the lag.
I am printing to the debug.log and am seeing that there is a 10 second delay between when the order status changed to completed: (woocommerce_order_status_changed hook) and when the thank you page hook is triggered (woocommerce_thankyou hook).
Can someone tell me what happens in between these 2 events or how to fix this?
Note that the lag is happening AFTER the payment has happened so it is not the payment processor.
Thanks so much!