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

Hide unnecessary order attribution details #44907

Merged
merged 3 commits into from Mar 6, 2024

Conversation

layoutd
Copy link
Contributor

@layoutd layoutd commented Feb 22, 2024

Changes proposed in this Pull Request:

This is a small change to the Order Attribution metabox to hide the "More details" dropdown for a specific set of sources. Unknown sources already had the "more details" toggle hidden, but this PR hides it for direct, web admin, and mobile app orders too.

Screenshots

🟡 Before changes:
Direct, Web admin and Mobile app "More details" are always the same, and not informative.

image

🟢 With changes:
image

How to test the changes in this Pull Request:

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

  1. Create orders with the various different order sources
    • Using an new incognito window for each order OR erasing the sbjs_ cookies after each order
    • Via referral. Go to any website (<woo.com>, for example) and edit a link href in developer tools to point to the store. Add items to the cart and complete the checkout.
    • Organic. Same as above, but use <google.com>.
    • Using UTM parameters. Open the store with a URL like https://woocommerce.store/shop/?utm_source=newsletter&utm_medium=email&utm_campaign=sale&utm_content=utmcontent&utm_term=utm_term. Add items to the cart and complete the checkout.
    • Typein. Like above, but without any parameters.
    • Web admin. Create from the Add Order page.
    • Mobile app. Create an order like above, but change the meta value _wc_order_attribution_source_type to mobile_app. This can be done using the filter add_filter( 'is_protected_meta', '__return_false' ); then editing the meta value on the Order edit page.
    • Unknown. Either disable order attribution and create another from the Add Order page, or create an order and delete all _wc_order_attribution_* meta values.
  2. Confirm that the order attribution types that should have values, have them: referral, organic and source (utm) should have more details toggles.
  3. Confirm that the simple order attribution types have no more details toggles: unknown, direct, web admin, mobile app.
  4. Check for no errors and the correct values in the Orders table as well.

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

@layoutd layoutd added team: Ventures focus: order attribution Issues related to the order attribution feature labels Feb 22, 2024
@layoutd layoutd self-assigned this Feb 22, 2024
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 22, 2024
Copy link
Contributor

Test Results Summary

Commit SHA: ab2a71d

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests319002503448m 33s

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.

@layoutd layoutd requested a review from a team March 5, 2024 15:01
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Hi , @woocommerce/ventures

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.

Good change. The UI is much clearer this way.

@layoutd layoutd merged commit 56d087f into trunk Mar 6, 2024
45 of 46 checks passed
@layoutd layoutd deleted the tweak/hide-unnecesary-order-attribution-details branch March 6, 2024 10:25
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 6, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 6, 2024
@layoutd
Copy link
Contributor Author

layoutd commented Mar 6, 2024

Thanks for the eyes @budzanowski

@Stojdza Stojdza added status: analysis complete Indicates if a PR has been analysed by Solaris needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 6, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* Hide more details for simple sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: order attribution Issues related to the order attribution feature needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Ventures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants