-
Notifications
You must be signed in to change notification settings - Fork 118
Remove pointOfSaleReceipts
feature flag
#16103
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
base: trunk
Are you sure you want to change the base?
Conversation
@@ -110,29 +106,23 @@ protocol PointOfSaleOrderControllerProtocol { | |||
|
|||
@MainActor | |||
func sendReceipt(recipientEmail: String) async throws { | |||
var isEligibleForPOSReceipt: Bool? | |||
var isEligibleForPOSReceipt: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAU we have no reason for this to be nil, since it's either eligible or it isn't. Also allows to simplify the value we pass to the catch block and the track event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, if there was no order, or orderService.updatePOSOrder
threw an error, we'd track the receiptEmailFailed
event without eligible_for_pos_receipt
(thanks to the compactMapValues.)
Now we'll log it as false even if the real answer would have been true.
Perhaps we should just set the isEligible
at the top instead of after updating the order. The only thing it uses is the siteID, which isn't going to change from the order update, surely.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning this up. One point about analytics changes this'll cause though...
@@ -110,29 +106,23 @@ protocol PointOfSaleOrderControllerProtocol { | |||
|
|||
@MainActor | |||
func sendReceipt(recipientEmail: String) async throws { | |||
var isEligibleForPOSReceipt: Bool? | |||
var isEligibleForPOSReceipt: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, if there was no order, or orderService.updatePOSOrder
threw an error, we'd track the receiptEmailFailed
event without eligible_for_pos_receipt
(thanks to the compactMapValues.)
Now we'll log it as false even if the real answer would have been true.
Perhaps we should just set the isEligible
at the top instead of after updating the order. The only thing it uses is the siteID, which isn't going to change from the order update, surely.
Description
Cleans up feature flag service by removing
pointOfSaleReceipts
, which has been in production for a while.Testing info
Sending receipts should work normally. For more granular testing:
POSReceiptService.sendReceipt(...)
receiptsRemote.sendPOSReceipt()
POSReceiptEligibilityConstants.wcPluginMinimumVersion
to something like"15.0.0"
receiptsRemote.sendReceipt()
instead.