Added filter woocommerce_attribute_label

This commit is contained in:
Geert De Deckere 2012-03-21 15:26:53 +01:00
parent 68f7a61100
commit 46812dad9c
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);
}
/**