=== Uber Direct Integration ===
Contributors: aarav2023
Tags: delivery, uber direct, shipping, woocommerce, courier
Requires at least: 5.0  
Tested up to: 6.8
Requires PHP: 7.4  
Stable tag: 1.8
License: GPLv2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html  

Offer instant or scheduled delivery from your WooCommerce store with real-time quotes and Uber Direct integration

== Description ==

Uber Direct Integration enables real-time delivery via Uber Direct directly from your WooCommerce store. Offer customers instant or scheduled delivery options with dynamic quotes, delivery tracking, and automated dispatching.

**Built and maintained by a team at Uber.**

== Features ==

- 🔄 Fetch **real-time delivery quotes** from Uber Direct at checkout.
- 🏬 Let customers select a nearby store based on their shipping address.
- 🚚 Automatically **create Uber Direct deliveries** when orders are placed.
- 🕐 Supports both **ASAP** and **Scheduled** delivery options.
- 🧾 Automatically calculate and display **delivery fees** in the cart/checkout.
- 🔒 Enable **PIN or picture verification** for dropoff or pickup.
- 📍 Display **live delivery tracking status** to customers post-purchase.
- 🌐 Webhook support to keep order status and ETA in sync in real-time.
- 📦 Supports **centralized** multi-store models.
- 🚶 Additionally Supports pickup option.
- 🕐 Ability to configure store hours

== Installation ==

1. In your WordPress admin dashboard, go to **Plugins -> Add New**.  
2. Search for **Uber Direct Integration** in the plugin directory.  
3. Click **Install Now**, then **Activate** the plugin.  
4. Navigate to **WooCommerce ->Uber Direct** in the dashboard menu.  
5. Enter your **API credentials** (Client ID and Secret).  
6. Add your **store pickup locations**.  
8. Choose whether to enable **ASAP**, **Scheduled**, or **both** delivery types.  
9. **For webhook setup**, please set your webhook URL in the Uber Direct dashboard as:  
YOUR_WEBSITE_URL/wp-json/uber-direct/v1/webhook` and use the same webhook URL in wordpress admin
10. Save your settings
11. Enable Uber Direct Shipping (Woocommerce -> settings -> Shipping->Add zone-> Add Shipping method->Uber Direct)
12. Done!


== Screenshots ==

1. Uber Direct settings screen / Admin panel to manage organizations and stores
2. Customer selects a store from nearby options
3. Quote fetched from Uber and delivery created on order
4. Tracking Page
5. Enable Uber Direct Shipping


== Frequently Asked Questions ==

= Do I need an Uber Direct account? =  
Yes. You must sign up for Uber Direct and obtain your API Client ID and Secret.

= How are delivery fees calculated? =  
Fees are returned dynamically from Uber's Delivery API based on the pickup and dropoff addresses.

= Does this plugin support scheduled delivery? =  
Yes! You can enable **ASAP**, **Scheduled**, or both in settings. Scheduled deliveries support time windows and custom dropoff ranges.

= Is this plugin officially built by Uber? =  
Yes. This plugin is developed and maintained by engineers at Uber. It uses the official Uber Direct API and was created to support WooCommerce stores with Uber-powered delivery options.


== Changelog ==

= 1.8 =
* Minor bug fixes on notes

= 1.7 =
* Minor bug fixes on screenshots

= 1.6 =
* Minor bug fixes on time slot selection

= 1.5 =
* Enhanced store naming in checkout page


= 1.4 =
* Disable/Enable shipping options based on admin setting

= 1.3 =
* Made store pickup/delivery time slots configurable
* Adjustments to tax/currency displayed 

= 1.2 =
* Minor enhancements to tax calculation

= 1.1 =
* Added `class-uber-direct-shipping-method.php`
* Updated tax display logic
* Other enhancements and fixes


= 1.0 =
* Initial release.
* Core delivery flow with quote + create + webhook support
* Admin config panel
* Store selection
* ASAP + Scheduled delivery
* Tracking and status bar on order page

== Upgrade Notice ==
Initial release – start offering on-demand and scheduled deliveries with Uber Direct today.


== External Services ==

This plugin connects to the Uber Direct API in order to provide real-time delivery capabilities for WooCommerce orders.

The following external API endpoints are accessed:

- `https://api.uber.com/v1/customers/{org_id}/delivery_quotes` – fetches delivery quotes based on address and store.
- `https://api.uber.com/v1/customers/{org_id}/deliveries` – creates delivery orders with Uber Direct.
- `https://api.uber.com/v1/direct/organizations` – retrieves configured Uber organizations.
- `https://api.uber.com/v1/direct/organizations/{org_id}/stores?address=...` – fetches nearby store locations for a given customer address.

These requests are made securely using WordPress's native HTTP functions.

### Data Sent to Uber

The plugin transmits only the information required to fulfill delivery operations, including:

- Customer billing/shipping address
- Order contents and metadata
- Contact phone number (used for delivery coordination)
- Delivery type (ASAP or scheduled), and scheduled date/time
- Store and organization identifiers
- WooCommerce order ID (used for webhook mapping and tracking)

No payment or sensitive account information is transmitted beyond what’s necessary for delivery dispatch.

### Webhooks & Delivery Status

This plugin also uses Uber’s webhook system to receive live updates on delivery status and estimated arrival time.

- [Uber Delivery Status Webhook Reference](https://developer.uber.com/docs/deliveries/daas/references/api/webhooks/delivery-status-webhook)

### Uber Direct API Documentation

To learn more about the API endpoints used by this plugin:

- [Uber Direct Overview](https://developer.uber.com/docs/deliveries/overview)
- [Create Delivery](https://developer.uber.com/docs/deliveries/api-reference/daas#tag/Delivery/paths/~1customers~1%7Bcustomer_id%7D~1deliveries/post)
- [Create Quote](https://developer.uber.com/docs/deliveries/api-reference/daas#tag/Quotes)
- [Create Organization](https://developer.uber.com/docs/deliveries/api-reference/org#tag/Organizations/operation/CreateOrg)
- [Get Organization](https://developer.uber.com/docs/deliveries/api-reference/org#tag/Organizations/operation/GetOrg)

### Service Provider

All external delivery services are provided by:

- **Uber Technologies, Inc.**
- [Terms of Use](https://www.uber.com/legal/en/document/?name=general-terms-of-use)
- [Privacy Policy](https://www.uber.com/legal/en/document/?name=privacy-notice)

