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

Adds priority to enhanced catalog attributes and display them as per their priority #2566

Merged
merged 8 commits into from
Jul 6, 2023

Conversation

ibndawood
Copy link
Contributor

@ibndawood ibndawood commented Jun 28, 2023

Changes proposed in this Pull Request:

The enhanced attributes in the product edit are not assigned a priority. This results in related attributes appearing randomly instead of together, as shown in the screenshot below.

image

It is expected that the product dimensions such as length, width, height, and depth should appear together. This PR loops through recommended attributes and assigns a priority index. We'll then sort the recommended attributes based on the priority.

  • Do the changed files pass phpcs checks? Please remove phpcs:ignore comments in changed files and fix any issues, or delete if not practical.

Screenshots:

After this PR:

image

Detailed test instructions:

  1. Install, activate, and connect Facebook for WooCommerce.
  2. Navigate to Products > All Products and click on Edit to open the product editor.
  3. In the Product data metabox, choose the Facebook tab.
  4. For Google Product Category field, choose a category that has measurements as attributes. A list of all category and their respective attributes can be found here: https://github.com/woocommerce/facebook-for-woocommerce/blob/develop/bin/fb_google_category_to_attribute_mapping.json
  5. Verify that the category specific fields are in order: Length, Width, Height, Depth, other measurement attributes and others. Please note that not all measure fields are available for all attributes. The order should be for whatever attributes are available.

Additional details:

Related forum issue: https://wordpress.org/support/topic/ui-issues-2/

Changelog entry

Add - Priority to enhanced catalog attributes and display as per priority.

@github-actions github-actions bot added changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement. labels Jun 28, 2023
@ibndawood ibndawood self-assigned this Jun 28, 2023
@ibndawood ibndawood changed the title Adds priority to enhanced attributes and display according to priority Adds priority to enhanced catalog attributes and display them as per their priority Jun 28, 2023
@ibndawood ibndawood marked this pull request as ready for review June 28, 2023 09:38
@ibndawood ibndawood requested a review from a team June 28, 2023 09:39
ibndawood and others added 3 commits June 28, 2023 20:12
@ibndawood ibndawood merged commit 9aaf7e6 into develop Jul 6, 2023
@ibndawood ibndawood deleted the add/priority-to-attributes branch July 6, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants