Avoid a possible error when linking accounts due to the delay between Google APIs #2412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
PT: pcTzPl-2iK-p2
It's an additional fix for a bug found while testing #2215.
This PR avoids a possible error when linking accounts due to the delay between Google APIs of Google Merchant Center and Google Ads. Please refer to the Additional details section for the issue details.
API\Google\Ads::get_merchant_link
method.💡 After a few rounds of testing, I could get an invitation link on the first retry in my dev environment, so I set the number of retries to 3.
Screenshots:
Kapture.2024-05-27.at.16.39.50.mp4
Detailed test instructions:
Additional details:
Looks like after updating Google API to v16 (#2386), the invitation link may not be available in Google Ads immediately after the invitation is sent from Google Merchant Center. This may result in a “Merchant link is not available to accept” error when linking to a newly created Google Ads account.
The error when linking accounts
An invitation was sent but left as pending approval
The way to reproduce the issue
Kapture.2024-05-27.at.16.19.14.mp4
Changelog entry