=== 3dGallery ===
Tags: gallery, woocommerce, 3d, exhibition
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.8.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your 3dGallery account, embed walkable 3D exhibitions, and optionally import WooCommerce products.

== Description ==
3dGallery connects WordPress to the hosted 3D exhibition editor at https://3dgallery.pro. Create a walkable exhibition, publish it, and embed it using a block or shortcode. Editing a draft does not change the live exhibition: publish an update to refresh the same embedded URL.

Embedding existing exhibitions works with every service plan and does not require WooCommerce. Free accounts can show up to 10 artworks and include visible 3dGallery attribution. WooCommerce product import and connected cart features require the hosted service's E-commerce plan. The plugin itself has no paid code, license-key activation or time-limited trial.

Choose your 3dGallery account from the setup wizard, approve your WordPress website on the service, and return to WordPress. The plugin shows the connected account and lets you choose a published exhibition. Passwords and Google credentials are never shared with WordPress. A manual one-use connection code remains available as a fallback.

The plugin sends selected public product data and optimized product images after account connection / import. The separate, explicit "Sync all public products to Studio" action sends the public catalogue's titles, descriptions, prices and mapped dimensions without importing all images or generating galleries. It enables catalogue updates on future product changes. It can be stopped independently, preserving previously synchronized data. Optional gallery order analytics sends only attributed order identifiers, status, currency, totals, refunds and consenting gallery item/session identifiers. Customer names, emails, addresses, payment credentials and WooCommerce REST API keys are never transferred.

The 3dGallery iframe contacts its own configured service to display your publication. Cart operations happen on your WordPress site and native WooCommerce checkout handles payments. 3dGallery subscription payments are separate.

== Installation ==
1. Install the 3dGallery ZIP via Plugins > Add New > Upload Plugin and activate. Directory search installation becomes available after WordPress.org approves and publishes this plugin.
2. Open WordPress > 3dGallery and choose your 3dGallery account. Sign in on 3dgallery.pro and explicitly approve the displayed website address.
3. WooCommerce sites continue to step 2: Product fields. Map width, height, length, depth/thickness and weight separately, with units. Product overrides win over ordered category rules and defaults. Preview an actual product by name/SKU/ID. Raw custom field names and values remain in WordPress.
4. Step 3 syncs all public, published catalogue products (2000 per account maximum), with metadata and image descriptors only. Resume interrupted sync without resetting captured maps. Open Studio; the plugin does not create galleries.
5. In Studio > WooCommerce products, choose products, source images or custom photos, presentation and placement. Add manually or preview an automatic new/append layout. Apply to draft, then publish separately. Rebuild is explicit with a recovery checkpoint. Catalogue changes never automatically rewrite or publish exhibitions.
6. Return to WordPress step 3, refresh exhibitions and allow embedding. Copy each published gallery’s [3dgallery id="GALLERY_UUID"] shortcode or choose it in the block. [3dgallery] follows the default and [gallerylab] remains compatible.

Simple products and explicit product variations support cart actions. Products with complex options, "Any" attribute variations, more than 100 variations, grouped/external/custom product types use the native product page. Native gateway/checkout plugins keep their existing WooCommerce behavior. Image processing requires GD or Imagick; Action Scheduler or WP-Cron handles catalogue updates. Cart requests always verify current stock and price in WooCommerce.

HTTPS is required for production. WP_DEBUG permits HTTP loopback for local verification. Disconnect in 3dGallery to revoke the stored connection credential. Plugin deactivation stops queued sync actions; it does not erase products, orders, galleries or 3dGallery account data.

== External service and privacy ==
This plugin requires the 3dGallery service for hosting and editing exhibitions. Service website: https://3dgallery.pro. Terms: https://3dgallery.pro/terms. Privacy notice: https://3dgallery.pro/privacy. Operator: MacoLabs, Varga István Bertalan, registered in Hungary.

Before connecting, the plugin does not contact the service automatically. When you choose an account, your site URL, site name and interface language (English or Hungarian) are sent to 3dGallery to create a ten-minute authorization request. After your approval, WordPress stores a private connection credential and can request your account name, email, plan and published exhibition list. The credential and temporary polling secret are never exposed to frontend scripts or embeds.

WooCommerce import sends selected public product identifiers, titles, descriptions, categories, links, prices, availability, dimensions, modification times and optimized product images. The separate opt-in Studio catalogue sync sends these public metadata fields and SKU for all public products, without images or raw custom fields, and enables later metadata updates. It can be stopped independently. No customer profiles, payment credentials or WooCommerce REST API keys are transferred.

Paid hosted galleries provide first-party analytics, only after visitors explicitly allow measurement; no Google Analytics is required. The viewer measures visits, active time, artwork opens, links, shortlists, audio/tour/fullscreen actions, country, coarse device/browser/OS and referral domain/channel. No IP address, raw user agent, precise location or full referral URL is retained in analytics. Refusing measurement does not restrict gallery use; browser GPC/DNT is respected. Privacy controls stop tracking and remove this visit's measurement and browser identifier. Raw analytics in the service expires after 90 days.

