woocommerce_attribute filter. Closes #768.

This commit is contained in:
Mike Jolley 2012-07-11 19:11:41 +01:00
parent 2b9a03db2c
commit 4200f43d52
2 changed files with 7 additions and 6 deletions

View File

@ -167,6 +167,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Payment gateway API tweaks - get_title, get_icon, get_description * Tweak - Payment gateway API tweaks - get_title, get_icon, get_description
* Tweak - Price filter widgets takes you back to page 1. * Tweak - Price filter widgets takes you back to page 1.
* Tweak - Changed microdata for offers/product so its picked up by google * Tweak - Changed microdata for offers/product so its picked up by google
* Tweak - woocommerce_attribute filter if needed
* Fix - Widget init function conflict with widget logic * Fix - Widget init function conflict with widget logic
* Fix - PLN currency code * Fix - PLN currency code
* Fix - Variation get shipping class ID * Fix - Variation get shipping class ID

View File

@ -49,14 +49,14 @@ if ( empty( $attributes ) && ( ! $product->enable_dimensions_display() || ( ! $p
<td><?php <td><?php
if ( $attribute['is_taxonomy'] ) { if ( $attribute['is_taxonomy'] ) {
echo implode( ', ', woocommerce_get_product_terms( $product->id, $attribute['name'], 'names' ) ); $values = woocommerce_get_product_terms( $product->id, $attribute['name'], 'names' );
echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
} else { } else {
// Convert pipes to commas // Convert pipes to commas and display values
$value = explode( '|', $attribute['value'] ); $values = explode( '|', $attribute['value'] );
$value = implode( ', ', $value ); echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
echo wpautop( wptexturize( $value ) );
} }
?></td> ?></td>