Skip to content

Remove IAP as experimental feature flag option #15799

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

Merged
merged 3 commits into from
Jun 24, 2025

Conversation

iamgabrielma
Copy link
Contributor

@iamgabrielma iamgabrielma commented Jun 23, 2025

Description

General feature flag clean-up. This PR removes the In-App purchases toggle as experimental feature flag for debug builds, and its debug view to test IAP.

I've only tackled the feature flag and debug view in this PR, but most likely there's more cleanup to be done around InAppPurchasesForWPComPlansManager, WPComPlanProduct, its stores/actions and so on. I have not checked yet if we still have any merchant with one of these plans active from when the feature and upgrade path was actually available.

Testing information

  • Run the app in debug build
  • Navigate to Menu > Settings > Experimental Features
  • Observe there is no In-App Purchases toggle
  • Debug builds also do not show any [Debug] IAP row in the app settings
Before Before
Simulator Screenshot - iPad mini (A17 Pro) - US store - 2025-06-23 at 13 27 00 Simulator Screenshot - iPad mini (A17 Pro) - US store - 2025-06-23 at 13 27 06
After After
Simulator Screenshot - iPad mini (A17 Pro) - US store - 2025-06-23 at 13 23 33 Simulator Screenshot - iPad mini (A17 Pro) - US store - 2025-06-23 at 13 23 46

@iamgabrielma iamgabrielma changed the title Remove beta flag for IAP Remove IAP as experimental feature flag option Jun 23, 2025
@iamgabrielma iamgabrielma added type: task An internally driven task. type: technical debt Represents or solves tech debt of the project. source: peacock-backlog Issue source, useful for migrating to Linear labels Jun 23, 2025
@iamgabrielma iamgabrielma added this to the 22.7 milestone Jun 23, 2025
@iamgabrielma iamgabrielma requested a review from joshheald June 23, 2025 06:30
@iamgabrielma iamgabrielma marked this pull request as ready for review June 23, 2025 06:30
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 23, 2025

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

App NameWooCommerce iOS Prototype
Build Number30677
VersionPR #15799
Bundle IDcom.automattic.alpha.woocommerce
Commit920e98b
Installation URL4h9opgdplb69o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@joshheald joshheald left a comment

Choose a reason for hiding this comment

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

Works as expected, thanks for cleaning this up!

InAppPurchasesForWPComPlansManager, WPComPlanProduct

If you could check for people with active plans, that would help. I'm not sure whether they can renew now that we've removed the plans from the store, but they might be able to. If so, we'll need to keep that code until everyone drops off.

The debug screen was entirely separate from that, especially by the time we shipped it, so there seems to be very little risk here.

@@ -568,7 +568,7 @@ final class HubMenuViewModelTests: XCTestCase {
@MainActor
func test_navigateToDestination_replaces_navigationPath_with_specified_destination() throws {
// Given
let generalAppSettings = try mockGeneralAppSettingsStorage(isInAppPurchaseEnabled: true)
let generalAppSettings = try mockGeneralAppSettingsStorage()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you still need to pass a mock?

It's fine, arguably good practice... just wondering if the mock is changing the behaviour at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem really needed, by not injecting the mock explicitly the test still passes as uses the Servicelocator's instance as default. It seems a bit better though, as the mock relies on MockInMemoryStorage as well when saving settings.

I personally don't like hiding the dependencies much if can be avoided, is not the first time I found issues with tests not working as expected because were relying on a ServiceLocator as default. I'll leave the mock for now, but I think it could benefit from some refactoring around the init at some point the next time we work in the HubMenuViewModel 👍

@iamgabrielma iamgabrielma enabled auto-merge June 24, 2025 03:04
@iamgabrielma iamgabrielma merged commit b7e7ffd into trunk Jun 24, 2025
13 checks passed
@iamgabrielma iamgabrielma deleted the task/remove-IAP-debug-menu branch June 24, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: peacock-backlog Issue source, useful for migrating to Linear type: task An internally driven task. type: technical debt Represents or solves tech debt of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants