diff --git a/woocommerce-functions.php b/woocommerce-functions.php index 8ee5ef5cc0a..6bd39019ca2 100644 --- a/woocommerce-functions.php +++ b/woocommerce-functions.php @@ -13,7 +13,7 @@ * Handle redirects before content is output - hooked into template_redirect so is_page works **/ function woocommerce_redirects() { - global $woocommerce; + global $woocommerce, $wp_query; // When default permalinks are enabled, redirect shop page to post type archive url if ( isset($_GET['page_id']) && $_GET['page_id'] > 0 && get_option( 'permalink_structure' )=="" && $_GET['page_id'] == woocommerce_get_page_id('shop') ) :