Weird customer_email attribute when using set_coupons
Closed this issue · 0 comments
michaelfranzl commented
The Woocommerce user interface in Wordpress, on the Coupons page, shows a weird customer email address:
a:1:{i:0;s:0:"";}
The request I made:
{
"action": "woocommerce_json_api",
"proc": "set_coupons",
"arguments": {
"token": "1234"
},
"payload": [
{
"code": "cc4",
"slug": "",
"type": "shop_coupon",
"publishing": "publish",
"discount_type": "",
"value": "",
"is_exclusive": "yes",
"limit": "",
"product_ids": [
""
],
"exclude_product_ids": "",
"expiry_date": "",
"is_before_tax": "yes",
"is_shipping_free": "yes",
"will_exclude_sale_products": "yes",
"product_category_ids": [
""
],
"exclude_product_category_ids": [
""
],
"minimum_total": "",
"customer_email": [
""
]
}
]
}
Similarly, when I send an email address with it:
"customer_email": [
"m@m.com"
]
The backend shows:
a:1:{i:0;s:7:"m@m.com";}