Woocommerce api选项格式为默认的_属性和属性

Woocommerce api选项格式为默认的_属性和属性,woocommerce,woocommerce-rest-api,Woocommerce,Woocommerce Rest Api,我正在为woocommerce开发react中的产品配置程序,为此我使用woocommerce rest api。除了一件奇怪的事,一切都很好 当我查询产品时: \u product=wait WooCommerce.get(“products/”+productId) 我收到这个物品: { id: 37464, name: "Product", slug: "product", ... attributes:[ {id:14, name:'Attribu

我正在为woocommerce开发react中的产品配置程序,为此我使用woocommerce rest api。除了一件奇怪的事,一切都很好

当我查询产品时:
\u product=wait WooCommerce.get(“products/”+productId)

我收到这个物品:

{
id: 37464,
name: "Product",
slug: "product",
...
attributes:[ {id:14, name:'Attribute name', options:["Option Name 1", "Option Name 2"]}]
...
default_attributes: {id:14, name:'Attribute name', options:["option-slug-1", "option-slug-2"]}
正如您可以看到的,属性选项的格式不同,我在属性列表中有一个名称,在默认的_属性中有一个slug,这是一个问题,因为要使配置程序工作,我需要具有相同的格式,是否可以同时具有名称和slug,或者在两个对象属性中至少具有相同类型的数据

tnx