| @@ -43,9 +43,15 @@ | ||
| 43 | 43 | |
| 44 | 44 | $request_path = $path; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - return $request_path; | |
| 47 | + /** | |
| 48 | + * Normalize the storefront path segment Yatra uses for routing (no leading slash, site subdirectory removed). | |
| 49 | + * Map custom public URLs onto Yatra paths before {@see PrettyRouteMatcher} runs, e.g. `regions/norway` → `destination/norway`. | |
| 50 | + * | |
| 51 | + * @param string $request_path Already normalized relative path or empty string. | |
| 52 | + */ | |
| 53 | + return (string) apply_filters('yatra_frontend_request_path', $request_path); | |
| 48 | 54 | } |
| 49 | 55 | |
| 50 | 56 | /** |
| 51 | 57 | * Extract slug from URL path using pattern matching |