Does the woocommerce_order_status_changed hook fire when WooCommerce updates an order status automatically? [closed]

One of the results did bring up this (in reference to
woocommerce_order_status_changed):

“Where the hook is used (in WC core): Does not used.”

Which seems to answer Question 1, which is what leads me to believe if
WooCommerce or a payment gateway changes the order status
automatically, it will never fire, thus not creating our CSV etc.

That’s not what that means. What that’s saying is that WooCommerce itself doesn’t add any additional actions to that hook. Not that it doesn’t get fired at all.

The woocommerce_order_status_changed hook fires whenever an order status is changed using the $order->update_status() or $order->set_status() methods. WooCommerce only uses these methods internally to change order statuses (and 3rd-party extensions are supposed to also). So if WooCommerce itself ever updates the order status, automatically or not, the hook will fire. This includes when updating the Order manually in the back-end.

The hook wouldn’t fire if an extension, such as a payment gateway, tried to set the order status incorrectly. For example, if they changed the status by using $order->status="processing" or wp_transition_post_status( 'on-hold', 'processing', $order ); then the hook would not fire.

So you’re going to need to find out what circumstances exactly the hook is not firing. If it’s a payment gateway updating the order status, and the hook doesn’t fire, then it’s likely that its developers are doing the status change incorrectly. At that point you would need to talk to its developers.