json - Check if a category has a parent category in WooCommerce REST API

admin2025-06-07  45

I am trying to list the categories of my Woocommerce in an "iOS App" using json.

My problem comes from not knowing if a category has subcategories or not (The parameter "Parent" is not useful for me)

{
id: 17,
name: "Uncategorized",
slug: "uncategorized",
parent: 0,
description: "",
.
.
.
}

There is some way to add a parameter to the json that can tell me if a category has subcategory (sample isSubcategory: true/false) or any suggestion to solve my problem.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749254133a317644.html

最新回复(0)