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

Add mobile app order attribution source #44519

Merged
merged 3 commits into from Feb 15, 2024
Merged

Conversation

layoutd
Copy link
Contributor

@layoutd layoutd commented Feb 9, 2024

Changes proposed in this Pull Request:

Closes #44490.

This PR introduces the "Mobile app" order origin to correctly identify orders created in the Woo Mobile App.

image
image

NOTE: This PR will only work after #44496 has been merged and the Order Attribution classes are being loaded properly again. Dependency PR merged ✔️

How to test the changes in this Pull Request:

  1. Create an order in the WooCommerce dashboard (/wp-admin/post-new.php?post_type=shop_order).
  2. The order should show "Web admin" as the origin in the Orders table ( /wp-admin/edit.php?post_type=shop_order) and Order Edit "Order attribution" metabox (/wp-admin/post.php?post=[ORDER_ID]&action=edit).
  3. Update the order metadata value for _wc_order_attribution_source_type to mobile_app.
    Using the WC CLI, for example (insert the order ID and admin user if necessary):
    wp wc shop_order update [ORDER_ID] --user=admin --meta_data='[{"key":"_wc_order_attribution_source_type","value":"mobile_app"}]'
    wp wc shop_order get [ORDER_ID] --user=admin --field=meta_data
  4. Confirm that the order shows "Mobile app" as the origin in the Orders table and Order Edit metabox.

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 the focus: order attribution Issues related to the order attribution feature label Feb 9, 2024
@layoutd layoutd self-assigned this Feb 9, 2024
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 9, 2024
@layoutd layoutd changed the title Add/mobile app order attribution Add mobile app order attribution source Feb 9, 2024
Copy link
Contributor

github-actions bot commented Feb 9, 2024

Test Results Summary

Commit SHA: 50b63f6

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

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.

Copy link
Contributor

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

@layoutd layoutd force-pushed the add/mobile-app-order-attribution branch from 9e2acf0 to 50b63f6 Compare February 13, 2024 15:12
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, @layoutd. I followed the test instructions and the PR tests well.

@layoutd layoutd merged commit b439a01 into trunk Feb 15, 2024
34 checks passed
@layoutd layoutd deleted the add/mobile-app-order-attribution branch February 15, 2024 12:44
@github-actions github-actions bot added this to the 8.7.0 milestone Feb 15, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 15, 2024
@Stojdza Stojdza added status: analysis complete Indicates if a PR has been analysed by Solaris needs: internal testing Indicates if the PR requires further testing conducted 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. needs: internal testing Indicates if the PR requires further testing conducted by Solaris labels Feb 16, 2024
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.

[Enhancement]: Order attribution "Origin" - Handle source type mobile_app
3 participants