diff --git a/admin/woocommerce-admin-init.php b/admin/woocommerce-admin-init.php index 5043f3281c3..c305ab9399d 100644 --- a/admin/woocommerce-admin-init.php +++ b/admin/woocommerce-admin-init.php @@ -298,7 +298,7 @@ function woocommerce_admin_scripts() { endif; // Term ordering - only when sorting by term_order - if ( ( $screen->id == 'edit-product_cat' || strstr( $screen->id, 'edit-pa_' ) || in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array() ) ) ) && ! isset( $_GET['orderby'] ) ) : + if ( ( strstr( $screen->id, 'edit-pa_' ) || in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) && ! isset( $_GET['orderby'] ) ) : wp_register_script( 'woocommerce_term_ordering', $woocommerce->plugin_url() . '/assets/js/admin/term-ordering.js', array('jquery-ui-sortable') ); wp_enqueue_script( 'woocommerce_term_ordering' ); diff --git a/readme.txt b/readme.txt index 48a33c95379..9179a6c62ec 100644 --- a/readme.txt +++ b/readme.txt @@ -173,6 +173,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Orders page is now the first item in the WooCommerce menu * Tweak - If all variations are the same price, don't show the variation price. * Tweak - woocommerce_completed_order_customer_notification_subject hook renamed to for more sense: woocommerce_email_heading_customer_completed_order +* Tweak - woocommerce_sortable_taxonomies filter * Fix - Widget init function conflict with widget logic * Fix - PLN currency code * Fix - Variation get shipping class ID diff --git a/woocommerce-core-functions.php b/woocommerce-core-functions.php index bdfd5e211c5..88da9716310 100644 --- a/woocommerce-core-functions.php +++ b/woocommerce-core-functions.php @@ -781,7 +781,7 @@ function woocommerce_terms_clauses($clauses, $taxonomies, $args ) { // wordpress should give us the taxonomies asked when calling the get_terms function. Only apply to categories and pa_ attributes $found = false; foreach ((array) $taxonomies as $taxonomy) : - if ($taxonomy=='product_cat' || strstr($taxonomy, 'pa_') || in_array($taxonomy, apply_filters( 'woocommerce_sortable_taxonomies', array()))) : + if ( strstr($taxonomy, 'pa_') || in_array( $taxonomy, apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) : $found = true; break; endif;