{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/536","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/536/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/536/events","html_url":"https://github.com/Automattic/wp-calypso/pull/536","id":118437273,"number":536,"title":"Purchases: Individual purchases not loading on sites with Site Redirect","user":{"login":"umurkontaci","id":991022,"avatar_url":"https://avatars.githubusercontent.com/u/991022?v=3","gravatar_id":"","url":"https://api.github.com/users/umurkontaci","html_url":"https://github.com/umurkontaci","followers_url":"https://api.github.com/users/umurkontaci/followers","following_url":"https://api.github.com/users/umurkontaci/following{/other_user}","gists_url":"https://api.github.com/users/umurkontaci/gists{/gist_id}","starred_url":"https://api.github.com/users/umurkontaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umurkontaci/subscriptions","organizations_url":"https://api.github.com/users/umurkontaci/orgs","repos_url":"https://api.github.com/users/umurkontaci/repos","events_url":"https://api.github.com/users/umurkontaci/events{/privacy}","received_events_url":"https://api.github.com/users/umurkontaci/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Purchases","name":"Purchases","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Awaiting%20Author%20Response","name":"[Status] Awaiting Author Response","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"drewblaisdell","id":1130674,"avatar_url":"https://avatars.githubusercontent.com/u/1130674?v=3","gravatar_id":"","url":"https://api.github.com/users/drewblaisdell","html_url":"https://github.com/drewblaisdell","followers_url":"https://api.github.com/users/drewblaisdell/followers","following_url":"https://api.github.com/users/drewblaisdell/following{/other_user}","gists_url":"https://api.github.com/users/drewblaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/drewblaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewblaisdell/subscriptions","organizations_url":"https://api.github.com/users/drewblaisdell/orgs","repos_url":"https://api.github.com/users/drewblaisdell/repos","events_url":"https://api.github.com/users/drewblaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/drewblaisdell/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/16","html_url":"https://github.com/Automattic/wp-calypso/milestones/Purchases:%20v1","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/16/labels","id":1419675,"number":16,"title":"Purchases: v1","description":"","creator":{"login":"fabianapsimoes","id":1248436,"avatar_url":"https://avatars.githubusercontent.com/u/1248436?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianapsimoes","html_url":"https://github.com/fabianapsimoes","followers_url":"https://api.github.com/users/fabianapsimoes/followers","following_url":"https://api.github.com/users/fabianapsimoes/following{/other_user}","gists_url":"https://api.github.com/users/fabianapsimoes/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianapsimoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianapsimoes/subscriptions","organizations_url":"https://api.github.com/users/fabianapsimoes/orgs","repos_url":"https://api.github.com/users/fabianapsimoes/repos","events_url":"https://api.github.com/users/fabianapsimoes/events{/privacy}","received_events_url":"https://api.github.com/users/fabianapsimoes/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":40,"state":"open","created_at":"2015-11-19T11:56:01Z","updated_at":"2015-11-30T20:07:06Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-11-23T18:01:46Z","updated_at":"2015-11-30T21:07:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/536","html_url":"https://github.com/Automattic/wp-calypso/pull/536","diff_url":"https://github.com/Automattic/wp-calypso/pull/536.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/536.patch"},"body":"This fixes the issue of individual purchases not loading on site with Site Redirect record set as primary domain. (Fixes #122)\r\n\r\nIt changes the use of `domain` property from purchases data to getting the site slug from `SitesList`. This will the URLs will behave the same as in store.\r\n\r\n/cc: @mikeshelton1503 @breezyskies"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/160761932","html_url":"https://github.com/Automattic/wp-calypso/pull/536#issuecomment-160761932","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/536","id":160761932,"user":{"login":"drewblaisdell","id":1130674,"avatar_url":"https://avatars.githubusercontent.com/u/1130674?v=3","gravatar_id":"","url":"https://api.github.com/users/drewblaisdell","html_url":"https://github.com/drewblaisdell","followers_url":"https://api.github.com/users/drewblaisdell/followers","following_url":"https://api.github.com/users/drewblaisdell/following{/other_user}","gists_url":"https://api.github.com/users/drewblaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/drewblaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewblaisdell/subscriptions","organizations_url":"https://api.github.com/users/drewblaisdell/orgs","repos_url":"https://api.github.com/users/drewblaisdell/repos","events_url":"https://api.github.com/users/drewblaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/drewblaisdell/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T21:07:44Z","updated_at":"2015-11-30T21:07:44Z","body":"Looks good! As @umurkontaci is AFK, I self-assigned and added a couple commits:\r\n\r\n- Added `SitesList` to `PurchasesData` and updated `PurchasesList` to ensure that the sites are loaded before rendering.\r\n- Updated the function signature of `getPurchasesBySite` to accept an array instead of `SitesList` instance. This makes the behavior of that function more explicit and easier to test.\r\n\r\nI also rebased. @jeherve Can you still reproduce that error during checkout? I wasn't able to reproduce on this branch. The error message looks unrelated to these changes, so I'm curious if this is an error that has since been fixed."}}