Skip to content

Conversation

@KevinBrent
Copy link
Contributor

@KevinBrent KevinBrent commented Sep 12, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes # .

How to test the changes in this Pull Request:

Start with trunk/start without this change:

  1. Via Products ▸ Attributes, create some product attributes and terms.
    • For at least two different attributes, apply custom ordering.
    • Via the Configure Terms screen, go ahead and re-order the terms.
  2. Apply a range of those same terms (for at least two different attributes) to one of your products.
    • If you visit the single product page and open the Additional Information tab, you should see these terms.
    • The custom ordering you applied in the admin screen should be respected here (if you have applied the terms a and b, but b has been custom ordered to display before a, that should also apply on the frontend).

Now switch to this branch:

  1. Create a new attribute and terms, apply some custom ordering, then apply this new attribute and some of those terms to the same product.
  2. Edit one of the existing attributes (that you worked on at the start), re-order some of its terms.
  3. Visit the single product page: ordering should be respected for the new attribute terms, the existing terms that you re-ordered, and the existing term where you did not change the order.

Some screenshots etc, in case helpful when trying to find some of the locations referenced above:

Asset Notes
Additional info tab (single product page) Single product page: additional info tab
Configure terms Admin screen: configure terms link
🎥  Reordering terms Screencast (how re-ordering terms works)

Other information:

  • [x ] Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

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.

Developer notes

#34213 (comment)

It appears this issue was partially addressed in version 3.6.0. However, we updated from version 3.4 to version 6.1.0. This caused us to miss the DB update wc_update_360_term_meta. This PR will address the order meta key name for newly created attribute taxonomy terms. In addition, this will address the same issue when an attribute taxonomy term is updated.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Sep 12, 2022
@piinthecloud
Copy link
Contributor

Hi @KevinBrent, can you take a look at some of the linting issues that are failing?

@barryhughes
Copy link
Member

See internal discussion at p1668679441393279-slack-C0E1AV8T0 — hoping to test/merge if possible in the week beginning 2022-11-21.

@barryhughes barryhughes merged commit f7f3f01 into woocommerce:trunk Nov 23, 2022
@github-actions github-actions bot added this to the 7.3.0 milestone Nov 23, 2022
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. type: community contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants