Open alexp25 opened 6 months ago
I'm not sure if this helps, but if you look in the migration guide, it says "In the new version, only valid products are included in store.products...":
https://github.com/j3k0/cordova-plugin-purchase/wiki/HOWTO:-Migrate-to-v13#detecting-valid-products
That's exactly my point - now there seems to be no way to check the valid products until they are loaded from the store, but how can I wait for the valid products to load without waiting forever for the invalid products?
My understanding is that it doesn't load invalid products at all - only valid products. So you shouldn't need to worry about waiting for invalid products to load.
Yes but how do I know they are invalid if they don't load at all? I should wait for them to load eventually, right? But now if they are invalid..
I guess you'd log out the ones that do load and see if there are any missing..
Observed behavior
The new version of this plugin does not detect invalid products (e.g., not available/deactivated products, etc.) Previously, there used to be an event
store.when().invalid
and now there is onlystore.when().valid
How is it possible now to detect invalid products while loading their details from the store? It seems
store.get(pid)
returns undefined until the products have been loaded, but that would imply waiting for the invalid products forever.Expected behavior
There should be an event triggered for invalid products too, or some way to skip waiting for them to load.