=== ShipBG for WooCommerce ===
Contributors: sksoft
Tags: shipping, woocommerce, bulgaria, courier, shipbg
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Shipping integration for WooCommerce with ShipBG — Bulgaria's leading multi-carrier shipping platform.

== Description ==

ShipBG for WooCommerce integrates your WooCommerce store with the ShipBG shipping platform, providing access to multiple Bulgarian courier services through a single plugin.

**Features:**

* **Multi-carrier aggregation** — Speedy, Econt Express, PostOne, BoxNow, Sameday, A1 Post, BG Post in one plugin
* **Live shipping rates** — Real-time rate calculation from all carriers at checkout
* **Smart pickup point search** — Typo-tolerant search with interactive map picker
* **Shipment management** — Create shipments, generate labels, and track packages from WooCommerce admin
* **Bulk operations** — Batch label generation for multiple orders
* **Customer tracking** — Tracking timeline widget on My Account page
* **Webhook support** — Auto-registered endpoint with HMAC signature verification for real-time status updates
* **Returns** — Initiate return shipments from admin
* **COD support** — Automatic cash-on-delivery amount mapping
* **Block checkout** — Full support for WooCommerce Blocks checkout via React components
* **Classic checkout** — jQuery-based delivery type selector and pickup point map
* **HPOS compatible** — Uses WooCommerce CRUD methods, no direct postmeta access
* **Setup wizard** — Step-by-step onboarding to connect your ShipBG account and configure carriers
* **Flexible carrier overrides** — Per-carrier configurable settings and pricing rules

**Requirements:**

* WordPress 5.0 or higher
* WooCommerce 8.0 or higher
* PHP 7.4 or higher
* A ShipBG account with API credentials

**External Service Usage:**

This plugin relies on the following external services:

1. ShipBG API (https://shipbg.com/api/v1) — Required. This is the core backend the plugin is an integration for.

What it's used for: Real-time shipping rate calculation, shipment creation, label generation, shipment tracking, pickup-point search, address autocomplete/geocoding, and OAuth-based account connection.

What data is sent, and when:
* Order details, customer shipping address (name, street, city, postcode, country, phone, email), and parcel dimensions/weight are sent whenever the merchant calculates rates at checkout or creates a shipment from the admin order screen.
* Free-text address queries are sent when a customer uses the pickup-point map or address autocomplete at checkout.
* Shipment IDs are sent when the merchant refreshes tracking status.
* A store-identifying OAuth token is sent with every request (configured once during setup).

Terms of Service: https://shipbg.com/terms-and-conditions
Privacy Policy: https://shipbg.com/privacy-policy

A ShipBG account with API credentials is required for the plugin to function.

2. OpenStreetMap tile server (https://{s}.tile.openstreetmap.org/) — Browser-side only.

What it's used for: Rendering the pickup-point selection map on the classic WooCommerce checkout page (via Leaflet).

What data is sent, and when: Only the customer's browser requests map tiles. Each request contains the tile coordinates (z/x/y) the map needs to render the visible area. No personal data, order data, or plugin-specific data is sent.

Terms of Service: https://operations.osmfoundation.org/policies/tiles/
Privacy Policy: https://wiki.osmfoundation.org/wiki/Privacy_Policy

== Installation ==

1. Upload the `shipbg-for-woocommerce` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to WooCommerce > Settings > Shipping > ShipBG to configure your API credentials.
4. Enable the ShipBG shipping method in your WooCommerce shipping zones.

== Frequently Asked Questions ==

= Do I need a ShipBG account? =

Yes, you need an active ShipBG account with API credentials. Visit [shipbg.com](https://shipbg.com) to create one.

= Which carriers are supported? =

ShipBG supports multiple Bulgarian courier services including Speedy, Econt, Sameday, BoxNow, PostOne, A1 Post, BG Post. The available carriers depend on your ShipBG account configuration.

= Does this plugin support WooCommerce Blocks checkout? =

Yes, the plugin fully supports both the classic WooCommerce checkout and the newer Blocks-based checkout.

== Changelog ==

= 1.0.0 =
* Initial release.
* Multi-carrier shipping rate calculation.
* Shipment creation and tracking.
* Pickup point selection.
* Bulk operations support.
* Webhook status updates.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
