• Hi,

    Is it possible by a hook to change the permalink when a search is made on a SKU ? My idea is when a person search by sku, it should return after the variation when it is, but for now it goes on the parent product, and the customer is lost to find the good SKU between all the variations. So i would change to change the permalink as soon as a SKU is shown

    Is it possible ?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes, it’s possible. You can add a filter function on the the_permalink hook that checks if the search query matches a product variation SKU and if it does, the filter function returns the variation URL instead of the main product URL.

Viewing 1 replies (of 1 total)
  • The topic ‘Change the permalink when search by SKU’ is closed to new replies.