=== EdiDev AI Assistant for Perfection42 ===
Contributors: edidev
Tags: ai, woocommerce, ecommerce, product-description, product-images
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.12
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI assistant for WooCommerce that generates and improves product titles, descriptions, images and videos in bulk from your Products list.

== Description ==

https://youtu.be/VvjEOSvT6nQ

EdiDev AI Assistant for Perfection42 (Perfection42 AI Product Assistant for WooCommerce) turns basic product data into sales-ready content in a few clicks.

Generate, fix, and enhance **titles, short descriptions, full descriptions, product images, and videos** – without leaving your WooCommerce Products screen. Run AI workflows on a single product or bulk-select hundreds and let the plugin handle the queue in the background.

This plugin connects your store to the **Perfection42** platform, a specialized AI engine for e-commerce visuals and product content.

Developed and maintained by **EdiDev**. This plugin integrates with the **Perfection42 API** as a technology partner to provide AI generation features. **Perfection42 did not author or maintain the plugin code.**

**Highlights**
- Works directly in wp-admin (WooCommerce Products list + product edit page)
- Generate or improve titles, short descriptions, full descriptions and product videos
- Fix visuals with background removal, upscaling and enhancement
- Run AI workflows for one product or hundreds at once with background queues and logs
- Permission-aware: only users with product editing rights can run AI actions

**How it works**

1. **Select products** – choose one or multiple WooCommerce products from the Products list or edit page.
2. **Select workflow** – text, images or video (e.g. Text to Text, Remove Background, Upscale Image, Create Product Video).
3. **Tell the AI what you need** – short brief, tone of voice, keywords.
4. **Preview the results** – adjust titles, descriptions and visuals before saving.
5. **Apply to one or many products** – save for a single product or run in bulk via the background queue.

**Supported Product Types**
- Simple products (downloadable/virtual)
- Other types (Variable, Grouped, External, Affiliate) at parent level only
- Variations support planned for next update

== Screenshots ==

1. Perfection42 Account Login Page
2. AI Assistant on WooCommerce Products List
3. Product Edit Screen – AI Popup
4. Configuration for Text Generation Example
5. Results in Text Generation Example
6. AI Generation Processing
7. Successful State on Generate for All Example
8. Saving Results to WooCommerce Product Fields Example

== Demo Videos ==

[**More demo videos available on our YouTube channel**](https://www.youtube.com/@E-AI-Assistant-for-P-Forty-Two)

== External Service Disclosure ==
This plugin connects to the Perfection42 service to assist with product content generation and optimization.
Data sent: product title, short/long description, attributes, category context, store locale, and optional images/URLs — only when you explicitly trigger an AI action in the plugin UI.
Purpose: to generate or optimize product content with AI.
When: only on user-initiated actions; no background or scheduled transfers.
Transport: HTTPS requests to Perfection42’s API.

**Privacy & Terms**
- Privacy Policy: [https://www.perfection42.com/legal/privacy-policy](https://www.perfection42.com/legal/privacy-policy)
- Terms of Service: [https://www.perfection42.com/legal/terms-of-service](https://www.perfection42.com/legal/terms-of-service)

= Non-Affiliation =
This plugin is not affiliated with or endorsed by WooCommerce or Automattic.
“Perfection42” is a third-party service; this plugin is developed by EdiDev.
Brand names are used solely for compatibility and descriptive purposes.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it via the **Plugins → Add New** screen.
2. Activate **WooCommerce** and then activate this plugin.
3. Go to **Perfection42 → Settings**.
4. Enter your Perfection42 API credentials (or create them in your Perfection42 account).
5. Start generating in **WooCommerce → Products**.

== Frequently Asked Questions ==

= What does Perfection42 AI Product Assistant do? =

It helps WooCommerce store owners generate and improve product content automatically — including titles, descriptions, images, and videos — directly from the WordPress dashboard.

= Will it overwrite my existing content? =
Only if you choose **UPDATE**. If you choose **ADD**, content will be appended. All results can be previewed before saving.

= Where are generated images and videos stored? =
All generated media is stored in the **Media Library** and assigned to products as Featured, Gallery, or Product Video.

= Can I generate for multiple products at once? =
Yes. Use **Generate for all selected products**. For large sets, the plugin uses a background queue to prevent timeouts.

= Does it support Variations? =
Not yet. Current release supports Simple products (and parent-level actions for other types). Variation support is planned for an upcoming update.

= Is my data safe? =
Yes. The plugin uses nonces, capability checks, and communicates only with the Perfection42 API. No customer data is sent.
See our Privacy and External Services sections below.

== External Services / API ==

This plugin connects to the **Perfection42 API** when an admin explicitly triggers AI generation. Data sent may include product text, prompts, and image URLs. Responses may include generated text, images, or video URLs for use in WooCommerce.

== Privacy ==

This plugin registers a Privacy Policy Guide entry via `wp_add_privacy_policy_content()` describing what data is sent to the Perfection42 API and for what purpose.
Site owners should review and, if needed, add their own policy disclosures.

== Credits ==

This plugin is developed and maintained by **EdiDev** ([https://edidev.online](https://edidev.online)).

Acknowledgements: **Perfection42** is our technology partner and API provider for AI generation. They did not author the plugin code.

== License ==

This plugin is licensed under the GNU General Public License, version 2 (GPLv2) or later.

You should have received a copy of the GNU General Public License along with this program.
If not, see [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)

== Third-Party Licenses ==

This plugin includes and/or bundles third-party components licensed under GPL-compatible licenses (e.g., MIT).
A complete list is available in the file `THIRD-PARTY-LICENSES.txt`.

Notes for reviewers and users:
- Any third-party library included via Composer or npm preserves its original LICENSE file in the distribution (e.g., under `/vendor` or `/assets` as applicable).
- No assets with “NonCommercial” or “NoDerivatives” clauses are included.
- All images, icons, and fonts shipped in this plugin are original works by the authors or under GPL-compatible licenses.

== Changelog ==

= 1.0.12 - 2026-02-24 =
- IMPLEMENTATION: Added Email Verification (OTP) system for new signups to enhance account security.
- ENHANCEMENT: Integrated advanced email validation, including MX record checks and blocking of disposable/temporary email domains.
- UI/UX: Updated the React Assistant interface with new HeaderNotice and HelperText components for better guidance.
- UI/UX: Refined the BottomActionBar and CodeEditor components in the generation workflow.
- ENHANCEMENT: Added new quick-access links for "My Projects" and "My Profile" within the Account panel.
- I18N: Added new translation strings for OTP verification states and account management labels.
- FIXED: Improved error handling for email delivery and validation failures during onboarding.

= 1.0.11 - 2026-01-28 =
- ENHANCEMENT: Improved UI/UX for the Results Zone when generating Featured Images and Galleries.
- ENHANCEMENT: Optimized Product Tabs navigation to prevent overlapping of the first and last items.
- IMPLEMENTATION: Added a real-time Progress Bar for tracking AI generation status.
- UI: Improved form validation for dynamic fields with required markers.
- FIXED: Improved error handling and UI feedback for empty or null responses from the Perfection42 API.
- FIXED: Resolved an issue where successful generation would occasionally fail to update WooCommerce Featured or Gallery image fields.

= 1.0.10 - 2026-01-21 =
- ENHANCEMENT: Optimized workflow for generating Featured Images and Galleries.
- IMPLEMENTATION: Added Perfection42 Account Information modal and real-time credit balance checks within the working modal.
- COMPATIBILITY: Verified support for WordPress 6.9 and WooCommerce 10.4.x.

= 1.0.9 - 2025-12-28 =
- ENHANCEMENT: Bulk Generation UX optimizations:
  - Smoother switching between product tabs during processing.
  - Added per-tab, per-result loading indicators to make progress and status clear.
  - Reduced UI jank when navigating between tabs with active requests.

= 1.0.8 - 2025-12-20 =
- ENHANCEMENT: Enhanced Plugin Settings page for sign-in, sign-up, and account information to streamline onboarding and account management.
- ENHANCEMENT: Upgraded the Perfection42 modal to support fullscreen for better advertisement visibility and improved user experience.

= 1.0.7 - 2025-12-15 =
- UPDATE: Improved UI layout and responsiveness for small-screen devices.
- ENHANCEMENT: Enhanced UX for the generating workflow to provide a smoother and more intuitive user experience.

= 1.0.6 - 2025-12-10 =
- FIXED: Compatibility adjustments for WooCommerce 10.3.5.

= 1.0.5 - 2025-12-05 =
- REMOVE: Removed admin iframe from Settings and replaced it with an external sign-up link (opens in a new tab) per WordPress.org feedback.
- UPDATE: Added PHP-translated strings for the sign-up button and helper text, passed into Twig for rendering.
- CLEANUP: Removed any iframe-specific assets/styles; retained general layout assets used by the settings form.

= 1.0.4 - 2025-11-28 =
- REFACTOR: Standardize plugin naming, REST API endpoints, and version constants (Renamed plugin name and updated REST API namespace for consistency. Replaced version references with `PLUGIN_VERSION` constant. Updated options cleanup logic, author metadata in `composer.json`, and removed obsolete TODO comments.)
- REMOVE: Eliminate unused imports, exception handling, and redundant methods (Streamlined code by removing unused class imports, exception handling around plugin deactivation, and the redundant `notice_success_message` method. Simplifies maintenance and improves readability.)
- UPDATE: Adjust global `constants` variable to reflect renamed plugin configuration (Replaced `EDIDEV_PERFECTION_WP_CONST` with `EDIDEV_AI_ASSISTANT_FOR_PERFECTION42_WP_CONST` for consistency with the new plugin namespace.)

= 1.0.2 =
* Renamed plugin to “EdiDev AI Assistant for Perfection42” (slug `edidev-ai-assistant-for-perfection42`)
* Added nonce + capability checks on settings save
* Hardened REST API endpoint permissions (`manage_woocommerce` / `edit_products`)
* Added clear External Service Disclosure & Non-Affiliation statements (Guideline 6 compliance)
* Removed all manual core includes (`wp-load.php`, `admin.php`, etc.)
* Verified i18n consistency and removed redundant `load_plugin_textdomain`
* Ensured JS client attaches `X-WP-Nonce` header on every REST call
* Passed PHPCS/WPCS validation and prepared for WordPress.org submission

= 1.0.0 =
* Initial release
* Supports Simple products (others at parent level)
* Generate text, images, and videos
* Popup UI with bulk generation, logging, and background processing


== Upgrade Notice ==

= 1.0.0 =
First release: Variations support planned for the next update.