{"action":"opened","number":20174,"pull_request":{"url":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174","id":189804585,"html_url":"https://github.com/woocommerce/woocommerce/pull/20174","diff_url":"https://github.com/woocommerce/woocommerce/pull/20174.diff","patch_url":"https://github.com/woocommerce/woocommerce/pull/20174.patch","issue_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/20174","number":20174,"state":"open","locked":false,"title":"Only hide .payment_box elements on init for multiple payment methods","user":{"login":"ChaseWiseman","id":999301,"avatar_url":"https://avatars0.githubusercontent.com/u/999301?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseWiseman","html_url":"https://github.com/ChaseWiseman","followers_url":"https://api.github.com/users/ChaseWiseman/followers","following_url":"https://api.github.com/users/ChaseWiseman/following{/other_user}","gists_url":"https://api.github.com/users/ChaseWiseman/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseWiseman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseWiseman/subscriptions","organizations_url":"https://api.github.com/users/ChaseWiseman/orgs","repos_url":"https://api.github.com/users/ChaseWiseman/repos","events_url":"https://api.github.com/users/ChaseWiseman/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseWiseman/received_events","type":"User","site_admin":false},"body":"Prevents hiding a single payment method’s UI on the order pay page.\r\n\r\nSome of our hosted gateways will output a payment form using the `woocommerce_receipt_{payment_method}` action on the order pay page, and surround it with a `.payment_box` div to get the usual styling. The changes introduced with https://github.com/woocommerce/woocommerce/commit/9cb0d3c88480623fbe0ed769d8f96db40c2e2d4f will hide _all_ `div.payment_box` elements on that page, and single the markup added might not include the payment method radio, there's no way to expand it. \r\n\r\n### All Submissions:\r\n\r\n* [x] Have you followed the [WooCommerce Contributing guideline](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md)?\r\n* [x] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?\r\n* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?\r\n\r\n### Changes proposed in this Pull Request:\r\n\r\nOnly slideUp `.payment_box` elements if there is more than one payment method on the page.\r\n\r\nAn alternative would be to skip `init_payment_methods()` on the receipt/order pay page. \r\n\r\n### How to test the changes in this Pull Request:\r\n\r\n1. Visit an order's pay page using the URL generated by `WC_Order::get_checkout_payment_url( true );`\r\n2. Add some a `.payment_box` element using the `woocommerce_receipt_{payment_method}` action\r\n3. Without this PR, the payment box is hidden on page load and cannot be shown\r\n4. With the PR, it is shown by default since it is the only one that exists\r\n\r\n### Other information:\r\n\r\n* [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n* [x] Have you successfully ran tests with your changes locally?","created_at":"2018-05-22T21:59:48Z","updated_at":"2018-05-22T21:59:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174/commits","review_comments_url":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174/comments","review_comment_url":"https://api.github.com/repos/woocommerce/woocommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/20174/comments","statuses_url":"https://api.github.com/repos/woocommerce/woocommerce/statuses/346e710314f8fa1c7c261faa1454b1c93cfb4484","head":{"label":"ChaseWiseman:fix/show-single-payment-methods-pay-page","ref":"fix/show-single-payment-methods-pay-page","sha":"346e710314f8fa1c7c261faa1454b1c93cfb4484","user":{"login":"ChaseWiseman","id":999301,"avatar_url":"https://avatars0.githubusercontent.com/u/999301?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseWiseman","html_url":"https://github.com/ChaseWiseman","followers_url":"https://api.github.com/users/ChaseWiseman/followers","following_url":"https://api.github.com/users/ChaseWiseman/following{/other_user}","gists_url":"https://api.github.com/users/ChaseWiseman/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseWiseman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseWiseman/subscriptions","organizations_url":"https://api.github.com/users/ChaseWiseman/orgs","repos_url":"https://api.github.com/users/ChaseWiseman/repos","events_url":"https://api.github.com/users/ChaseWiseman/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseWiseman/received_events","type":"User","site_admin":false},"repo":{"id":134476997,"name":"woocommerce","full_name":"ChaseWiseman/woocommerce","owner":{"login":"ChaseWiseman","id":999301,"avatar_url":"https://avatars0.githubusercontent.com/u/999301?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseWiseman","html_url":"https://github.com/ChaseWiseman","followers_url":"https://api.github.com/users/ChaseWiseman/followers","following_url":"https://api.github.com/users/ChaseWiseman/following{/other_user}","gists_url":"https://api.github.com/users/ChaseWiseman/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseWiseman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseWiseman/subscriptions","organizations_url":"https://api.github.com/users/ChaseWiseman/orgs","repos_url":"https://api.github.com/users/ChaseWiseman/repos","events_url":"https://api.github.com/users/ChaseWiseman/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseWiseman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChaseWiseman/woocommerce","description":"An open source eCommerce plugin for WordPress.","fork":true,"url":"https://api.github.com/repos/ChaseWiseman/woocommerce","forks_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/forks","keys_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/teams","hooks_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/hooks","issue_events_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/issues/events{/number}","events_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/events","assignees_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/assignees{/user}","branches_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/branches{/branch}","tags_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/tags","blobs_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/languages","stargazers_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/stargazers","contributors_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/contributors","subscribers_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/subscribers","subscription_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/subscription","commits_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/contents/{+path}","compare_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/merges","archive_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/downloads","issues_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/issues{/number}","pulls_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/labels{/name}","releases_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/releases{/id}","deployments_url":"https://api.github.com/repos/ChaseWiseman/woocommerce/deployments","created_at":"2018-05-22T21:18:04Z","updated_at":"2018-05-22T21:18:13Z","pushed_at":"2018-05-22T21:42:57Z","git_url":"git://github.com/ChaseWiseman/woocommerce.git","ssh_url":"git@github.com:ChaseWiseman/woocommerce.git","clone_url":"https://github.com/ChaseWiseman/woocommerce.git","svn_url":"https://github.com/ChaseWiseman/woocommerce","homepage":"http://www.woocommerce.com/","size":146472,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"woocommerce:master","ref":"master","sha":"c05c5d75cbe5f3f5d8c14ca36a87ce15fb3114f4","user":{"login":"woocommerce","id":473596,"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":2179920,"name":"woocommerce","full_name":"woocommerce/woocommerce","owner":{"login":"woocommerce","id":473596,"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},"private":false,"html_url":"https://github.com/woocommerce/woocommerce","description":"An open source eCommerce plugin for WordPress.","fork":false,"url":"https://api.github.com/repos/woocommerce/woocommerce","forks_url":"https://api.github.com/repos/woocommerce/woocommerce/forks","keys_url":"https://api.github.com/repos/woocommerce/woocommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/woocommerce/woocommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/woocommerce/woocommerce/teams","hooks_url":"https://api.github.com/repos/woocommerce/woocommerce/hooks","issue_events_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/events{/number}","events_url":"https://api.github.com/repos/woocommerce/woocommerce/events","assignees_url":"https://api.github.com/repos/woocommerce/woocommerce/assignees{/user}","branches_url":"https://api.github.com/repos/woocommerce/woocommerce/branches{/branch}","tags_url":"https://api.github.com/repos/woocommerce/woocommerce/tags","blobs_url":"https://api.github.com/repos/woocommerce/woocommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/woocommerce/woocommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/woocommerce/woocommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/woocommerce/woocommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/woocommerce/woocommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/woocommerce/woocommerce/languages","stargazers_url":"https://api.github.com/repos/woocommerce/woocommerce/stargazers","contributors_url":"https://api.github.com/repos/woocommerce/woocommerce/contributors","subscribers_url":"https://api.github.com/repos/woocommerce/woocommerce/subscribers","subscription_url":"https://api.github.com/repos/woocommerce/woocommerce/subscription","commits_url":"https://api.github.com/repos/woocommerce/woocommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/woocommerce/woocommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/woocommerce/woocommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/woocommerce/woocommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/woocommerce/woocommerce/contents/{+path}","compare_url":"https://api.github.com/repos/woocommerce/woocommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/woocommerce/woocommerce/merges","archive_url":"https://api.github.com/repos/woocommerce/woocommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/woocommerce/woocommerce/downloads","issues_url":"https://api.github.com/repos/woocommerce/woocommerce/issues{/number}","pulls_url":"https://api.github.com/repos/woocommerce/woocommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/woocommerce/woocommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/woocommerce/woocommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/woocommerce/woocommerce/labels{/name}","releases_url":"https://api.github.com/repos/woocommerce/woocommerce/releases{/id}","deployments_url":"https://api.github.com/repos/woocommerce/woocommerce/deployments","created_at":"2011-08-09T15:12:11Z","updated_at":"2018-05-22T21:58:35Z","pushed_at":"2018-05-22T19:29:15Z","git_url":"git://github.com/woocommerce/woocommerce.git","ssh_url":"git@github.com:woocommerce/woocommerce.git","clone_url":"https://github.com/woocommerce/woocommerce.git","svn_url":"https://github.com/woocommerce/woocommerce","homepage":"http://www.woocommerce.com/","size":146472,"stargazers_count":4431,"watchers_count":4431,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4053,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4053,"open_issues":55,"watchers":4431,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174"},"html":{"href":"https://github.com/woocommerce/woocommerce/pull/20174"},"issue":{"href":"https://api.github.com/repos/woocommerce/woocommerce/issues/20174"},"comments":{"href":"https://api.github.com/repos/woocommerce/woocommerce/issues/20174/comments"},"review_comments":{"href":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174/comments"},"review_comment":{"href":"https://api.github.com/repos/woocommerce/woocommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/woocommerce/woocommerce/pulls/20174/commits"},"statuses":{"href":"https://api.github.com/repos/woocommerce/woocommerce/statuses/346e710314f8fa1c7c261faa1454b1c93cfb4484"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":6,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"ChaseWiseman"}}