File tree 1 file changed +12
-13
lines changed
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 ) {
72
72
* Get the queried taxonomy
73
73
* @return string
74
74
*/
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
+ }
88
87
89
88
/**
90
89
* Get postlink
You can’t perform that action at this time.
0 commit comments