{"action":"created","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/11529","repository_url":"https://api.github.com/repos/woothemes/woocommerce","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11529/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11529/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11529/events","html_url":"https://github.com/woothemes/woocommerce/issues/11529","id":167504335,"number":11529,"title":"Feature request: hooks to add fields to Attributes and Global Add-ons","user":{"login":"nimmolo","id":1948095,"avatar_url":"https://avatars.githubusercontent.com/u/1948095?v=3","gravatar_id":"","url":"https://api.github.com/users/nimmolo","html_url":"https://github.com/nimmolo","followers_url":"https://api.github.com/users/nimmolo/followers","following_url":"https://api.github.com/users/nimmolo/following{/other_user}","gists_url":"https://api.github.com/users/nimmolo/gists{/gist_id}","starred_url":"https://api.github.com/users/nimmolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimmolo/subscriptions","organizations_url":"https://api.github.com/users/nimmolo/orgs","repos_url":"https://api.github.com/users/nimmolo/repos","events_url":"https://api.github.com/users/nimmolo/events{/privacy}","received_events_url":"https://api.github.com/users/nimmolo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T01:53:13Z","updated_at":"2016-07-26T23:44:57Z","closed_at":"2016-07-26T10:16:56Z","body":"It is impossible to hook into admin functions for **Attributes** or  **Global Add-ons** to add extra fields, like \"description\" or \"thumbnail\". ACF can't add fields to them either. I need some extra fields.\r\n\r\nWhile it is possible to add these at the **variation** level, an attribute is not the same as a product variation. In a highly configurable product such as a personal computer, the attribute is the _hard drive_, the variation is the _computer with whatever hard drive_. And it can be very helpful to have a graphic and a description to tell the client exactly what **attribute** they are configuring (the monitor, hd, keyboard, mouse) and why you'd want one or the other option. \r\n\r\nIn my case, configured plumbing systems, these fields are pretty essential.\r\n\r\nFor a post_type like **Add-ons**, it seems to me the most WP way to add these two fields would be to enable them via swtiches in the post_type declaration: `'supports' => $selected` where $selected is an `array( 'title', 'thumbnail', 'excerpt' )` chosen by the user on a Settings page. For a taxonomy like **Attributes** maybe hooks would do. In any case, the problem is these objects both seem impervious to modification, without redeclaring the classes that create them as suggested in #7105."},"comment":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/comments/235439997","html_url":"https://github.com/woothemes/woocommerce/issues/11529#issuecomment-235439997","issue_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11529","id":235439997,"user":{"login":"nimmolo","id":1948095,"avatar_url":"https://avatars.githubusercontent.com/u/1948095?v=3","gravatar_id":"","url":"https://api.github.com/users/nimmolo","html_url":"https://github.com/nimmolo","followers_url":"https://api.github.com/users/nimmolo/followers","following_url":"https://api.github.com/users/nimmolo/following{/other_user}","gists_url":"https://api.github.com/users/nimmolo/gists{/gist_id}","starred_url":"https://api.github.com/users/nimmolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimmolo/subscriptions","organizations_url":"https://api.github.com/users/nimmolo/orgs","repos_url":"https://api.github.com/users/nimmolo/repos","events_url":"https://api.github.com/users/nimmolo/events{/privacy}","received_events_url":"https://api.github.com/users/nimmolo/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T23:44:57Z","updated_at":"2016-07-26T23:44:57Z","body":"Hooking into attribute admin screens is actually a bit more complicated!  Each attribute is a separate taxonomy and therefore the hooks are each uniquely named.\r\n\r\nFor product category images, the hooks are `product_cat_add_form_fields` and `product_cat_edit_form_fields`.\r\n\r\nBut for attribute \"Wheel width\", the hooks might be `pa_wheel-width_add_form_fields` - you have to loop through all the attributes?\r\n"}}
{"actor":{"display_login":"nimmolo"}}