=== Wappbiz ===
Contributors: wappbiz2024
Tags: woocommerce, orders, API integration, cart
Requires at least: 5.2
Tested up to: 6.8
Requires PHP: 7.2
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Advanced integration with the Wappbiz API for seamless WooCommerce order and cart synchronization.

== Description ==

The Wappbiz Plugin provides an advanced connection with the Wappbiz API, enabling seamless synchronization of WooCommerce orders and cart updates.

**Key Features:**

- Synchronize orders with the Wappbiz API.
- Real-time cart updates.
- Order status change notifications.
- Multi-vendor support for WCFM Marketplace.
- Configurable event triggers via settings.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory.
2. Activate it through the 'Plugins' menu in WordPress.
3. Navigate to the "Wappbiz" admin menu to configure your API key and plugin settings.

== Frequently Asked Questions ==

= Do I need an API key to use this plugin? =

Yes. You must configure your Wappbiz API key in the plugin settings for integration to function. You can register and get your key at: https://app.wapp.biz/register

= Can I enable or disable specific events? =

Yes. The plugin provides checkboxes in the Options tab to enable or disable:
- Order Creation
- Order Status Updates
- Cart Updates

== External Services ==

This plugin connects to the Wappbiz API to send order, cart, and status update data to an external messaging platform for order notifications.

**What data is sent:**
- Customer details (name, email, phone, address)
- Order and product information
- Cart item details (product name, quantity, price)

**When data is sent:**
- When an order is placed or updated
- When items are added or updated in the cart

**Service Provider:** Wappbiz  
**Terms:** [https://www.wappbiz.com/terms-conditions/](https://www.wappbiz.com/terms-conditions/)  
**Privacy Policy:** [https://www.wappbiz.com/privacy-policy/](https://www.wappbiz.com/privacy-policy/)

== Screenshots ==
1. Wappbiz plugin settings page.
2. Enable/disable event triggers.
3. Vendor notification options (for WCFM).

== Changelog ==

= 1.1.0 =
* Fixed: order notification could be re-sent on every thank-you page refresh; now sent exactly once per order.
* Fixed: order-creation notification could go out with an empty order details payload.
* Fixed: order status update could be sent before the order creation notification.
* Fixed: frontend script was never loaded on the storefront.
* Fixed: vendor WhatsApp notifications now respect the "Send Notification to Vendor" setting and single/multi-vendor mode.
* Fixed: "Clear Logs" button now works.
* Fixed: API errors are now detected and logged with the actual error message instead of a blank message.
* Fixed: settings page no longer errors if plugin-detection functions aren't loaded yet.
* Added: plugin action links (Settings, Documentation) on the Plugins page.
* Fixed: API logs now display consistently for all log types, with a working "View Response" details view.
* Fixed: API logs are now capped to prevent unbounded growth.
* Removed: dead code with no corresponding handler.

= 1.0 =
* Initial release of the Wappbiz Plugin.

== Upgrade Notice ==

= 1.1.0 =
Fixes duplicate/incorrect order notifications and several stability issues. Recommended update for all users.

= 1.0 =
Initial release.
