Skip to content

Conversation

@barryhughes
Copy link
Member

@barryhughes barryhughes commented Jan 11, 2023

With reference to #36350, we just restored the default of hiding the quantity selector for any products that are sold individually.

Following some further feedback, this change adjusts the selector so it hides the entire .quantity div (important because some themes add their own increment/decrement buttons within the div, and we don't want those to remain visible when the input is hidden).

How to test the changes in this Pull Request:

Testing is as per earlier PR #36350 ... just as for that PR, you may wish to test this change alongside any of the default Twenty X themes (or indeed with a generic non-default theme, so long as it does not override and replace our stylesheets). Note that the change cannot currently be seen using Storefront, because that theme replaces our default styles (ie, we need to make a separate change within that product).

💡 After checking out this branch, rebuild the relevant stylesheets using pnpm run --filter='woocommerce/client/legacy' build. You may also need to clear your browser cache to see the change.

  1. Configure a product such that it is sold individually.
  2. Visit the single product page, confirm you do not see the quantity selector.
  3. Configure it so it is not sold individually.
  4. Visit the single product page, confirm you can now see the quantity selector.

This change should have no impact outside of single product pages.

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jan 11, 2023
@barryhughes barryhughes requested review from a team and coreymckrill and removed request for a team January 11, 2023 23:30
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 83c9466

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 54s
E2E Tests189006019518m 13s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

Copy link
Contributor

@coreymckrill coreymckrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Works as described

@barryhughes barryhughes merged commit 5d10f08 into trunk Jan 13, 2023
@barryhughes barryhughes deleted the fix/36007-sold-individually-amendment branch January 13, 2023 17:19
@github-actions github-actions bot added this to the 7.4.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants