=== TricksBiz Product Optimizer for WooCommerce ===
Contributors: aiproductoptimizer, tricksbiz
Tags: woocommerce, product description, seo, ai, product content
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Score WooCommerce product content and get AI suggestions you review and approve before anything in your store changes.

== Description ==

TricksBiz Product Optimizer connects your WooCommerce catalogue to the TricksBiz Product Optimizer service at app.tricksbiz.com, run by Tricks Biz.

The service scores each product in seven areas: SEO, content, attributes, images, AI readiness, structured data and FAQ. It lists the problems it finds with a recommended fix, and can write suggestions with AI: product name, short and long description, SEO title and meta description, image ALT text and a product FAQ.

You review every suggestion in your account, edit it if you like, and approve it. Nothing in your store changes until you apply a change; a change is not written if the product was edited after the suggestion was made; and every applied change can be rolled back.

**This plugin requires an account on the TricksBiz Product Optimizer service.** Registration is free, and the Free plan includes a one-time allowance of AI credits granted the first time you connect a store. Rule-based scoring does not use credits; AI suggestions do. Larger plans can be requested from your account. Current plans: https://plugin.tricksbiz.com/pricing

Features:

* A score and a problem list for every product, a score column on the Products screen and a score box on the product edit screen.
* AI suggestions grounded in the product data you already have. The service rejects suggestions that add unsupported specifications, measurements, materials, warranties, certifications, prices, shipping promises, links or contact details.
* Review, edit, approve, apply and roll back, with conflict protection.
* Bulk analysis and bulk AI suggestions for selected products.
* SEO fields are written to Yoast SEO or Rank Math when one of them is active, otherwise to the plugin's own SEO title and meta description.
* Approved product FAQs are shown in an "FAQ" tab on the product page, or wherever you place the [tbpo_faq] shortcode.
* Simple and variable products. Compatible with WooCommerce High-Performance Order Storage (the plugin never reads or changes orders).

Documentation: https://plugin.tricksbiz.com/docs
Support: https://plugin.tricksbiz.com/support

== External services ==

This plugin connects to the TricksBiz Product Optimizer service, operated by Tricks Biz at https://app.tricksbiz.com. The service is required: the plugin has no features without it. No connection is made until an administrator clicks "Connect store" on WooCommerce > Product Optimizer and approves the connection while logged in to their account.

What is sent to the service, and when:

* When you connect, and every six hours afterwards (heartbeat): the store URL and name, WordPress, WooCommerce, PHP and plugin versions, the active SEO plugin, the site language, the plugin's notification URL, a random installation ID and which optional WooCommerce features are available.
* When products are imported (right after connecting, when you click an import button, and shortly after a product is created, edited, trashed or deleted): product content only - product ID, name, SKU, slug, permalink, type, status, short and long description, price, regular and sale price, currency, stock status, GTIN, brands, categories, attributes, variation attribute options and count, image IDs, URLs, file names, sizes and ALT text, SEO title and meta description, product FAQ, last-modified time and content hashes. For deleted products only the product ID is sent.
* When you open WooCommerce > Product Optimizer or the Products screen: a request for your account summary and product scores.
* When the plugin applies or rolls back a change you approved: the result (status and a hash of the stored value).
* Never sent: customers, orders, payments, users, passwords or any other site content.

The service sends signed notifications to /wp-json/tbpo/v1/ping on your site. They only tell the plugin to check the service for new requests; the plugin verifies each signature and ignores anything else.

To write AI suggestions the service sends a limited part of the product content (name, brand, categories, product type, attributes, variation options, descriptions, SEO fields, FAQ, and image IDs, file names and ALT text - no prices, stock, image files or customer data) to the AI provider configured by the service operator, currently OpenAI or Groq. OpenAI privacy policy: https://openai.com/policies/privacy-policy/ - Groq privacy policy: https://groq.com/privacy-policy/

