{"action":"closed","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/7678","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/7678/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/7678/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/7678/events","html_url":"https://github.com/woothemes/woocommerce/issues/7678","id":60357584,"number":7678,"title":"product > attributes > visible overwrite to false on update","user":{"login":"kallewallin","id":796502,"avatar_url":"https://avatars.githubusercontent.com/u/796502?v=3","gravatar_id":"","url":"https://api.github.com/users/kallewallin","html_url":"https://github.com/kallewallin","followers_url":"https://api.github.com/users/kallewallin/followers","following_url":"https://api.github.com/users/kallewallin/following{/other_user}","gists_url":"https://api.github.com/users/kallewallin/gists{/gist_id}","starred_url":"https://api.github.com/users/kallewallin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kallewallin/subscriptions","organizations_url":"https://api.github.com/users/kallewallin/orgs","repos_url":"https://api.github.com/users/kallewallin/repos","events_url":"https://api.github.com/users/kallewallin/events{/privacy}","received_events_url":"https://api.github.com/users/kallewallin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-09T15:11:43Z","updated_at":"2015-03-09T15:48:36Z","closed_at":"2015-03-09T15:48:36Z","body":"If i try to update a product using the following:\r\n\r\n```\r\nPUT /wc-api/v2/products/[id]\r\n\r\n{  \r\n   \"product\":{  \r\n      \"type\":\"variable\",\r\n      \"attributes\":[  \r\n         {  \r\n            \"name\":\"Color\",\r\n            \"slug\":\"color\",\r\n            \"options\":[  \r\n               \"Red\",\r\n               \"Green\"\r\n            ],\r\n            \"variation\":true\r\n         }\r\n      ]\r\n   }\r\n}\r\n```\r\n\r\nThe result is that ```\"visible\": false``` will be set on the product even if it was ```\"visible\": true``` before the update\r\n\r\nbefore update:\r\n\r\n```\r\n\"attributes\": [\r\n  {\r\n    \"name\": \"Color\",\r\n    \"slug\": \"Color\",\r\n    \"position\": \"0\",\r\n    \"visible\": true,\r\n    \"variation\": true,\r\n    \"options\": [\r\n      \"Red\",\r\n      \"Green\"\r\n    ]\r\n  }\r\n]\r\n```\r\n\r\nafter update:\r\n\r\n```\r\n\"attributes\": [\r\n  {\r\n    \"name\": \"Color\",\r\n    \"slug\": \"Color\",\r\n    \"position\": \"0\",\r\n    \"visible\": false,\r\n    \"variation\": true,\r\n    \"options\": [\r\n      \"Red\",\r\n      \"Green\"\r\n    ]\r\n  }\r\n]\r\n```\r\n\r\n"}}