Skip to content

Conversation

@ilyasfoo
Copy link
Contributor

@ilyasfoo ilyasfoo commented May 3, 2023

Changes proposed in this Pull Request:

Closes #38069.

Fixes import failures when user profile language preference is set to en_US.

How to test the changes in this Pull Request:

Prerequisite

  1. Go to Users > Profile
  2. Set language to English (United States)
  3. Save profile

Testing product type

  1. Go to WooCommerce > Home
  2. Click on "Add Products" task
  3. Click on "Variable product"
  4. Observe the product is created as a "variable product" and the product image is shown

Testing sample import

  1. Go to WooCommerce > Home
  2. Click on "Add Products" task
  3. Click on "View more product types"
  4. Click on "Load Sample Products"
  5. Observe 9 sample products are loaded and product image is shown for the newly imported products

@ilyasfoo ilyasfoo requested review from a team, chihsuan and rjchow May 3, 2023 08:18
@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Hi @chihsuan, @rjchow, @woocommerce/ghidorah

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

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Test Results Summary

Commit SHA: 8a13c87

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202690m 53s
E2E Tests1870010019714m 44s

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.

@ilyasfoo ilyasfoo added this to the 7.8.0 milestone May 3, 2023
Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

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

Looks good and tested well! 🚢

Thanks for adding the tests. 😃

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

Tests well and fixes the issue! Can't say I understand what's going on though - what are mappings and why are they 0 sometimes and not other times?

@ilyasfoo
Copy link
Contributor Author

ilyasfoo commented May 4, 2023

Good question, @rjchow! It's because there's this logic called by our product task import which would fail when user profile locale is en_US.

I think having translated column names in export/import is not a good design, but I digress.

@ilyasfoo ilyasfoo merged commit 8e6fd41 into trunk May 4, 2023
@ilyasfoo ilyasfoo deleted the fix/38069-fix-product-task-imports branch May 4, 2023 14:54
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.

Setting user locale to en_US breaking product task import

4 participants