=== TrustedPulse Reviews ===
Contributors: trustedpulse
Tags: reviews, woocommerce, product reviews, testimonials, ugc
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Collect verified-purchase reviews for your WooCommerce store and display them on product pages with TrustedPulse.

== Description ==

TrustedPulse Reviews connects your WooCommerce store to [TrustedPulse](https://trustedpulse.com), a hosted review collection and display service.

The plugin does three things:

* **Syncs your catalog** — every published product with a SKU is sent to your TrustedPulse account daily, or on demand from the settings page.
* **Requests reviews after purchase** — when an order reaches the status you choose, TrustedPulse emails the customer a review invitation after a delay you also choose.
* **Displays reviews on product pages** — a review widget renders at the placement you pick, with no theme editing.

**A TrustedPulse account is required.** This plugin is a client for that service and does nothing on its own. You can create an account at [trustedpulse.com](https://trustedpulse.com).

= External services =

This plugin relies on the TrustedPulse service and will not function without it. It is not affiliated with WordPress.org or WooCommerce.

**1. TrustedPulse API — `https://api.trustedpulse.com`**

Used to synchronise your catalog and to request review invitations.

*What is sent, and when:*

* **On product sync** (daily via WP-Cron, and when you click "Sync Now"): for each published product that has a SKU — its SKU, name, product URL, featured image URL, price and store currency. Products with no SKU are not sent.
* **When an order reaches your chosen trigger status**, and only if you enable "automatic review requests": the customer's billing email address, billing first name, the order number, and the SKU and name of each purchased product that has one.
* Every request includes the TrustedPulse API key you enter in the plugin settings.

**2. TrustedPulse widget script — `https://cdn.trustedpulse.com/widget.js`**

Loaded in visitors' browsers on product pages to render the review widget. As with any externally hosted script, the visitor's browser sends its IP address and user agent to that host when fetching the file. The script requests review content for the product SKU shown on the page.

No data is sent to TrustedPulse from your store until you enter an API key. Customer data is sent only when you enable automatic review requests.

Service terms and policies:

* Terms of Service: https://trustedpulse.com/terms
* Privacy Policy: https://trustedpulse.com/privacy-policy

= Privacy =

Personal data (customer email address and first name) leaves your site only when automatic review requests are enabled, and only for orders that have been paid. Disabling that setting stops all transmission of customer data. Deleting the plugin removes its stored settings and cancels any queued review requests.

== Installation ==

1. Install and activate the plugin.
2. Go to **TrustedPulse** in the WordPress admin menu.
3. Paste the API key from your TrustedPulse dashboard, under Settings → API Keys.
4. Choose where the review widget appears, turn on automatic review requests, and click **Save settings**.
5. Click **Sync now** to send your catalogue straight away.

There is nothing else to configure. The API key is the only credential the plugin needs.

== Frequently Asked Questions ==

= Do I need a TrustedPulse account? =

Yes. The plugin sends data to and reads reviews from the TrustedPulse service, and does nothing without an account and API key.

= Do I need WooCommerce? =

Yes. Product sync, order triggers and the product-page widget all depend on WooCommerce.

= Why are some products missing from the sync? =

A product needs a SKU to sync. TrustedPulse matches purchases and reviews to products by SKU, so a product with no SKU could never collect or show a review even if it were synced — it is excluded instead of creating a dead entry. Set a SKU on the product in WooCommerce and sync again. Any other skip reason is named in the sync report on the settings page.

= Should I set SKUs before collecting reviews? =

Yes — it is required, not optional. Only products with a SKU are synced. Changing a product's SKU later makes it a different product to TrustedPulse, so reviews already collected will not follow it.

= When is the review email sent? =

After the order reaches the trigger status you choose in settings (paid, Processing or Completed), following the delay you also choose — immediately, or after 1, 3 or 7 days. Three days is the default.

= Does the plugin email my customers directly? =

No. Your store sends the order details to TrustedPulse, and TrustedPulse sends the review invitation.

= Is it compatible with High-Performance Order Storage? =

Yes. The plugin uses the WooCommerce CRUD API and declares HPOS compatibility.

= What happens if I delete the plugin? =

All plugin settings are removed and any queued review requests are cancelled. Reviews already collected remain in your TrustedPulse account.

== Screenshots ==

1. The three-step setup wizard shown on first run.
2. The settings tabs, with widget placement, layout and theme.
3. The review widget displayed on a WooCommerce product page.

== Changelog ==

= 1.3.5 =
* Corrected the WordPress.org package folder, output escaping, line endings and upgrade-notice length.

= 1.3.4 =
* Kept product-plan information within the TrustedPulse settings screen and removed code that suppressed WordPress or other plugins' admin notices.

= 1.3.3 =
* Updated the WordPress.org package metadata and text domain for directory submission.

= 1.3.2 =
* Products without SKUs now sync, collect verified-purchase reviews, and display their review widget using a stable WooCommerce product ID automatically.

= 1.3.1 =
* Merchants now see a clear WordPress admin alert when their TrustedPulse product limit is reached. It explains that new products pause while already connected products continue to update automatically.

= 1.3.0 =
* Simplified product-page placement to one full-width location immediately below the product summary and before tabs, upsells and related products. This prevents a review widget from ever appearing in a narrow buy-box column.

= 1.2.9 =
* Made the recommended placement theme-safe: reviews now detect the related-products renderer and appear directly above it, rather than relying on a fixed tab priority that some themes place beside the buy box.

= 1.2.8 =
* Moved existing stores using the former product-summary placement to the recommended position below product details and above related products. This keeps reviews out of the purchase controls and follows the natural product-page reading flow.

= 1.2.7 =
* Saving a new or changed API key now automatically fetches the widget token and queues the first full catalogue sync. Merchants no longer need to press Sync now after setup.
* WooCommerce Action Scheduler is used for that first import when available, with a WP-Cron fallback for compatible stores.

= 1.2.6 =
* New and updated published WooCommerce products now sync to TrustedPulse immediately after saving. The daily catalogue sync is retained only as a recovery check.
* The Product sync screen now distinguishes the last real-time product sync from a full catalogue sync.

= 1.2.5 =
* Restored the TrustedPulse logo using the stable website asset, with the correct dark or light mark for the selected widget theme.
* Completed dark-theme styling for the review surface, carousel controls and verification badge.

= 1.2.4 =
* Redesigned product-page reviews so they appear below product details, without duplicating the product image or competing with Add to Cart.
* Added a Review media setting: merchants can show text only, photos, or photos and videos submitted with reviews.
* Removed WooCommerce's separate native review tab when TrustedPulse is active, preventing the misleading "Reviews (0)" section.
* Fixed the storefront widget showing "Verified undefined" by including the review source in public product data.

= 1.2.3 =
* Fixed the WooCommerce product widget not appearing after a successful product sync. The plugin now receives and stores the API's widget token correctly.

= 1.2.2 =
* Fixed "Straight away" review requests never being sent on sites where WP-Cron is disabled or loopback requests are blocked. The request is now made immediately instead of being handed to WP-Cron, with a short timeout so it cannot hold up a payment webhook.
* The settings screen now shows the result of the last review request, including the error when one fails. Previously a failure was completely silent unless the site ran with WP_DEBUG on.
* The verification-code email now carries the business logo, like every other email.

= 1.2.1 =
* Fixed a white screen when activating the plugin or finishing the setup wizard. 1.2.0 read the trigger list from WooCommerce, which is not safely callable from the settings sanitize callback that runs on options.php. The trigger list is a fixed set again: Paid, Processing, Completed.

= 1.2.0 =
* Products without a SKU are no longer synced, and no longer show the review widget on their product page. TrustedPulse matches purchases and reviews by SKU, so a SKU-less product could never actually collect one — syncing it under a fake id only cluttered the dashboard with entries that could never receive a review.
* The sync report now says when products were skipped for having no SKU, instead of implying TrustedPulse rejected them.
* A review request is no longer sent if the order was cancelled, refunded or marked failed after the request was scheduled and before its delay elapsed.
* "Straight away" review requests now send over a non-blocking connection, so they no longer hold up the request that changed the order's status (a payment webhook, or an admin editing the order).

= 1.1.9 =
* Product sync now names the brand your catalogue was filed under, and warns when it could not be attached to one.

= 1.1.8 =
* Fixed product sync always reporting zero created and zero updated, however many products it had written.
* Removed a false "WooCommerce is required" warning that appeared even when WooCommerce was active.

= 1.1.7 =
* Sync errors now show what TrustedPulse actually said, instead of a raw API response.

= 1.1.6 =
* Fixed product sync failing with a 404: it was calling the wrong API path.
* Settings are shown as tabs once setup is complete, with product sync as its own tab.
* Other plugins' notices no longer appear on the TrustedPulse screen.
* The page now uses the full admin width with the content centred.

= 1.1.5 =
* Fixed the storefront widget, which never rendered: its settings were placed on a container element instead of the script tag it reads them from.
* Products without a SKU are now matched by their WooCommerce id, so every product can collect and show reviews.
* Added a layout (carousel or grid) and a light/dark theme for the widget.
* The widget token is fetched with your API key, so there is still only one credential to enter.

= 1.1.4 =
* First-time setup is now a three-step wizard instead of a wall of settings.
* Added the order status that triggers a review request, so it is configured here rather than in the TrustedPulse dashboard.
* A review request is scheduled only once per order, even if the status is set twice.

= 1.1.3 =
* Setup is now just the API key. The WooCommerce webhook, its URL and its secret are gone — orders reach TrustedPulse with the API key alone.
* The settings screen is a single page of three numbered steps instead of tabs.
* Upgrading removes the webhook the plugin previously created, so orders are not reported twice.

= 1.1.2 =
* Product sync now reports how many products were scanned, and explains when they were all skipped for having no SKU.
* Sync errors are shown on the settings screen instead of being recorded silently.

= 1.1.1 =
* Reorganised the settings screen into tabs with a connection status indicator.
* Fixed saving one section clearing settings that belong to another.

= 1.1.0 =
* Added verified-purchase review requests triggered by paid orders.
* Added the WooCommerce webhook installer for order events.
* Added product sync status and on-demand "Sync Now".
* Added removal of all settings and scheduled events on uninstall.
* Declared High-Performance Order Storage compatibility.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.5 =
Directory submission compatibility update. No merchant action is required.

= 1.3.4 =
Admin notices now follow WordPress dashboard conventions. No merchant action is required.

= 1.3.3 =
WordPress.org package metadata update. No merchant action is required.

= 1.3.2 =
Products without SKUs now work automatically. Run one catalogue sync after upgrading to import products that were previously skipped.

= 1.3.1 =
Adds a visible product-plan-limit alert in WordPress. Existing product updates remain automatic when the catalogue is full.

= 1.2.0 =
Products without a SKU stop syncing. Add a real SKU and sync again to keep each product active.

= 1.1.0 =
Adds automatic verified-purchase review requests. Review the new settings after upgrading.
