Description
Disables purchase management and auto-renew toggle for in-app purchases, adds a user notice regarding how to manage the purchase (via the app store) and adds ‘In-App Purchase’ as a visual payment method in the purchase meta.
Fixes #58496
Changes proposed in this Pull Request
- Remove purchase management options if the API returns
purchase.is_locked: true
- Remove ‘Upgrade’ button from the plans page if
purchase.is_locked: true
for that plan purchase
- Show ‘In-App Purchase’ under payment method if the API returns
purchase.is_iap_purchase: true
- Show ‘This product is an in-app purchase, it can only be managed via the app store.’ notice if API returns
purchase.is_locked: true
and purchase.is_iap_purchase: true
Testing instructions
- Apply diff D70663 for the public API changes
- Have a (non-ecommerce) subscription on your account that was paid for using in-app-purchases (payment method is ‘iap_ios’, or ping me and I can add one to your account).
- View the purchase in Calypso (e.g.
/me/purchases/{ site_url }/{ purchase_id }
)
- Assert that there are no options to manage the purchase (e.g. renew, refund, toggle auto-renew, cancel, remove etc)
- Assert that the payment method shows ‘In-App Purchase’
- Assert that there is a user notice instructing the user to manage the purchase in the app store
- Assert that there is no ‘Upgrade’ button on the Plans page (
/plans/{ site_url }
)
- Have a subscription on your account that was not paid for using in-app-purchases (e.g. added via Store Admin).
- View the purchase in Calypso (e.g.
/me/purchases/{ site_url }/{ purchase_id }
)
- Assert that there are the usual options to manage the purchase (e.g. renew, refund, toggle auto-renew, cancel, remove etc)
- Assert that the payment method shows the expected value (e.g. ‘None’ for a Store Admin addition)
- Assert that there is not a user notice instructing the user to manage the purchase in the app store
Unfortunately, no screenshots were provided by the developer.