=== YallaFelSekka ===
Contributors: YallaFelSekka
Donate link:
Tags: delivery, shipping, woocommerce, integration, webhook
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrates WooCommerce with the YallaFelSekka platform for automated order creation and shipment syncing via secure webhooks.

== Description ==
**YallaFelSekka** connects your WooCommerce store with the YallaFelSekka platform, automating order data transfer and fulfillment.
After installation, the plugin automatically registers webhooks and sends order data to YallaFelSekka when new orders are created.

You can configure your Shop Key and WooCommerce REST API credentials under:
**WooCommerce → Settings → YallaFelSekka**

= Requirements =
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4

== Installation ==
1. Download and unzip the plugin, then upload the `yallafelsekka` folder to `/wp-content/plugins/` **OR** install directly through the WordPress **Plugins → Add New** screen.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **WooCommerce → Settings → Advanced → REST API → Add Key**, create a key with **Read/Write** permissions, and copy the Consumer Key and Consumer Secret.
4. Go to **WooCommerce → Settings → YallaFelSekka** and paste your Shop Key, Consumer Key, and Consumer Secret.
5. Check **Automatically Create Orders** to automatically create delivery orders on new WooCommerce orders.

== Screenshots ==
1. Generate WooCommerce REST API keys — go to WooCommerce → Settings → Advanced → REST API → Add Key and set permissions to Read/Write.
2. Copy your Consumer Key and Consumer Secret — these are shown only once after generating.
3. Paste your Shop Key (provided by YallaFelSekka) along with your Consumer Key and Consumer Secret, then check Automatically Create Orders to activate automatic delivery order creation.

== Changelog ==
= 1.0.0 =
* Initial release — webhook registration, order data sync, and auto-order integration.

== Upgrade Notice ==
= 1.0.0 =
Initial release.

== Frequently Asked Questions ==
= Does this plugin send customer data? =
Only WooCommerce order data necessary for delivery fulfillment is sent to YallaFelSekka via secure API endpoints.

= Is WooCommerce required? =
Yes. This plugin requires WooCommerce to be installed and active.

== External Services ==

This plugin connects to the YallaFelSekka delivery platform API (`https://be.yfsdelivery.com`) to register and unregister WooCommerce webhooks and to facilitate automated delivery order creation.

= What data is sent and when =

**On saving plugin settings (when "Automatically Create Orders" is enabled):**
The plugin sends the following data to `https://be.yfsdelivery.com/create-order-api/api/wooCommerce/register_webhook`:
- Shop Key (provided by YallaFelSekka)
- Store URL
- WooCommerce REST API Consumer Key and Consumer Secret
- "Automatically Create Orders" preference flag

**On saving plugin settings (when "Automatically Create Orders" is disabled) or on plugin uninstall:**
The plugin sends the following data to `https://be.yfsdelivery.com/create-order-api/api/wooCommerce/unregister_webhook`:
- Shop Key
- Store URL

**On new WooCommerce order (via webhook, when "Automatically Create Orders" is enabled):**
WooCommerce sends order data (customer name, address, phone number, and order details) directly to the YallaFelSekka platform for delivery fulfillment.

= Service provider =

This service is provided by YallaFelSekka (YFS Logistics):
- Website: https://www.yfs-logistics.com
- Privacy Policy: https://privacy-policy.yallafelsekka.com

== Privacy Policy ==
This plugin sends order data (name, address, phone, order details)
to YallaFelSekka servers for delivery processing.

Data is transmitted securely via HTTPS.

Privacy Policy:
https://privacy-policy.yallafelsekka.com