Merge pull request #861 from GeertDD/filter_attribute_label

Added filter woocommerce_attribute_label
This commit is contained in:
Mike Jolley 2012-03-23 14:03:50 -07:00
commit d0d440042a
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
/**