wc_attribute_orderby()WC 1.0

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() code WC 8.7.0

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 );
}