=== TillFoundry All Product Reviews for WooCommerce ===
Contributors: lijnam
Tags: woocommerce, reviews, product reviews, ratings, testimonials
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.26.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show every product review in one place with six designs, filters, moderation and CSV export. Customers can submit their own photo reviews.

== Description ==

All Product Reviews is free, with no paid tier, licence key or upgrade prompt: every design, block, filter, the photo lightbox, the admin review screen and the Photo Review Form ship in this build. Customers can leave a rating, a written review and photos with the included Photo Review Form block; submitted reviews enter the normal moderation queue. The plugin also renders media that compatible photo-review tools have already stored, through the same `reviews-images` comment meta.

WooCommerce only shows reviews on the single product page. This plugin displays all approved product reviews together, with three ways to use it:

**1. The `[all_reviews]` shortcode**, on any page, post or widget. It renders an average rating and clickable 1–5 star distribution; approved reviews with avatar, author, rating, verified-owner badge, product link and date; compatible review photos and videos in a lightbox; filters for rating, sorting, verified owners, photos and optional search; and numbered, load-more or no pagination.

**2. Blocks**, including Customer Reviews, Reviews Hero, Featured Review, Review Rating Summary, Review Rating and Photo Review Form. Blocks support six designs, wide/full alignment, anchors, custom classes and spacing controls. The Photo Review Form prints a rating, a written-review field and photo uploads, and stores submissions in the normal review moderation queue.

**3. The admin screen**, in its own **All Reviews** menu: status and average-rating summaries; search, product, category, rating, status and verified-owner filters; moderation and restore actions; photo thumbnails; and CSV export of up to 20,000 selected reviews.

**Six designs.** Choose `customer-stories`, `journal`, `lookbook`, `stories`, `testimonials` or `list` in the Review Page settings, shortcode or block. They range from warm editorial pages with customer photos to a classic single-column list with detailed reviews.

The full reference — including block options, template overrides and CSS hooks — is available at <https://tillfoundry.com/docs/>.

Shortcode attributes:

* `layout` – one of the six designs: `testimonials`, `customer-stories`, `journal`, `lookbook`, `stories` or `list`. Defaults to the saved setting.
* `columns` – 1 to 4 columns for the card grid. Default `3`.
* `rows` – how many rows of reviews to show per page. Rows times columns sets the reviews per page, and overrides `per_page` when set.
* `title`, `eyebrow`, `intro` – section heading, small label and supporting paragraph.
* `hero_image`, `grid_title`, `closing_quote`, `closing_byline`, `gallery_title`, `gallery_note`, `cta_label`, `cta_url` – design-specific hero, gallery and closing-band content.
* `show_categories`, `masonry` – `yes`/`no` design options.
* `accent_color`, `bg_color`, `surface_color`, `text_color`, `heading_color`, `muted_color`, `line_color`, `star_color`, `button_color`, `button_text_color`, `badge_color`, `badge_text_color`, `chip_color`, `chip_text_color`, `overlay_color` – optional hex colours for design elements.
* `text_size` – `s`, `m` or `l`; `spacing` – `compact`, `comfortable` or `spacious`.
* `radius`, `photo_size`, `photo_height`, `avatar_size` – pixel sizes for visual elements.
* `accent` – hex colour for stars, buttons, active filters and links. Defaults to the saved setting.
* `per_page` – reviews per page. Default `10`.
* `product_id` – limit to one or more product IDs (comma separated), or `current` on a product page.
* `category` – limit to one or more product category slugs or IDs (comma separated).
* `rating` – only show a specific star rating (1–5).
* `verified` – `yes` or `no` to filter by verified owners.
* `photos` – `yes` to only show reviews with photos, `no` for reviews without photos. Existing images can come from attachment IDs or imported image URLs; supported video embeds load only after opening the lightbox.
* `orderby` – `date`, `rating` or `random`; `seed` fixes a random order; `order` is `DESC` or `ASC`.
* `status` – comment status to include. Default `approve`. Set by the site owner only; it can never be changed from the URL.
* `search` – pre-filled search term; `include_replies` – `yes` to include review replies. Default `no`.
* `show_summary`, `show_filters`, `show_photo_filter`, `show_search`, `show_product`, `show_avatar`, `show_date` – `yes`/`no` display options.
* `pagination` – `numbers`, `loadmore` or `none`. Default `numbers`.
* `empty_message` – text shown when there are no reviews.

