File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -72,19 +72,18 @@ public static function create( $id = 0 ) {
7272 * Get the queried taxonomy
7373 * @return string
7474 */
75- public function get_tax_query () {
76- global $ wp_query ;
77-
78- if ( function_exists ('is_woocommerce ' ) ) {
79- if ( is_woocommerce () && isset ( $ wp_query ->tax_query ->queries [1 ]['taxonomy ' ] ) ) {
80- return $ wp_query ->tax_query ->queries [1 ]['taxonomy ' ];
81- }
82- } elseif ( isset ( $ wp_query ->tax_query ->queries [0 ]['taxonomy ' ] ) ) {
83- return $ wp_query ->tax_query ->queries [0 ]['taxonomy ' ];
84- }
85-
86- return parent ::get_tax_query ();
87- }
75+ public function get_tax_query () {
76+ global $ wp_query ;
77+
78+ if ( class_exists ( 'WooCommerce ' ) && is_woocommerce () && isset ( $ wp_query ->tax_query ->queries [1 ]['taxonomy ' ] ) ) {
79+ return $ wp_query ->tax_query ->queries [1 ]['taxonomy ' ];
80+ }
81+ elseif ( isset ( $ wp_query ->tax_query ->queries [0 ]['taxonomy ' ] ) ) {
82+ return $ wp_query ->tax_query ->queries [0 ]['taxonomy ' ];
83+ }
84+
85+ return parent ::get_tax_query ();
86+ }
8887
8988 /**
9089 * Get postlink
You can’t perform that action at this time.
0 commit comments