WC to OneFlow – Plugin Help Doc

The WooCommerce to OneFlow API Plugin has been designed to (hopefully) make your life a bit easier. We’ve put these docs together to help you setup as quickly as possible. In the event that you just need some help, feel free to contact us and we’ll do our best to help you.

Plugin Installation
Installing this plugin is very simple and follows the normal process of installing a WordPress Plugin. Once you have purchased/downloaded the .zip file, please follow these simple steps.

– Login to your WordPress Admin
– Navigate to: Plugins -> Add New
– Click the “Upload Plugin” button, find/navigate to the .zip file.
– Click the “Install Now” button and wait a few seconds.
– Once the Install is finished, click on “Activate”!

Setup Guide
In order to properly setup the WooCommerce to OneFlow API Plugin, you will need to set a few variables. Most importantly, the “Destinations” as this defines where you’ll be sending your Print-On-Demand orders. Once the plugin has been installed/activated, you should see a new menu entry on the left hand side -> OneFlow Control. Setting up your Destination is as follows.

– Navigate to: OneFlow Control -> Destinations
– Destination: This is the destination name. Usually, it’s a short name which identifies the OneFlow Gateway. (IE: “wpaps” or “ampmm”).
– OneFlow API URL: This is the URL used for sending orders. Needs to be the full URL (IE: https://pro-api.oneflowcloud.com/api)
– OneFlow User: The Username for your OneFlow Account (Usually given to you by your Print-On-Demand supplier).
– OneFlow Pass: The Password for your OneFlow Account (Usually given to you by your Print-On-Demand supplier).
– Image Directory: The path to your image directory. Relative to the root path of your website. (IE: /wp-content/themes/somethemename/oneflowimages)
– Mode: This is used for debugging, and typically should be left on “Live”.

Selecting Products, Images and Medium to Print
To select a product for OneFlow processing, assign it’s print image and/or medium to print to. We’ve built the controls right into your Products -> Edit screen. Making short work of adding new products! Navigate to: Products -> All Products -> Select a Product to Edit (or add a new one). You’ll see three new options just below the products Description.

– OneFlow (Print On Demand Product) – Check this box IF the product is to be processed by OneFlow.
– Print Medium – This is the SKU code assigned from the print-on-demand supplier. It designates what type of product we will be printing too. Common examples: 12_OZ_Mug, 7_OZ_Tshirt.
– Print Image: This is the image to be printed. It can be any image, but UNLIKE the products image – it will be a very hi-resolution designed for print. Be sure to double check that the image exists, or the order will fail.

A Word On Shipping Processors
Shipping processors vary and we’ve added the Royal Mail processor by default. A small translation is (sometimes) needed to make your OneFlow source understand the shipping variables coming from your shipping plugin(s). Often times, this needs to match your supplier or they may reject your order. If you find that your print-on-demand supplier requires a different shipping translation. For the code savvy – just follow these instructions.

Adding Shipping Translations
Locate the plugins folder. From within, find the following file in /admin/includes/shipping-translations.php

Duplicate the “elseif” lines adding any translations you may need. Via example, let’s say we received the results “internationalstandard”, but our OneFlow supplier wants to see this as “firstclass”. We would add the following line:

elseif ($oneflow_shipping_method == “internationalstandard”) {$oneflow_shipping_method = “firstclass”;}

Your OneFlow endpoint will often give you a an example of what they’d like to see. But your cart/checkout will likely use shipping names that are much different. This is why you must translate the shipping into names that the endpoint requires. It is beyond the ability of this plugin to read minds, though we do wish it could do so as it would take far less time.

Getting Help!
We are here to help. Send an email or Contact Us via our site. We’re happy to help you at any time, as we want you to be happy, successful and making money! 🙂 However, please understand that we have a no-tolerance policy for anyone abusing our work. Please, politely ask, and we shall always do our best. Any additional coding will require an hourly fee. Advice is 100% free! Code alterations are not.

What this plugin will not do:
The plugin will handle single / multiple product orders, and can handle a mixed cart of orders. However, if you use attributes you might experience an error. Much like the Shipping Translations, attributes must be translated to match what your OneFlow endpoint wants to see.

Because each endpoint is different, you may be passing attributes in your product that the endpoint will simply not understand.

In some cases, attributes may work. In MOST they will not. Same for shipping. If you are using Royal Mail, GREAT! This will work right out of the box. There is even a chance that other shipping suppliers will work by default (without code translation). But this is entirely up to the endpoint you are communicating with.