Examples:

`[all_reviews per_page="20" pagination="loadmore"]`

`[all_reviews category="coffee,tea" orderby="rating" order="DESC"]`

`[all_reviews product_id="current" show_summary="no" per_page="5"]`

`[all_reviews photos="yes" show_photo_filter="yes" title="Customer photos"]`

**Designs can be customized** with the shortcode attributes above or the corresponding block controls.

**Requirements.** WordPress 5.8 or higher, PHP 7.4 or higher, and WooCommerce installed and active.

== Choosing a design ==

The Review Page settings choose a site-wide design and defaults. Individual shortcodes and blocks can override those defaults. The designs adapt to their container width and use system font fallbacks; the plugin ships no webfonts and makes no third-party request to load its own CSS, JavaScript or fonts.

== Review photos ==

Photos already attached to reviews by compatible collection tools are displayed automatically. The included Photo Review Form block also lets customers submit their own rating, written review and photos; uploaded images are stored as media library attachments and linked to the review through the same `reviews-images` comment meta. Collection is on by default and can be switched off with the `tillapr_feature_can` filter. Existing review images, videos and supported YouTube, Vimeo and Dailymotion links appear in the lightbox. Photo URLs are validated before rendering.

== Installation ==

1. Install the ZIP through *Plugins → Add New → Upload Plugin*, or upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen.
3. WooCommerce must be installed and active. A Customer Reviews page with the `[all_reviews]` shortcode is created on activation.
4. Add the shortcode or Customer Reviews block to a page to display your reviews.

== Frequently Asked Questions ==

= Does this plugin collect customer photos? =

Yes. The free Photo Review Form block lets customers submit a rating, a written review and photos. Uploaded images are stored in the media library and linked to the review; submitted reviews enter the pending moderation queue, and the display templates show the photos alongside media attached by compatible tools. A site can switch collection off with the `tillapr_feature_can` filter.

= Does it work with WooCommerce HPOS? =

Yes. The plugin reads product reviews stored as WordPress comments and declares HPOS compatibility.

= Can visitors see pending or spam reviews? =

No. The front end displays approved reviews of published products only.

= Which reviews are counted? =

Product reviews stored as WooCommerce review comments, plus plain comments WooCommerce itself queries. Reviews on trashed or draft products appear in the admin screen but never on the front end.

= Are visitors able to see pending or spam reviews? =

No. The front end only queries approved reviews of published products, enforced server-side for normal and AJAX requests regardless of URL parameters.

= Are results cached? =

Aggregate review statistics are cached in a transient and invalidated when a review is added, edited, moderated or deleted.

= Why can the average rating card differ from the distribution bars? =

The approved average is store-wide and counts approved reviews of published products. Distribution bars follow the selected filters and can include other statuses when selected.

= Do the blocks work with my theme's editor styles? =

Yes. Blocks use theme editor typography and the standard block wrapper. The review markup is styled by the plugin and supports alignment, spacing, custom classes and the accent colour.

= Can I show fit, temperature or audio reviews? =

WooCommerce does not store those fields, and the plugin does not invent them. If your store collects this data elsewhere, copy a design into your theme and add the fields there.

= Can I override templates? =

Yes. Copy files from `templates/` into `your-theme/all-product-reviews/`. The structure mirrors the plugin: shared page elements, `items/<layout>.php` templates and `partials/` building blocks. The pre-1.2 `review.php` override remains supported for the List design.

= Do the review photos work with my photo review plugin? =

