Skip to main content

WooCommerce integration

Besides notiwoo/v1, the plugin extends the WooCommerce APIs. This page summarizes what you need to integrate.

Custom order statuses​

StatusESENUse
wc-acceptedAceptadoAcceptedOrder accepted by the store. Not a sale yet.
wc-shippedEnviadoShippedOrder on its way. The tracking link is shown only in this status.
wc-finalizedFinalizadoFinalizedDelivery or pickup confirmed and payment verified. WooCommerce counts it as paid and includes it in its reports.
wc-acceptingAceptandoAcceptingLegacy WooFood flow.

Flows:

  • Delivery: on-hold → accepted → processing → shipped → completed → finalized
  • Pickup and dine-in: the same, without shipped.

The plugin does not move orders through these statuses: the NOTIWOO app does, with PUT /wc/v3/orders/{id} or PUT /notiwoo/v1/orders/{id}. See Statuses and payments.

When an order enters accepted, shipped and finalized, the customer receives the corresponding emails, configured in WooCommerce → Settings → Emails. See Emails.

Webhooks​

Notiwoo does not create its own webhooks. Use the standard WooCommerce webhooks (WooCommerce → Settings → Advanced → Webhooks); Notiwoo adds this data to the payload of order webhooks:

FieldContent
service_modedine_in (at a table), takeaway or empty.
table{ id, label, zone, released_at } on dine-in orders.
loyalty{ points_earned, points_redeemed, coupon }.
meta_data[] → _notiwoo_whatsapp_opt_inWhatsApp consent, as a boolean.

Verify each webhook's signature with the secret configured in WooCommerce (X-WC-Webhook-Signature header).

Order metadata​

Read from meta_data in wc/v3/orders:

KeyContent
_notiwoo_fulfillment_typeService mode: delivery or pickup.
_notiwoo_fulfillment_date, _notiwoo_fulfillment_timeDay (YYYY-MM-DD) and time (HH:MM, now or asap).
_notiwoo_delivery_coordinates{ latitude, longitude } confirmed by the customer on the map. Not used to calculate the fee.
_notiwoo_service_mode, _notiwoo_table_id, _notiwoo_table_label, _notiwoo_table_zone, _notiwoo_table_released_atTable service.
_notiwoo_whatsapp_opt_in, _notiwoo_whatsapp_consent_atWhatsApp consent.
_notiwoo_loyalty_points_earned, _notiwoo_loyalty_points_redeemed, _notiwoo_loyalty_couponLoyalty.
_notiwoo_tracking_urlTracking link. Written by the app.

On order items, _notiwoo_extras_snapshot stores the chosen extras with their price at the time of purchase. The delivery fee is identified by _notiwoo_delivery_fee = yes, not by its name, so it works in any language.

For compatibility, the plugin also writes the legacy keys woofood_order_type, date_to_deliver, time_to_deliver, minutes_to_arrive and printed.

Block checkout (Store API)​

Extension pointData
Checkout → extensions.notiwooorder_type, fulfillment_date, fulfillment_time, service_mode, table_id
Checkout → extensions.notiwoo-deliverylatitude, longitude, confirmed
Cart → extensions.notiwoo-loyaltyenabled, preview, balance (read-only)
POST /wc/store/v1/cart/add-itemextra_selections, extra_ids, additional_comments in the item data
Additional checkout fieldsnotiwoo/whatsapp-opt-in, notiwoo/referral, notiwoo/latitude, notiwoo/longitude, notiwoo/location-confirmed

Store URLs​

URLUse
https://tienda.example.test/?notiwoo_table=<token>Entry from a table's QR code.
https://tienda.example.test/?nw_ref=<code>Referral link.
<My account page>/mis-puntos/"My points" in My account.
Shortcode [notiwoo_catalog style="tabs" category="hamburguesas"]Catalog with category menu. See Catalog menu.

External services​

ServiceUseKey
Google Routes APIDelivery distance, calculated on the server.Server key, restricted by IP.
Google Maps JavaScript APICheckout map.Browser key, restricted by domain.
Notiwoo WhatsAppCustomer notifications.Configured by Notiwoo; see WhatsApp.

SMS (BulkGate) and push (FCM) notifications from the previous system remain in the code but are not documented. Push notifications use a Google API retired in 2024 and do not work.