Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[in_app_purchase] Deprecated the InAppPurchaseAndroidPlatformAddition.enablePendingPurchases method. #4527

Merged
merged 4 commits into from
Nov 29, 2021

Conversation

mvanbeusekom
Copy link
Contributor

@mvanbeusekom mvanbeusekom commented Nov 19, 2021

Deprecates the InAppPurchaseAndroidPlatformAddition.enablePendingPurchases method and the InAppPurchaseAndroidPlatformAddition.enablePendingPurchase property.

An additional PR will follow to update the documentation in the README.md of the in_app_purchase package as this needs to be released separately.

Resolves flutter/flutter#93837

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

static bool _enablePendingPurchase = false;
@Deprecated(
'The requirement to call `enablePendingPurchases()` has become obsolete since Google Play no longer accepts app submissions that don\'t support pending purchases.')
static bool get enablePendingPurchase => true;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't entirely sure about this update (always returning true instead of returning the _enablePendingPurchase variable). However I decided to do the update like this to prevent false expectations where people might think pending purchases are not enabled (because they never called enablePendingPurchases()).

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to me.

Deprecates the
`InAppPurchaseAndroidPlatformAddition.enablePendingPurchases` method and
the `InAppPurchaseAndroidPlatformAddition.enablePendingPurchase`
property.
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM with nits, but @cyanglaz should probably review too.

static bool _enablePendingPurchase = false;
@Deprecated(
'The requirement to call `enablePendingPurchases()` has become obsolete since Google Play no longer accepts app submissions that don\'t support pending purchases.')
static bool get enablePendingPurchase => true;
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to me.

@mvanbeusekom
Copy link
Contributor Author

@cyanglaz I have resolved nits mentioned by @stuartmorgan could you please have a look at this PR?

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@mvanbeusekom mvanbeusekom added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Nov 29, 2021
@fluttergithubbot fluttergithubbot merged commit 3990aaf into flutter:master Nov 29, 2021
@mvanbeusekom mvanbeusekom deleted the issue/93837_android branch November 29, 2021 21:23
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2021
stuartmorgan-g pushed a commit that referenced this pull request Dec 10, 2021
…urchaseAndroidPlatformAddition.enablePendingPurchases ` method (#4597)

This will resolve flutter/flutter#93837 & this work is just the follow-up from #4527 PR.

We need to update the documentation in the README.md of the in_app_purchase package to remove the instruction of initialization with the deprecated `InAppPurchaseAndroidPlatformAddition.enablePendingPurchases` method.

Fixes flutter/flutter#94977
amantoux pushed a commit to amantoux/plugins that referenced this pull request Dec 11, 2021
amantoux pushed a commit to amantoux/plugins that referenced this pull request Dec 11, 2021
…urchaseAndroidPlatformAddition.enablePendingPurchases ` method (flutter#4597)

This will resolve flutter/flutter#93837 & this work is just the follow-up from flutter#4527 PR.

We need to update the documentation in the README.md of the in_app_purchase package to remove the instruction of initialization with the deprecated `InAppPurchaseAndroidPlatformAddition.enablePendingPurchases` method.

Fixes flutter/flutter#94977
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
…urchaseAndroidPlatformAddition.enablePendingPurchases ` method (flutter#4597)

This will resolve flutter/flutter#93837 & this work is just the follow-up from flutter#4527 PR.

We need to update the documentation in the README.md of the in_app_purchase package to remove the instruction of initialization with the deprecated `InAppPurchaseAndroidPlatformAddition.enablePendingPurchases` method.

Fixes flutter/flutter#94977
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: in_app_purchase platform-android waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InAppPurchase.instance requires calling enablePendingPurchases()
4 participants