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

Allow passing a "source type" when creating Woo Orders. #2964

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Mar 1, 2024

Part of woocommerce/woocommerce-android#10990

This PR updates the Woo Order store by allowing passing a custom "source type" to attribute the order to (check woocommerce/woocommerce-android#10960 for more details).

Instead of hardcoding the value of the mobile app in FluxC, I opted for making a configurable value, where each client can use their own, even though for now WCAndroid is the only client.

Testing
  1. Open the example app and sign in.
  2. Click on Woo, then Orders.
  3. Select a site.
  4. Click on Create an order.
  5. Enter a product ID.
  6. Skip the other steps.
  7. When the order is created, check it in wp-admin, and confirm it has a source type set to: "fluxc-example-app" (the Origin will be unknown, as this source type value is not mapped by Core)

Copy link

sonarqubecloud bot commented Mar 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@0nko 0nko left a comment

Choose a reason for hiding this comment

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

The test works as expected 👍

@0nko 0nko merged commit 1d7da09 into trunk Mar 5, 2024
14 checks passed
@0nko 0nko deleted the order-creation-attribution branch March 5, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants