Last active
December 17, 2015 05:59
-
-
Save paulgibbs/5561643 to your computer and use it in GitHub Desktop.
woocommerce taxonomy fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: woocommerce-core-functions.php | |
=================================================================== | |
--- woocommerce-core-functions.php (revision 711539) | |
+++ woocommerce-core-functions.php (working copy) | |
@@ -1425,6 +1425,9 @@ | |
function woocommerce_terms_clauses( $clauses, $taxonomies, $args ) { | |
global $wpdb, $woocommerce; | |
+ // If we're not filtering a query for the product_cat taxonomy, bail out | |
+ if ( ! in_array( 'product_cat', $taxonomies ) ) return $clauses; | |
+ | |
// No sorting when menu_order is false | |
if ( isset($args['menu_order']) && $args['menu_order'] == false ) return $clauses; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment