目前在資源 「/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