ShipStation Integration
The Dealers Site integrates with ShipStation for order fulfilment and shipping management through two complementary mechanisms.
Plugin: WooCommerce ShipStation Integration
| Property | Value |
|---|---|
| Plugin | WooCommerce ShipStation Integration |
| Location | plugins/woocommerce-shipstation-integration/ |
This official WooCommerce plugin provides:
- WooCommerce → ShipStation order sync — new WooCommerce orders appear automatically in ShipStation for fulfilment
- ShipStation → WooCommerce tracking push — when an order ships in ShipStation, tracking info is written back to WooCommerce
- Order status updates — ShipStation can update WooCommerce order status to "Completed" when shipped
Theme-Level ShipStation Integration
The WooCommerce\ShipStation class in the Suma Elementor theme (inc/class-woocommerce-shipstation.php) provides additional functionality beyond the plugin:
International Customs Declarations
For international orders, the theme:
- Identifies orders needing customs declarations (marked with a custom meta flag)
- Strips tax/duty/fee virtual line items from ShipStation (these are not shipped items)
- Adds those amounts to
taxAmounton the ShipStation order - Enriches each line item with:
- HS code (Harmonised Tariff code) from
_hs_codeproduct meta - Country of origin from
_country_of_originproduct meta - Product description from
_product_descriptionproduct meta
- HS code (Harmonised Tariff code) from
- Posts the corrected order back to ShipStation via its REST API
This process is triggered via an AJAX endpoint (wp_ajax_suma_shipstation_sync) and can also be run manually from the admin.
Environment-Aware Store IDs
The integration supports two ShipStation store IDs:
| Environment | Store ID |
|---|---|
Production (scottsdale.cc) | 80276 |
Staging (wpengine) | 66519 |
The store ID is auto-detected from the current server URL.
Tariff Data
The WooCommerce\Tariff class (inc/class-woocommerce-tariff.php) provides a static method get_tariff_data($product_id, $country_code) that returns the HS code, country of origin, and product description for international customs declarations.
These values are stored as product meta fields:
_hs_code— Harmonised System tariff code_country_of_origin— ISO country code (e.g.,US)_product_description— regulatory product description
Configuration
ShipStation API credentials are stored in the theme class:
private $apikey = 'db55f5c8...';
private $apisecret = '8b8eccef...';
These credentials should ideally be moved to wp-config.php constants or environment variables for better security hygiene.
In ShipStation, configure:
- The WooCommerce store connection to the Dealers Site
- Shipping carriers and service mappings
- Automation rules for standard domestic orders