目前在资源 “/coupon.json” 我们得到以下返回JSON试图优惠券(POST)时: 响应代码: {"status":400,"message":"The field 'id' cannot be written to. Please remove it from your request before trying again."}
的 “ID”字段显然没有在我们的代码中的位置,但我
参照这个问题How do I programmatically apply a coupon in Woocommerce? 我正在寻找非常相似,在第一篇文章的最终解决方案的东西,但我想,如果小计为> 99欧元适用优惠券。 您如何看待我可以修改代码?既然我是新手......我要在哪里粘贴整个代码? 非常感谢
我在通过代码添加优惠券折扣时遇到了问题。我得到这个错误 Fatal error: Call to a member function add_discount() on a non-object in C:\xampp\htdocs\teachingyounet\wp-content\themes\responsive\functions.php on line 43 我的代码: function