WP Manifestindependent plugin directory
manifest / ai / isw_ai_product_description_generator

ISW AI Product Description Generator

Generates WooCommerce product descriptions and SEO content through the OpenAI API.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ivicastasuk/isw_ai_product_description_generator/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

English · Srpski

A WordPress and WooCommerce plugin for manually generating product descriptions and SEO suggestions through the OpenAI API. Every generated field is displayed in an editable preview and is saved only after the user explicitly selects and applies it.


English

Overview

ISW AI Product Description Generator adds an ISW AI generator tab to the WooCommerce Product Data panel. Administrators and shop managers can generate, review, edit, and selectively apply product content without automatically overwriting existing data.

Plugin settings are available under:

WordPress Admin → ISWorkshop HUB → ISW AI Generator

Features

  • Generate a short product description.
  • Generate a main product description.
  • Generate both descriptions in one request.
  • Generate an SEO title.
  • Generate an SEO meta description.
  • Generate keyword suggestions.
  • Generate all supported fields at once.
  • Review and edit every generated field before saving.
  • Select individual fields to apply.
  • Keep existing product data unchanged until the user explicitly applies a preview field.
  • Write descriptions through the WooCommerce CRUD API.
  • Write selected SEO values to Rank Math metadata when Rank Math is active.
  • Retain plugin-prefixed SEO metadata when Rank Math is unavailable.
  • Configure the output language, writing tone, OpenAI model, request timeout, and per-user daily limit.
  • Integrate with the shared, decentralized ISWorkshop HUB admin menu.

Requirements

  • WordPress 6.5 or newer.
  • PHP 8.1 or newer.
  • WooCommerce installed and active.
  • An OpenAI API key.
  • OpenSSL when storing the API key in WordPress.
  • Rank Math is optional.

The plugin has been tested with WordPress up to version 7.0.

Installation

  1. Download the release ZIP file.
  2. In WordPress Admin, go to Plugins → Add New Plugin → Upload Plugin.
  3. Upload the ZIP file and activate ISW AI Product Description Generator.
  4. Open ISWorkshop HUB → ISW AI Generator.
  5. Configure the API key and generation preferences.
  6. Edit a WooCommerce product and open Product Data → ISW AI generator.

The plugin directory must use the following slug:

isw-ai-product-description-generator

OpenAI API key configuration

The API key is resolved in this order:

  1. The ISW_AI_PRODUCT_DESCRIPTION_GENERATOR_OPENAI_API_KEY constant.
  2. The OPENAI_API_KEY environment variable.
  3. The encrypted WordPress option configured in the plugin settings.

The recommended wp-config.php configuration is:

define(
    'ISW_AI_PRODUCT_DESCRIPTION_GENERATOR_OPENAI_API_KEY',
    getenv( 'OPENAI_API_KEY' ) ?: ''
);

When a key is available, the settings page displays stars as a status indicator. The stored key itself is never returned to the browser. Entering a new value replaces the key stored in WordPress; leaving the field unchanged keeps the existing key.

Usage

  1. Open a WooCommerce product for editing.
  2. Select ISW AI generator in the Product Data panel.
  3. Choose the content type to generate.
  4. Optionally provide additional instructions.
  5. Select Generate preview.
  6. Review and edit the generated fields.
  7. Select only the fields you want to save.
  8. Select Apply selected content.

Generating a preview never updates the product automatically.

Security and privacy

  • Dedicated nonces protect generation and apply requests.
  • Generator access requires use_isw_ai_product_description_generator.
  • Settings access requires manage_isw_ai_product_description_generator.
  • The user must also have permission to edit the requested product.
  • Request data is validated, unslashed, and sanitized.
  • Generated output is sanitized before preview and again before storage.
  • API requests use WordPress safe HTTP functions, reject redirects, and use a bounded timeout.
  • Stored API keys are encrypted with AES-256-GCM using key material derived from WordPress security salts.
  • If secure encryption is unavailable, the API key is not stored in WordPress.
  • API keys, prompts, product content, and generated content are not written to diagnostic logs.
  • OpenAI requests use store: false.
  • Per-user daily limits and short per-product request locks help prevent abuse and duplicate requests.

