Skip to content

WooCommerce OnWay Shipping Method

Documentation for the Plug and Pay WooCommerce OnWay Shipping Method plugin. The plugin provides OnWay Courier rates, Georgian city selection, manual parcel registration, labels, cancellation, and shipment tracking.

Requirements

Technical Requirements

  • PHP: 7.4, 8.1, 8.2, or 8.3
  • ionCube Loader: Required. For version requirements and installation details, see IonCube Loader.
  • WooCommerce: 3.6 or higher

Store Setup Prerequisites

  • OnWay account: API username and API key supplied by OnWay Courier.
  • Currency: The store currency must be GEL (Georgian Lari).
  • Product weights: Every shippable product must have a positive weight configured in WooCommerce. The plugin converts the configured store weight unit to kilograms for OnWay.
  • Destination: Delivery is supported within Georgia only.

Technical Specification & Feature Support

FeatureSupported
HPOS
Shipping Zones
Real-time Rates
Georgian City Search
Shipment RegistrationManual
Label Printing
Shipment Cancellation
Shipment Tracking
Test Mode
OnWay courier-side COD collection
Debug Mode

Setup

Global Settings

Go to WooCommerce > Settings > Shipping > OnWay Courier and configure:

  1. API Username: The username supplied by OnWay Courier.
  2. API Key: The API key or secret token supplied by OnWay Courier.
  3. Test Mode: Sends requests to the OnWay test environment. Enable this only when using credentials intended for that environment.
  4. Sender City / Zone: The warehouse or pickup city from the OnWay zone list.
  5. Sender Address: The street address where the courier collects parcels.
  6. Sender Contact Name: The contact person responsible for pickup.
  7. Sender Phone Number: The courier pickup contact number.
  8. Sender Company Name: The sender company included with the shipment.
  9. Fragile Packages: Marks registered shipments as fragile by default.
  10. Debug Log: Records OnWay API activity in WooCommerce > Status > Logs. The API key is redacted from request logs.

Shipping Zones

Add OnWay Courier to a Georgia shipping zone:

  1. Go to WooCommerce > Settings > Shipping > Shipping zones.
  2. Create or edit a zone whose region is Georgia.
  3. Add OnWay Courier as a shipping method.
  4. Edit the method instance to configure the checkout title and optional instance debug logging.

Do not add OnWay Courier to international zones. The method is available only when the destination country is Georgia and the store currency is GEL.

Checkout Behavior

Georgian City Selection

For Georgian billing and shipping addresses, the normal city input becomes a searchable OnWay city/zone selector. Enter at least two characters to search. Billing and shipping selections are handled independently and are preserved when WooCommerce refreshes checkout.

When the country is changed away from Georgia, the normal WooCommerce city input is restored. The selected city must exactly match a valid OnWay zone; the plugin does not silently substitute another city when a zone cannot be resolved.

Real-time Rate Calculation

The plugin totals the cart's shippable product weights, converts the result to kilograms, and requests a rate for the configured sender zone and selected destination zone. The quoted weight and zones are saved with the shipping line so parcel registration uses the same shipment data that produced the checkout rate.

If any shippable product has no valid positive weight, OnWay Courier will not return a checkout rate. One WooCommerce shipping line is registered as one OnWay parcel.

OnWay Courier-side COD

This plugin always registers the shipment with the non-COD OnWay Cash / Sender combination. OnWay is not instructed to collect the WooCommerce order total from the recipient. Courier-side collection will be provided by a separate OnWay COD integration.

Managing Shipments

Register a Shipment

Shipment registration is manual:

  1. Open WooCommerce > Orders and select the order.
  2. Find the OnWay shipping line in the order items section.
  3. Select Register with OnWay.

After OnWay confirms registration, the plugin stores the tracking number and shipping amount and adds an order note. A shipping line cannot be registered twice.

Print a Label

After registration, select Print Label beside the OnWay shipping line. The generated label contains the tracking number, sender and receiver information, route, weight, and order number.

Cancel a Shipment

After registration, select Cancel Shipment and confirm the action. Cancellation is available only while OnWay permits the shipment to be edited or cancelled, normally before pickup. The local tracking number is removed only after OnWay confirms the cancellation.

Shipment Tracking

Customers can see the tracking number, current status, estimated delivery date, and available shipment history on My Account > Orders > View. Tracking responses are cached for one hour. Customers can also follow the Track on OnWay link to open OnWay's website.

Tracking is displayed only while the plugin API-key license is activated. Deactivation does not delete existing tracking numbers or cached tracking information.

Debugging

WooCommerce Shipping Debug Mode

When configuring or troubleshooting rates, enable WooCommerce shipping debug mode so cached rates do not hide settings changes:

  1. Go to WooCommerce > Settings > Shipping > Shipping options.
  2. Enable Debug mode.
  3. Save the changes.

Disable WooCommerce shipping debug mode again after testing because it can affect checkout performance.

OnWay Debug Log

Enable Debug Log in the OnWay global or shipping-zone instance settings, then review entries under WooCommerce > Status > Logs using the onway_shipping_method source. Request details remain visible for troubleshooting, while the OnWay API key is redacted.

Actions & Filters

plugandpay_onway_register_order_payload

Type: filter

When: Immediately before a WooCommerce order is registered with OnWay.

ParameterTypeDescription
$payloadarrayComplete OnWay registration payload.
$orderWC_OrderWooCommerce order being registered.
$item_idintOnWay shipping-line item ID.

The $payload array contains:

KeyTypeDescription
from_city_idintOnWay sender-zone ID.
from_namestringSender contact name.
from_phonestringSender phone number.
from_addressstringSender pickup address.
from_companystringSender company name.
to_city_idintOnWay recipient-zone ID.
to_namestringRecipient name.
to_phonestringRecipient phone number.
to_addressstringRecipient delivery address.
to_companystringRecipient company name, when available.
paymentintOnWay payment code; defaults to Cash (1).
payerintOnWay payer code; defaults to Sender (1).
weightfloatParcel weight in kilograms.
quantityintParcel count.
service_levelintOnWay service level; defaults to 1.
order_numberstringUnique WooCommerce order and shipping-line reference.
order_detailstringWooCommerce customer note.
brittleintFragile flag: 1 for fragile or 0 otherwise.
add_filter(
    'plugandpay_onway_register_order_payload',
    function( $payload, $order, $item_id ) {
        $payload['order_detail'] = sprintf( 'WooCommerce order #%d', $order->get_id() );

        return $payload;
    },
    10,
    3
);

Do not change the payment and payer fields to enable OnWay courier-side COD collection. That service requires additional OnWay account capability and collection fields that this plugin version does not implement.


WooCommerce Core Hooks

The WooCommerce method ID is onway_shipping_method.

Use the standard woocommerce_package_rates filter to change the OnWay checkout cost or label. See General Shipping Hooks for examples based on cart total, destination city, or products.