NAV

Woo Commerce

original_WOO_COMMERCE_FULFILLMENT.png 7.81 KB
Our Woo Commerce integration creates a realtime 2-way sync of product and order details. What does this mean? Install our Woo integration, sync your products, and when orders come through your Woo store, we receive them automatically. Our warehouses then process the orders. Once they have shipped, Whiplash updates your Woo store with shipment information, and updates inventory. 

It's that easy!

Setup

  1. Follow the Woo Guide to setting up API access before you attempt to install the Whiplash integration.
    Woo Commerce Setup
    Woo Commerce REST API Setup
    Optionally, install the Woo Commerce Shipping Extension (This will allow Whiplash to add tracking links to your orders once they've shipped.)
  2. Install our Woo integration

NOTE: To enable inventory updates from Whiplash, be sure you've enabled "Manage Stock" for all of your products.
https://docs.woocommerce.com/document/managing-products/#inventory-tab
WooCommerce-Simple-Product-Inventory-Tab.png 59.8 KB


TroubleShooting

PERMISSIONS

Woo requires sufficient permissions to work with Whiplash. You (or your host) will need to add something like this:

    <ifModule mod_headers.c>
        Header always set Access-Control-Allow-Origin: "https://integrations.getwhiplash.com"
        Header always set Access-Control-Allow-Methods "POST, GET, PUT,OPTIONS"
        Header always set Access-Control-Allow-Headers "authorization"
    </ifModule>

If you're still getting an authorization error, be sure to check whether you're using https in your store or not. If you are, it's advised that use that in your store settings.
http://woocommerce.github.io/woocommerce-rest-api-docs/#authentication-over-https

You should have access to your consumer key/secret in Wordpress/Woo. You can test requests/permissions directly using them like so:

​curl https://YOURSTORE.COM/wp-json/wc/v2/products?consumer_key=YOUR_CK&consumer_secret=YOUR_CS 

If your Woo/Wordpress permissions are not correct, you'll get a message like this:

​{"code":"woocommerce_rest_cannot_view","message":"Sorry, you cannot list resources.","data":{"status":401}} 

Some servers use FCGI which may cause HTTP_AUTH_USER and HTTP_AUTH_PW to be unset. You can likely fix that by adding the following the Woo REST file:

list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
https://github.com/woocommerce/woocommerce/issues/12230
https://github.com/WP-API/Basic-Auth/issues/35

INSTALL

When you click "Connect Shop" we're trying to redirect to something like:

https://shop.com/wc-auth/v1/authorize/?app_name=Whiplash&scope=read_write&user_id=xyz=&return_url=https://integrations.getwhiplash.com/users/auth/callback/woo_commerce&callback_url=https://integrations.getwhiplash.com/shops/authenticate/woo_commerce

If we're not redirecting properly, you'll need to adjust your .htaccess file, Nginx, or permalinks settings. If permalinks are not "pretty", changing it to "Post name" and a custom base might do the trick.

Automatic Updates

If you have Wordpress's Automatic Updates feature enabled, and had to change your .htaccess file, it's possible that your .htaccess config will be overwritten when your site updates. It is recommended in this case that you disable Automatic Updates, and when you do update, to verify that your .htaccess file is correct.

Support

Whiplash does not provide ANY support for Woo installation, setup, or permissions troubleshooting.
There are many, many variables involved in self-hosted sales platforms, and we're not experts in them, unfortunately—but your host should be. Please direct them here for information on how to get you up and running.

Last updated Aug 31st, 2018