Advanced Settings
Establishing a Connection
Connecting to WooCommerce
WooCommerce supports the following authentication methods: Basic Authentication, one-legged OAuth1.0 Authentication and standard OAuth2.0 Authentication.
Additionally, in order to connect to WooCommerce, you will need to specify the URL of the instance to connect to.
Connecting using Basic Authentication
Some plugins and some servers may interfere with the Authorization header, if not configured properly.
For these cases, Basic authentication may be used. In this authentication mode, the user provides the consumer_key and the consumer_secret as user and password respectively.
These credentials are then sent as query parameters with each request.
Specify the following properties:
- AuthScheme - Set this to Basic
- User - Set this to your consumer key
- Password - Set this to your consumer secret
In addition specify the URL of the instance:
- Url
Connecting using one-legged OAuth 1.0 Authentication
Specify the following properties (NOTE: the below credentials are generated from WooCommerce settings page and should not be confused with the credentials generated by using WordPress OAuth2.0 plugin):
- ConsumerKey
- ConsumerSecret
In addition specify the URL of the instance:
- Url
Connecting using WordPress OAuth 2.0 Authentication
After having configured the OAuth2 Plugin plugin, you may connect to WooCommerce by providing the following connection proeprties:
- OAuthClientId
- OAuthClientSecret
- CallbackURL
- InitiateOAuth - Set this to either GETANDREFRESH or REFRESH
In addition specify the URL of the instance:
- Url
Custom Credentials
You can register an app to obtain the OAuthClientId and OAuthClientSecret.
When to Create a Custom OAuth App
Web Applications
You need to create a custom OAuth app in the web flow.
Desktop Applications
You need to create a custom OAuth app in the desktop flow.
Headless Machines
In the headless OAuth flow, users need to authenticate via a browser on another machine. You need to create a custom OAuth app in the hadless machine flow.
Creating a Custom OAuth App
Installing the plugin
You will need the OAuth2 Plugin in order to authenticate via OAuth2.0. To install the plugin manually, copy the downloaded folder to the wp-content\plugins folder and then enable the plugin via the WooCommerce admin interface.
Authenticate using Custom OAuth Credentials
To create an OAuth application, log into your site through the admin panel, navigate to Users -> Applications, and click Add New. After filling in the required fields, you may click "Create Client" and the following credentials will be displayed:
- Client Key - This will be your OAuthClientId
- Client Secret - This will be your OAuthClientSecret
Note that while creating the OAuth application, you will be required to specify a Callback. This is the url the user will be redirected to after explicitly granting access. WooCommerce does not do any validation on this however, so you can input something like http://localhost:33333.
You can now use these credentials to connect to WooCommerce by setting them as the following connection properties:
- OAuthClientId = Client Id
- OAuthClientSecret = Client Secret
- InitiateOAuth = GETANDREFRESH
- CallbackURL = Callback
- Url = The URL of your instance
Customizing the SSL Configuration
By default, the provider attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store. To specify another certificate, see the SSLServerCert property for the available formats to do so.
Connecting Through a Firewall or Proxy
HTTP Proxies
To connect through the Windows system proxy, you do not need to set any additional connection properties. To connect to other proxies, set ProxyAutoDetect to false.
In addition, to authenticate to an HTTP proxy, set ProxyAuthScheme, ProxyUser, and ProxyPassword, in addition to ProxyServer and ProxyPort.
Other Proxies
Set the following properties:
- To use a proxy-based firewall, set FirewallType, FirewallServer, and FirewallPort.
- To tunnel the connection, set FirewallType to TUNNEL.
- To authenticate, specify FirewallUser and FirewallPassword.
- To authenticate to a SOCKS proxy, additionally set FirewallType to SOCKS5.
Troubleshooting the Connection
To show provider activity from query execution to network traffic, use Logfile and Verbosity. The examples of common connection errors below show how to use these properties to get more context. Contact the support team for help tracing the source of an error or circumventing a performance issue.
- Authentication errors: Typically, recording a Logfile at Verbosity 4 is necessary to get full details on an authentication error.
- Queries time out: A server that takes too long to respond will exceed the provider's client-side timeout. Often, setting the Timeout property to a higher value will avoid a connection error. Another option is to disable the timeout by setting the property to 0. Setting Verbosity to 2 will show where the time is being spent.
- The certificate presented by the server cannot be validated: This error indicates that the provider cannot validate the server's certificate through the chain of trust. If you are using a self-signed certificate, there is only one certificate in the chain.
To resolve this error, you must verify yourself that the certificate can be trusted and specify to the provider that you trust the certificate. One way you can specify that you trust a certificate is to add the certificate to the trusted system store; another is to set SSLServerCert.