Last active
June 11, 2021 09:03
-
-
Save vovadocent/eb452907e0cab1eb8313af2da2a9ff32 to your computer and use it in GitHub Desktop.
Reorder Woocommerce Attribute Taxonomies
This file contains 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
<?php | |
// reorder woocommerce attribute taxonomies | |
function css_woocommerce_attribute_taxonomies( $taxonomies ) { | |
$out = array(); | |
foreach($taxonomies as $t){ | |
$out[$t->attribute_id] = $t; | |
} | |
ksort($out); | |
return $out; | |
}; | |
add_filter( 'woocommerce_attribute_taxonomies', 'css_woocommerce_attribute_taxonomies' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment