wc_attribute_orderby( string $name )

Get a product attributes orderby setting.


Description Description


Parameters Parameters

$name

(Required) Attribute name.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-attribute-functions.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.