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

Dont render attribution metabox for non-supported order types. #44680

Merged
merged 4 commits into from Feb 16, 2024

Conversation

vedanshujain
Copy link
Contributor

@vedanshujain vedanshujain commented Feb 16, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Bail early if the order type is anything other than the Automattic\WooCommerce\Admin\Overrides\Order which provides the necessary method for rendering this metabox.

Closes #44677

How to test the changes in this Pull Request:

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

This fix can be tested on any order type other than the core order type that renders their own admin page. For example, we can test with subscriptions.

Edit: Please also repeat these testing instructions for both HPOS and post data stores. Note that if WooCommcerce analytics is disabled then the customer history stats will not be displayed.

  1. Create a new subscription order, by first creating a subscription product and adding a new subscription to it.
  2. Open the edit page for that subscription. It should load properly. Check that the customer history meta box is not displayed for the subs order.

Additionally, we need to test that the order attribution meta box is indeed displayed for normal orders.

  1. Open any order edit screen in the admin view.
  2. Check that the order attribution screen is displayed as expected.

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

Comment

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

github-actions bot commented Feb 16, 2024

Hi @layoutd, @bor0,

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

@budzanowski budzanowski left a comment

Choose a reason for hiding this comment

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

The code looks good!

Disclaimer: I have not tested it.

@vedanshujain vedanshujain removed the request for review from bor0 February 16, 2024 05:37
Copy link
Contributor

github-actions bot commented Feb 16, 2024

Test Results Summary

Commit SHA: 25ee027

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 36s
E2E Tests233009203254m 52s

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.

@ibndawood
Copy link
Contributor

Hey @vedanshujain, thank you for the PR. I followed the test instructions. It is failing this test:

we need to test that the order attribution meta box is indeed displayed for normal orders.

Can you please check?

With PR:

image

Without PR:

image

Copy link
Contributor

@ibndawood ibndawood left a comment

Choose a reason for hiding this comment

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

Thank you, @vedanshujain, for the changes. I tested the PR by following the test instructions and they test well.

@vedanshujain vedanshujain merged commit 1d91b89 into trunk Feb 16, 2024
36 checks passed
@vedanshujain vedanshujain deleted the fix/44677 branch February 16, 2024 07:09
@github-actions github-actions bot added this to the 8.7.0 milestone Feb 16, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 16, 2024
@senadir senadir mentioned this pull request Feb 16, 2024
5 tasks
@nigeljamesstevenson nigeljamesstevenson modified the milestones: 8.7.0, 8.6.0 Feb 16, 2024
github-actions bot pushed a commit that referenced this pull request Feb 16, 2024
* Dont render attribution metabox for non-supported order types.

* Use a screen check instead of order type check for better compat.

* phpcs fix

* Remove unnecessary call.
nigeljamesstevenson pushed a commit that referenced this pull request Feb 16, 2024
* Dont render attribution metabox for non-supported order types. (#44680)

* Dont render attribution metabox for non-supported order types.

* Use a screen check instead of order type check for better compat.

* phpcs fix

* Remove unnecessary call.

* Prep for cherry pick 44680

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
@mostafasoufi
Copy link
Contributor

For your information, I recommend expediting the release of the new version, primarily because the WooCommerce Subscription feature is currently non-functional.

Screenshot 2024-02-17 at 9 22 10 AM

@Stojdza Stojdza added needs: internal testing Indicates if the PR requires further testing conducted by Solaris 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 Feb 20, 2024
github-actions bot pushed a commit that referenced this pull request Feb 21, 2024
* Dont render attribution metabox for non-supported order types.

* Use a screen check instead of order type check for better compat.

* phpcs fix

* Remove unnecessary call.
alopezari pushed a commit that referenced this pull request Feb 21, 2024
* Dont render attribution metabox for non-supported order types. (#44680)

* Dont render attribution metabox for non-supported order types.

* Use a screen check instead of order type check for better compat.

* phpcs fix

* Remove unnecessary call.

* Prep for cherry pick 44680

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
@alopezari alopezari added the fix release: 8.6.1 Temporary label for fix release metrics retrieval label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix release: 8.6.1 Temporary label for fix release metrics retrieval needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8.6.0. causes fatal error with Woo Subscriptions's subscription details area
7 participants