Service terms of service: https://plugin.tricksbiz.com/terms
Service privacy policy: https://plugin.tricksbiz.com/privacy-policy

== Installation ==

1. Make sure WooCommerce 8.5 or later is installed and active.
2. In WordPress go to Plugins > Add New Plugin, click Upload Plugin, choose the plugin ZIP file, click Install Now, then Activate.
3. Create a free account at https://app.tricksbiz.com/register and verify your email address.
4. Go to WooCommerce > Product Optimizer and click "Connect store". Log in if asked, check the store details and approve the connection.
5. You are sent back to WordPress and your products are imported in the background. Scores appear once the import and analysis have finished.

For reliable background processing on low-traffic sites, run WP-Cron from a real server cron job.

== Frequently Asked Questions ==

= Do I need an account? =
Yes. The plugin connects your store to the TricksBiz Product Optimizer service, where products are analysed and suggestions are reviewed. Registration is free.

= Does the plugin change my products automatically? =
No. Changes are only applied after you approve them in your account, and every applied change can be rolled back.

= What happens if I edit a product after a suggestion was made? =
The change is not written and is marked as a conflict. Re-sync the product in your account and generate a new suggestion.

= What does it cost? =
Rule-based scoring does not use credits. AI suggestions use credits; the Free plan includes a one-time credit allowance. Current plans and credit costs: https://plugin.tricksbiz.com/pricing

= Which SEO plugins are supported? =
Yoast SEO and Rank Math. Without either, the plugin stores its own SEO title and meta description and prints them on product pages.

= Where does the product FAQ appear? =
Approved FAQs appear automatically in an "FAQ" tab on the product page. To place it elsewhere use the [tbpo_faq] shortcode (the tab is then not added). Developers can turn the tab off with add_filter( 'tbpo_faq_show_tab', '__return_false' ).

= Where are the connection credentials stored? =
In the WordPress options table, encrypted with a key derived from your wp-config.php salts.

= How do I disconnect? =
Click "Disconnect" on WooCommerce > Product Optimizer. The service loses access immediately. Deleting the plugin removes its settings; content written by changes you applied stays in your products.

= Can I use a different service URL? =
Developers can add define( 'TBPO_SERVICE_URL', 'https://...' ); to wp-config.php, or use the Advanced field on the plugin screen before connecting. Only https URLs are accepted.

== Changelog ==

= 0.5.0 =
* Renamed to TricksBiz Product Optimizer for WooCommerce (new slug: tricksbiz-product-optimizer).
* All functions, classes, options, hooks, meta keys, the shortcode ([tbpo_faq]), filters (tbpo_faq_show_tab, tbpo_faq_tab_title, tbpo_faq_tab_priority), constants and the REST route (/wp-json/tbpo/v1/ping) now use the tbpo prefix.
* Admin notices are limited to relevant screens.

= 0.4.2 =
* The plugin now uses the official service address app.tricksbiz.com by default. A saved service URL that exactly matches a retired default address is removed on upgrade; custom URLs and the APO_SERVICE_URL constant are not changed.
* The official website, documentation and support are now at plugin.tricksbiz.com. Added Settings, Docs and Support links on the Plugins screen and help links on the plugin page.
* Readme: full disclosure of the external service, the data sent and the AI providers used.

= 0.4.1 =
* Approved product FAQs now show automatically in an "FAQ" tab on the product page (previously only via the [apo_faq] shortcode). Filters: apo_faq_show_tab, apo_faq_tab_title, apo_faq_tab_priority.

= 0.4.0 =
* Applies approved changes and rollbacks with conflict protection: a value is only written if the product was not changed after the suggestion was created.

= 0.3.0 =
* Product scores link to the product's analysis page; SEO / content / attribute sub-scores in the product metabox.

= 0.2.0 =
* Store connection (PKCE), product import (full and incremental), signed pings, command polling, score column.

== Upgrade Notice ==

= 0.5.0 =
First release under the new name and slug.