The plugin reads the `reviews-images` comment meta, including attachment IDs, imported image URLs, supported video files and YouTube, Vimeo or Dailymotion links. For another meta key, use the `tillapr_review_images_meta_key` filter.

= How do I check which version is running? =

The version appears beside the title on the All Reviews screen and in the admin footer on the All Reviews and Review Page screens.

== External Services ==

This plugin contacts WordPress's avatar service (Gravatar) whenever a review avatar is displayed, and contacts a video provider only when a visitor opens a review video in the lightbox. These requests are made directly by the visitor's browser.

**Avatars (WordPress Gravatar).** When avatars are shown, the browser requests `https://secure.gravatar.com/avatar/<md5 hash of the review author's email address>`. The request sends the hashed email address, visitor IP address and browser user agent to Gravatar on every page that lists reviews, without any click by the visitor. Privacy policy: https://automattic.com/privacy/. Turn off avatars to prevent this request. Local avatar integrations can replace the service using WordPress avatar filters.

When a video is opened, the browser sends the video provider the visitor's IP address, browser user agent and page referrer. The plugin does not receive, log or store that data.

* **YouTube** (youtube.com) — player loaded from `https://www.youtube.com/embed/` when a review contains a YouTube link. Terms of Service: https://www.youtube.com/t/terms. Privacy Policy: https://policies.google.com/privacy.
* **Vimeo** — player loaded from `https://player.vimeo.com/video/` when a review contains a Vimeo link. Terms of Service: https://vimeo.com/legal. Privacy Policy: https://vimeo.com/legal/privacy/policy.
* **Dailymotion** (dailymotion.com) — player loaded from `https://www.dailymotion.com/embed/video/` when a review contains a Dailymotion or dai.ly link. Terms of Use: https://legal.dailymotion.com/en/terms-of-use/. Privacy Policy: https://legal.dailymotion.com/en/privacy-policy/.

If a store would rather not contact these video services, it can leave video links out of reviews. The lightbox still displays images and uploaded video files without contacting these providers.

== Screenshots ==

1. The front-end review page with rating summary, filters and review cards.
2. The All Reviews admin screen with summaries, filters and moderation.
3. The Review Page settings screen.
4. The lookbook: customer photos displayed from reviews as a storefront grid.
5. The review page on a phone.

== Changelog ==

= 1.26.1 =
* Aligns the text domain with the WordPress.org directory slug (`tillfoundry-all-product-reviews-for-woocommerce`) in the plugin header, every gettext call in PHP and JavaScript, the block metadata, the coding-standards config and the shipped gettext template, so Plugin Check no longer reports `WordPress.WP.I18n.TextDomainMismatch` and directory translation packs can load.
* Renames the gettext template to `languages/tillfoundry-all-product-reviews-for-woocommerce.pot` and realigns its `X-Domain`, `Project-Id-Version` and bug-report URL. The translatable strings themselves are unchanged.
* No feature, setting, hook or stored value changes.

= 1.26.0 =
* Enables photo review collection in the free build. The plugin has no paid tier, so the Photo Review Form lets customers submit a rating, a written review and photos out of the box, and every submission enters the pending moderation queue.
* Collection can still be switched off with the documented `tillapr_feature_can` filter, and it is never sold.
* Updates the Review Page settings and the photo-review wording so collection is described as available rather than disabled.

= 1.25.1 =
* Removes the `Requires Plugins: woocommerce` header so the plugin can be activated on WordPress 6.5+ without WooCommerce, and the existing missing-WooCommerce admin notice can render. Runtime `class_exists()`/`function_exists()` guards and the Plugins-screen-scoped dismissible notice are unchanged.
* Deletes the `tillapr_legacy_keys_migrated` option during uninstall so no plugin option is left behind.

= 1.25.0 =
* Adds the Photo Review Form block. Collection is disabled by default and is not sold or unlocked by this product; compatible extensions may enable it through `tillapr_feature_can`.
* Submitted reviews enter the pending moderation queue; uploads are validated and protected by a nonce, honeypot and cooldown.
* Requires WooCommerce and documents the prerequisite. Sanitizes shortcode and block output while preserving required review markup and data attributes.
* Documents the external services contacted by review avatars and video lightboxes.