When a user selects Generate preview, the plugin sends the product name, SKU, product type, categories, tags, attributes, shortened existing descriptions, and optional additional instructions to OpenAI. Do not include personal or confidential information in product fields or instructions. OpenAI API usage may incur charges under the API account associated with the configured key.

The plugin keeps a bounded audit history containing timestamps, user IDs, actions, selected fields, model names, and OpenAI request IDs. Generated content and API keys are not stored in this history.

WordPress capabilities

Activation grants the following capabilities to administrators and shop managers:

use_isw_ai_product_description_generator
manage_isw_ai_product_description_generator

Custom roles may receive either capability separately.

ISWorkshop HUB compatibility

The plugin does not require a dedicated HUB master plugin. Every ISWorkshop plugin may include its own namespaced HUB engine and use the same parent slug:

isworkshop-hub

Each engine checks whether the parent menu already exists before creating it. Every plugin then registers only its own child settings page with a plugin-specific capability. This allows plugins such as ISW AI Generator, ISW Events, and ISW ML to coexist without depending on activation order.

Example child registration:

add_submenu_page(
    'isworkshop-hub',
    'ISW Events',
    'ISW Events',
    'manage_isw_events',
    'isw-events',
    $callback
);

Uninstall behavior

Uninstalling the plugin removes:

  • Plugin settings.
  • The encrypted API-key option.
  • Plugin-specific product metadata.
  • Rate-limit and request-lock transients.
  • Plugin capabilities.

Descriptions and Rank Math metadata that a user explicitly applied are retained as product content.

Project structure

isw-ai-product-description-generator/
├── assets/
│   ├── css/admin.css
│   └── js/admin.js
├── includes/
│   ├── class-admin.php
│   ├── class-api-client.php
│   ├── class-compatibility.php
│   ├── class-generator.php
│   ├── class-hub.php
│   ├── class-logger.php
│   ├── class-plugin.php
│   ├── class-prompt-builder.php
│   ├── class-rank-math-compatibility.php
│   ├── class-rate-limiter.php
│   ├── class-settings.php
│   └── class-woocommerce-compatibility.php
├── languages/
├── isw-ai-product-description-generator.php
├── LICENSE
├── README.md
├── readme.txt
└── uninstall.php

Changelog

1.1.0

  • Added the decentralized ISWorkshop HUB admin menu engine.
  • Moved settings to ISWorkshop HUB → ISW AI Generator.
  • Added a masked indicator for a configured API key.
  • Improved Plugin Check compatibility and request validation.

1.0.0

  • Initial release.

Srpski

Pregled

ISW AI Product Description Generator je WordPress i WooCommerce plugin za ručno generisanje opisa proizvoda i SEO predloga preko OpenAI API-ja. Plugin dodaje karticu ISW AI generator u WooCommerce Product Data panel.

Administratori i shop manager korisnici mogu da generišu, pregledaju, izmene i pojedinačno primene sadržaj. Postojeći podaci proizvoda nikada se ne menjaju automatski.

Podešavanja plugina nalaze se na:

WordPress administracija → ISWorkshop HUB → ISW AI Generator

