{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/comments/166434029","pull_request_review_id":94495354,"id":166434029,"diff_hunk":"@@ -76,6 +76,14 @@ public function output_account_screen() {\n \t\t\t\t<?php\n \t\t\t}\n \n+\t\t\t$referer_url = wp_get_referer();\n+\t\t\t$referer = parse_url( $referer_url );\n+\t\t\tif ( preg_match( '/\\/wp-admin\\/post\\.php$/', $referer['path'] ) ) {\n+\t\t\t\tWC_Connect_Options::update_option( 'label_settings_redirect', $referer_url );","path":"classes/class-wc-connect-settings-pages.php","position":null,"original_position":7,"commit_id":"4050efc06bbea5901e9c9acd4c05cebcb7e3d5e9","original_commit_id":"b77a3a353884f398b9225564c0939ae49c0c2aea","user":{"login":"dechov","id":1867547,"avatar_url":"https://avatars1.githubusercontent.com/u/1867547?v=4","gravatar_id":"","url":"https://api.github.com/users/dechov","html_url":"https://github.com/dechov","followers_url":"https://api.github.com/users/dechov/followers","following_url":"https://api.github.com/users/dechov/following{/other_user}","gists_url":"https://api.github.com/users/dechov/gists{/gist_id}","starred_url":"https://api.github.com/users/dechov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dechov/subscriptions","organizations_url":"https://api.github.com/users/dechov/orgs","repos_url":"https://api.github.com/users/dechov/repos","events_url":"https://api.github.com/users/dechov/events{/privacy}","received_events_url":"https://api.github.com/users/dechov/received_events","type":"User","site_admin":false},"body":"Much better — thanks!","created_at":"2018-02-06T20:33:21Z","updated_at":"2018-02-06T20:33:21Z","html_url":"https://github.com/Automattic/woocommerce-services/pull/1300#discussion_r166434029","pull_request_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/comments/166434029"},"html":{"href":"https://github.com/Automattic/woocommerce-services/pull/1300#discussion_r166434029"},"pull_request":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300"}},"in_reply_to_id":166357750},"pull_request":{"url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300","id":167236536,"html_url":"https://github.com/Automattic/woocommerce-services/pull/1300","diff_url":"https://github.com/Automattic/woocommerce-services/pull/1300.diff","patch_url":"https://github.com/Automattic/woocommerce-services/pull/1300.patch","issue_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/1300","number":1300,"state":"open","locked":false,"title":"Add redirect link from label settings screen back to order","user":{"login":"dechov","id":1867547,"avatar_url":"https://avatars1.githubusercontent.com/u/1867547?v=4","gravatar_id":"","url":"https://api.github.com/users/dechov","html_url":"https://github.com/dechov","followers_url":"https://api.github.com/users/dechov/followers","following_url":"https://api.github.com/users/dechov/following{/other_user}","gists_url":"https://api.github.com/users/dechov/gists{/gist_id}","starred_url":"https://api.github.com/users/dechov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dechov/subscriptions","organizations_url":"https://api.github.com/users/dechov/orgs","repos_url":"https://api.github.com/users/dechov/repos","events_url":"https://api.github.com/users/dechov/events{/privacy}","received_events_url":"https://api.github.com/users/dechov/received_events","type":"User","site_admin":false},"body":"Implements \"Solution 1\" referred to in https://github.com/Automattic/woocommerce-services/issues/1115#issuecomment-325632978.\r\n\r\nIf (and only if) the label settings screen was arrived at from an order screen (i.e. an edit post screen), and settings are saved with a payment method selected, a \"Back to order\" link appears in the success notification (which also persists in this case, instead of disappearing after 5 seconds).\r\n\r\n<img width=\"605\" alt=\"screen shot 2018-02-05 at 2 41 09 pm\" src=\"https://user-images.githubusercontent.com/1867547/35825061-b6302d66-0a82-11e8-81a6-513517f349d7.png\">\r\n\r\nCan change \"Back to order\" text if there are better ideas — \"return\" instead of \"back\"? to \"order page\"? or \"Order ##\"?","created_at":"2018-02-05T19:42:59Z","updated_at":"2018-02-06T20:33:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2230635964fe72c710b0437543c66350134165d8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300/commits","review_comments_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300/comments","review_comment_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/1300/comments","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-services/statuses/4050efc06bbea5901e9c9acd4c05cebcb7e3d5e9","head":{"label":"Automattic:add/redirect-link-from-settings-back-to-order","ref":"add/redirect-link-from-settings-back-to-order","sha":"4050efc06bbea5901e9c9acd4c05cebcb7e3d5e9","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":50946955,"name":"woocommerce-services","full_name":"Automattic/woocommerce-services","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/woocommerce-services","description":"WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes real time USPS and Canada Post shipping rates and the ability to purchase and print USPS shipping labels.","fork":false,"url":"https://api.github.com/repos/Automattic/woocommerce-services","forks_url":"https://api.github.com/repos/Automattic/woocommerce-services/forks","keys_url":"https://api.github.com/repos/Automattic/woocommerce-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/woocommerce-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/woocommerce-services/teams","hooks_url":"https://api.github.com/repos/Automattic/woocommerce-services/hooks","issue_events_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/woocommerce-services/events","assignees_url":"https://api.github.com/repos/Automattic/woocommerce-services/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/woocommerce-services/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/woocommerce-services/tags","blobs_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-services/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/woocommerce-services/languages","stargazers_url":"https://api.github.com/repos/Automattic/woocommerce-services/stargazers","contributors_url":"https://api.github.com/repos/Automattic/woocommerce-services/contributors","subscribers_url":"https://api.github.com/repos/Automattic/woocommerce-services/subscribers","subscription_url":"https://api.github.com/repos/Automattic/woocommerce-services/subscription","commits_url":"https://api.github.com/repos/Automattic/woocommerce-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/woocommerce-services/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/woocommerce-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/woocommerce-services/merges","archive_url":"https://api.github.com/repos/Automattic/woocommerce-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/woocommerce-services/downloads","issues_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/woocommerce-services/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/woocommerce-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/woocommerce-services/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/woocommerce-services/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/woocommerce-services/deployments","created_at":"2016-02-02T19:44:26Z","updated_at":"2018-01-30T16:18:39Z","pushed_at":"2018-02-06T20:32:30Z","git_url":"git://github.com/Automattic/woocommerce-services.git","ssh_url":"git@github.com:Automattic/woocommerce-services.git","clone_url":"https://github.com/Automattic/woocommerce-services.git","svn_url":"https://github.com/Automattic/woocommerce-services","homepage":"","size":5704,"stargazers_count":53,"watchers_count":53,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":166,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":9,"open_issues":166,"watchers":53,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"1c9b36c32772142cc6a29c789d6a89d06eaf8c12","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":50946955,"name":"woocommerce-services","full_name":"Automattic/woocommerce-services","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/woocommerce-services","description":"WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes real time USPS and Canada Post shipping rates and the ability to purchase and print USPS shipping labels.","fork":false,"url":"https://api.github.com/repos/Automattic/woocommerce-services","forks_url":"https://api.github.com/repos/Automattic/woocommerce-services/forks","keys_url":"https://api.github.com/repos/Automattic/woocommerce-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/woocommerce-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/woocommerce-services/teams","hooks_url":"https://api.github.com/repos/Automattic/woocommerce-services/hooks","issue_events_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/woocommerce-services/events","assignees_url":"https://api.github.com/repos/Automattic/woocommerce-services/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/woocommerce-services/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/woocommerce-services/tags","blobs_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-services/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/woocommerce-services/languages","stargazers_url":"https://api.github.com/repos/Automattic/woocommerce-services/stargazers","contributors_url":"https://api.github.com/repos/Automattic/woocommerce-services/contributors","subscribers_url":"https://api.github.com/repos/Automattic/woocommerce-services/subscribers","subscription_url":"https://api.github.com/repos/Automattic/woocommerce-services/subscription","commits_url":"https://api.github.com/repos/Automattic/woocommerce-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/woocommerce-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/woocommerce-services/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/woocommerce-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/woocommerce-services/merges","archive_url":"https://api.github.com/repos/Automattic/woocommerce-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/woocommerce-services/downloads","issues_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/woocommerce-services/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/woocommerce-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/woocommerce-services/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/woocommerce-services/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/woocommerce-services/deployments","created_at":"2016-02-02T19:44:26Z","updated_at":"2018-01-30T16:18:39Z","pushed_at":"2018-02-06T20:32:30Z","git_url":"git://github.com/Automattic/woocommerce-services.git","ssh_url":"git@github.com:Automattic/woocommerce-services.git","clone_url":"https://github.com/Automattic/woocommerce-services.git","svn_url":"https://github.com/Automattic/woocommerce-services","homepage":"","size":5704,"stargazers_count":53,"watchers_count":53,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":166,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":9,"open_issues":166,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300"},"html":{"href":"https://github.com/Automattic/woocommerce-services/pull/1300"},"issue":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/issues/1300"},"comments":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/issues/1300/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/1300/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/woocommerce-services/statuses/4050efc06bbea5901e9c9acd4c05cebcb7e3d5e9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dechov"}}