我正在使用WP MyCred积分系统。但是,无论出于何种原因,当用户应用优惠券时,它都不会更新后端...
如果我手动进入用户个人资料,只需再次“保存”个人资料即可。
话虽如此,我试图在用户注册后自动向mycred_balance用户元添加1000。
我发现user_register是可以使用的正确钩子,但更新仍然有问题。这是我的代码...
For Each Item In Request.Form
fieldName = Item 'This is the ID (with above field name: qtyID where ID is the ID from the DB.
fieldValue = Request.Form(Item) 'This is the Quantity of that Article ID
articleid=replace(fieldName,"qty","")
sql="update table set qty=" + fieldValue + " where id=" + articleid
Next