Skip to content

Commit d386016

Browse files
committed
refactor language retrieval for feed generation to ensure non-empty values are used
1 parent b9e4e0e commit d386016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Url/Rewrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function sf_add_custom_query_vars( $vars ) {
7373
public function sf_parse_request() {
7474
global $wp;
7575
if ( isset( $wp->query_vars[ self::FEED_QUERY_VAR ] ) ) {
76-
$lang = $wp->query_vars[ self::FEED_LANG_QUERY_VAR ] ?? null;
76+
$lang = ! empty( $wp->query_vars[ self::FEED_LANG_QUERY_VAR ] ) ? $wp->query_vars[ self::FEED_LANG_QUERY_VAR ] : null;
7777
ShoppingFeedHelper::get_feedbuilder_manager()->render_feed( $lang );
7878
}
7979
}

0 commit comments

Comments
 (0)