Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's no way not to choose product review rating when ratings are optional #25656

Open
3 tasks done
starypop opened this issue Feb 13, 2020 · 3 comments
Open
3 tasks done
Labels
focus: product management Related to product creation and editing. plugin: woocommerce Issues related to the WooCommerce Core plugin. priority: normal The issue/PR is of normal priority—not many people are affected or there’s a workaround, etc. team: Mothra type: bug The issue is a confirmed bug.

Comments

@starypop
Copy link

starypop commented Feb 13, 2020

Describe the bug
On admin "Edit comment" screen (e.g. /comment.php?action=editcomment&c=1) there is a WooCommerce metabox for start rating select. It has values from 1 to 5 which is fine.

But having "Star ratings should be required, not optional" WooCommerce Products Settings options unchecked, there is no way not to set this select value to be empty. There is no such option as "none", so when review already has a rating, you can not remove it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to WooCommerce->Settings->Products
  2. Set "Star ratings should be required, not optional" checkbox unchecked (make them non-required).
  3. Edit one of the product reviews which has some rating.
  4. On this comment's admin "Edit comment" screen see that you cannot remove rating or set rating empty in any way.

Screenshots

WooCommerce Product Reviews Settings:
Zrzut ekranu 2020-02-13 o 11 30 27

Product review rating select options currently:
Zrzut ekranu 2020-02-13 o 11 28 44

Product review rating select proposed options:
Zrzut ekranu 2020-02-13 o 11 29 38

Expected behavior
If "Star ratings should be required, not optional" is unchecked, there should be a select option value called "none" possible to choose.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

``` ` ### WordPress Environment ###

WordPress address (URL): http://localhost:8888/wc
Site address (URL): http://localhost:8888/wc
WC Version: 3.9.1
REST API Version: ✔ 1.0.7
Log Directory Writable: ✔
WP Version: 5.3.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.2.1 mod_ssl/2.2.34 OpenSSL/1.0.2j DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.24.0
PHP Version: 7.2.1
PHP Post Max Size: 8 MB
PHP Time Limit: 1000
PHP Max Input Vars: 1000
cURL Version: 7.52.1
OpenSSL/1.0.2j

SUHOSIN Installed: –
MySQL Version: 5.6.38
Max Upload Size: 8 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 3.9.1
WC Database Prefix: wp_
Total Database Size: 2.64MB
Database Data Size: 1.66MB
Database Index Size: 0.98MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 1.05MB + Index: 0.03MB + Engine InnoDB
wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_posts: Data: 0.05MB + Index: 0.06MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 1
page: 6
post: 3
product: 1
revision: 1
scheduled-action: 3
shop_coupon: 1
shop_order: 6

Security

Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ❌Error messages should not be shown to visitors.

Active Plugins (1)

WooCommerce: by Automattic – 3.9.1

Inactive Plugins (0)

Settings

API Enabled: –
Force SSL: –
Currency: GBP (£)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –

WC Pages

Shop base: #6 - /shop/
Cart: #7 - /cart/
Checkout: #8 - /checkout/
My account: #9 - /my-account/
Terms and conditions: ❌ Page not set

Theme

Name: Twenty Twenty
Version: 1.1
Author URL: https://wordpress.org/
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔

Templates

Overrides: –

Action Scheduler

Complete: 3
Oldest: 2020-01-26 17:21:10 +0000
Newest: 2020-01-26 17:21:11 +0000

Pending: 0
Oldest: –
Newest: –

Canceled: 0
Oldest: –
Newest: –

In-progress: 0
Oldest: –
Newest: –

Failed: 0
Oldest: –
Newest: –

`

</details>
@starypop
Copy link
Author

Also, I know that the Rating metbox on "Edit comment" screen is displaying only if the comment has meta called "rating". When there's no rating, metabox is not displayed at all.

So if there will be the "none" option available to select, after updating the comment, that metabox will disappear. And selecting an rating 1-5 will become impossible.

I think it would be nice not to hide that metabox basing on existence of rating, but rather on comment's post type for example.

@claudiosanches claudiosanches added type: bug The issue is a confirmed bug. priority: normal The issue/PR is of normal priority—not many people are affected or there’s a workaround, etc. labels May 5, 2020
@claudiosanches
Copy link
Contributor

Hi @starypop ,

Thank you for taking the time reporting this bug, we really appreciate your help. I can reproduce it on my end.

We won’t be able to include this fix in the upcoming release due to the lower priority of this issue compared to others reported. We’re going to add it to our backlog so we can include it in our planning for one of our future releases.

@tammullen tammullen added the status: reproduction Bug reports that need to be reproduced and confirmed. label Dec 8, 2021
@swatipawarGS
Copy link

Hi @starypop ,

Thank you for taking the time to report this bug, we really appreciate your help. We are able to reproduce the issue on our end using WooCommerce 5.9.0 version.

Please find below screenshots for reference :

WooCommerce Product Reviews Settings :

#25656(setting)

Product review rating select options :

#25656(Rating)

Priority of this issue will be assigned shortly after we’d go through a round of prioritization. Please note it may take a couple of days.

@tammullen tammullen removed the status: reproduction Bug reports that need to be reproduced and confirmed. label Dec 12, 2021
@ObliviousHarmony ObliviousHarmony added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 21, 2022
@rrennick rrennick added focus: product management Related to product creation and editing. team: Mothra labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: product management Related to product creation and editing. plugin: woocommerce Issues related to the WooCommerce Core plugin. priority: normal The issue/PR is of normal priority—not many people are affected or there’s a workaround, etc. team: Mothra type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

6 participants