HUSKY - Product Filter for WooCommerce

woof_override_seo_request_uri

From v.2.2.6/1.2.6

Uses for extension ‘SEO URL request‘ – passes the current URL. Need to adapt different servers if necessary

Parameters

$uri (string) — the current request URI

Source File

ext/url_request/classes/url_parser.php

Code Example


add_filter('woof_override_seo_request_uri', function($uri) {
    // Clean up the SEO URL for specific pages
    if (is_shop()) {
        $uri = '/shop' . $uri;
    }
    return $uri;
});

Usage Notes

  • Add this code to your theme's functions.php file or a custom plugin.
  • The hook is applied during the filtering process — changes take effect immediately.
  • Always return the expected value type from the callback function.