Skip to content

Commit de9933a

Browse files
chore: bump version to 2.0.3 with Product Review generator
1 parent dbfd145 commit de9933a

File tree

7 files changed

+46
-42
lines changed

7 files changed

+46
-42
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![WordPress Plugin](https://img.shields.io/badge/WordPress-Plugin-blue.svg)](https://wordpress.org/)
44
[![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](http://www.gnu.org/licenses/gpl-2.0.txt)
55
[![PHP Version](https://img.shields.io/badge/PHP-7.4%2B-8892BF.svg)](https://php.net/)
6-
[![Version](https://img.shields.io/badge/Version-2.0.2-green.svg)]()
6+
[![Version](https://img.shields.io/badge/Version-2.0.3-green.svg)]()
77
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-v4.1.18-blue.svg)](https://tailwindcss.com/)
88

99
🚀 **Generate realistic test data for your EasyCommerce store in seconds!** Create products, customers, orders, coupons, and more with our modern React interface powered by Tailwind CSS v4. Features smart defaults, real-time validation, WordPress admin integration, and a "Get Started" quick access link. Perfect for development, testing, and creating stunning demos.
@@ -49,10 +49,17 @@ npm run build
4949
- 🔗 **Quick Access** - "Get Started" link directly from the plugins page
5050
- 🔧 **Developer Friendly** - Extensive customization options, TypeScript support, and comprehensive API
5151

52+
## 🚀 What's New in v2.0.3
53+
54+
- **Product Review Generator**: New generator for creating realistic product reviews with ratings
55+
- **Review Rating System**: Weighted rating distribution favoring higher ratings (realistic patterns)
56+
- **WordPress Comments Integration**: Leverages WordPress comment system for review storage
57+
- **Verified Purchase Tracking**: Reviews can be marked as verified purchases
58+
5259
## 🚀 What's New in v2.0.2
5360

5461
- **Tailwind CSS v4**: Upgraded to the latest version with improved performance and modern CSS features
55-
- **Enhanced UI**: Fixed visual inconsistencies in success messages and breadcrumb navigation
62+
- **Enhanced UI**: Fixed visual inconsistencies in success messages and navigation elements
5663
- **Quick Access**: Added "Get Started" link directly from the WordPress plugins page
5764
- **Build Optimization**: Updated PostCSS configuration for better development workflow
5865
- **Code Quality**: Enhanced linting and modern development practices
@@ -143,6 +150,6 @@ GPL v2 or later - see [LICENSE](LICENSE) file.
143150

144151
---
145152

146-
**EasyCommerce FakerPress v2.0.2** | December 15, 2025
153+
**EasyCommerce FakerPress v2.0.3** | December 15, 2025
147154

148155
_Modern test data generation for EasyCommerce stores_

class-easycommerce-fakerpress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* - Multi-locale support for international data generation
4747
*
4848
* @since 1.0.0
49-
* @version 2.0.2
49+
* @version 2.0.3
5050
*/
5151
class EasyCommerce_FakerPress {
5252

docs/changelog.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,29 @@ All notable changes to EasyCommerce FakerPress will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.0.2] - 2025-12-15
8+
## [2.0.3] - 2025-12-15
99

1010
### ✨ New Features & Enhancements
1111

12-
- **Plugin Action Link**: Added "Get Started" link to the plugin's action links on the plugins page for easier access
13-
- **Tailwind CSS v4 Upgrade**: Upgraded to Tailwind CSS v4.1.18 with improved performance and modern CSS features
14-
- **UI Design Fixes**: Fixed visual inconsistencies in success messages and breadcrumb navigation
12+
- **Product Review Generator**: Added new generator for creating realistic product reviews with ratings and customer feedback
13+
- **Review Rating Distribution**: Implemented weighted rating system favoring higher ratings (realistic 5-4-3-2-1 star distribution)
14+
- **Review Content Generation**: Added intelligent review content generation based on rating levels
15+
- **Verified Purchase Tracking**: Reviews can be marked as verified purchases for enhanced credibility
1516

1617
### 🔧 Technical Improvements
1718

18-
- **Build System Updates**: Updated PostCSS configuration for Tailwind v4 compatibility
19-
- **Code Quality**: Enhanced linting configuration for modern CSS standards
20-
- **Dependency Updates**: Updated development dependencies for better compatibility
19+
- **WordPress Comments Integration**: Leverages WordPress comment system for review storage and management
20+
- **REST API Endpoint**: New `/product-reviews/generate` endpoint for programmatic review generation
21+
- **Frontend Component**: Added ProductReviewGenerator React component with parameter configuration
22+
- **Type Safety**: Full TypeScript support for review generation parameters and API responses
2123

22-
### 🐛 Bug Fixes
24+
### 🐛 Previous Version Fixes
2325

24-
- **GeneratorBase**: Added proper border styling to success message containers
25-
- **GeneratorPage**: Removed unwanted list styling from breadcrumb navigation
26-
- **Composer Dependencies**: Updated PHP utility libraries for improved performance
26+
- **Plugin Action Link**: Added "Get Started" link to the plugin's action links on the plugins page for easier access
27+
- **Tailwind CSS v4 Upgrade**: Upgraded to Tailwind CSS v4.1.18 with improved performance and modern CSS features
28+
- **UI Design Fixes**: Fixed visual inconsistencies in success messages and breadcrumb navigation
29+
- **Build System Updates**: Updated PostCSS configuration for Tailwind v4 compatibility
30+
- **Code Quality**: Enhanced linting configuration for modern CSS standards
2731

2832
## [2.0.1] - 2025-11-13
2933

@@ -168,7 +172,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
168172

169173
## 📊 Version Information
170174

171-
- **Current Version**: 2.0.2
175+
- **Current Version**: 2.0.3
172176
- **PHP Requirement**: 7.4+
173177
- **WordPress Requirement**: 5.0+
174178
- **EasyCommerce Requirement**: Latest version

easycommerce-fakerpress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
exit;
2727
}
2828

29-
define( 'EASYCOMMERCE_FAKERPRESS_VERSION', '2.0.2' );
29+
define( 'EASYCOMMERCE_FAKERPRESS_VERSION', '2.0.3' );
3030
define( 'EASYCOMMERCE_FAKERPRESS_PLUGIN_FILE', __FILE__ );
3131
define( 'EASYCOMMERCE_FAKERPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
3232
define( 'EASYCOMMERCE_FAKERPRESS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );

includes/Controllers/Product_Review.php

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace EasyCommerceFakerPress\Controllers;
1313

1414
use EasyCommerceFakerPress\Abstracts\Controller;
15+
use EasyCommerceFakerPress\Generators\Product_Review as ProductReviewGenerator;
1516

1617
/**
1718
* Product Review Controller Class
@@ -23,17 +24,6 @@
2324
*/
2425
class Product_Review extends Controller {
2526

26-
/**
27-
* Get the generator class name
28-
*
29-
* @since 2.0.3
30-
*
31-
* @return string Generator class name.
32-
*/
33-
protected function get_generator_class(): string {
34-
return 'EasyCommerceFakerPress\\Generators\\Product_Review';
35-
}
36-
3727
/**
3828
* Get the resource name for this controller
3929
*
@@ -64,8 +54,7 @@ protected function get_rest_base(): string {
6454
* @return \EasyCommerceFakerPress\Abstracts\Generator Generator instance.
6555
*/
6656
protected function get_generator_instance(): \EasyCommerceFakerPress\Abstracts\Generator {
67-
$generator_class = $this->get_generator_class();
68-
return new $generator_class();
57+
return new ProductReviewGenerator();
6958
}
7059

7160
/**
@@ -122,11 +111,13 @@ protected function get_parameter_config(): array {
122111
*/
123112
protected function validate_parameters( array $params ) {
124113
// Check if products exist.
125-
$product_query = new \WP_Query( array(
126-
'post_type' => 'product',
127-
'post_status' => 'publish',
128-
'posts_per_page' => 1,
129-
) );
114+
$product_query = new \WP_Query(
115+
array(
116+
'post_type' => 'product',
117+
'post_status' => 'publish',
118+
'posts_per_page' => 1,
119+
)
120+
);
130121

131122
if ( ! $product_query->have_posts() ) {
132123
return new \WP_Error(
@@ -136,10 +127,12 @@ protected function validate_parameters( array $params ) {
136127
}
137128

138129
// Check if customers exist.
139-
$customer_query = get_users( array(
140-
'role' => 'customer',
141-
'number' => 1,
142-
) );
130+
$customer_query = get_users(
131+
array(
132+
'role' => 'customer',
133+
'number' => 1,
134+
)
135+
);
143136

144137
if ( empty( $customer_query ) ) {
145138
return new \WP_Error(
@@ -150,4 +143,4 @@ protected function validate_parameters( array $params ) {
150143

151144
return parent::validate_parameters( $params );
152145
}
153-
}
146+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mralaminahamed/easycommerce-fakerpress",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Comprehensive EasyCommerce test data generator with 10 specialized generators, real-time validation, advanced parameter configuration, WordPress admin color integration, and modern React Router v7 interface.",
55
"scripts": {
66
"build": "wp-scripts build",

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: ecommerce, faker, data-generation, testing, development
44
Requires at least: 5.0
55
Tested up to: 6.8
66
Requires PHP: 7.4
7-
Stable tag: 2.0.2
7+
Stable tag: 2.0.3
88
License: GPL v2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010

0 commit comments

Comments
 (0)