{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/9714","repository_url":"https://api.github.com/repos/Automattic/jetpack","labels_url":"https://api.github.com/repos/Automattic/jetpack/issues/9714/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/9714/comments","events_url":"https://api.github.com/repos/Automattic/jetpack/issues/9714/events","html_url":"https://github.com/Automattic/jetpack/pull/9714","id":330628143,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNTkwODk1","number":9714,"title":"Widgets: Make the Simple Payments button compatible with Selective Refresh","user":{"login":"Copons","id":2070010,"node_id":"MDQ6VXNlcjIwNzAwMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2070010?v=4","gravatar_id":"","url":"https://api.github.com/users/Copons","html_url":"https://github.com/Copons","followers_url":"https://api.github.com/users/Copons/followers","following_url":"https://api.github.com/users/Copons/following{/other_user}","gists_url":"https://api.github.com/users/Copons/gists{/gist_id}","starred_url":"https://api.github.com/users/Copons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copons/subscriptions","organizations_url":"https://api.github.com/users/Copons/orgs","repos_url":"https://api.github.com/users/Copons/repos","events_url":"https://api.github.com/users/Copons/events{/privacy}","received_events_url":"https://api.github.com/users/Copons/received_events","type":"User","site_admin":false},"labels":[{"id":70993307,"node_id":"MDU6TGFiZWw3MDk5MzMwNw==","url":"https://api.github.com/repos/Automattic/jetpack/labels/Extra%20Sidebar%20Widgets","name":"Extra Sidebar Widgets","color":"006b75","default":false},{"id":371672245,"node_id":"MDU6TGFiZWwzNzE2NzIyNDU=","url":"https://api.github.com/repos/Automattic/jetpack/labels/Touches%20WP.com%20Files","name":"Touches WP.com Files","color":"0087be","default":false},{"id":199076921,"node_id":"MDU6TGFiZWwxOTkwNzY5MjE=","url":"https://api.github.com/repos/Automattic/jetpack/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"Copons","id":2070010,"node_id":"MDQ6VXNlcjIwNzAwMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2070010?v=4","gravatar_id":"","url":"https://api.github.com/users/Copons","html_url":"https://github.com/Copons","followers_url":"https://api.github.com/users/Copons/followers","following_url":"https://api.github.com/users/Copons/following{/other_user}","gists_url":"https://api.github.com/users/Copons/gists{/gist_id}","starred_url":"https://api.github.com/users/Copons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copons/subscriptions","organizations_url":"https://api.github.com/users/Copons/orgs","repos_url":"https://api.github.com/users/Copons/repos","events_url":"https://api.github.com/users/Copons/events{/privacy}","received_events_url":"https://api.github.com/users/Copons/received_events","type":"User","site_admin":false},"assignees":[{"login":"Copons","id":2070010,"node_id":"MDQ6VXNlcjIwNzAwMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2070010?v=4","gravatar_id":"","url":"https://api.github.com/users/Copons","html_url":"https://github.com/Copons","followers_url":"https://api.github.com/users/Copons/followers","following_url":"https://api.github.com/users/Copons/following{/other_user}","gists_url":"https://api.github.com/users/Copons/gists{/gist_id}","starred_url":"https://api.github.com/users/Copons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copons/subscriptions","organizations_url":"https://api.github.com/users/Copons/orgs","repos_url":"https://api.github.com/users/Copons/repos","events_url":"https://api.github.com/users/Copons/events{/privacy}","received_events_url":"https://api.github.com/users/Copons/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-08T11:51:31Z","updated_at":"2018-06-08T11:52:39Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/9714","html_url":"https://github.com/Automattic/jetpack/pull/9714","diff_url":"https://github.com/Automattic/jetpack/pull/9714.diff","patch_url":"https://github.com/Automattic/jetpack/pull/9714.patch"},"body":"Replace #9668\r\nRequired by #9577\r\n\r\nThe Simple Payments module works basically like this: whenever the Simple Payments button is rendered, it calls a JS script that in turns renders a PayPal button.\r\nThis doesn't happen with the Simple Payments widget, when the Customizer _selectively refreshes_ it.\r\n\r\n#### Changes proposed in this Pull Request:\r\n\r\n* Add the Simple Payments widget to the widgets that support Selective Refresh.\r\n* Upon widget change or move, trigger a new PayPal button render on the updated widget button.\r\n\r\n#### Testing instructions:\r\n\r\n* `git checkout fix/simple-payment-widget-customizer-reload-script`: it's the branch of #9668, and it contains exactly the same changes as this PR, but it's branched off #9577 which introduces the Simple Payments widget, so it's easier to test.\r\n* Pick a Premium/Business site with one or more Simple Payments button already created.\r\n* Open the Customizer and add a Simple Payments widget.\r\n* Edit the widget, wait for the Customizer to refresh it, and make sure its PayPal button is still visible.\r\n* Move the widget, and again check if the PayPal button is there."},"comment":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/comments/395737982","html_url":"https://github.com/Automattic/jetpack/pull/9714#issuecomment-395737982","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/9714","id":395737982,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTczNzk4Mg==","user":{"login":"Copons","id":2070010,"node_id":"MDQ6VXNlcjIwNzAwMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2070010?v=4","gravatar_id":"","url":"https://api.github.com/users/Copons","html_url":"https://github.com/Copons","followers_url":"https://api.github.com/users/Copons/followers","following_url":"https://api.github.com/users/Copons/following{/other_user}","gists_url":"https://api.github.com/users/Copons/gists{/gist_id}","starred_url":"https://api.github.com/users/Copons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copons/subscriptions","organizations_url":"https://api.github.com/users/Copons/orgs","repos_url":"https://api.github.com/users/Copons/repos","events_url":"https://api.github.com/users/Copons/events{/privacy}","received_events_url":"https://api.github.com/users/Copons/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T11:52:39Z","updated_at":"2018-06-08T11:52:39Z","author_association":"CONTRIBUTOR","body":"@Automattic/jetpack FYI this was already approved (by team Lannister) in #9668."}}
{"actor":{"display_login":"Copons"}}