Important Note: The WooCommerce Auto Comments plugin does not create any custom post types, custom taxonomies, or custom meta fields. Instead, it works with existing WordPress and WooCommerce data structures.
How the Plugin Works with Existing Data
The plugin operates entirely within WordPress and WooCommerce’s existing framework:
WordPress Comments System
The plugin uses WordPress’s built-in comment system to store product reviews. When a customer submits a review through the plugin:
- Storage Location: WordPress `wp_comments` table
- Comment Type: ‘review’ (WooCommerce standard)
- Rating: Stored as comment meta with key ‘rating’
- Auto-Rating: All reviews are automatically assigned 5 stars
- Approval Status: Comments are set to pending approval (0)
WooCommerce Products
The plugin works with standard WooCommerce products:
- Post Type: ‘product’ (WooCommerce standard)
- No Modifications: Plugin doesn’t alter product data
- Review Association: Reviews are linked to products via post ID
- Compatibility: Works with all product types (simple, variable, grouped, etc.)
WooCommerce Orders
The plugin queries existing order data to determine eligible products:
- Post Type: ‘shop_order’ (WooCommerce standard)
- Order Status: Checks configurable order statuses
- Customer Association: Links orders to customers via user ID
- Product Extraction: Identifies purchased products from order items
Data Flow
- Customer Login: Plugin identifies logged-in customer
- Order Query: Retrieves customer’s orders with configured statuses
- Product Extraction: Gets unique products from order items
- Review Check: Queries existing reviews to exclude already-reviewed products
- Form Display: Shows comment form only for unreviewed products
- Review Submission: Saves new review as WordPress comment with WooCommerce review format
Database Tables Used
- wp_comments: Stores submitted reviews
- wp_commentmeta: Stores review ratings
- wp_posts: Product and order data
- wp_postmeta: Order item details
- wp_woocommerce_order_items: Order line items
- wp_woocommerce_order_itemmeta: Product details in orders
- wp_options: Plugin settings storage
Review Data Structure
When a review is submitted, it creates a WordPress comment with these properties:
Comment Fields
- comment_post_ID: Product ID being reviewed
- comment_author: Customer’s display name
- user_id: Customer’s WordPress user ID
- comment_type: ‘review’
- comment_content: Customer’s review text
- comment_approved: 0 (pending approval)
Comment Meta
- rating: 5 (automatically assigned)
No Custom Fields or Meta
The plugin intentionally avoids creating custom fields or meta to maintain:
- Compatibility: Works with any theme or other plugins
- Simplicity: Uses standard WordPress/WooCommerce structures
- Data Integrity: Reviews appear in standard WooCommerce review lists
- Easy Migration: No custom data to migrate if switching plugins
- Theme Support: Reviews display in any WooCommerce-compatible theme
Managing Reviews
Since the plugin uses standard WordPress comments, you can manage reviews through:
- WordPress Admin: Comments → All Comments
- WooCommerce: Products → Reviews (if available in your WooCommerce version)
- Product Edit Page: Reviews section when editing individual products