Darb Delivery

Darb Delivery

Details
View on WordPress

Darb is a delivery marketplace in Oman. This plugin connects your WordPress site
to it: you hand Darb a customer and a destination, Darb prices the delivery,
charges your Darb credit and assigns a courier.

It does not need WooCommerce. Deliveries can start from three places:

  • A front-end form. Put [darb_delivery_form] on a page and customers can
    request a delivery themselves.
  • The admin. Darb Delivery New delivery — for orders taken by phone,
    WhatsApp or over the counter.
  • Your own code. Call darb_send_delivery() from a theme, a form plugin, or
    any other integration.

Every request is written down locally before it is sent, so an order Darb
rejected — or one that never reached Darb at all — is visible under
Darb Delivery Deliveries instead of disappearing.

Already selling with WooCommerce? Install Darb Delivery for WooCommerce
instead, which pushes orders automatically as their status changes. The two
plugins are designed to run side by side if you need both.

Where the delivery goes

Darb needs a map pin, not a street address. If the request carries a Google Maps
link the courier is dispatched straight away. Without one, Darb texts the
customer a link and asks them to share their location — the delivery waits until
they do. The wilaya is used in the meantime for the delivery-zone check, so set
a default under Settings even if you collect map links.

The wilaya is chosen from a list of the sixty wilayat Darb recognises, never
typed. Darb matches its delivery zones on the Arabic name, so a customer typing
“Al Seeb” or misspelling a wilaya would have had their delivery refused for a
reason nobody could see. Deliveries sent from code may use either spelling —
“Seeb”, “As Seeb” and “Al Seeb” all resolve to السيب — and anything
unrecognised is passed through for Darb itself to judge.

Sending from your own code

$result = darb_send_delivery( array(
    'name'        => 'Ahmed',
    'phone'       => '91234567',
    'wilaya'      => 'السيب',
    'maps_url'    => 'https://www.google.com/maps?q=23.6100,58.5450',  // optional
    'notes'       => 'Villa 5, second gate',
    'description' => 'Two cakes',
    'value'       => 12.500,                          // value of the goods
) );

if ( ! $result['sent'] ) {
    error_log( 'Darb: ' . $result['message'] );
}

Accepted keys: name, phone (required), wilaya, maps_url, notes,
description, value, items, external_ref.

items is an array of `array( 'name' => ..., 'qty' => ..., 'price' => ... )`.

When every item carries a price, the goods value is worked out for you.

To adjust the request just before it is signed — for example to add exact
coordinates your site already knows:

add_filter( 'darb_wp_delivery_payload', function ( $payload, $record ) {
    $payload['dropoff']['lat'] = 23.6100;
    $payload['dropoff']['lng'] = 58.5450;
    return $payload;
}, 10, 2 );

Wiring up a form plugin

Any form plugin that fires an action on submit can feed Darb. With Contact
Form 7, for instance:

add_action( 'wpcf7_mail_sent', function ( $form ) {
    $data = WPCF7_Submission::get_instance()->get_posted_data();
    darb_send_delivery( array(
        'name'  => $data['your-name'],
        'phone' => $data['your-phone'],
        'notes' => $data['your-address'],
    ) );
} );

External services

This plugin connects to the Darb delivery marketplace to create delivery
orders. Sending deliveries to Darb is what the plugin is for, so it cannot work
without contacting the service.

Only when you send a delivery — from the form after you approve it, from the
admin, or from your own code — does the plugin transmit to Darb’s API the
details needed to fulfil it: the customer’s name and phone number, the delivery
wilaya and, if provided, a map location or Google Maps link, order notes, and
item descriptions and values. Each request is signed with the secret key Darb
issued you. Nothing is sent until you enter your credentials, and the plugin
does not track usage or contact any other service.

  • Service: Darb delivery marketplace — https://darbarise.com/
  • API endpoint: https://us-central1-darb-42eca.cloudfunctions.net/shopApi
    (test mode uses https://us-central1-darbdev.cloudfunctions.net/shopApi)
  • Terms of Service: https://darbarise.com/terms-of-use/
  • Privacy Policy: https://darbarise.com/privacy-policy/

Details

Plugin code:
darb-delivery
Plugin version:
1.0.0
Outdated:
No
WP version:
6.0 or higher
PHP version:
7.4 or higher
Test up to WP version:
7.1
Total installations:
0
Last updated:
2026-09-06
Rating:
Times rated:
0
courier
delivery
logistics
oman
shipping