Replaced settings option with filter.
This commit is contained in:
parent
6f1611bc40
commit
8759b3c6cc
|
@ -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_' ) ) && ! isset( $_GET['orderby'] ) ) :
|
||||
if ( ( $screen->id == 'edit-product_cat' || strstr( $screen->id, 'edit-pa_' ) || in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array() ) ) ) && ! 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' );
|
||||
|
|
|
@ -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_')) :
|
||||
if ($taxonomy=='product_cat' || strstr($taxonomy, 'pa_') || in_array($taxonomy, apply_filters( 'woocommerce_sortable_taxonomies', array()))) :
|
||||
$found = true;
|
||||
break;
|
||||
endif;
|
||||
|
|
Loading…
Reference in New Issue