Skip to content

Commit

Permalink
fix url in default lang
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardogomez97 committed Nov 7, 2023
1 parent 955104e commit 27faa55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doofinder-for-woocommerce/includes/class-landing.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ private function get_desired_language($languages, $hashid) {
* @return string The formatted URL with the slug included.
*/
private function formated_url($home_url, $slug) {
if (substr($home_url, -1) != '/') {
$home_url .= '/';
}

$slug = "df/{$slug}";
if(strpos($home_url, '?lang=') !== false) {
$formated_url = str_replace('?lang=', "{$slug}/?lang=", $home_url);
Expand Down

0 comments on commit 27faa55

Please sign in to comment.