ElasticPress
ElasticPress copied to clipboard
Fixed PHP autosuggest placeholder is not being used.
Description of the Change
- While the autosuggest search string placeholder value can be changed via a PHP hook, it's not picked up by the autosuggest JS and therefore the query will break or doesn't deliver the correct results.
Alternate Designs
- Instead of deleting
const placeholder = 'ep_autosuggest_placeholder';
I considered usingconst placeholder = queryJSON.placeholder;
but decided to drop the line completely as the placeholder is used inbuildSearchQuery()
only.
Benefits
- Don't break any the results if other than the default value is used :)
Possible Drawbacks
- X
Verification Process
- Inspected the query after the search and replace was done to ensure the query runs with the actual search term.
Checklist:
- [x] I have read the CONTRIBUTING document.
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests passed.
Applicable Issues
- Didn't find any.
Changelog Entry
@mustafauysal can you review this one?
@tlovett1 looks good to me 👍