{"action":"opened","issue":{"url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12286","repository_url":"https://api.github.com/repos/woocommerce/woocommerce","labels_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12286/labels{/name}","comments_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12286/comments","events_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/12286/events","html_url":"https://github.com/woocommerce/woocommerce/issues/12286","id":188174894,"number":12286,"title":"Download array not returning variation id","user":{"login":"dare-devil-arrives","id":16662063,"avatar_url":"https://avatars.githubusercontent.com/u/16662063?v=3","gravatar_id":"","url":"https://api.github.com/users/dare-devil-arrives","html_url":"https://github.com/dare-devil-arrives","followers_url":"https://api.github.com/users/dare-devil-arrives/followers","following_url":"https://api.github.com/users/dare-devil-arrives/following{/other_user}","gists_url":"https://api.github.com/users/dare-devil-arrives/gists{/gist_id}","starred_url":"https://api.github.com/users/dare-devil-arrives/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dare-devil-arrives/subscriptions","organizations_url":"https://api.github.com/users/dare-devil-arrives/orgs","repos_url":"https://api.github.com/users/dare-devil-arrives/repos","events_url":"https://api.github.com/users/dare-devil-arrives/events{/privacy}","received_events_url":"https://api.github.com/users/dare-devil-arrives/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-09T06:23:39Z","updated_at":"2016-11-09T06:23:39Z","closed_at":null,"body":"## EXPLANATION OF THE ISSUE\r\n\r\nTill WooCommerce v2.6.4, for variable products, download array used to return values:\r\n`$download : Array\r\n(\r\n    [download_url] => http://www.abc.com/?download_file=443&order=wc_order_581081e58c191&email=abc@abc.com&key=e06b8e8fcf158e518e2443bdb6eba5e7\r\n    [download_id] => e06b8e8fcf158e518e2443bdb6eba5e7\r\n    [product_id] => 443\r\n    [download_name] => Serial Key - Variable &ndash; SKV-Black\r\n    [order_id] => 700\r\n    [order_key] => wc_order_581081e58c191\r\n    [downloads_remaining] => \r\n    [access_expires] => 2016-10-27 00:00:00\r\n    [file] => Array\r\n        (\r\n            [name] => SKV-Black\r\n            [file] => http://www.abc.com/wp-content/uploads/woocommerce_uploads/2016/06/Key-2.jpg\r\n        )\r\n)`\r\n\r\nHere `[product_id] => **443**` is actually variation id whose parent (variable) product id is **440**.\r\n\r\nBut from WooCommerce v2.6.5 onwards, for variable products, download array now returns values: \r\n`$download : Array\r\n(\r\n    [download_url] => http://www.abc.com/?download_file=443&order=wc_order_581081e58c191&email=abc@abc.com&key=e06b8e8fcf158e518e2443bdb6eba5e7\r\n    [download_id] => e06b8e8fcf158e518e2443bdb6eba5e7\r\n    [product_id] => 440\r\n    [download_name] => Serial Key - Variable &ndash; SKV-Black\r\n    [order_id] => 700\r\n    [order_key] => wc_order_581081e58c191\r\n    [downloads_remaining] => \r\n    [access_expires] => 2016-10-27 00:00:00\r\n    [file] => Array\r\n        (\r\n            [name] => SKV-Black\r\n            [file] => http://www.abc.com/wp-content/uploads/woocommerce_uploads/2016/06/Key-2.jpg\r\n        )\r\n)`\r\n\r\nNow here, `[product_id] => **440**` is actually variable product's id.\r\nMeaning, there is no way I have variation id of the product in the array.\r\n\r\nI have a custom plugin which fetches variation id & order id from the download array and shows results. Now since there is no variation id in the array, it fails.\r\n\r\nWas there any reason to remove variation id from the array?"}}
{"actor":{"display_login":"dare-devil-arrives"}}