=== Onedev Verified Customer Rating ===
Contributors: onedevtn
Tags: woocommerce, reviews, ratings, verified, phone
Requires at least: 6.6
Tested up to: 7.1
WC requires at least: 8.2
WC tested up to: 11.1.0
Requires PHP: 8.1
Stable tag: 1.3.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Allow only verified customers to leave WooCommerce product ratings, using phone-number verification and a secure shortcode form.

== Description ==

Onedev Verified Customer Rating adds a product rating flow that helps ensure reviews come from real customers.

Use this shortcode on a product page (or any page) to display the rating form:
[onedev_vcr_form]

How it works:
- The customer selects a 1–5 star rating and enters a phone number.
- The plugin checks for a completed WooCommerce order matching that phone number (normalized to E.164 when the phone library is available).
- If verified, a WooCommerce product review is created and approved, and the rating is included in the product average.

Key features:
- Phone verification using E.164 normalization (libphonenumber for PHP).
- One rating per phone number per product.
- Compatible with WooCommerce HPOS (Custom Order Tables).
- Internationalization-ready (.pot/.po/.mo).

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` (or install it via WordPress admin).
2. Activate the plugin.
3. Make sure WooCommerce is installed and active.
4. Add the shortcode `[onedev_vcr_form]` to a product page or any page you want.
5. Optional: Ensure the phone library is installed (the plugin loads `vendor/autoload.php` when present).

== Frequently Asked Questions ==

= Does this plugin require libphonenumber? =
It is recommended for international phone normalization (E.164). If missing, the plugin will show an admin notice and phone validation may not work as expected.

= Which orders count as “verified”? =
A WooCommerce order with status “completed” matching the customer phone number.

= Can the same customer rate a product multiple times? =
No. The plugin prevents duplicates for the same product using the same phone number.

= How do I display the form? =
Add the shortcode:
[onedev_vcr_form]

== Screenshots ==

1. Rating form on a product page.
2. Success and error messages.

== Changelog ==

= 1.3.6 =
* Compatibility update: Tested and verified for WordPress 7.1 and WooCommerce 11.1.0.

= 1.3.5 =
* i18n improvements (POT generation and translators comments for placeholders).
* Minor fixes and stability improvements.

== Upgrade Notice ==

= 1.3.6 =
Recommended update: Full compatibility declaration for WordPress 7.1 and WooCommerce 11.1.0.

= 1.3.5 =
Recommended update (i18n improvements and minor fixes).