=== 3dGallery ===
Tags: gallery, woocommerce, 3d, exhibition
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.5.0
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 only selected public product data and optimized product images to the configured 3dGallery service after account connection / import. Product change jobs synchronize public catalogue data. Orders, customer details, payment credentials and WooCommerce REST API keys are never sent to 3dGallery.

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. Return to WordPress; WooCommerce users continue to step 2, Products and settings. Select individual products with search and pagination, or a whole category. Sites without WooCommerce can choose an already published gallery directly.
4. Map width, height / length and optional depth to WooCommerce shipping fields, numeric custom fields (including ACF) or product attributes. Confirm each unit. Review exact converted centimetres, missing measurements and ordered category / tag placement rules before starting import. Choose rug appearance for flat floor or hanging rugs. Floating wall shelves can display pillows and small objects. Each automatic shelf counts as one additional furnishing. Failed imports resume using the captured selection, field mapping and placement rules.
5. Open the created draft using Open gallery editor and publish. Arrange it in the hosted editor, then use Export > Live gallery > Publish. Return to step 4, refresh exhibitions, select the published gallery and allow embedding / Free attribution before finishing setup.
6. Add a 3dGallery block or [3dgallery] shortcode to your WordPress / Elementor page. Existing [gallerylab] shortcodes and publication URLs keep working. Changes to product selection, appearance or imported sizes require an explicit layout rebuild; normal updates preserve hand-edited layouts.

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. After connection and import, product-change background jobs update imported public catalogue data. No orders, customers, payment credentials or WooCommerce REST API keys are transferred.

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 unless you explicitly enable publish-after-import.

= 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? =
No. Images, dimensions and your explicit placement rules determine the exhibition. No AI service is used.

== Screenshots ==
1. Select individual products and map real dimensions from custom product fields before import (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.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.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 ==
An individual product's 3dGallery placement (Product data > General) overrides tag rules, which override category rules, which override the default. The first matching rule within each group wins; use Move up / down to set priority. Parent category rules include subcategories. Deleted terms are ignored until their obsolete rules are removed. Product photos remain camera-facing images on floors / pedestals. No image recognition or AI is used. A gallery can contain at most 250 objects including pedestals (125 products if all need pedestals).

== Dimension fields ==
Numeric candidates are discovered from up to 50 local published products. Mapping is explicit: WooCommerce width / height / length, meta:field_name (ACF stores numeric fields as product meta), or attribute:attribute_name. The setup preview shows width x height / length x thickness in centimetres. Separate units may be set for each axis; decimal comma and mm/cm/m/in/yd suffixes are accepted. Combined strings, grouped values and multiple attribute options are not guessed. Empty depth uses the configured default thickness. Missing width / height blocks import unless image estimates are explicitly allowed. Existing legacy connections retain their old estimate behavior until field mapping is saved. Raw custom fields and field names stay in WordPress; only validated physical dimensions are transmitted to 3dGallery. Normal refresh preserves edited sizes; an explicit rebuild applies changed sizes to the gallery.
