Opis
Live multi-carrier shipping rates at checkout from the ShipStation API v2 (UPS, Canada Post, Purolator, DHL, and more), with a guaranteed fallback so a carrier or API outage can never leave checkout with zero shipping options.
Key features:
- Proper WooCommerce shipping method (extends WC_Shipping_Method), instance-based per shipping zone.
- Multi-carrier redundancy: one carrier erroring never suppresses the others.
- Mandatory fallback flat rate on API error, timeout, or zero usable rates — the fallback amount cannot be saved empty or negative.
- Two-tier rate caching (fresh + 24h stale) keyed by a package/destination hash, with a configurable TTL.
- Customs handling for US/international shipments (default HS code + per-product overrides).
- Per-service whitelist, percentage + flat markup, generic or carrier-named labels, delivery-day estimates.
- Structured logging via the WooCommerce logger (source: sonicpixel-mclr); the API key is never logged.
- API client isolated from WooCommerce (injectable transport) so it is unit-testable and reusable.
Sonic Pixel Multi-Carrier Live Rates is an independent plugin by Sonic Pixel. It is not affiliated with, endorsed by, or sponsored by ShipStation, Auctane, or WooCommerce. ShipStation and WooCommerce are trademarks of their respective owners and are named here only to describe what the plugin works with.
External services
This plugin connects to the ShipStation API v2 (https://api.shipstation.com/v2), operated by ShipStation (Auctane). It is required: live shipping rates come from this service. Nothing is sent until you enter your own ShipStation API key, and all requests are authenticated with that key.
- When shipping is calculated in the cart or at checkout (classic or block checkout), the plugin requests rates (
POST /v2/rates). It sends the package weight and dimensions; the ship-from address, name, company, and phone from the plugin settings; and the destination address the customer entered (street, city, state/province, postcode, country). No customer name, email, or phone number is sent. On cross-border shipments it also sends customs details for each item: description, quantity, value, currency, HS code, and country of origin. Rates are cached, so repeat views of the same cart do not trigger another request. - When you save the plugin settings, it requests your connected carriers and their services (
GET /v2/carriers) to build the service list. No store or customer data is sent with this request.
ShipStation’s Terms of Service and Privacy Policy.
Instalacja
- Upload the
sonicpixel-multi-carrier-live-ratesfolder to /wp-content/plugins/ and activate it (WooCommerce must be active). - Go to WooCommerce > Settings > Shipping > Multi-Carrier Live Rates and enter your ShipStation API v2 key and ship-from origin. Save to load the carrier list.
- Add the „Multi-Carrier Live Rates” method to each shipping zone and configure the carrier/service whitelist, markup, fallback amount, cache TTL, and timeout per zone.
Najczęściej zadawane pytania
-
What happens if the ShipStation API is down?
-
The method serves stale cached rates if available; otherwise it emits the configured flat-rate fallback. Checkout never shows zero shipping options.
-
Does it handle US and international customs?
-
Yes. Cross-border requests automatically include a customs block (required by ShipStation, or cross-border returns zero rates). Defaults are set globally; products can override HS code, description, and country of origin.
-
The rates show, but the selected option looks unselected
-
That is theme CSS, not the plugin. Some themes style radio inputs with
appearance: none
and draw their own indicator; when WooCommerce replaces the cart totals over AJAX, that
styling is not always re-applied, so the chosen option renders blank while still being
checked. Confirmed on Blocksy 2.1.To check, run this in the browser console on the cart page — if a dot appears, it is
purely visual:document.querySelectorAll('input.shipping_method').forEach(i => i.style.cssText='appearance:auto;opacity:1;width:16px;height:16px;position:static')Easiest fix: enable Fix unselected-looking shipping options in WooCommerce > Settings > Shipping > Multi-Carrier Live Rates. Or do it in your theme’s Additional CSS:
.woocommerce ul#shipping_method input.shipping_method, .woocommerce .woocommerce-shipping-methods input.shipping_method { appearance: auto; -webkit-appearance: radio; opacity: 1; width: 16px; height: 16px; position: static; margin-right: .5em; } -
Why do international rates only appear once a street address is entered?
-
Carriers will not quote an international shipment without one. Until the customer enters
a street address, the request has nothing to rate against and the fallback is shown. This
is a carrier requirement, so set your fallback amount to something defensible — customers
see it before they have typed an address. -
Which carriers are supported?
-
Any carrier connected in your ShipStation account. Note that Canada Post exposes no international services through ShipStation — use UPS or DHL for international zones.
Recenzje
Wtyczka nie ma jeszcze żadnej recenzji.
Kontrybutorzy i deweloperzy
„Sonic Pixel Multi-Carrier Live Rates for WooCommerce” jest oprogramowaniem open source. Poniższe osoby miały wkład w rozwój wtyczki.
ZaangażowaniPrzetłumacz wtyczkę “Sonic Pixel Multi-Carrier Live Rates for WooCommerce” na swój język.
Interesuje cię rozwój wtyczki?
Przeglądaj kod, sprawdź repozytorium SVN lub czytaj dziennik rozwoju przez RSS.
Rejestr zmian
0.4.1
- The carriers / services list is now styled by an enqueued stylesheet on WooCommerce > Settings > Shipping, rather than an inline style element.
- The „WooCommerce is required” notice now appears on the Plugins screen only.
- The shipping debug mode warning now appears on WooCommerce > Settings > Shipping only.
0.4.0
- Renamed to Sonic Pixel Multi-Carrier Live Rates for WooCommerce. The plugin folder, main file and text domain are now
sonicpixel-multi-carrier-live-rates. - The WooCommerce log source is now
sonicpixel-mclr(wasshipstation-rates). Older log files keep their old name. - Uninstalling no longer removes settings while a copy under the old
multi-carrier-live-rates-for-woocommercefolder is still installed. - Moving from the old folder: deactivate the old plugin, remove its folder over FTP or a file manager (do not use Plugins > Delete, which runs the old copy’s cleanup and erases the shared settings), then install and activate this one. Settings, zone methods and product customs fields carry over, since the stored keys are unchanged.
0.3.0
- Added an opt-in „Fix unselected-looking shipping options” setting. Some themes style radios with appearance:none and their indicator is not re-applied after WooCommerce replaces the totals over AJAX, so the chosen option looks unselected while being genuinely checked. Off by default — enabling it replaces your theme’s radio styling on those fields, which would be a regression on themes that render correctly.
0.2.3
- Every filter that can drop a rate now reports itself. A quote that returns nothing always says which check consumed the rates, and the whitelist mismatch log lists what the carrier offered next to what is selected.
0.2.2
- Fixed international rates never being offered. ShipStation returns validation_status „has_warnings” routinely on cross-border shipments — incomplete customs, an unverified address, a guessed residential indicator — and every one of those rates was being discarded. The price is valid; the warning is advisory. Only „invalid” is now treated as unusable.
- Rates dropped on validation status are counted and logged, so this cannot fail invisibly again.
0.2.1
- Fixed the shipping zone method settings modal failing to open. WooCommerce’s moveHTMLHelpTips reads label.attr(’for’) without a guard, so a label carrying a help tip but no for attribute threw a TypeError and the modal never rendered.
0.2.0
- Added a currency conversion rate, for stores whose currency differs from the currency their carriers quote in. Carriers rate in their account’s currency and cannot be asked for another; leaving the field empty keeps the previous behaviour of ignoring mismatched rates.
- Carriers / services is now a grouped checkbox list rather than a multi-select, so it is clear more than one can be chosen and the whole list is visible.
- The per-zone method title now defaults to the plugin name instead of „Shipping”, matching WooCommerce convention.
- Logging: currency-mismatch now reports the currency actually received and how to resolve it, empty-usable carries the skipped count, and conversions are logged for audit.
0.1.0
- Initial release: live multi-carrier rates, mandatory fallback, two-tier caching, customs handling, per-zone settings, redacted logging.