This isn’t new. This issue has been discussed in WordPress circles for a few years, and outside of WordPress for at least a decade. I was struggling with this here in this forum with Local last year, and again just recently. It’s a real pain.
Refs:
(my detailed post)
This is also not specific to Local or Woocommerce or other applications. It’s not Windows-only. It doesn’t seem to be WordPress-specific. Here’s what I’ve learned in my own installation - your experience / symptoms / results may vary:
None of the solutions offered in blogs or forums help.
Most open requests for help on this topic are eventually closed without resolution. Closed reports seem to have been self-inflicted errors and I can’t determine the cause/fix in those situations.
This seems to be specific to a loopback with Apache when cURL is used in PHP. It does not happen when running curl from the command-line to localhost or 127.0.0.1, for example to trigger wp-cron.
I do not think this is related to security. I’ve turned off Windows firewall, deleted and/or disabled all security. I’ve temporarily disabled SSL/TLS with my Local sites.
I do not think this is an Apache issue. The Local environment configures the Apache server and sites for us (yay). I have not been able to resolve this with changes in Apache configs, for example to call the same site on a different port, with changes to the server name, getting “localhost” to resolve to the same site as “mysite.local”, etc. I have probably not been thorough here.
I do not think this is related to /etc/hosts.A
I do not think this is related to my NIC, a policy, or network configuration. I’m on a laptop, LAN, DHCP. Again, a loopback request from the command-line works.
Given all of that, my best guess at this point is that there is something in the default (or a minimal) Apache and/or PHP configuration in Local that is causing this for us. I’ve gone through all Apache and PHP settings that are in the configs and I can’t find anything that impacts this - however there might be some setting that I have notadded into the Apache configs or php.ini that would change a behavior related to this.
I’m really hoping Local/WPEngine Support can take a look at this. I’m anxious to help.