Optional hosted AI guides require a separate visitor opt-in and an explicit voice or typed conversation start. The visitor’s voice/text and public exhibition facts are processed by ElevenLabs Agents and its managed model; 3dGallery does not save recordings or transcripts. The hosted viewer delegates microphone permission, but no microphone or AI connection starts automatically. Declining does not restrict gallery browsing. ElevenLabs privacy information: https://elevenlabs.io/privacy-policy. EEA terms: https://elevenlabs.io/terms-of-use-eu. Processor terms: https://elevenlabs.io/dpa. Provider terms and processor agreements must be reviewed before enabling the feature publicly; see the 3dGallery privacy notice for its service-specific processing.

Order reporting is a separate administrator opt-in at setup step 3. It attributes only consenting gallery cart lines, using WooCommerce's native line-item metadata and HPOS-compatible order APIs, including block checkout. It sends the internal order ID, modification revision, status, currency/precision, total/refund amounts and attributed product quantities/session identifiers; no customer name, email, address, card, payment gateway credentials or unrelated product list. Native checkout stays in the store. Whole-order value can include products bought outside the gallery, taxes and shipping; attributed line value excludes tax. Returns and retries update one record per order. Order attribution metadata remains in the merchant's own WooCommerce order under its retention policy; stopping reporting does not delete shop orders or previous service summaries.

Embedding is an explicit opt-in. Visitors' browsers load the hosted viewer and selected exhibition media from the service, disclosing ordinary network request information such as IP address and user agent to its infrastructure. The viewer may store visitor graphics preferences and artwork shortlists in the visitor's browser as described in the service privacy/cookie notices. Free exhibition attribution is shown only after the site administrator explicitly allows embedding. The plugin adds no advertising analytics, tracking pixel or unrelated remote code downloads.

Disconnect in the plugin to revoke the remote connection as well as remove its local credential. Deactivation stops scheduled synchronization but preserves settings. Uninstall removes local plugin options and scheduled jobs; it does not delete remote exhibitions, media, accounts, orders or products. Revoke the website in 3dGallery before uninstalling if you want to invalidate its remote credential too.

== Frequently Asked Questions ==
= Can I use this without WooCommerce? =
Yes. Connect a Free account to choose its published exhibition or manually provide a published 3dGallery URL. Use the block or [3dgallery] shortcode. The existing [gallerylab] shortcode is also supported.

= Do changes appear automatically on my website? =
After saving your changes in the service, publish the updated exhibition. Its URL remains unchanged, so the WordPress embed does not need replacement. WooCommerce synchronization updates the catalogue; layout rebuilding and publishing are separate reviewed actions Publishing is always a separate Studio action in the new workflow.

= Where are checkout and payments handled? =
On your own WooCommerce site using its existing checkout and payment gateways. 3dGallery does not process your customers' payments.

= Can I switch accounts? =
Disconnect the current connection in the wizard, then choose another account. This preserves your remote exhibitions and WordPress products. On the authorization screen, use another account before approving if the displayed account is wrong.

= Is this an AI plugin? =
Exhibition layout, media and 3D models are built without AI. An optional hosted AI voice guide is a separate service feature: visitors explicitly consent and start voice or typed conversation before any conversation data is processed. The plugin never requests the microphone itself.

== Screenshots ==
1. Map five physical product fields and units, with a resolved-value preview (example QA store).
2. Select a connected account's published exhibition and explicitly allow embedding (example QA account).
3. Explore the embedded exhibition with product details and native WooCommerce checkout links (example QA store).

== Changelog ==
= 0.8.2 =
* Allow visitor-initiated microphone use in hosted gallery embeds for optional AI guides. No recording or microphone request starts automatically.
* Connection settings, field maps and shortcode IDs are preserved.

= 0.8.1 =
* Sync numeric display prices, currency and original product creation dates for accurate Studio filtering and sorting.
* Preserve all field maps, connection settings and shortcodes.

= 0.8.0 =
* Dedicated Setup, Features and Help tabs with responsive, accessible admin controls.
* Versioned downloads; saved connection and field maps remain intact on replacement.
* Reconnecting after a service-side data reset preserves local field mappings.


= 0.7.1 =
* Catalogue sync buttons wait for their handlers to load, preventing lost clicks on a slow connection. Saved connections, field maps, galleries and shortcode IDs are preserved.

= 0.7.0 =
* Three-step connection, independent physical field maps and complete metadata catalogue sync; create galleries in Studio.
* Signed, product-bound image export with expiry/replay protection, authenticated thumbnails and on-demand selected image transfer.
* Preserve connection, maps, shortcodes and paused legacy generation jobs during replacement upgrades.

= 0.6.0 =
* First-party gallery analytics with visitor consent, private Pro/E-commerce dashboards and 90-day service retention.
* Explicit opt-in gallery order attribution for native WooCommerce checkout, including blocks/HPOS, bounded retries and refunds.
* Measurement withdrawal clears attribution from the current shop cart; store products, payment gateways and orders remain intact.

