wc_attribute_orderby()
Get a product attributes orderby setting.
Hooks from the function
Return
String
.
Usage
wc_attribute_orderby( $name );
- $name(string) (required)
- Attribute name.
wc_attribute_orderby() wc attribute orderby code WC 9.6.1
function wc_attribute_orderby( $name ) { $name = wc_attribute_taxonomy_slug( $name ); $id = wc_attribute_taxonomy_id_by_name( $name ); $taxonomies = wc_get_attribute_taxonomies(); return apply_filters( 'woocommerce_attribute_orderby', isset( $taxonomies[ 'id:' . $id ] ) ? $taxonomies[ 'id:' . $id ]->attribute_orderby : 'menu_order', $name ); }