magento - How to add Custom Attributes in Google shopping content api with php? -


i using google shopping api last 1 year working properly. want add new attributes in such customlabel5. have used setcustomattributes() method , passed 3 attributes name, type ,value. but working showing error 400 invalid attribute values. following code please check , suggest proper answer that.

$product = new google_service_shoppingcontent_product(); $data= new google_service_shoppingcontent_productcustomattribute(); $data->setname('customlabel5'); $data->settype('text'); $data->setvalue('test'); $product->setcustomattributes($data); 

please give answer.


Comments