How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Include hidden & retired attributes in GetProduct's response for products themselves, and configurable options



Products support "hidden" and "retired" bool attributes. Configurable options support a "hidden" bool attribute as well. These are fundamental attributes to support produce and options lifecycle states as they are being deprecated.

When developing your own storefront GetProducts is used to obtain all products, their options and relevant attributes. At this time, hidden and retired products and options are included in the GetProduct[^1] response without any indication of their hidden/retired state. They are indistinguishable from still active products/options. This defeats the purpose of having these states - they are unusable when you develop your own storefront. Either filter products/options in hidden states out from the response, or (preferably, more use cases), include these attributes in the response.

Without this, we are left with managing state some other implicit way - e.g. hiding based on product/option name strings ending in ' (deprecated)' or such.

[^1]: Note that no other existing API method seems to carry this information as well, at least that we could find.

Post the first comment

Login to post a comment.