We are developing a large Woocommerce store which relies heavily on the search functionality. We have found a potential bug on the search when the user searches for an exact phrase using quotation marks. For example: “John Smith”
When the user searches for it, everything works correctly and uses the default (or most relevant) sorting. However, if you click ‘Order by newness’ it then re-loads the page retaining some of the query however adds some backslashes.
“John Smith” or: /?s=”John+Smith”&post_type=product
\”John Smith\” or: ?orderby=date&s=%5C”John+Smith%5C”&post_type=product
Another orderby makes this even worse with:
I can see there is an obvious confliction between the quotation marks and the php I expect — does Woocommerce fully support these exact phrase strings or is there a problem my end? I have tested this on multiple Woocommerce sites and it appears to yield the same results.
Thanks in advance for any help.
- The topic ‘Search results orderby glitch when searching with quotation marks’ is closed to new replies.