added a public setOrderOptedIn function #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Report scenario is:
So my thought on this report is there isn't an actual issue in our SDK.
But The problem is that they decide to render the
multi-opt-in
widget after they got the eligibility result of themulti-opt-in
widget by calling an exposed function namedcheckMultiOptInEligibility
. and if it returnsnot-eligible
, then they rather not rendermulti-opt-in
widget on their end.which means our SDK skips the operation of updating OrderOptedIn value.
So if
OrderOptedIn
was previously set astrue
, this value won't change in the above case, and on confirmation view, the widget will be automatically eligible.This made the issue.
So I added another function called
setOrderOptedIn
to let them set the value manually on their end just for them.