{"action":"created","comment":{"url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/comments/77884948","id":77884948,"diff_hunk":"@@ -8,8 +8,15 @@\n  * @return      array of commissions that would need to be paid based on the payment id.\n  */\n function eddc_calculate_payment_commissions( $payment_id ){\n-\n-\t$payment = new EDD_Payment( $payment_id );\n+\t\n+\t// If we were passed an int as the payment id (which it should be)\n+\tif ( !is_object( $payment_id ) && is_int( $payment_id ) ){\n+\t\t$payment = new EDD_Payment( $payment_id );\n+\t}else{","path":"includes/commission-functions.php","position":40,"original_position":10,"commit_id":"399d619972e63cab811057000a1463982196097b","original_commit_id":"399d619972e63cab811057000a1463982196097b","user":{"login":"pippinsplugins","id":1034109,"avatar_url":"https://avatars.githubusercontent.com/u/1034109?v=3","gravatar_id":"","url":"https://api.github.com/users/pippinsplugins","html_url":"https://github.com/pippinsplugins","followers_url":"https://api.github.com/users/pippinsplugins/followers","following_url":"https://api.github.com/users/pippinsplugins/following{/other_user}","gists_url":"https://api.github.com/users/pippinsplugins/gists{/gist_id}","starred_url":"https://api.github.com/users/pippinsplugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pippinsplugins/subscriptions","organizations_url":"https://api.github.com/users/pippinsplugins/orgs","repos_url":"https://api.github.com/users/pippinsplugins/repos","events_url":"https://api.github.com/users/pippinsplugins/events{/privacy}","received_events_url":"https://api.github.com/users/pippinsplugins/received_events","type":"User","site_admin":false},"body":"@mintplugins let's go ahead and adjust the spacing here. There should always be spaces before and after conditionals, brackets, `!`, etc.","created_at":"2016-09-07T19:09:23Z","updated_at":"2016-09-07T19:09:23Z","html_url":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130#discussion_r77884948","pull_request_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130","_links":{"self":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/comments/77884948"},"html":{"href":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130#discussion_r77884948"},"pull_request":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130","id":64869772,"html_url":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130","diff_url":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130.diff","patch_url":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130.patch","issue_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/130","number":130,"state":"open","locked":false,"title":"Issue/125: Introduce commissions calculation function.","user":{"login":"mintplugins","id":1638128,"avatar_url":"https://avatars.githubusercontent.com/u/1638128?v=3","gravatar_id":"","url":"https://api.github.com/users/mintplugins","html_url":"https://github.com/mintplugins","followers_url":"https://api.github.com/users/mintplugins/followers","following_url":"https://api.github.com/users/mintplugins/following{/other_user}","gists_url":"https://api.github.com/users/mintplugins/gists{/gist_id}","starred_url":"https://api.github.com/users/mintplugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mintplugins/subscriptions","organizations_url":"https://api.github.com/users/mintplugins/orgs","repos_url":"https://api.github.com/users/mintplugins/repos","events_url":"https://api.github.com/users/mintplugins/events{/privacy}","received_events_url":"https://api.github.com/users/mintplugins/received_events","type":"User","site_admin":false},"body":"Changes to Commissions calculations for Shipping\r\n\r\nThese new calculations allows the site owner to set how the shipping fee shoud be split based on the product and over-ride the site default if set. It also fixes a few issues with shipping calculations:\r\n\r\n- Shipping wasn't calculated correctly for commissions for any of the options for \"Reciever split\" settings. While Paypal Adaptive worked for \"Ignored/Split Evenly\" because it had its own calculation functions, it didn't actually work without Paypal Adaptive.\r\n\r\n- Shipping with variable pricing options was not previously addressed or calculated for commissions and so were doubled or tripled (or more) depending on the number of variable prices in the cart. Now it uses the $current_variable_price_number to check if the fee matches the variable price (or even duplicate product) in the cart.","created_at":"2016-03-31T22:31:10Z","updated_at":"2016-09-07T19:09:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4f39cc8e2aa0834f6189faa4de458e0c1c4ea98","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130/commits","review_comments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130/comments","review_comment_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/130/comments","statuses_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/statuses/399d619972e63cab811057000a1463982196097b","head":{"label":"easydigitaldownloads:issue/125","ref":"issue/125","sha":"399d619972e63cab811057000a1463982196097b","user":{"login":"easydigitaldownloads","id":2955346,"avatar_url":"https://avatars.githubusercontent.com/u/2955346?v=3","gravatar_id":"","url":"https://api.github.com/users/easydigitaldownloads","html_url":"https://github.com/easydigitaldownloads","followers_url":"https://api.github.com/users/easydigitaldownloads/followers","following_url":"https://api.github.com/users/easydigitaldownloads/following{/other_user}","gists_url":"https://api.github.com/users/easydigitaldownloads/gists{/gist_id}","starred_url":"https://api.github.com/users/easydigitaldownloads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easydigitaldownloads/subscriptions","organizations_url":"https://api.github.com/users/easydigitaldownloads/orgs","repos_url":"https://api.github.com/users/easydigitaldownloads/repos","events_url":"https://api.github.com/users/easydigitaldownloads/events{/privacy}","received_events_url":"https://api.github.com/users/easydigitaldownloads/received_events","type":"Organization","site_admin":false},"repo":{"id":6264901,"name":"EDD-Commissions","full_name":"easydigitaldownloads/EDD-Commissions","owner":{"login":"easydigitaldownloads","id":2955346,"avatar_url":"https://avatars.githubusercontent.com/u/2955346?v=3","gravatar_id":"","url":"https://api.github.com/users/easydigitaldownloads","html_url":"https://github.com/easydigitaldownloads","followers_url":"https://api.github.com/users/easydigitaldownloads/followers","following_url":"https://api.github.com/users/easydigitaldownloads/following{/other_user}","gists_url":"https://api.github.com/users/easydigitaldownloads/gists{/gist_id}","starred_url":"https://api.github.com/users/easydigitaldownloads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easydigitaldownloads/subscriptions","organizations_url":"https://api.github.com/users/easydigitaldownloads/orgs","repos_url":"https://api.github.com/users/easydigitaldownloads/repos","events_url":"https://api.github.com/users/easydigitaldownloads/events{/privacy}","received_events_url":"https://api.github.com/users/easydigitaldownloads/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/easydigitaldownloads/EDD-Commissions","description":"Commissions Add-on for Easy Digital Downloads","fork":false,"url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions","forks_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/forks","keys_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/teams","hooks_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/hooks","issue_events_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/events{/number}","events_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/events","assignees_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/assignees{/user}","branches_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/branches{/branch}","tags_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/tags","blobs_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/refs{/sha}","trees_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/statuses/{sha}","languages_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/languages","stargazers_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/stargazers","contributors_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/contributors","subscribers_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/subscribers","subscription_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/subscription","commits_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/commits{/sha}","git_commits_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/commits{/sha}","comments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/comments{/number}","issue_comment_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/comments{/number}","contents_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/contents/{+path}","compare_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/merges","archive_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/downloads","issues_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues{/number}","pulls_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls{/number}","milestones_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/milestones{/number}","notifications_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/labels{/name}","releases_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/releases{/id}","deployments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/deployments","created_at":"2012-10-17T16:47:57Z","updated_at":"2016-08-02T15:57:17Z","pushed_at":"2016-09-07T19:08:24Z","git_url":"git://github.com/easydigitaldownloads/EDD-Commissions.git","ssh_url":"git@github.com:easydigitaldownloads/EDD-Commissions.git","clone_url":"https://github.com/easydigitaldownloads/EDD-Commissions.git","svn_url":"https://github.com/easydigitaldownloads/EDD-Commissions","homepage":null,"size":573,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":39,"forks":13,"open_issues":39,"watchers":10,"default_branch":"master"}},"base":{"label":"easydigitaldownloads:master","ref":"master","sha":"6d9ad52cf9a72f4e461503d0ac15952401e59344","user":{"login":"easydigitaldownloads","id":2955346,"avatar_url":"https://avatars.githubusercontent.com/u/2955346?v=3","gravatar_id":"","url":"https://api.github.com/users/easydigitaldownloads","html_url":"https://github.com/easydigitaldownloads","followers_url":"https://api.github.com/users/easydigitaldownloads/followers","following_url":"https://api.github.com/users/easydigitaldownloads/following{/other_user}","gists_url":"https://api.github.com/users/easydigitaldownloads/gists{/gist_id}","starred_url":"https://api.github.com/users/easydigitaldownloads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easydigitaldownloads/subscriptions","organizations_url":"https://api.github.com/users/easydigitaldownloads/orgs","repos_url":"https://api.github.com/users/easydigitaldownloads/repos","events_url":"https://api.github.com/users/easydigitaldownloads/events{/privacy}","received_events_url":"https://api.github.com/users/easydigitaldownloads/received_events","type":"Organization","site_admin":false},"repo":{"id":6264901,"name":"EDD-Commissions","full_name":"easydigitaldownloads/EDD-Commissions","owner":{"login":"easydigitaldownloads","id":2955346,"avatar_url":"https://avatars.githubusercontent.com/u/2955346?v=3","gravatar_id":"","url":"https://api.github.com/users/easydigitaldownloads","html_url":"https://github.com/easydigitaldownloads","followers_url":"https://api.github.com/users/easydigitaldownloads/followers","following_url":"https://api.github.com/users/easydigitaldownloads/following{/other_user}","gists_url":"https://api.github.com/users/easydigitaldownloads/gists{/gist_id}","starred_url":"https://api.github.com/users/easydigitaldownloads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easydigitaldownloads/subscriptions","organizations_url":"https://api.github.com/users/easydigitaldownloads/orgs","repos_url":"https://api.github.com/users/easydigitaldownloads/repos","events_url":"https://api.github.com/users/easydigitaldownloads/events{/privacy}","received_events_url":"https://api.github.com/users/easydigitaldownloads/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/easydigitaldownloads/EDD-Commissions","description":"Commissions Add-on for Easy Digital Downloads","fork":false,"url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions","forks_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/forks","keys_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/teams","hooks_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/hooks","issue_events_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/events{/number}","events_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/events","assignees_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/assignees{/user}","branches_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/branches{/branch}","tags_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/tags","blobs_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/refs{/sha}","trees_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/statuses/{sha}","languages_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/languages","stargazers_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/stargazers","contributors_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/contributors","subscribers_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/subscribers","subscription_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/subscription","commits_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/commits{/sha}","git_commits_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/git/commits{/sha}","comments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/comments{/number}","issue_comment_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/comments{/number}","contents_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/contents/{+path}","compare_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/merges","archive_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/downloads","issues_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues{/number}","pulls_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls{/number}","milestones_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/milestones{/number}","notifications_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/labels{/name}","releases_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/releases{/id}","deployments_url":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/deployments","created_at":"2012-10-17T16:47:57Z","updated_at":"2016-08-02T15:57:17Z","pushed_at":"2016-09-07T19:08:24Z","git_url":"git://github.com/easydigitaldownloads/EDD-Commissions.git","ssh_url":"git@github.com:easydigitaldownloads/EDD-Commissions.git","clone_url":"https://github.com/easydigitaldownloads/EDD-Commissions.git","svn_url":"https://github.com/easydigitaldownloads/EDD-Commissions","homepage":null,"size":573,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":39,"forks":13,"open_issues":39,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130"},"html":{"href":"https://github.com/easydigitaldownloads/EDD-Commissions/pull/130"},"issue":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/130"},"comments":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/easydigitaldownloads/EDD-Commissions/statuses/399d619972e63cab811057000a1463982196097b"}}}}
{"actor":{"display_login":"pippinsplugins"}}