【发布时间】:2018-08-23 13:01:45
【问题描述】:
我在我的 ionic 应用中创建 Woocommerce 产品。我还想在创建产品时推送库存数量。但是,库存始终是 NULL 存储在我的 MYSQL 数据库中。这是 JSON 提要
{
"product": {
"title": "test stock",
"stock_quantity": "35",
"images": [],
"post_author": 88,
"type": "simple",
"categories": []
}
}:
这里是应用程序中的一段代码
var productInfo = {
title: this.productName,
regular_price: this.productPrice,
sale_price: this.productDiscount,
stock_quantity: this.productStock,
description: this.productDesc,
images: new Array<any>(),
post_author: this.userService.id,
type: this.productType,
categories: new Array<any>()
};
我为 stock_quantity 尝试了不同的标签,比如只有“stock”,并尝试用“”推送变量,而没有它。但我仍然面临同样的问题。
【问题讨论】:
标签: php woocommerce