=== Zap Product Feed ===
Contributors: woosystems
Tags: woocommerce, product feed, xml, zap, ecommerce
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate Zap-compatible XML product feeds from WooCommerce.

== Description ==

Zap Product Feed creates a dedicated XML feed endpoint for WooCommerce products.

Use it to:
* Expose a full product feed grouped by category.
* Generate per-category feed URLs.
* Map feed fields (description, model, delivery time, manufacturer, warranty).
* Control product inclusion via per-product options and bulk actions.
* Configure shipping and URL query parameter behavior for feed output.

The plugin works with WooCommerce product categories by default, and can optionally use a dedicated custom taxonomy for feed categories.

If WooCommerce is not active, the plugin shows an admin notice and does not bootstrap WooCommerce-dependent runtime services.

== Feed URLs ==

After activation, the plugin adds a feed endpoint slug (default: `zap-feed`):

* Category index: `https://example.com/zap-feed/`
* Category feed: `https://example.com/zap-feed/{term_id}/`

You can change the endpoint slug under WooCommerce -> Zap Product Feed.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/woosystems-zap/`.
2. Activate the plugin via **Plugins** in WordPress admin.
3. Make sure WooCommerce is installed and active.
4. Go to **WooCommerce -> Zap Product Feed**.
5. Configure endpoint, categories, URL params, shipping, and field mappings.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active.

= What happens if WooCommerce is deactivated? =

The plugin avoids loading WooCommerce-dependent runtime services and displays an admin notice.

= Can I exclude specific products from the feed? =

Yes. You can exclude products from the product edit screen and with bulk actions in the Products list.

= Can I customize output values? =

Yes. Use the built-in settings and the documented filters below.

= Does it support custom shipping logic? =

Yes. You can force a fixed shipping cost, use a selected shipping method instance, or override shipping cost per product.

== Filters ==

= Category and query filters =

* `woozap_feed_category_args` - Filters `get_terms()` args for the category index.
* `woozap_feed_products_query_args` - Filters `wc_get_products()` query args for category feed generation.

= Product eligibility filter =

* `woozap_product_is_eligible` - Filters whether a product is eligible for export.

= Field/value filters =

* `woozap_product_url`
* `woozap_product_name`
* `woozap_product_details`
* `woozap_product_catalog_number`
* `woozap_product_image`
* `woozap_product_model`
* `woozap_product_delivery_time`
* `woozap_product_manufacturer`
* `woozap_product_warranty`
* `woozap_product_code`
* `woozap_product_currency`
* `woozap_product_price`
* `woozap_product_tax`
* `woozap_product_shipment_cost`
* `woozap_feed_product_data` - Filters the final normalized product row before XML rendering.

== Security ==

The plugin uses:
* WordPress Settings API for admin settings forms.
* Nonces and capability checks for product meta saves and admin operations.
* Sanitization on input and escaping on output in admin templates.

== Changelog ==

= 0.1.0 =
* Initial public release.
* XML feed endpoint and category index.
* Per-category feed generation.
* Product-level include/exclude controls and bulk actions.
* Field mapping for feed attributes.
* Shipping and URL parameter configuration.

== Upgrade Notice ==

= 0.1.0 =
Initial release.