Mogućnosti

  • Generisanje kratkog opisa proizvoda.
  • Generisanje glavnog opisa proizvoda.
  • Generisanje oba opisa u jednom zahtevu.
  • Generisanje SEO naslova.
  • Generisanje SEO meta opisa.
  • Generisanje predloga ključnih reči.
  • Generisanje svih podržanih polja odjednom.
  • Pregled i izmena svakog generisanog polja pre čuvanja.
  • Pojedinačan izbor polja koja treba primeniti.
  • Očuvanje postojećih podataka dok korisnik izričito ne primeni izabrana polja.
  • Upis opisa preko WooCommerce CRUD API-ja.
  • Upis izabranih SEO vrednosti u Rank Math meta podatke kada je Rank Math aktivan.
  • Čuvanje SEO predloga u meta poljima plugina kada Rank Math nije dostupan.
  • Podešavanje jezika, tona, OpenAI modela, vremena čekanja i dnevnog limita po korisniku.
  • Integracija sa zajedničkim decentralizovanim ISWorkshop HUB menijem.

Zahtevi

  • WordPress 6.5 ili noviji.
  • PHP 8.1 ili noviji.
  • Instaliran i aktivan WooCommerce.
  • OpenAI API ključ.
  • OpenSSL ako se API ključ čuva u WordPress opcijama.
  • Rank Math nije obavezan.

Plugin je testiran sa WordPress verzijama do 7.0.

Instalacija

  1. Preuzmite ZIP paket odgovarajuće verzije.
  2. U WordPress administraciji otvorite Plugins → Add New Plugin → Upload Plugin.
  3. Otpremite ZIP i aktivirajte ISW AI Product Description Generator.
  4. Otvorite ISWorkshop HUB → ISW AI Generator.
  5. Podesite API ključ i parametre generisanja.
  6. Otvorite WooCommerce proizvod i izaberite Product Data → ISW AI generator.

Folder plugina mora imati sledeći slug:

isw-ai-product-description-generator

Podešavanje OpenAI API ključa

API ključ se učitava sledećim redosledom:

  1. Konstanta ISW_AI_PRODUCT_DESCRIPTION_GENERATOR_OPENAI_API_KEY.
  2. Environment promenljiva OPENAI_API_KEY.
  3. Šifrovana vrednost sačuvana u WordPress opcijama.

Preporučeno podešavanje u wp-config.php fajlu:

define(
    'ISW_AI_PRODUCT_DESCRIPTION_GENERATOR_OPENAI_API_KEY',
    getenv( 'OPENAI_API_KEY' ) ?: ''
);

Kada je ključ dostupan, stranica podešavanja prikazuje zvezdice kao potvrdu. Stvarni sačuvani ključ nikada se ne vraća u pregledač. Unos nove vrednosti zamenjuje ključ sačuvan u WordPress-u, dok neizmenjeno prazno polje zadržava postojeći ključ.

Korišćenje

  1. Otvorite WooCommerce proizvod za uređivanje.
  2. U Product Data panelu izaberite ISW AI generator.
  3. Izaberite vrstu sadržaja koji želite da generišete.
  4. Po potrebi unesite dodatna uputstva.
  5. Kliknite Generate preview.
  6. Pregledajte i po potrebi izmenite generisana polja.
  7. Označite samo polja koja želite da sačuvate.
  8. Kliknite Apply selected content.

Samo generisanje preview-a nikada automatski ne menja proizvod.

Bezbednost i privatnost

  • Svaki zahtev za generisanje i primenu sadržaja zaštićen je posebnim nonce-om.
  • Za korišćenje generatora potrebna je capability vrednost use_isw_ai_product_description_generator.
  • Za upravljanje podešavanjima potrebna je capability vrednost manage_isw_ai_product_description_generator.
  • Korisnik mora imati i dozvolu za uređivanje konkretnog proizvoda.
  • Ulazni podaci se proveravaju, normalizuju i sanitizuju.
  • Generisani sadržaj sanitizuje se pre preview-a i ponovo pre čuvanja.
  • API zahtevi koriste bezbedne WordPress HTTP funkcije, ne prate redirekcije i imaju ograničeno vreme čekanja.
  • API ključ sačuvan u WordPress-u šifruje se AES-256-GCM algoritmom, korišćenjem materijala izvedenog iz WordPress security salt vrednosti.
  • Ako bezbedno šifrovanje nije dostupno, API ključ se ne čuva u WordPress-u.
  • API ključevi, promptovi, podaci proizvoda i generisani sadržaj ne upisuju se u dijagnostičke logove.
  • OpenAI zahtevi koriste store: false.
  • Dnevni limit po korisniku i kratki lock po proizvodu smanjuju zloupotrebe i duple zahteve.

Kada korisnik klikne Generate preview, OpenAI-ju se šalju naziv proizvoda, SKU, tip proizvoda, kategorije, tagovi, atributi, skraćeni postojeći opisi i opciona dodatna uputstva. Nemojte unositi lične ili poverljive podatke u polja proizvoda ili dodatna uputstva. Korišćenje OpenAI API-ja može proizvesti troškove na API nalogu čiji je ključ podešen.

Plugin čuva ograničenu istoriju aktivnosti koja sadrži vreme, ID korisnika, vrstu akcije, izabrana polja, naziv modela i OpenAI request ID. Generisani sadržaj i API ključevi ne čuvaju se u ovoj istoriji.

WordPress dozvole

Prilikom aktivacije plugin administratorima i shop manager korisnicima dodeljuje:

use_isw_ai_product_description_generator
manage_isw_ai_product_description_generator

Prilagođenim ulogama moguće je pojedinačno dodeliti bilo koju od ovih capability vrednosti.

ISWorkshop HUB kompatibilnost

Plugin ne zahteva poseban HUB master plugin. Svaki ISWorkshop plugin može da sadrži sopstveni namespaced HUB engine i koristi zajednički parent slug:

isworkshop-hub

Svaki engine proverava da li parent meni već postoji pre nego što pokuša da ga kreira. Nakon toga plugin registruje samo svoju child stranicu sa sopstvenom capability proverom. Na ovaj način pluginovi kao što su ISW AI Generator, ISW Events i ISW ML mogu raditi zajedno bez zavisnosti od redosleda aktivacije.

Primer registracije child stranice:

add_submenu_page(
    'isworkshop-hub',
    'ISW Events',
    'ISW Events',
    'manage_isw_events',
    'isw-events',
    $callback
);

Deinstalacija

Deinstalacijom se uklanjaju:

  • Podešavanja plugina.
  • Šifrovana WordPress opcija sa API ključem.
  • Meta podaci proizvoda specifični za plugin.
  • Transient vrednosti za limitiranje i zaključavanje zahteva.
  • Capability vrednosti plugina.

Opisi i Rank Math meta podaci koje je korisnik izričito primenio ostaju sačuvani kao sadržaj proizvoda.

Struktura projekta

isw-ai-product-description-generator/
├── assets/
│   ├── css/admin.css
│   └── js/admin.js
├── includes/
│   ├── class-admin.php
│   ├── class-api-client.php
│   ├── class-compatibility.php
│   ├── class-generator.php
│   ├── class-hub.php
│   ├── class-logger.php
│   ├── class-plugin.php
│   ├── class-prompt-builder.php
│   ├── class-rank-math-compatibility.php
│   ├── class-rate-limiter.php
│   ├── class-settings.php
│   └── class-woocommerce-compatibility.php
├── languages/
├── isw-ai-product-description-generator.php
├── LICENSE
├── README.md
├── readme.txt
└── uninstall.php

Istorija izmena

1.1.0

  • Dodat decentralizovani ISWorkshop HUB admin meni.
  • Podešavanja su premeštena u ISWorkshop HUB → ISW AI Generator.
  • Dodat je maskirani indikator podešenog API ključa.
  • Poboljšana je kompatibilnost sa Plugin Check alatom i validacija zahteva.

1.0.0

  • Prvo izdanje.

License / Licenca

ISW AI Product Description Generator is licensed under the GNU General Public License v2.0 or later.

ISW AI Product Description Generator objavljen je pod GNU General Public License v2.0 ili novijom.