= 1.24.1 =
* Directory review response: moves functions, classes, constants, hooks, options, transients and meta keys to the required four-character `tillapr_` / `TILLAPR_` prefixes and updates the text domain to match the directory slug.
* Renames the `[awr_reviews]` alias to `[tillapr_reviews]`; `[all_reviews]` is unchanged. Updates directory metadata and readme wording.

= 1.24.0 =
* Adopts the brand-first display name and matching text domain for the WordPress.org directory. No feature or setting changes.

= 1.23.0 =
* Maintenance release; no feature or setting changes.

= 1.22.0 =
* Documentation and internal checks; existing features remain free and unchanged.

= 1.21.0 =
* Documentation and internal checks; existing features remain free and unchanged.

= 1.20.0 =
* Removes the optional external webfont loader. Designs use system font fallbacks.

= 1.19.0 =
* Documents where review photos and videos come from.

= 1.18.0 =
* Version 1.18.0 was not released; subsequent work shipped as 1.19.0.

= 1.17.1 =
* Fixes random-sort summary links and removes a no-op comment-query argument.

= 1.17.0 =
* Adds random sorting with a stable seed and additional colour controls.

= 1.16.0 =
* Accessibility and contrast improvements across designs, plus empty, busy and error states.

= 1.15.0 =
* Adds Reviews Hero and Featured Review blocks.

= 1.14.0 =
* Adds display controls for shortcode and block sections.

= 1.13.0 =
* Removes share-and-submit invitations and their related shortcode control.

= 1.12.0 =
* Adds responsive checks and fixes touch-target and overflow issues.

= 1.11.0 =
* Adds CSS masonry layouts and image loading performance improvements.

= 1.10.0 =
* Adds the Customer Stories design and gallery note attribute.

= 1.9.0 =
* Adds block and shortcode size, spacing, colour and layout controls.

= 1.8.0 =
* Adds Journal photo vignettes and removes invitations in later releases.

= 1.7.0 =
* Adds Journal and Lookbook designs.

= 1.6.0 =
* Adds the Stories design, category chips and related attributes.

= 1.5.0 =
* Adds the Testimonials design and its content attributes.

= 1.4.0 =
* Adds the Editorial design and eyebrow attribute.

= 1.3.0 =
* Adds Customer Reviews, Review Rating Summary and Review Rating blocks.

= 1.2.0 =
* Adds selectable designs, Review Page settings and template overrides.

= 1.1.1 =
* Improves accessibility and touch support for review controls and photo galleries.

= 1.1.0 =
* Adds customer photo thumbnails, lightbox, photo filters and CSV photo URLs.

= 1.0.0 =
* First release: review shortcode, summary, filters, pagination, AJAX load more and admin moderation/export.

== Upgrade Notice ==

= 1.26.1 =
Aligns the text domain with the plugin's directory slug and the shipped gettext template, so translations load under the plugin's own domain. No feature, setting, hook or stored value changes; upgrades in place.

= 1.26.0 =
Enables photo review collection in the free plugin: the included Photo Review Form block now accepts a rating, a written review and photos, which enter the pending moderation queue. No settings migration is needed, and collection can still be switched off with the `tillapr_feature_can` filter.

= 1.25.1 =
Removes the `Requires Plugins: woocommerce` header so the plugin can activate on WordPress 6.5+ without WooCommerce and show its missing-WooCommerce notice. No feature or setting changes. Upgrades in place.

= 1.25.0 =
Adds the Photo Review Form block. Collection stays off by default and is not sold or unlocked by this product. A compatible extension may enable it through `tillapr_feature_can`. Submitted reviews require moderation; no settings migration is needed.

= 1.24.1 =
Directory review response: updates prefixes and text domain. Existing settings and review-page data are migrated automatically.

= 1.24.0 =
Branding and WordPress.org directory metadata update; no settings migration is needed.
