Don't repeat the dimension unit after each value.

Just adding it once at the end is fine and improves readability.
This commit is contained in:
Geert De Deckere 2012-02-11 15:02:06 +01:00
parent 1c6b6ac1dd
commit 2ed83cc117
1 changed files with 5 additions and 3 deletions

View File

@ -802,15 +802,17 @@ class WC_Product {
// Show length
if ($this->length) {
$this->dimensions = $this->length.get_option('woocommerce_dimension_unit');
$this->dimensions = $this->length;
// Show width also
if ($this->width) {
$this->dimensions .= ' × '.$this->width.get_option('woocommerce_dimension_unit');
$this->dimensions .= ' × '.$this->width;
// Show height also
if ($this->height) {
$this->dimensions .= ' × '.$this->height.get_option('woocommerce_dimension_unit');
$this->dimensions .= ' × '.$this->height;
}
}
// Append the unit
$this->dimensions .= ' '.get_option('woocommerce_dimension_unit');
}
endif;
return $this->dimensions;