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

Use the term attribute sort order for the "Filter by attribute" block #47616

Merged
merged 3 commits into from
May 21, 2024

Conversation

albarin
Copy link
Contributor

@albarin albarin commented May 20, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR uses the attribute Default sort order to sort the attribute terms in the Filter by attribute block.

Closes #42417

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to wp-admin/edit.php?post_type=product&page=product_attributes.
  2. Create a new attribute.
  3. Click on Configure terms.
  4. Create terms with the following names: 1, 8, and 10.
  5. Go to Products and assign products to the 3 terms you just created.
  6. Go to the Product Catalog templates (wp-admin/site-editor.php?postType=wp_template&postId=woocommerce%2Fwoocommerce%2F%2Farchive-product).
  7. Insert the Filter by attribute block, configure it with the attribute you created in step 2, and save.
  8. Go to the shop page on the front-end.
  9. Check the order of the terms in the filter is: 1, 10, 8.
  10. Go back to the list of attributes, hover over the one you just created, and click Edit.
  11. Change the Default sort order to Name (numeric), and save.
  12. Refresh the front-end and check the order of the terms is now: 1, 8, 10.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Use the term attribute sort order for displaying the "Filter by attribute" terms.

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 20, 2024
Copy link
Contributor

github-actions bot commented May 20, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@albarin albarin closed this May 20, 2024
@albarin albarin reopened this May 20, 2024
@albarin albarin marked this pull request as ready for review May 20, 2024 14:17
@albarin albarin added the type: cooldown Things that are queued for a cooldown period (assists with planning). label May 20, 2024
@woocommercebot woocommercebot requested review from a team and imanish003 and removed request for a team May 20, 2024 14:22
Copy link
Contributor

github-actions bot commented May 20, 2024

Hi @samueljseay, @roykho, @imanish003, @kmanijak,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@kmanijak kmanijak 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 expected! Nice! 🚀

@albarin albarin merged commit 1d0ec79 into trunk May 21, 2024
57 checks passed
@albarin albarin deleted the 42417-attributes-order branch May 21, 2024 13:44
@github-actions github-actions bot added this to the 9.0.0 milestone May 21, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 21, 2024
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris type: cooldown Things that are queued for a cooldown period (assists with planning).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product attribute terms not in numeric order
3 participants