WooCommerce integration

Add virtual try-on to WooCommerce product pages

A WooCommerce integration should call TryRobe from WordPress server code or a protected service—not from public browser JavaScript. The repository contains a WooCommerce integration package, but each merchant deployment still requires secure configuration, product eligibility, and consent handling.

WordPress server-side flow

A product-page button collects approved input, sends it to a protected WordPress AJAX or REST handler, and that handler calls TryRobe with the merchant's Business license key.

  • Check WordPress nonce and customer session
  • Validate file type and size
  • Call TryRobe from PHP or a protected service
  • Persist the asynchronous job ID
  • Return only safe status and result data

Do not expose the license key

Use server configuration outside the public uploads and theme directories. Restrict WordPress administrator access and rotate the key if it appears in HTML, JavaScript, logs, or a public backup.

Operational rollout

Start with a small eligible category, test common themes and caching plugins, and ensure page caches never store one shopper's private result for another shopper.

Frequently asked questions

Can the integration run entirely in a WooCommerce theme?

No. The UI can live in the theme, but authenticated TryRobe calls must run in trusted server-side code.

What about WordPress page caching?

Private upload state and result URLs must bypass shared page caches and should be scoped to the correct customer session.