"Can't create resources" error when push product generates because of failed authentication.

The default methods used by the WooCommerce API are HTTP Basic Authentication (which can only be performed over HTTPS) and OAuth 1.0a “one-legged” authentication.

The most common method we’ve found is Basic Authentication. The trouble is, some hosts and/or managed services don’t work out of the box with basic authentication authorization header and require some adjustments to their configuration to correctly handle it. most common issue generating because of this is Basic Authentication Headers Are Not Passed Through with PHP in CGI Mode and The solution we’ve found that works the majority of times is to use a simple WordPress .htaccess modification.

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Specifically include E=HTTP_AUTHORIZATION:%{HTTP:Authorization}, in the first [L].

For reference, the default WordPress .htaccess files can be found here(https://codex.wordpress.org/htaccess#Basic_WP).

Did this answer your question?