WooCommerce - excelling eCommerce
Search results orderby glitch when searching with quotation marks (1 post)

  1. SL Blaise
    Posted 1 year ago #


    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.

    For example:
    "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:
    \\\"John Smith\\\"

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic