Closed puntope closed 2 months ago
after authorizing the WPCOM App, it seems Google is redirecting to the wrong URL.
Had a look at it and I found they tried to redirect us to this URL:
https://shoppingdataintegration.googleapis.com/v1/credentials/partners/WooCommerce/https%3A%2F%2Ftest-site.example.com%2Fwp-admin%2Fadmin.php%3Fpage%3Dwc-admin%26path%3D%2Fgoogle%2Fsettings%3Fnonce=XXXXX&google_wpcom_app_status=approved
We should ask them to remove https://shoppingdataintegration.googleapis.com/v1/credentials/partners/WooCommerce/
so they could redirect to the correct URL.
However I also noticed there were something wrong in the merchant site's URL:
The URL decoded version of the merchant site's URL is:
https://test-site.example.com/wp-admin/admin.php?page=wc-admin&path=/google/settings?nonce=XXXXX&google_wpcom_app_status=approved
where it added a question mark ?
before nonce
parameter which it would cause the page not found. We should also ask them the replace that ?
with &
so it would return to the merchant site correctly.
Thanks, @ianlin and @jorgemd24 for your suggestions and investigation. They fixed the error from Google and now seems to work. Also, I addressed the review comments. Can you test again?
@puntope, I tested it, and it is now redirecting me back to my site. Is there anything else we need to wait for, or can I proceed with the review? Also, I noticed some PHPCS errors.
@puntope, I tested it, and it is now redirecting me back to my site. Is there anything else we need to wait for, or can I proceed with the review? Also, I noticed some PHPCS errors.
We need to wait for a fix from google. I will ping you
Attention: Patch coverage is 64.70588%
with 18 lines
in your changes missing coverage. Please review.
Project coverage is 64.3%. Comparing base (
aec6d57
) to head (e42f728
). Report is 481 commits behind head on feature/google-api-project.
@jorgemd24 @ianlin This seems to be ready for another look. Google deployed their last changes
Also, what do you think about setting the default value of this filter to true
? Or do we want the merchant to enable this manually?
One more thought: how will Google return any errors through the OAuth flow, and how are we going to handle them?
Or do we want the merchant to enable this manually?
If nothing has changed for now I think the first version requires setting the filter. But not sure if that changed after dark launch discussion
One more thought: how will Google return any errors through the OAuth flow, and how are we going to handle them?
The discussion between @ianlin and Google was that they would return google_wpcom_app_status=error
. Can you confirm @ianlin ?
Thanks @jorgemd24. Can you take another look ?
Thanks for the adjustments, LGTM 👍
If nothing has changed for now I think the first version requires setting the filter. But not sure if that changed after dark launch discussion
Okay I will ask them, for me it looks a bit redundant.
Sounds good. @jorgemd24 Go ahead and we can remove if so.
The discussion between @ianlin and Google was that they would return google_wpcom_app_status=error. Can you confirm @ianlin ?
If so, I can work on a PR to display those errors to the user.
@jorgemd24 We do display a notice on the card banner and allow granting again. Is this what you mean?
p.s You can also check the tracking topic if you are looking for issues.
One more thought: how will Google return any errors through the OAuth flow, and how are we going to handle them?
The discussion between @ianlin and Google was that they would return google_wpcom_app_status=error. Can you confirm @ianlin ?
@puntope @jorgemd24 Yeah correct, they will just set the query param to google_wpcom_app_status=error
without what error it is.
Changes proposed in this Pull Request:
Detailed test instructions:
Additional details:
get_data_from_google
function