=== DigiLucks Reviews ===
Contributors: appnly
Tags: google reviews, reviews, testimonials, reputation, woocommerce
Requires at least: 5.7
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show your Google reviews anywhere, and automatically invite every customer to review you after they buy. Fair, policy-compliant, no gating.

== Description ==

DigiLucks Reviews does two jobs:

1. **Show off your Google reviews.** Paste one shortcode (or drop the block) and display your live Google reviews in a grid, carousel, list, or a compact rating badge. Includes star ratings, reviewer photos, and SEO-friendly review schema so search engines can show your rating in results.

2. **Get more reviews, automatically.** After a WooCommerce order completes, DigiLucks emails the customer a friendly invitation to leave a review. They land on a page with a one-click link to review you on Google, and an equal option to send you feedback privately instead. Every customer sees the same choices, we never gate reviews by rating (which violates Google's policies), the decision is always theirs.

**Highlights**

* Live Google reviews widget: grid, carousel, list, or badge
* Light and dark themes, filter by minimum rating
* Review schema (AggregateRating) for rich results in search
* Automatic review requests after WooCommerce orders
* Send a request to any customer by hand
* One-click Google review link, plus an optional private feedback channel for every customer
* Rating trend and request tracking on the dashboard
* Fast: reviews are cached, front end never waits on Google

Showing your reviews is **free**. Automatic review requests (with the private feedback option) are on the Pro plan.

== External services ==

This plugin connects to the DigiLucks Reviews service (https://reviews.digilucks.com) to work. It is required for the plugin's core features.

**What it does and why:**

* **Displaying reviews** — to show your Google reviews, the plugin asks the DigiLucks Reviews service for them. The service fetches your business's public reviews from the Google Places API using the Google Place ID you configure, and returns the rating, review count, and reviews for display.
* **Requesting reviews (paid plans)** — when you (or a completed WooCommerce order) trigger a review request, the plugin sends the request to the service, which emails the customer and hosts the review page the email links to (a one-click Google review link plus an optional private feedback form).

**Data sent to the service:** your website URL and account API key on every request; your business name and Google Place ID when loading reviews; and, when a review request is sent, the customer's name and email address (and order reference, if provided). No data is sent until you enter an API key and enable the plugin.

**Service provider terms and privacy policy:**

* Terms of Service: https://reviews.digilucks.com/terms
* Privacy Policy: https://reviews.digilucks.com/privacy

Review content is retrieved from Google and remains subject to Google's terms (https://policies.google.com/terms) and privacy policy (https://policies.google.com/privacy).

== Installation ==

1. Upload the plugin and activate it.
2. Create an account at https://reviews.digilucks.com and copy your API key.
3. Go to **Reviews > Settings**, paste the key, add your Google Place ID and "Write a review" link, tick Enable, and save.
4. Go to **Reviews > Display widget**, pick a layout, and paste `[digilucks_reviews]` onto any page.
5. (Pro) Turn on automatic requests under **Reviews > Ask for reviews**.

== Frequently Asked Questions ==

= How do I find my Google Place ID? =
Use Google's Place ID finder: https://developers.google.com/maps/documentation/places/web-service/place-id

= Where do I get my "Write a review" link? =
In your Google Business Profile, choose "Ask for reviews", Google gives you a short link (g.page/r/...). Paste it in Settings.

= Does it work without WooCommerce? =
Yes. You can send review requests by hand, or trigger them from your own code with `do_action('digilucks_reviews_request', $email, $name);`.

= Does it gate or filter out negative reviews? =
No. Gating reviews by predicted sentiment violates Google's policies and consumer-protection rules, so this plugin does not do it. Every customer is invited the same way and sees the same choices: a one-click Google review link and an equal option to send private feedback. Which they pick is entirely up to them.

== Changelog ==

= 1.2.0 =
* New: optional "Load more" button for grid and list layouts. Show a set number of reviews first, then let visitors expand the rest. Set it in Display widget or with initial="N" on the shortcode/block.

= 1.1.3 =
* Renamed short internal identifiers (AJAX action, nonces, transient, query flag) to the full digilucks_reviews_ prefix to avoid any chance of conflicts.

= 1.1.2 =
* Removed the arbitrary Custom CSS setting per WordPress.org guidelines; theme-level customization is available through developer filters.
* All widget CSS and JavaScript is now loaded via wp_enqueue_style/wp_enqueue_script + inline helpers.
* Hardened JSON-LD output so review text can never break out of the script element.
* Live preview now renders inline on the Display widget screen (no iframe).

= 1.1.1 =
* Code-quality pass for WordPress standards: escape all output, sanitize/unslash request input, and trim the short description. No functional changes.

= 1.1.0 =
* Review requests now treat every customer equally: one page with a one-click Google review link and an equal option to send private feedback. Removed rating-based routing entirely to comply with Google's review policies and consumer-protection rules.
* Dashboard now shows "Private feedback" received instead of intercepted negatives; copy updated throughout.

= 1.0.3 =
* Live preview on the Display widget screen with Desktop and Mobile views; updates as you change layout, theme and options.
* When not yet connected, the preview shows a friendly setup prompt with links to add your API key and Google Place ID.

= 1.0.2 =
* Refreshed, more professional widget design: real Google logo, cleaner cards, "Read more" for long reviews, polished header and badge.
* Added developer filters (digilucks_reviews_data, digilucks_reviews_card_html, digilucks_reviews_html) for fully custom output.
* Guards against pasting a Google API key into the Place ID field by mistake.

= 1.0.1 =
* Settings (Place ID, review link, business name, threshold) now sync to the service on save, so the widget reflects your configuration immediately.
* Added CORS support for browser-based WordPress environments.

= 1.0.0 =
* First release: Google reviews widget (grid/carousel/list/badge), review schema, WooCommerce review requests, private feedback option, dashboard.
