{"action":"created","comment":{"url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/comments/226996347","pull_request_review_id":166936802,"id":226996347,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjk5NjM0Nw==","diff_hunk":"@@ -47,6 +47,14 @@ function dependencies_satisfied() {\n \t\t\t&& class_exists( 'WooCommerce' ) && version_compare( WC_VERSION, '3.5', '>' );\n }\n \n+/**\n+ * Daily events to run.\n+ */\n+function wc_admin_daily() {","path":"wc-admin.php","position":7,"original_position":7,"commit_id":"aa6229ad7164486a001a4d494e0944878628c7d3","original_commit_id":"aa6229ad7164486a001a4d494e0944878628c7d3","user":{"login":"joshuatf","id":10561050,"node_id":"MDQ6VXNlcjEwNTYxMDUw","avatar_url":"https://avatars0.githubusercontent.com/u/10561050?v=4","gravatar_id":"","url":"https://api.github.com/users/joshuatf","html_url":"https://github.com/joshuatf","followers_url":"https://api.github.com/users/joshuatf/followers","following_url":"https://api.github.com/users/joshuatf/following{/other_user}","gists_url":"https://api.github.com/users/joshuatf/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuatf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuatf/subscriptions","organizations_url":"https://api.github.com/users/joshuatf/orgs","repos_url":"https://api.github.com/users/joshuatf/repos","events_url":"https://api.github.com/users/joshuatf/events{/privacy}","received_events_url":"https://api.github.com/users/joshuatf/received_events","type":"User","site_admin":false},"body":"Not sure if we have naming conventions in place for this, but could we make this different from the event name?  (e.g., `do_wc_admin_daily()` so we can distinguish a bit faster).","created_at":"2018-10-22T14:01:20Z","updated_at":"2018-10-22T14:01:20Z","html_url":"https://github.com/woocommerce/wc-admin/pull/566#discussion_r226996347","pull_request_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/comments/226996347"},"html":{"href":"https://github.com/woocommerce/wc-admin/pull/566#discussion_r226996347"},"pull_request":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566"}}},"pull_request":{"url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566","id":223791780,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNzkxNzgw","html_url":"https://github.com/woocommerce/wc-admin/pull/566","diff_url":"https://github.com/woocommerce/wc-admin/pull/566.diff","patch_url":"https://github.com/woocommerce/wc-admin/pull/566.patch","issue_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/566","number":566,"state":"open","locked":false,"title":"Activity Panel: Inbox: New Sales Record Note","user":{"login":"allendav","id":1595739,"node_id":"MDQ6VXNlcjE1OTU3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1595739?v=4","gravatar_id":"","url":"https://api.github.com/users/allendav","html_url":"https://github.com/allendav","followers_url":"https://api.github.com/users/allendav/followers","following_url":"https://api.github.com/users/allendav/following{/other_user}","gists_url":"https://api.github.com/users/allendav/gists{/gist_id}","starred_url":"https://api.github.com/users/allendav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allendav/subscriptions","organizations_url":"https://api.github.com/users/allendav/orgs","repos_url":"https://api.github.com/users/allendav/repos","events_url":"https://api.github.com/users/allendav/events{/privacy}","received_events_url":"https://api.github.com/users/allendav/received_events","type":"User","site_admin":false},"body":"See #176 \r\n\r\nAdds/updates an activity panel: inbox: note if the previous day's sales are a new record.\r\n\r\nCreates a note that will look like this in the inbox (can't be seen in React until #513 is merged):\r\n\r\n<img width=\"564\" alt=\"screen shot 2018-10-18 at 3 57 37 pm\" src=\"https://user-images.githubusercontent.com/1595739/47188848-a2ca0c80-d2ee-11e8-82a6-af45736b6b4b.png\">\r\n\r\nTo test:\r\n- update_option `woocommerce_sales_record_date` with a date in the past (e.g. `2018-09-22`)\r\n- update_option `woocommerce_sales_record_amount` with a low value (e.g. `10.0`)\r\n- Create a few orders totalling more than that value, complete them, and change their dates to yesterday.\r\n- Switch to this branch if you haven't already\r\n- Deactivate and re-activate the plugin to get the daily scheduled task added (will repeat daily).\r\n- Install and activate the Admin Notes Test Bench https://github.com/automattic/wc-admin-notes-test-bench\r\n- Navigate to wp-admin > Tools > WC Admin Notes Test Bench\r\n- Look for the sales record note.\r\n\r\n<img width=\"1091\" alt=\"screen shot 2018-10-18 at 4 47 55 pm\" src=\"https://user-images.githubusercontent.com/1595739/47190337-a7de8a00-d2f5-11e8-917d-e4599793af14.png\">\r\n\r\n- If you don't see the note there, install https://wordpress.org/plugins/wp-crontrol/  and navigate to wp-admin > Tools > Cron Events. Look for the wc_admin_daily event and click Run Now.\r\n","created_at":"2018-10-18T00:28:06Z","updated_at":"2018-10-22T14:01:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1719d223083c903abff75cadc3914a7cc137ab73","assignee":{"login":"allendav","id":1595739,"node_id":"MDQ6VXNlcjE1OTU3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1595739?v=4","gravatar_id":"","url":"https://api.github.com/users/allendav","html_url":"https://github.com/allendav","followers_url":"https://api.github.com/users/allendav/followers","following_url":"https://api.github.com/users/allendav/following{/other_user}","gists_url":"https://api.github.com/users/allendav/gists{/gist_id}","starred_url":"https://api.github.com/users/allendav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allendav/subscriptions","organizations_url":"https://api.github.com/users/allendav/orgs","repos_url":"https://api.github.com/users/allendav/repos","events_url":"https://api.github.com/users/allendav/events{/privacy}","received_events_url":"https://api.github.com/users/allendav/received_events","type":"User","site_admin":false},"assignees":[{"login":"allendav","id":1595739,"node_id":"MDQ6VXNlcjE1OTU3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1595739?v=4","gravatar_id":"","url":"https://api.github.com/users/allendav","html_url":"https://github.com/allendav","followers_url":"https://api.github.com/users/allendav/followers","following_url":"https://api.github.com/users/allendav/following{/other_user}","gists_url":"https://api.github.com/users/allendav/gists{/gist_id}","starred_url":"https://api.github.com/users/allendav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allendav/subscriptions","organizations_url":"https://api.github.com/users/allendav/orgs","repos_url":"https://api.github.com/users/allendav/repos","events_url":"https://api.github.com/users/allendav/events{/privacy}","received_events_url":"https://api.github.com/users/allendav/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":921782814,"node_id":"MDU6TGFiZWw5MjE3ODI4MTQ=","url":"https://api.github.com/repos/woocommerce/wc-admin/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566/commits","review_comments_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566/comments","review_comment_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/566/comments","statuses_url":"https://api.github.com/repos/woocommerce/wc-admin/statuses/aa6229ad7164486a001a4d494e0944878628c7d3","head":{"label":"woocommerce:add/admin-notices-new-sales-record","ref":"add/admin-notices-new-sales-record","sha":"aa6229ad7164486a001a4d494e0944878628c7d3","user":{"login":"woocommerce","id":473596,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/473596?v=4","gravatar_id":"","url":"https://api.github.com/users/woocommerce","html_url":"https://github.com/woocommerce","followers_url":"https://api.github.com/users/woocommerce/followers","following_url":"https://api.github.com/users/woocommerce/following{/other_user}","gists_url":"https://api.github.com/users/woocommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/woocommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woocommerce/subscriptions","organizations_url":"https://api.github.com/users/woocommerce/orgs","repos_url":"https://api.github.com/users/woocommerce/repos","events_url":"https://api.github.com/users/woocommerce/events{/privacy}","received_events_url":"https://api.github.com/users/woocommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":128732084,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg3MzIwODQ=","name":"wc-admin","full_name":"woocommerce/wc-admin","private":false,"owner":{"login":"woocommerce","id":473596,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/473596?v=4","gravatar_id":"","url":"https://api.github.com/users/woocommerce","html_url":"https://github.com/woocommerce","followers_url":"https://api.github.com/users/woocommerce/followers","following_url":"https://api.github.com/users/woocommerce/following{/other_user}","gists_url":"https://api.github.com/users/woocommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/woocommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woocommerce/subscriptions","organizations_url":"https://api.github.com/users/woocommerce/orgs","repos_url":"https://api.github.com/users/woocommerce/repos","events_url":"https://api.github.com/users/woocommerce/events{/privacy}","received_events_url":"https://api.github.com/users/woocommerce/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/woocommerce/wc-admin","description":"A feature plugin for a modern, javascript-driven WooCommerce Admin experience.","fork":false,"url":"https://api.github.com/repos/woocommerce/wc-admin","forks_url":"https://api.github.com/repos/woocommerce/wc-admin/forks","keys_url":"https://api.github.com/repos/woocommerce/wc-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/woocommerce/wc-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/woocommerce/wc-admin/teams","hooks_url":"https://api.github.com/repos/woocommerce/wc-admin/hooks","issue_events_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/events{/number}","events_url":"https://api.github.com/repos/woocommerce/wc-admin/events","assignees_url":"https://api.github.com/repos/woocommerce/wc-admin/assignees{/user}","branches_url":"https://api.github.com/repos/woocommerce/wc-admin/branches{/branch}","tags_url":"https://api.github.com/repos/woocommerce/wc-admin/tags","blobs_url":"https://api.github.com/repos/woocommerce/wc-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/woocommerce/wc-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/woocommerce/wc-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/woocommerce/wc-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/woocommerce/wc-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/woocommerce/wc-admin/languages","stargazers_url":"https://api.github.com/repos/woocommerce/wc-admin/stargazers","contributors_url":"https://api.github.com/repos/woocommerce/wc-admin/contributors","subscribers_url":"https://api.github.com/repos/woocommerce/wc-admin/subscribers","subscription_url":"https://api.github.com/repos/woocommerce/wc-admin/subscription","commits_url":"https://api.github.com/repos/woocommerce/wc-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/woocommerce/wc-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/woocommerce/wc-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/woocommerce/wc-admin/contents/{+path}","compare_url":"https://api.github.com/repos/woocommerce/wc-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/woocommerce/wc-admin/merges","archive_url":"https://api.github.com/repos/woocommerce/wc-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/woocommerce/wc-admin/downloads","issues_url":"https://api.github.com/repos/woocommerce/wc-admin/issues{/number}","pulls_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/woocommerce/wc-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/woocommerce/wc-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/woocommerce/wc-admin/labels{/name}","releases_url":"https://api.github.com/repos/woocommerce/wc-admin/releases{/id}","deployments_url":"https://api.github.com/repos/woocommerce/wc-admin/deployments","created_at":"2018-04-09T07:29:35Z","updated_at":"2018-10-22T06:31:57Z","pushed_at":"2018-10-22T13:51:19Z","git_url":"git://github.com/woocommerce/wc-admin.git","ssh_url":"git@github.com:woocommerce/wc-admin.git","clone_url":"https://github.com/woocommerce/wc-admin.git","svn_url":"https://github.com/woocommerce/wc-admin","homepage":"https://woocommerce.github.io/wc-admin/#/","size":4203,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":98,"license":null,"forks":4,"open_issues":98,"watchers":56,"default_branch":"master"}},"base":{"label":"woocommerce:master","ref":"master","sha":"161baa9133c91d8ff5b175fc86c90094cd486d0a","user":{"login":"woocommerce","id":473596,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/473596?v=4","gravatar_id":"","url":"https://api.github.com/users/woocommerce","html_url":"https://github.com/woocommerce","followers_url":"https://api.github.com/users/woocommerce/followers","following_url":"https://api.github.com/users/woocommerce/following{/other_user}","gists_url":"https://api.github.com/users/woocommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/woocommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woocommerce/subscriptions","organizations_url":"https://api.github.com/users/woocommerce/orgs","repos_url":"https://api.github.com/users/woocommerce/repos","events_url":"https://api.github.com/users/woocommerce/events{/privacy}","received_events_url":"https://api.github.com/users/woocommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":128732084,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg3MzIwODQ=","name":"wc-admin","full_name":"woocommerce/wc-admin","private":false,"owner":{"login":"woocommerce","id":473596,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/473596?v=4","gravatar_id":"","url":"https://api.github.com/users/woocommerce","html_url":"https://github.com/woocommerce","followers_url":"https://api.github.com/users/woocommerce/followers","following_url":"https://api.github.com/users/woocommerce/following{/other_user}","gists_url":"https://api.github.com/users/woocommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/woocommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woocommerce/subscriptions","organizations_url":"https://api.github.com/users/woocommerce/orgs","repos_url":"https://api.github.com/users/woocommerce/repos","events_url":"https://api.github.com/users/woocommerce/events{/privacy}","received_events_url":"https://api.github.com/users/woocommerce/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/woocommerce/wc-admin","description":"A feature plugin for a modern, javascript-driven WooCommerce Admin experience.","fork":false,"url":"https://api.github.com/repos/woocommerce/wc-admin","forks_url":"https://api.github.com/repos/woocommerce/wc-admin/forks","keys_url":"https://api.github.com/repos/woocommerce/wc-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/woocommerce/wc-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/woocommerce/wc-admin/teams","hooks_url":"https://api.github.com/repos/woocommerce/wc-admin/hooks","issue_events_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/events{/number}","events_url":"https://api.github.com/repos/woocommerce/wc-admin/events","assignees_url":"https://api.github.com/repos/woocommerce/wc-admin/assignees{/user}","branches_url":"https://api.github.com/repos/woocommerce/wc-admin/branches{/branch}","tags_url":"https://api.github.com/repos/woocommerce/wc-admin/tags","blobs_url":"https://api.github.com/repos/woocommerce/wc-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/woocommerce/wc-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/woocommerce/wc-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/woocommerce/wc-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/woocommerce/wc-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/woocommerce/wc-admin/languages","stargazers_url":"https://api.github.com/repos/woocommerce/wc-admin/stargazers","contributors_url":"https://api.github.com/repos/woocommerce/wc-admin/contributors","subscribers_url":"https://api.github.com/repos/woocommerce/wc-admin/subscribers","subscription_url":"https://api.github.com/repos/woocommerce/wc-admin/subscription","commits_url":"https://api.github.com/repos/woocommerce/wc-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/woocommerce/wc-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/woocommerce/wc-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/woocommerce/wc-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/woocommerce/wc-admin/contents/{+path}","compare_url":"https://api.github.com/repos/woocommerce/wc-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/woocommerce/wc-admin/merges","archive_url":"https://api.github.com/repos/woocommerce/wc-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/woocommerce/wc-admin/downloads","issues_url":"https://api.github.com/repos/woocommerce/wc-admin/issues{/number}","pulls_url":"https://api.github.com/repos/woocommerce/wc-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/woocommerce/wc-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/woocommerce/wc-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/woocommerce/wc-admin/labels{/name}","releases_url":"https://api.github.com/repos/woocommerce/wc-admin/releases{/id}","deployments_url":"https://api.github.com/repos/woocommerce/wc-admin/deployments","created_at":"2018-04-09T07:29:35Z","updated_at":"2018-10-22T06:31:57Z","pushed_at":"2018-10-22T13:51:19Z","git_url":"git://github.com/woocommerce/wc-admin.git","ssh_url":"git@github.com:woocommerce/wc-admin.git","clone_url":"https://github.com/woocommerce/wc-admin.git","svn_url":"https://github.com/woocommerce/wc-admin","homepage":"https://woocommerce.github.io/wc-admin/#/","size":4203,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":98,"license":null,"forks":4,"open_issues":98,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566"},"html":{"href":"https://github.com/woocommerce/wc-admin/pull/566"},"issue":{"href":"https://api.github.com/repos/woocommerce/wc-admin/issues/566"},"comments":{"href":"https://api.github.com/repos/woocommerce/wc-admin/issues/566/comments"},"review_comments":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566/comments"},"review_comment":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/woocommerce/wc-admin/pulls/566/commits"},"statuses":{"href":"https://api.github.com/repos/woocommerce/wc-admin/statuses/aa6229ad7164486a001a4d494e0944878628c7d3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"joshuatf"}}