Merge pull request #861 from GeertDD/filter_attribute_label
Added filter woocommerce_attribute_label
This commit is contained in:
commit
d0d440042a
|
@ -1186,10 +1186,12 @@ class Woocommerce {
|
|||
|
||||
$label = $wpdb->get_var( $wpdb->prepare( "SELECT attribute_label FROM ".$wpdb->prefix."woocommerce_attribute_taxonomies WHERE attribute_name = %s;", $name ) );
|
||||
|
||||
if ($label) return $label; else return ucfirst($name);
|
||||
if ( ! $label) $label = ucfirst($name);
|
||||
} else {
|
||||
return $name;
|
||||
$label = $name;
|
||||
}
|
||||
|
||||
return apply_filters('woocommerce_attribute_label', $label, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue