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

Fix blank screen is displayed during OBW when using WP5.9 #36903

Merged
merged 4 commits into from Mar 1, 2023

Conversation

chihsuan
Copy link
Member

@chihsuan chihsuan commented Feb 21, 2023

All Submissions:

Changes proposed in this Pull Request:

Closes #36711.

When a site downgrades WP to a lower version with an incompatible active theme, it leads to a fatal error when clicking "Continue" on "Business Details" step because theme data is incomplete.

This PR adds a check to exclude the active theme from onboarding themes if it's incompatible.

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Create a test site using Jurassic Ninja (ensure to check the box for WP Downgrade) or use a WP 6.1 site with Twenty Twenty-Three theme active.
  2. Downgrade the version of WP to 5.9 PbPjnJ-1eN-p2
  3. Start with OBW.
  4. Go to Business Details > Free feature step.
  5. Click Continue.
  6. Observe that Blank Screen is NOT displayed, but a theme screen is shown.

Other information:

  • 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 created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

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 focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Feb 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2023

Test Results Summary

Commit SHA: d5163f9

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 3s
E2E Tests189006019513m 30s

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.

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #36903 (3d7b765) into trunk (2e146d5) will decrease coverage by 0.0%.
The diff coverage is n/a.

❗ Current head 3d7b765 differs from pull request most recent head d5163f9. Consider uploading reports for the commit d5163f9 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             trunk   #36903     +/-   ##
==========================================
- Coverage     46.7%    46.7%   -0.0%     
+ Complexity   17171    17168      -3     
==========================================
  Files          429      429             
  Lines        64762    64748     -14     
==========================================
- Hits         30220    30207     -13     
+ Misses       34542    34541      -1     
Impacted Files Coverage Δ
plugins/woocommerce/includes/wc-core-functions.php 54.9% <0.0%> (-0.2%) ⬇️
plugins/woocommerce/includes/class-wc-tracker.php 89.7% <0.0%> (-<0.1%) ⬇️

@chihsuan chihsuan marked this pull request as ready for review February 21, 2023 07:54
@chihsuan chihsuan self-assigned this Feb 21, 2023
@chihsuan chihsuan requested review from a team, ilyasfoo and rjchow February 21, 2023 07:59
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.

Works as expected! Thanks for fixing this!

Copy link
Contributor

@ilyasfoo ilyasfoo left a comment

Choose a reason for hiding this comment

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

Apologies for the delayed review. Tested well, thanks! 🚢

@chihsuan chihsuan merged commit 4b1bcad into trunk Mar 1, 2023
@chihsuan chihsuan deleted the fix/36711-obw-blank-screen-wp5_9 branch March 1, 2023 01:42
@github-actions github-actions bot added this to the 7.6.0 milestone Mar 1, 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
3 participants