Skip to main content

Product Designer

Overview​

Product Designer lets a customer personalise a product — text and images placed inside print areas you define — before adding it to the cart. The design is saved with a preview image, travels with the cart item into the order, and appears on the order screen with its preview and production file for you to download.

Files stay on your own site, in the WordPress uploads folder. Nothing is sent to an external storage service.

It is a premium module. Enable it from Empora → Modules once your license includes product-designer; enabling it creates its two tables and schedules the daily cleanup job.

Availability​

ItemValue
Module keyproduct-designer
TierPremium — lowest plan Business
Entitlement keyproduct-designer
Enabled optionaiowc_module_enabled_product-designer (off until enabled)
REST namespaceaiowc/v1

Product templates​

The designer is switched on per product, through that product's template.

Template fieldValues
EnabledShows the designer on this product.
RequiredThe product cannot be added to the cart without a design.
Print areas1–10 areas, each with a name, its position on the product image, and its printed width and height.
FontsUp to 20 fonts customers may use.
Ink coloursUp to 50 colours customers may use.
Uploads0–20 images per design; allowed types png, jpg and svg (PNG and JPG by default); 1–50 MB each (10 by default).
Sharpness minimum300–10,000 px (1,500 by default). A smaller upload is accepted with a warning that it may print soft.
Production formatpng300 (default), pdf or svg, recorded on the template. The production file is currently saved as a PNG.

A design may contain only text layers and image layers. An image layer can reference only an upload the module itself stored, never an outside URL, and every position is kept inside its print area.

SVG uploads

SVG is off unless a template allows it. When it is allowed, each SVG is rebuilt from a list of safe drawing elements and attributes: scripts, event handlers, embedded content and outside links are removed, and a file that cannot be reduced to that safe form is refused.

Settings​

Stored in the bundled option row aiowc_pd_settings.

KeyDefaultWhat it does
max_design_kb200Largest saved design (10–2,048 KB).
max_preview_kb2048Largest preview image (100–8,192 KB).
max_layers50Layers per design (1–200).
draft_retention_days30Designs never ordered, and uploads no order uses, are deleted after this (1–365 days).
ordered_upload_retention90dCustomer uploads on an order are deleted 90d or 1y after the order is completed, or kept (never). The design and its production file are always kept.

The settings response also reports where files are stored: uploads.

Where files are kept​

Files are saved under wp-content/uploads/aiowc-designs/ in year and month folders, with random 32-character names, a .htaccess that blocks direct requests on Apache, and an empty index.php.

Servers that ignore .htaccess

On nginx and other servers that ignore .htaccess, the random file name is the only thing preventing a direct download. Add a rule denying direct access to wp-content/uploads/aiowc-designs/. Administrators download files through authenticated REST routes, and file paths are never shown to customers.

REST API endpoints​

MethodPathWhoPurpose
POST/product-designer/designsStorefront, guests includedSave a design with its preview; returns a design key.
POST/product-designer/uploadsStorefront, guests includedUpload an image; returns its key, size, effective DPI and any warnings.
GET/product-designer/products/{id}/templateAdministratorRead a product's template.
PUT / PATCH / POST/product-designer/products/{id}/templateAdministratorSave a product's template.
GET/product-designer/orders/{order_id}/designsAdministratorThe designs on an order.
GET/product-designer/designs/{key}/previewAdministratorDownload the preview image.
GET/product-designer/designs/{key}/productionAdministratorDownload the production file.
GET/product-designer/settingsAdministratorRead the settings.
PUT / PATCH / POST/product-designer/settingsAdministratorUpdate the settings.

The two storefront routes require the WordPress REST nonce and are rate limited per IP address.

Database schema​

TableHolds
{prefix}aiowc_product_designsOne row per design: its key, product, customer, design data, file paths, order and status.
{prefix}aiowc_product_design_uploadsOne row per customer upload: its key, owner, type, size and file path.

WooCommerce integration​

  • The designer's configuration loads only on products whose designer is enabled; every other page is unaffected.
  • Add to cart carries the design key. It must belong to a draft design for that same product, and a product whose template requires a design refuses the add without one.
  • At checkout the design is attached to the order line and marked as ordered.
  • The order screen shows each personalised line's preview and production-file links. Orders are read through WooCommerce's order API, so HPOS stores are supported.

Background jobs​

DraftCleanupJob (aiowc_product_designer_cleanup) runs daily, 200 rows at a time. It deletes expired drafts and unused uploads, applies the ordered-upload retention, and never removes an ordered design. It is unscheduled when the module is disabled; rows and files stay.

Entitlement limits​

The entitlement is a single on/off grant. Without product-designer the module stays locked and none of the above loads.