= 0.5.1 =
* Opt-in full public product catalogue for Studio, independently of gallery selection and image import.
* Selective artwork/product pairing in Studio, with per-field import and optional WooCommerce cart.
* Preserve import settings and gallery layout; partial mapped dimensions never use invented measurements.

= 0.5.0 =
* Separate shortcode and block selection for every published gallery; create and update multiple store exhibitions.
* Shared multi-product floating shelves and stacked rows in automatic layouts.
* Separate high-resolution gallery product images survive sync; webshop product images remain unchanged.
* Hardened API content types, private response caching and concurrent image updates. Settings and interrupted jobs remain.


= 0.4.2 =
* Floating wall shelf placement rules and product overrides. Generated rooms reserve arrival space and connected aisles using complete support footprints. Existing settings survive replacement.

= 0.4.1 =
* Preserve original WebP/PNG/JPEG bytes; reuse fitting WebP images without recompression. No forced PNG conversion.
* Select 4096 px (default) or 2048 px for the longest texture side; proportional resizing, no upscaling, separate 512 px thumbnails.
* Per-image source limit 10 MiB / 40 megapixels, WebP texture 4 MiB. Original media and merchant files stay unchanged.
* ZIP replacement preserves connection, product selection, dimension mapping, placement rules and interrupted import progress. Existing jobs without a resolution use 4096 px.
* Re-activation of an existing setup no longer redirects to the first step.

= 0.4.0 =
* Fixed account authorization skipping directly to the final wizard step.
* Added individual product search / selection with pagination and persistent selections.
* Added explicit dimension field mapping, local numeric custom field / ACF / attribute discovery, unit conversion and per-product measurement review.
* Added rug appearance and clear draft, editor, publication and embedding guidance. Invalid dimensions block import instead of silently resizing products.
= 0.3.1 =
* Updated the public product name to 3dGallery in setup, blocks and translations. Existing plugin paths, connections and shortcodes are preserved.
* Added the [3dgallery] shortcode alongside the compatible [gallerylab] alias.
= 0.3.0 =
* Added explicit browser-based account authorization with private server polling, account identification and published exhibition selection.
* Added server-side revocation on disconnect, explicit embed/attribution consent, uninstall cleanup and WordPress.org service disclosures.
* Default hosted service is https://3dgallery.pro; existing manual connection codes remain supported.

= 0.2.0 =
* Added setup wizard, ordered category/tag placement rules and per-product placement overrides.

== Upgrade Notice ==
= 0.8.1 =
Replace the existing ZIP without uninstalling, then sync the catalogue again to send numeric prices and original product dates. Field maps and connections remain. Gallery changes are still reviewed and published in Studio.

= 0.8.0 =
Replace the existing plugin without uninstalling. Connection and mappings remain. If you reset your service account data, reconnect in Setup and sync again; merchant products and orders are never deleted.

= 0.7.1 =
Replace the installed ZIP without uninstalling. This fixes clicks during catalogue-control loading. Your account connection, field maps, synced catalogue and published galleries remain unchanged.

= 0.7.0 =
Replace the installed ZIP; do not uninstall. Connection, field maps and publications remain. Legacy gallery-generation jobs are preserved and paused. Map physical fields, sync the catalogue, then create or update layouts in Studio and publish separately.

= 0.4.1 =
Upload the ZIP and replace the existing plugin; do not uninstall it. Saved settings and an interrupted import remain. Return to step 3 and use Import / resume. No new connection or fresh import is required. Install after the matching 3dGallery service update.

= 0.4.0 =
Connections and galleries are preserved. Open Products and settings to select products and confirm dimension fields. Rebuild explicitly to apply new sizes to an existing layout; review the recovery version and publish when ready.
= 0.3.0 =
Existing connections and galleries are preserved. Open 3dGallery > Embed to explicitly allow hosted embedding and attribution before displaying an exhibition.

== Source code ==
All plugin PHP, JavaScript and CSS are human-readable and included in this package. There is no compiled frontend build step for the plugin. Development repository: https://github.com/whereismaco/GalleryLab/tree/codex/curation-materials/wordpress/gallerylab. The separately hosted viewer runs inside its service iframe; it is not downloaded or executed as WordPress server code.

== Placement rules ==
Presentation and placement are chosen in Studio. Products can use painting/print, rug or camera-facing object photos on walls, floors, shared shelves or pedestals. Automatic layouts reserve arrival space and walking paths. Existing gallery generation jobs and their old rules are preserved but paused. No AI is used.

== Dimension fields ==
Five independent physical axes: width, height, length, depth/thickness, weight. Sources can be standard WooCommerce fields, numeric product custom fields/ACF or attributes. Product override > first matching category (including descendants) > default. Units are explicit; ambiguous combined values are flagged, not guessed. Physical values are normalized to metres/kg; only these selected values leave WordPress. In Studio, choose the height or length as display height. Missing display width/height requires mapping or manual placement; display thickness defaults are explicitly shown. Weight does not scale geometry.
