From 7e8a99a74852449b534413e6ddcb20b9b045d6fc Mon Sep 17 00:00:00 2001 From: charroma <65042439+charroma@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:21:51 -0400 Subject: [PATCH] Update slugs.php prevent warning on Woocommerce special product archive page when using the product filter --- src/modules/slugs/slugs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/slugs/slugs.php b/src/modules/slugs/slugs.php index b7095b84..6ba42700 100644 --- a/src/modules/slugs/slugs.php +++ b/src/modules/slugs/slugs.php @@ -438,7 +438,7 @@ function filter_request( $query ) { $id = $query['post_type']; } else { - $page_slug = $query['name'] ?? $query[ $query['post_type'] ]; + $page_slug = $query['name'] ?? $query[ $query['post_type'] ] ?? null; $page = isset( $page_slug ) ? $this->get_page_by_path( $page_slug, $query['post_type'] ) : null; if ( $page ) { $id = $page->ID;