Allow WooCommerce product reviews without an account: a plugin you can build today
· 4 min read
The WooCommerce setting for reviews does one thing: it controls whether a reviewer must have purchased the product. It does not control whether they need a WordPress account. That second requirement comes from WordPress itself, under Settings > Discussion. Unchecking one does not touch the other, which is why the review form still demands a login after you change the WooCommerce setting.
Disabling the WordPress global setting opens guest commenting across the entire site, including blog posts and pages. For a store that publishes editorial content alongside the shop, that trade is usually unacceptable. The plugin built here solves the narrower problem: allow guest reviews on product pages only, without changing anything for the rest of the site.
Here is the prompt.
What one build gives you
- Bypasses the WordPress login requirement for the comment form on WooCommerce product pages only, leaving all other post types unchanged
- Requires name and email for guest review submissions, with a honeypot field to reject basic spam bots
- Works with the existing WooCommerce star rating field and moderation settings
What it does not do
- Verified purchaser badge for guest reviewers
- Moderation workflow, review approval queue, or spam filtering beyond a basic honeypot
- Blog posts or pages, which remain subject to the global WordPress comment registration setting
- Review incentive emails, follow-up sequences, or analytics
- Compatibility testing with comment caching or anti-spam plugins
Customer Reviews for WooCommerce does these. This covers the part most sites use.
The prompt
Loads into the composer so you can edit it first. Nothing is built, and nothing is charged, until you send it.
Build a WordPress plugin that allows guest product reviews on WooCommerce product pages without changing the global WordPress discussion settings. Hook into the pre_option_comment_registration filter: when is_singular('product') returns true, return '0' to bypass the WordPress login requirement for the comment form on that page. On all other post types, return the unchanged $pre_value so WordPress reads the setting from the database as normal. Add a honeypot field to the WooCommerce review form by using the comment_form_default_fields filter on product pages only: append a hidden text input named review_honeypot with an inline style of 'position:absolute;left:-9999px;' and autocomplete set to off. In a preprocess_comment filter that fires on product post types, check that review_honeypot in $_POST is empty and that comment_author and comment_author_email are not empty. If the honeypot is filled or name or email is missing, call wp_die with a plain error message. Do not add any admin settings page or options. Register the hooks only when the woocommerce post type product is registered, to avoid errors on sites without WooCommerce active.
Why both settings exist and what each one does
WordPress has a core setting under Settings > Discussion: 'Users must be registered and logged in to comment.' This applies to every comment form on every post type. WooCommerce reviews are WordPress comments, so they obey this setting.
WooCommerce adds its own layer: 'Reviews can only be left by verified owners.' This checks whether the reviewer has a completed order attached to their account. It says nothing about whether they need an account in the first place.
Both need to be off for a guest to leave a product review. The WooCommerce setting is in WooCommerce > Settings > Products > Reviews. The WordPress setting is in Settings > Discussion. Turning off the WordPress setting globally opens every comment form on the site.
What the plugin does
The plugin filters the comment_registration value on product pages. When WordPress checks whether to require login for a comment form, the plugin intercepts that check and returns 0 whenever the current page is a single WooCommerce product. The global setting in Settings > Discussion is not changed. On blog posts and all other post types, the filter passes through the database value unchanged.
It also requires name and email for guest submissions on product pages, and adds a honeypot field to the review form to catch basic spam bots. Any submission where the honeypot is filled in, or where name or email is missing, is rejected before the comment is saved.
The WooCommerce star rating field works as it normally would. Guest reviews appear in the moderation queue and go through whatever workflow is already in place. They are recorded as unverified.
Who this is for
Stores that use WooCommerce guest checkout. Customers who buy without creating an account can never leave a review under the default setup because there is no account to log into. For a store where guest checkout is common, that means a large share of buyers cannot contribute to the review count.
Sites that run a shop alongside editorial content and do not want to open blog comments to anonymous visitors. The plugin changes nothing outside of product pages.
Shop owners who find the verified-purchase requirement too restrictive for the size of their catalog or customer base, and want to collect reviews from any visitor who has tried the product.
Who should use a different approach
If the site has no blog posts and you do not mind guest comments site-wide, go to Settings > Discussion and uncheck the login requirement. No plugin needed.
If verified-purchase reviews matter for trust signals, guest reviews cannot carry that badge. WooCommerce checks order history by user ID, and a guest reviewer has no user ID to check against. The plugin does not change that, and there is no workaround that produces an honest verified label.
If you need moderation queues, review incentive emails, spam filtering beyond a honeypot, or any analytics around review volume, Customer Reviews for WooCommerce or a similar commercial plugin handles those. The plugin built here handles only the access question.
How to build it
Paste the prompt below into Steem. The plugin downloads as a zip and installs under Plugins > Add New > Upload Plugin. Once active, open a product page in a private browser window. The review form should appear without a login prompt, and submitting with name and email filled in should save the review for moderation.
A useful follow-up: 'add an option under Settings > Discussion to toggle guest product reviews on or off without deactivating the plugin' gives the site owner a switch they can reach without touching code. A second one: 'add a nonce to the review form submission and verify it in the preprocessed comment check' tightens the submission validation beyond the honeypot.
Questions
- Do I still need to uncheck 'Reviews can only be left by verified owners' in WooCommerce?
Yes. That setting is separate and controls whether reviewers must have a completed purchase on their account. Uncheck it under WooCommerce > Settings > Products > Reviews if you want guest reviewers to submit ratings regardless of purchase history.
- Will this let guests comment on blog posts too?
No. The plugin only bypasses the login check when is_singular('product') is true. Blog posts, pages, and all other post types are not affected.
- Can spam bots leave reviews?
The plugin adds a honeypot field that rejects submissions where the hidden field is filled in. This catches basic bots. For high-traffic stores, a dedicated anti-spam plugin on top of this is a better fit.
- Will guest reviews show a verified purchaser badge?
No. WooCommerce checks order history by user ID, and a guest reviewer has no user ID. Guest reviews will always appear as unverified.
- Does this work with WooCommerce guest checkout?
Yes. Customers who checked out without an account can return to the product page and leave a review. They will not be marked as verified purchasers because there is no account to link the order to.
The prompt
Loads into the composer so you can edit it first. Nothing is built, and nothing is charged, until you send it.
Build a WordPress plugin that allows guest product reviews on WooCommerce product pages without changing the global WordPress discussion settings. Hook into the pre_option_comment_registration filter: when is_singular('product') returns true, return '0' to bypass the WordPress login requirement for the comment form on that page. On all other post types, return the unchanged $pre_value so WordPress reads the setting from the database as normal. Add a honeypot field to the WooCommerce review form by using the comment_form_default_fields filter on product pages only: append a hidden text input named review_honeypot with an inline style of 'position:absolute;left:-9999px;' and autocomplete set to off. In a preprocess_comment filter that fires on product post types, check that review_honeypot in $_POST is empty and that comment_author and comment_author_email are not empty. If the honeypot is filled or name or email is missing, call wp_die with a plain error message. Do not add any admin settings page or options. Register the hooks only when the woocommerce post type product is registered, to avoid errors on sites without WooCommerce active.
Steem