wc_attribute_taxonomy_id_by_name( string $name )
Get a product attribute ID by name.
$name
(string) (Required) Attribute name.
Return
(int)
Source
File: includes/wc-attribute-functions.php
xxxxxxxxxx
function wc_attribute_taxonomy_id_by_name( $name ) {
$name = wc_attribute_taxonomy_slug( $name );
$taxonomy_ids = wc_get_attribute_taxonomy_ids();
return isset( $taxonomy_ids[ $name ] ) ? $taxonomy_ids[ $name ] : 0;
}
https://hooks.wbcomdesigns.com/reference/functions/wc_attribute_taxonomy_id_by_name/