=== Reseñas Woo ===
Contributors: juangallardo
Tags: google reviews, woocommerce, reviews, customer feedback, testimonials
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 3.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Display Google reviews locally and automate review requests after WooCommerce purchases.

== Description ==

**Reseñas Woo** importa reseñas de Google Maps, las guarda localmente en WordPress y permite mostrarlas con varios diseños listos para usar.

### Main Features
* Import reviews through an external service.
* Store reviews locally for fast frontend rendering.
* Display reviews in horizontal, vertical, square, or spotlight layouts.
* Send review request emails automatically after WooCommerce purchases.
* Manage invitations, retries, and delivery logs from the WordPress admin.
* Filter displayed reviews by star rating.
* Optionally hide external Google reviewer avatars to reduce PageSpeed transfer cost.

### External Service
This plugin can connect to an external review import service. The site owner must configure the service URL and explicitly consent before any Google Maps URL is sent to that service.
The plugin sends only the Google Maps URL, the configured review limit, the site language, the site URL, and an optional internal site token when an import is manually triggered by an administrator.

### Licencia (SupuHub)
Importar reseñas de Google (botón manual y tarea semanal) y recibir actualizaciones necesita una licencia de SupuDigital (49 €/año, 15 días de prueba, 1 web). Sin licencia, cada web tiene una importación gratis de prueba hecha a mano; las reseñas guardadas se siguen mostrando y los emails de petición de reseña se siguen enviando.
Para activar y revalidar la licencia (cada 12 h) el plugin envía a api.supudigital.es la clave (en cabecera), un identificador anónimo de la instalación, la URL de la web y las versiones del plugin y de WordPress.

== Installation ==

**Si ya tienes la versión 2.x (carpeta resenas_woo):** instala y activa la 3.0; desactiva sola la antigua y conserva reseñas, historial y ajustes. Después usa `Reseñas Woo > Licencia > Eliminar la versión antigua de forma segura`. **No borres la versión antigua desde Plugins: su desinstalador borra las reseñas.**


1. Upload the plugin folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the `Plugins` menu in WordPress.
3. Go to `Reseñas Woo > Configuración general`.
4. Paste the Google Maps URL of your business.
5. Enter the base URL of your review import service.
6. Accept the external service consent checkbox.
7. Save the settings and import your reviews.

== Frequently Asked Questions ==

= Do I need a Google API Key? =
No. This version imports reviews from a Google Maps URL using an external import service.

= Does the plugin contact an external server? =
Yes, but only after the site owner configures the service URL and explicitly enables consent in the settings page.

= How do I display the reviews? =
Use the shortcode `[mis_resenas_google]`. It supports attributes such as `design="horizontal"`, `design="spotlight"`, `limit="5"`, and `theme="light"`.

= Are emails sent immediately? =
You can configure a delay in days. If the delay is 0, the plugin waits 5 minutes after order completion to send the email.

== Screenshots ==

1. General settings panel with Google Maps URL import.
2. Review invitations list and delivery status.
3. Customization of email content and design.
4. Frontend reviews widget with spotlight layout.

== Changelog ==

= 3.1.1 =
* Si el servicio rechaza la importación gratis con una respuesta que no es JSON, también queda marcada como usada.
* Si la base de datos no guarda las reseñas importadas o sus ajustes, la importación gratis no se da por gastada.

= 3.1.0 =
* Versión gratis: sin licencia, cada web puede hacer una importación de reseñas de prueba a mano. El servicio la cuenta por dominio e IP, así que reinstalar no da otra.
* La importación semanal automática sigue siendo de la licencia.

= 3.0.1 =
* Botón «Comprar licencia» con el enlace de pago definitivo.

= 3.0.0 =
* Licencias y actualizaciones con SupuHub. Nueva pantalla Reseñas Woo > Licencia.
* Importar reseñas de Google exige licencia válida; mostrar reseñas y enviar emails no.
* La tarea semanal no reintenta cuando falta la licencia.
* Nueva carpeta resenas-woo: al activarla se desactiva la 2.x sin tocar datos y se puede eliminar la carpeta antigua de forma segura.
* Desinstalar ya no borra los datos salvo que se marque "Borrar todos los datos al desinstalar".

= 2.12.1 =
* Móvil: el bloque destacado de reseñas ya no desborda la pantalla (grid minmax(0, 1fr)).

= 2.12.0 =
* Fixed a bug that could send a duplicate review request email when a manual send raced with a pending scheduled cron send.
* Added an atomic lock and re-check of automatic-request settings to the scheduled cron send, preventing duplicate or unwanted sends.
* Declared compatibility with WooCommerce High-Performance Order Storage (HPOS) and migrated order meta reads/writes to the WooCommerce order API.
* Fixed a broken confirmation/progress script on the invitations log page that could display raw PHP code to the admin.
* Fixed the bulk invitation counter so calculating recipients no longer silently creates history records.
* Test emails now log correctly on repeated sends instead of overwriting a single record.
* Removed a global no-cache header on every page containing the reviews shortcode, and removed debug logging left in frontend rendering.
* Review cache clearing now uses the transients API so it also works correctly with persistent object caches (Redis/Memcached).
* Allowed the "only reviews with text" setting to be turned off once enabled.
* Improved uninstall cleanup to remove scheduled cron events with arguments and HPOS order meta.
* Improved invitations page performance for the default view by paginating the WooCommerce query instead of loading hundreds of orders per page load.

= 2.11.11 =
* Added a default-enabled setting to hide review avatars and avoid loading external Google profile images.

= 2.11.10 =
* Preserved editable email variables when saving the general settings page.

= 2.11.9 =
* Replaced unused email text variables with an editable Google review link variable.
* Migrated saved email templates so legacy placeholders do not appear in outgoing emails.

= 2.11.8 =
* Added editable email variables for company name, review button text, and review intro text.

= 2.11.7 =
* Added a defensive privacy module check to avoid fatal errors on incomplete uploads.

= 2.11.6 =
* Centered the spotlight summary and reduced the Google logo size.

= 2.11.5 =
* Improved the spotlight slider layout with compact Google-style summary and review cards.

= 2.11.4 =
* Added an option to show only reviews with written comments in the frontend slider.

= 2.11.3 =
* Added clear header controls for the displayed total review count and header stars.
* Fixed frontend theme styles and strengthened slider mode and star filter settings.

= 2.11.2 =
* Simplified the settings screen to show only useful controls for the current import flow.
* Fixed review display values so limit, speed, cache, and header ratings are now handled automatically.

= 2.10.6 =
* Fixed the review pipeline to keep and display only the 6 most recent reviews.
* Updated the import limit so the backend and frontend stay aligned on 6 reviews.

= 2.10.5 =
* Prepared the plugin to use the fixed scraper service URL at scraper.supufactory.es.
* Bumped the plugin version for a clean upload and detection of the latest release.

= 2.10.0 =
* Replaced the old Google Places flow with Google Maps URL import through an external service.
* Removed obsolete Place ID and API key logic from the plugin.
* Kept reviews stored locally after each import.

= 2.9.3 =
* Added new spotlight review layout inspired by Google-style review rails.

= 2.9.2 =
* Fixed functional bugs in emails, logs, and frontend rendering.

= 2.1 =
* Improved SMTP error handling.
* Refactored architecture to namespaces and autoloader.
* Added support for manual and automatic slider mode.
* Full internationalization support.

= 2.0 =
* Added post-sale email delivery system.
* Added local review storage for better performance.

= 1.0 =
* Initial release.
