Rate label hook. Closes #1534.

This commit is contained in:
Mike Jolley 2012-09-30 19:43:11 +01:00
parent c9e61eef82
commit 3e8a3f8b60
1 changed files with 3 additions and 2 deletions

View File

@ -615,8 +615,9 @@ class WC_Tax {
* @return string
*/
function get_rate_label( $key ) {
if ( isset( $this->rates[ $key ] ) && $this->rates[ $key ]['label'] ) return $this->rates[ $key ]['label'];
return '';
$label = empty( $this->rates[ $key ]['label'] ) ? '' : $this->rates[ $key ]['label'];
return apply_filters( 'woocommerce_rate_label', $label, $key, $this );
}
/**