woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
314 stars 113 forks source link

Send Receipt After Payment: Add eligibility checker #14446

Closed staskus closed 3 days ago

staskus commented 3 days ago

Partially addresses: https://github.com/woocommerce/woocommerce-ios/issues/14163 Continuation of https://github.com/woocommerce/woocommerce-ios/pull/14422

Description

Add eligibility checking logic for sending receipts after payment functionality:

Steps to reproduce

The feature flag is disabled, I think it could be enough to check unit test cases to confirm that supported scenarios are handled as expected. In the final PRs, we can test the full flows.

However, if you prefer testing live:

Eligible site

  1. Enable sendReceiptAfterPayment feature flag
  2. Use my testing site https://lovely-aware-sturgeon.jurassic.ninja/ details: PdfdoF-5Qj-p2
  3. Create an order
  4. Do not attach the customer
  5. Make a payment
  6. Confirm "Email receipt" button appears
  7. Tap on the button
  8. Input email
  9. Tap the CTA
  10. Confirm email appears

Ineligible site

  1. Enable sendReceiptAfterPayment feature flag
  2. Use a testing site that has released versions of WooCommerce and WooPayments
  3. Create an order
  4. Do not attach the customer
  5. Make a payment
  6. Confirm "Email receipt" doesn't appear (or it opens native Mail client if it's installed)

Testing information


Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

wpmobilebot commented 3 days ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14446-01c94d9
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commit01c94d9e1ce6d6f0e2db8dbf32df0566cdc2af9c
App Center BuildWooCommerce - Prototype Builds #11635

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.