=== Serviceform Pixel ===
Contributors: serviceform
Tags: serviceform, pixel, tracking, analytics, woocommerce, ecommerce
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 2.4.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Add Serviceform pixel to your WordPress site quickly. Optional product data API available.

== Description ==

**Serviceform Pixel** is the official plugin for adding Serviceform tracking pixel to your WordPress website. Simple, lightweight, and reliable.

### Core Features

* **Serviceform Pixel Integration** - V2 and V3 pixel support
* **Automatic Loading** - Pixel loads based on ID length detection
* **Easy Setup** - Just enter your Pixel ID and you're done
* **Lightweight** - No impact on site performance

### Optional Product Data API (Disabled by Default)

For WooCommerce stores, an optional product data API is available:

* **REST API Endpoint** - Retrieve all product data via `/wp-json/serviceform/v1/products`
* **Complete Product Data** - Names, descriptions, prices, images, categories, tags, custom fields
* **Pagination Support** - Handle large catalogs with `?page=1&per_page=100`
* **Incremental Updates** - Filter by date with `?updated_after=2024-01-01`
* **Optional Security** - API key protection available

### Important for Existing Users

**Your existing setup is completely safe.** The product data API is:
* **Disabled by default** - Nothing changes unless you opt-in
* **Completely optional** - Your pixel will work exactly as before

### Getting Started

1. Install the plugin
2. Go to Settings → Serviceform Pixel
3. Enter your Serviceform Pixel ID
4. **Optional:** Enable Product Data API if you have WooCommerce

### Requirements

* WordPress 5.0 or higher
* PHP 7.4 or higher
* WooCommerce 5.0+ (only for product data API)

### Support

* **Documentation:** [serviceform.com/help](https://serviceform.com/help)
* **Email:** support@serviceform.com

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/serviceform-pixel/`
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Navigate to Settings → Serviceform Pixel
4. Enter your Serviceform Pixel ID
5. **Optional:** Enable Product Data API if you have WooCommerce

== Frequently Asked Questions ==

= Will this update affect my existing pixel setup? =

**No.** Your existing pixel setup will continue working exactly as before. The product data API is disabled by default.

= Do I need WooCommerce for the pixel to work? =

**No.** The core Serviceform pixel functionality works on any WordPress site. WooCommerce is only required for the optional product data API.

= How do I enable the product data API? =

Go to Settings → Serviceform Pixel and check the "Enable Product Data API" box.

= Are the API endpoints publicly accessible? =

By default, yes. You can set an API key in the settings to protect the endpoint.

= Where do I get my Pixel ID? =

Sign up at [serviceform.com](https://serviceform.com) and create a pixel for your website.

== Screenshots ==

1. Simple settings page - enter your Pixel ID and optionally enable the product data API

== Changelog ==

= 2.4.4 =
* **New:** Added price_including_tax and price_excluding_tax to product data

= 2.4.3 =
* **Security:** Real-time token verification for orders endpoint via Serviceform backend
* **Removed:** Insecure derived key (was computable from public information)

= 2.4.2 =
* **Security:** Orders endpoint now always requires API key authentication (contains customer PII)
* **New:** Derived API key support from pixel ID for backend access
* **Enhanced:** CDP webhook triggers with product API enabled

= 2.4.1 =
* **Enhanced:** Auto-enable CDP sync when product API is enabled
* **Simplified:** Removed tenant ID field (resolved automatically from pixel ID)
* **Fixed:** REST API registration timing for better WooCommerce compatibility

= 2.4.0 =
* **New:** CDP sync integration with orders endpoint
* **New:** Tenant ID setting for CDP data sync
* **Enhanced:** API endpoints conditional on feature toggles

= 2.3.0 =
* **New:** Recommendations endpoint with real order co-purchase data
* **New:** Stock validation endpoint for real-time inventory checks

= 2.2.2 =
* **New:** Add to cart endpoint for widget integration
* **New:** Get cart endpoint for cart management

= 2.2.1 =
* **New:** Single product endpoint for frontend cart/variant operations

= 2.2.0 =
* **Updated:** Tested with WordPress 6.7
* **Updated:** WooCommerce HPOS compatibility
* **Updated:** Settings moved under Settings menu
* **Improved:** Comprehensive product data export (all custom fields, ACF, taxonomies)
* **Fixed:** Product visibility query for modern WooCommerce

= 2.1.0 =
* **New:** Optional product data API endpoint
* **New:** REST API for WooCommerce products
* **Important:** All new features disabled by default

= 2.0.1 =
* Updated pixel loading script
* Enhanced V3 pixel support

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.2.0 =
Safe update. Tested with WordPress 6.7. Existing pixel setup unchanged.