# Teleship Global Shipping

Copyright (c) 2025 Teleship Limited. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Seamlessly integrate Teleship shipping platform with your WooCommerce store. Get real-time shipping rates, handle shipments, and provide a better shipping experience for your customers.

## Features

- **Live Shipping Rates**: Get real-time shipping rates directly from Teleship's API based on the customer's cart items and shipping address
- **Multiple Carriers**: Access rates from various carriers through the Teleship platform
- **Shipping Zones**: Configure Teleship shipping for specific shipping zones
- **Fallback Rates**: Define fallback rates when the API is unavailable
- **Debug Mode**: Log API requests and responses for troubleshooting

## Installation

1. Upload the `teleship-global-shipping` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Add the Teleship shipping method to your shipping zones

## Configuration

### 1. Connect Your Teleship Account

Before you can use live rates, you need to connect your Teleship account:

1. Go to the Teleship dashboard in your WordPress admin menu
2. Log in to your Teleship account or sign up for a new account
3. Follow the integration steps to connect your WooCommerce store

### 2. Add to Shipping Zones

1. Go to WooCommerce > Settings > Shipping > Shipping Zones
2. Select a shipping zone (or create a new one)
3. Click "Add Shipping Method"
4. Select "Teleship Global Shipping" from the dropdown
5. Configure the shipping method settings:
   - **Title**: The shipping method name shown to customers
   - **Fallback Rate**: Set a fallback rate to use when the API is unavailable
   - **Handling Fee**: Add a handling fee to the shipping cost
   - **Debug Mode**: Enable debugging for this shipping zone

## Troubleshooting

If you're experiencing issues with live rates:

1. Enable debug mode in the Teleship settings
2. Check your WordPress debug log for API-related messages
3. Verify that your Teleship account is connected correctly
4. Ensure products have proper weight and dimensions
5. Check that your store's address is configured correctly in WooCommerce settings

## Frequently Asked Questions

### How are shipping rates calculated?

Shipping rates are calculated in real-time based on:
- The weight and dimensions of products in the cart
- The customer's shipping address
- Available carriers in your Teleship account

### What happens if the Teleship API is unavailable?

If the API is unavailable, the plugin will use the configured fallback rate. You can set a global fallback rate and/or specific fallback rates for each shipping zone.

### How do I add handling fees to shipping rates?

You can add a handling fee in the shipping method settings for each shipping zone. This fee will be added to all rates returned by the API.

## Support

For support, please contact us at [support@teleship.com](mailto:support@teleship.com) or visit our [help center](https://teleship.com/help).

## License

This plugin is released under the GPL v2 or later license.

## Changelog

See [changelog.txt](changelog.txt) for a list of changes.
