We are unable to return a list of add-on products for our Windows Store app.
We have an app in the Windows Store with 3 subscription add-ons.The add-ons are marked as Hidden as we don't want them visible in the store, only through our app.
We are developing a new version of our app which targets Windows 16299. We are using the Windows.Services.Store
namespace.
However this code only returns one of the list of add-ons
if (context == null)
context = StoreContext.GetDefault();
string[] productKinds = { "Durable" };
List<String> filterList = new List<string>(productKinds);
StoreProductQueryResult queryResult = await context.GetAssociatedStoreProductsAsync(filterList);
foreach (KeyValuePair<string, StoreProduct> addOn in queryResult.Products)
{
StoreProduct product = addOn.Value;
AddOnList.Add(product);
}
ExtendedError = null
Why does this code only return one of the list of add-on products?
The products have been certified and are listed as In The Store.
Micorsoft App store takes some time (approx. 24 hours) to enable the products/add-ons (some time apps as well) to programming APIs. It happened to me while getting products in my app very long time ago.
Always make sure that It could take some time to get updated for the addon/product after your new package gets into the Store.
I got something worth to look for getting add-on/product via API. Check this.