设置
我经营一家WooCommerce网店,有几种产品,其中有些有产品变体。你知道吗
我使用WooCommerce REST API来调整我网店中的内容。你知道吗
我的代码
调用具有变体的产品
product = uk_wcapi.get('products/51369').json()
这个很好用。你知道吗
这个产品有几个变种
print(product['variations'])
给出所有变体:https://gist.github.com/LucSpan/8185fa540cdd4267744f6c49f4b2a698
问题
我似乎无法调用或编辑产品变体。你知道吗
在explanation in the REST API documentation之后,当我试图编辑51369
的第一个产品变体时
具有id52548
,即
product_variation_1 = uk_wcapi.get('products/51369/variations/52548').json()
product_variation_1
等于
{'code': 'rest_no_route',
'data': {'status': 404},
'message': 'No route was found matching the URL and request method'}
我得到了上述任何产品的任何变化与变化的任何产品的错误。你知道吗
我做错什么了?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