Fix Semrush request limit warning in related keyphrases#22412
Merged
Conversation
Fixes a refactor mistake from 9a029fc Not realizing the actual current default was `undefined`. Now changing the default to documented `null` both in the UserMessage and the `getUserMessage` that supplies the variant.
11 tasks
Pull Request Test Coverage Report for Build ef15706ac59e7aa1bb828123961d9cf1d47082f6Details
💛 - Coveralls |
Contributor
|
CR & AC ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
Fixes a refactor mistake from 9a029fc -- not realizing the actual current default was
undefined.Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Now changing the default to documented
nullboth in the UserMessage and thegetUserMessagethat supplies the variant.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Now lets test some warnings do show up by changing the php file
wordpress-seo/src/routes/semrush-route.php
Line 219 in 6a203be
Here are the possible warnings/messages:
Sorry, there's no data available for that keyphrase/country combination.
Code path/variant:
requestEmptyYou've reached your request limit for today. Check back tomorrow or upgrade your plan over at Semrush.
Code path/variant:
requestLimitReachedWe've encountered a problem trying to get related keyphrases. Please try again later.
Code path/variant:
requestFailedYou've reached the maximum amount of 4 related keyphrases. You can change or remove related keyphrases in the Yoast SEO metabox or sidebar.
Code path/variant:
maxRelatedKeyphrasesRelevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes #22403