=== Swoove 360 ===
Contributors: swoove
Tags: woocommerce, shipping
Tested up to: 6.8.1
Stable tag: 2.3.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrate Swoove delivery services into your WooCommerce store for seamless shipping management.

== Description ==

=== Short Description ===
This plugin integrates Swoove delivery services into WooCommerce, enabling automated shipping management. 
Merchants can configure shipping zones, set up Swoove as a shipping method, and process both test and live orders with ease.
This plugin is designed specifically for businesses in Ghana and Kenya.

== Third-Party Services ==
This plugin integrates with:
1. **Swoove Delivery API**: Used to calculate delivery costs and track shipment status.

Data Sent:
- Shipping addresses
- Order IDs
- Delivery notes

Data Received:
- Delivery cost estimates
- Real-time tracking updates

The integration requires an API key, which is securely stored in the database.
2. **Google maps Api**: Used to get the latitude and logitude of a location address.

Data Sent:
- Shipping addresses

Data Received:
- latitude
- logitude

The integration requires an API key, which is securely stored in the database.



== Why Choose This Plugin? ==
1.Designed specifically for businesses in Ghana and Kenya.
2.Supports multiple delivery options: same-day, next-day, and scheduled deliveries.
3.Perfect for local retailers, grocery stores, and restaurants offering delivery services.



== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Use the WooCommerce shipping settings page to configure the plugin.
   - Set the shipping zone.
   - Pick the country, then select **Swoove** as the shipping method.
   - Click on **Edit** to update settings.
   - Enable the plugin.
4. Configure the following settings:
   - **Shop Location**: Enter the location of your shop.
   - **Environment**: Set to `Test` for testing deliveries or `Live` for real orders.
   - **Swoove API Key**: Obtain your API key from [Swoove Business Panel](https://business.swoove.delivery/):
     - Sign up and create a business.
     - Navigate to **Settings > API Key**.
     - Use the provided test and live keys accordingly.
   - **Google Maps API Key**: Enter your Google Maps API Key.
5. Copy the **Callback URL** provided in the plugin settings and set it in your Swoove Business Panel at [Swoove Business Panel](https://business.swoove.delivery/).

**Testing Your Setup**
- Place a test order using the **Test Environment** to confirm that everything works.
- Switch to **Live Environment** when you’re ready to process real orders.


== How It Works ==

The Swoove WooCommerce plugin seamlessly integrates with your store to manage shipping during the checkout process and order handling. Here's how it works:

1. **Customer Checkout**
   - When a customer adds products to their cart and proceeds to checkout, they’ll see the Swoove shipping option as part of the available shipping methods.
   - The shipping cost is dynamically calculated based on the shop location, destination, and other parameters configured in your Swoove settings.
   - The customer selects the Swoove shipping method, and the shipping cost is added to their order total.

2. **Order Placement**
   - Once the customer places an order, WooCommerce processes it, and the order appears in the **Orders** page in your WordPress admin panel.
   - For the Swoove plugin to create a delivery request, the order must be in the **Processing** stage. Ensure the order status is updated accordingly.
   - To trigger the delivery creation manually:
     - Open the **Orders** page in WooCommerce.
     - Click on **Screen Options** in the top-right corner of the page.
     - Enable the **Actions** column by checking the corresponding box.
     - This will reveal an **"Action"** button next to each order.
     - Click on the **"Create Delivery"** button to send the order details to Swoove for processing.
   - When the delivery is triggered:
     - The plugin communicates with the Swoove API to create a delivery request that includes customer details, order items, and delivery instructions.
     - The request is processed depending on the environment settings:
       - **Test Environment**: Simulated delivery request for testing purposes.
       - **Live Environment**: Real delivery request sent to Swoove, assigned to a rider.

3. **Order Management**
   - In the WooCommerce **Orders** page:
     - You can view the order’s shipping details, including the Swoove delivery status, delivery code, secret code and tracking link
     - Order statuses are updated automatically based on real-time updates from Swoove (e.g., "Out for Delivery," "Delivered").
   - Callback functionality ensures the plugin receives and updates order statuses in WooCommerce without manual intervention.

4. **Customer Notification**
   - Customers receive order confirmation emails with the delivery details.
   - They can track their delivery status using the provided tracking link.
   - Customers can either share the secret code with the rider or use it to confirm delivery or sign to confirm delivery.

5. **Delivery Completion**
   - The Swoove rider completes the delivery, and the final status is updated in WooCommerce.
   - You can review completed orders in the WooCommerce admin panel and track delivery analytics via the Swoove Business Panel.

**Notes**
- Configure your shop location, environment (test/live), Swoove API key, and Google Maps API key in the Swoove plugin settings.
- Use the Swoove Business Panel to manage API keys, set callback URLs, and monitor deliveries.



= Docs and support =

If you have questions, need help, or encounter any issues while using this plugin, please contact us:

Email: [developer@swoove.delivery](mailto:developer@swoove.delivery)
Website: [https://www.swoove360.com/](https://www.swoove360.com/)


== Frequently Asked Questions ==

= Is this free to use? =  
Yes, this plugin is free to use.

= Where do I get the Swoove API key? =  
Sign up at [https://business.swoove.delivery/](https://business.swoove.delivery/), create a business, and retrieve the API keys from **Settings > API Key**.

= What should I set for the environment? =  
Use `Test` to simulate deliveries or `Live` for processing real orders.

= How do I set up the callback URL? =  
Copy the URL provided in the plugin settings and set it in the Swoove Business Panel under **Settings > API Key**.

= Can I use this plugin in other countries? =
No, this plugin is designed specifically for businesses in Ghana and Kenya.

= Can I use this plugin with other shipping methods? =
Yes, you can use this plugin alongside other shipping methods in WooCommerce.

= Can I use this plugin for international shipping? =
No, this plugin is designed specifically for local deliveries in Ghana and Kenya.

= What is the Google Maps API Key used for? =
The Google Maps API Key is used to get the accurate location of the delivery address.

== Screenshots ==
1. swoove1.png - Configure your setting
2. swoove2.png - configure the product vendors

== Changelog ==

= 2.3.2 =
* Allow auto delivery creation when order is placed and in processing status

= 2.3.1 =
* Fixed issue with delivery customer details not sent for some orders

= 2.3.0 =
* Added support for WooCommerce 6.8.1
* Fixed missing payment complete action

= 2.2.0 =
* Added support for WooCommerce 6.8.3
* Improved delivery status update mechanism

= 2.1.0 =
* Added ability to mark orders as delivered
* Fixed issue with webhook not updating order status
* Show Swoove Delivery action only when order is in processing status and has not been requested
* Minor bug fixes and improvements

= 2.0.1 =
* Fixed issue with shop location not being saved correctly

= 2.0.0 =
* Plugin upgraged to use latest flow and features

= 1.0.3 =
Fix: Deliveries not creating in order page

= 1.0.2 =
Allow Ghana Post GPS to be used during location search
Fix: Email not passed during shipping requests

= 1.0.1 =
Updated Read Me with setup instructions

= 1.0.0 =
Initial release

= 0.0.1 =
Initial release.

== Upgrade Notice ==

= 2.3.2 =
* Allow auto delivery creation when order is placed and in processing status