{"action":"created","issue":{"url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12173","repository_url":"https://api.github.com/repos/woocommerce/woocommerce","labels_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12173/labels{/name}","comments_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12173/comments","events_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12173/events","html_url":"https://github.com/woocommerce/woocommerce/issues/12173","id":185122987,"number":12173,"title":"Variation SKU cannot be re-used when a product type is changed from variable to another type","user":{"login":"paulwilde","id":704594,"avatar_url":"https://avatars.githubusercontent.com/u/704594?v=3","gravatar_id":"","url":"https://api.github.com/users/paulwilde","html_url":"https://github.com/paulwilde","followers_url":"https://api.github.com/users/paulwilde/followers","following_url":"https://api.github.com/users/paulwilde/following{/other_user}","gists_url":"https://api.github.com/users/paulwilde/gists{/gist_id}","starred_url":"https://api.github.com/users/paulwilde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulwilde/subscriptions","organizations_url":"https://api.github.com/users/paulwilde/orgs","repos_url":"https://api.github.com/users/paulwilde/repos","events_url":"https://api.github.com/users/paulwilde/events{/privacy}","received_events_url":"https://api.github.com/users/paulwilde/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-25T13:48:58Z","updated_at":"2016-10-25T15:39:00Z","closed_at":"2016-10-25T14:50:55Z","body":"When you have a product that is set as a Variable product with any number of variations that contain SKUs and then change the product to be another type (such as Simple, or External), you cannot re-use the variation SKUs that already exist as the `_sku` meta key still exists, despite those variations no longer being used.\r\n\r\nThe only workaround I've found is to manually delete the `_sku` meta keys for those variations which are no longer used. \r\n\r\nIdeally the code that checks if a SKU is unique should exclude any variation SKU that is no longer being used, such as those in this scenario where the product type has been changed after the product initially being a variable product, or better yet remove the variations when the product type is changed."},"comment":{"url":"https://api.github.com/repos/woocommerce/woocommerce/issues/comments/256072536","html_url":"https://github.com/woocommerce/woocommerce/issues/12173#issuecomment-256072536","issue_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12173","id":256072536,"user":{"login":"claudiosanches","id":1264099,"avatar_url":"https://avatars.githubusercontent.com/u/1264099?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiosanches","html_url":"https://github.com/claudiosanches","followers_url":"https://api.github.com/users/claudiosanches/followers","following_url":"https://api.github.com/users/claudiosanches/following{/other_user}","gists_url":"https://api.github.com/users/claudiosanches/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiosanches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiosanches/subscriptions","organizations_url":"https://api.github.com/users/claudiosanches/orgs","repos_url":"https://api.github.com/users/claudiosanches/repos","events_url":"https://api.github.com/users/claudiosanches/events{/privacy}","received_events_url":"https://api.github.com/users/claudiosanches/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T15:39:00Z","updated_at":"2016-10-25T15:39:00Z","body":"And we are adding an option to remove all orphan variations in 2.7."}}
{"actor":{"display_login":"claudiosanches"}}