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

Remove redundant subscriptions.init() from EA API #2784

Merged
merged 8 commits into from Mar 1, 2023

Conversation

teiswit
Copy link
Collaborator

@teiswit teiswit commented Feb 28, 2023

It is not needed to call subscriptions.init(productId) when a productId is provided in the page markup. Furthermore this init call can result in an error if the page has already been initialized outside of EA. This is causing an issue with 3P integrations where SwG.js may have been initialized by method calls like getEntitlements() prior to GaaMetering.init.

Therefore I propose the folllowings:

  1. Remove the redundant subscriptions.init() from EA API
  2. Re-purpose GaaMetering.getProductIDFromPageConfig_() for a validation purpose i.e. ensuring the page has productId in the markup

Internal tracking: b/271063736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants