=== WPMR Product FAQs for WooCommerce ===
Contributors: wpmarketingrobot, michel-jongbloed
Tags: faq, woocommerce, product, ai, questions
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An easy to use FAQ generator for WooCommerce products.

== Description ==

Product FAQ Generator lets you quickly generate and manage frequently asked questions for your WooCommerce products, helping shoppers find the answers they need and reducing pre-sale support enquiries.

Generated FAQs are product-specific and merchant-editable, so you can generate a draft and then tailor each question and answer before publishing.

**Where to configure**

* Open `WooCommerce > Settings > FAQ Generator` to configure AI provider settings and defaults.
* API provider costs/billing are handled by your AI provider account and are not included in WooCommerce or this plugin.

**Per-product workflow**

* Open any WooCommerce product in the product editor.
* Use the `FAQ Generator` product-data tab to generate, review, and edit FAQs for that product.

**Bulk workflow**

* From the Products list table, use the bulk action `Generate draft FAQs` to process multiple products in batches.

**Shortcodes**

* `[pfaqg_faq]` renders FAQs for the current product context.
* `[pfaqg_faq product_id="42"]` renders FAQs for a specific product by ID.

**Compatibility**

* FAQ data is stored on products using post meta.
* The plugin does not depend on WooCommerce order storage, so behavior remains HPOS-safe.

**Requirements**

* WordPress 6.5 or higher
* WooCommerce 8.4 or higher
* PHP 8.0 or higher

== Installation ==

1. Upload the `wpmr-product-faqs-for-woocommerce` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Ensure WooCommerce is installed and active — the plugin will display an admin notice if the requirement is not met.

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =

No. WooCommerce 8.4 or higher must be installed and active.

= Which PHP version is required? =

PHP 8.0 or higher is required.

= Where do I configure the plugin? =

Go to `WooCommerce > Settings > FAQ Generator`.

= Can I edit generated FAQs? =

Yes. Generated FAQs are drafts that remain fully editable per product.

= Does this plugin support shortcodes? =

Yes. Use `[pfaqg_faq]` or `[pfaqg_faq product_id="42"]`.

== External services ==

This plugin connects to the OpenAI API to generate product FAQ drafts using AI.
This external service is required only for FAQ generation features; the plugin can still display and manage already saved FAQs without calling the service.

**Service provider**

* OpenAI (Chat Completions API): https://api.openai.com/v1/chat/completions

**What the service is used for**

* Generating draft product questions and answers in the WooCommerce admin product editor and during bulk FAQ generation.

**What data is sent and when**

* Data is sent only when an authorized admin user manually starts FAQ generation (single product or bulk generation) from the WordPress admin.
* The plugin sends:
  * Product content used for prompt context (for example: product name, description, short description, categories, tags, attributes, SKU, price, weight, dimensions, brand, and EAN when available).
  * Generation settings needed for the request (for example: selected model, requested FAQ count, language, and answer-length guidance).
  * Your configured OpenAI API key is sent in the request Authorization header for authentication.
* The plugin does not send customer/order/personal account data as part of the FAQ generation payload.

**Terms and privacy**

* OpenAI Terms of Use: https://openai.com/policies/terms-of-use
* OpenAI Privacy Policy: https://openai.com/policies/privacy-policy

== Changelog ==

= 0.1.1 =
* Initial release.

== Upgrade Notice ==

= 0.1.0 =
Initial release — no upgrade steps required.
