{"action":"created","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/10071","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10071/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10071/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10071/events","html_url":"https://github.com/woothemes/woocommerce/issues/10071","id":126629926,"number":10071,"title":"Custom order tables + new orders UI","user":{"login":"mikejolley","id":90977,"avatar_url":"https://avatars.githubusercontent.com/u/90977?v=3","gravatar_id":"","url":"https://api.github.com/users/mikejolley","html_url":"https://github.com/mikejolley","followers_url":"https://api.github.com/users/mikejolley/followers","following_url":"https://api.github.com/users/mikejolley/following{/other_user}","gists_url":"https://api.github.com/users/mikejolley/gists{/gist_id}","starred_url":"https://api.github.com/users/mikejolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikejolley/subscriptions","organizations_url":"https://api.github.com/users/mikejolley/orgs","repos_url":"https://api.github.com/users/mikejolley/repos","events_url":"https://api.github.com/users/mikejolley/events{/privacy}","received_events_url":"https://api.github.com/users/mikejolley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/woothemes/woocommerce/labels/API","name":"API","color":"207de5"},{"url":"https://api.github.com/repos/woothemes/woocommerce/labels/CLI","name":"CLI","color":"207de5"},{"url":"https://api.github.com/repos/woothemes/woocommerce/labels/Needs%20Dev%20Feedback","name":"Needs Dev Feedback","color":"a46497"},{"url":"https://api.github.com/repos/woothemes/woocommerce/labels/Refactor","name":"Refactor","color":"eb6420"},{"url":"https://api.github.com/repos/woothemes/woocommerce/labels/UI","name":"UI","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/woothemes/woocommerce/milestones/52","html_url":"https://github.com/woothemes/woocommerce/milestones/3.0","labels_url":"https://api.github.com/repos/woothemes/woocommerce/milestones/52/labels","id":1439257,"number":52,"title":"3.0","description":"Placing larger items and refactors here for potential future development.","creator":{"login":"mikejolley","id":90977,"avatar_url":"https://avatars.githubusercontent.com/u/90977?v=3","gravatar_id":"","url":"https://api.github.com/users/mikejolley","html_url":"https://github.com/mikejolley","followers_url":"https://api.github.com/users/mikejolley/followers","following_url":"https://api.github.com/users/mikejolley/following{/other_user}","gists_url":"https://api.github.com/users/mikejolley/gists{/gist_id}","starred_url":"https://api.github.com/users/mikejolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikejolley/subscriptions","organizations_url":"https://api.github.com/users/mikejolley/orgs","repos_url":"https://api.github.com/users/mikejolley/repos","events_url":"https://api.github.com/users/mikejolley/events{/privacy}","received_events_url":"https://api.github.com/users/mikejolley/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-12-02T10:10:13Z","updated_at":"2016-01-14T10:53:20Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2016-01-14T10:53:13Z","updated_at":"2016-01-15T10:02:02Z","closed_at":null,"body":"These are the steps I think we need to cover (in sequence) in order to migrate orders to a custom DB table (#9735).\r\n\r\n_Phase 1: Data Abstraction - 2.x.x_\r\n\r\nPhase 1 will be to remove any reliance for core and 3rd party plugins on WP functions, namely post and post meta functions. Also (@claudiosmweb) we really need to start consolidating code used in the API/CLI and WP Backend to update orders. Our current codebase is not DRY at all.\r\n\r\n- [ ] Introduce `wc_get_orders()` function to replace `get_posts()`.\r\n- [ ] Introduce meta setter and getter functions to avoid any kind of get_post_meta usage, where needed.\r\n- [ ] Expand CRUD operations for order classes.\r\n- [ ] Replace core usage of get_posts, get_post_meta and direct SQL queries where possible (reports cannot be changed however due to the nature of the complex queries currently required).\r\n- [ ] API CRUD usage for order endpoints.\r\n- [ ] CLI CRUD usage for order endpoints.\r\n\r\n_Phase 2: UI Refresh - 3.x.x_\r\n\r\nNext we need to redo the UI to again remove the reliance on WP core. Since we'll have a decent CRUD by this point, we can make use of React/Backbone to make something that performs well and gives a better experience for the store owner.\r\n\r\nThis will have the side affect of breaking any plugin which adds custom meta boxes, so new hooks and ways of adding custom content will be needed to ensure things are still extensible.\r\n\r\n@jameskoster will design new screens to show order data. Without the constraints of WP admin + meta boxes we can do pretty much anything we like here.\r\n\r\n- [ ] Replace posts list with custom list table.\r\n- [ ] Replace view/edit order screen with custom UI. This will include new panels for downloadable products to get around the performance issues originality reported in #8589\r\n\r\n_Phase 3: Data Migration - 3.x.x_\r\n\r\n- [ ] Create new tables; woocommerce_orders and woocommerce_ordermeta\r\n- [ ] Separate payment status from shipped status. Just throwing this on the list but needs more consideration ( @maxrice @justinstern ) to make statuses more flexible,\r\n- [ ] Create migration script (dedicated page with progress bar, or background operation) to migrate posts to orders.\r\n- [ ] Switch CRUD operations to new tables.\r\n- [ ] Rewrite reports to use new tables. Also a good opportunity to do a refresh of the entire reports section once data is easier to access.\r\n  \r\nI will create issues for the above points in the relevant milestones, however, I wanted to get feedback prior and ensure I have not missed anything. @pmgarman @thenbrent @maxrice @claudiosmweb @mattyza @allendav @justinshreve @jameskoster ."},"comment":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/comments/171919433","html_url":"https://github.com/woothemes/woocommerce/issues/10071#issuecomment-171919433","issue_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10071","id":171919433,"user":{"login":"mikejolley","id":90977,"avatar_url":"https://avatars.githubusercontent.com/u/90977?v=3","gravatar_id":"","url":"https://api.github.com/users/mikejolley","html_url":"https://github.com/mikejolley","followers_url":"https://api.github.com/users/mikejolley/followers","following_url":"https://api.github.com/users/mikejolley/following{/other_user}","gists_url":"https://api.github.com/users/mikejolley/gists{/gist_id}","starred_url":"https://api.github.com/users/mikejolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikejolley/subscriptions","organizations_url":"https://api.github.com/users/mikejolley/orgs","repos_url":"https://api.github.com/users/mikejolley/repos","events_url":"https://api.github.com/users/mikejolley/events{/privacy}","received_events_url":"https://api.github.com/users/mikejolley/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T10:02:02Z","updated_at":"2016-01-15T10:02:02Z","body":"@jkudish +1"}}