Permalink
Browse files

Hooks for short description - avoid the_content

  • Loading branch information...
1 parent e21ac53 commit c21b70e483e6f604cdecb5fb0ccc058e501fe8ef @mikejolley mikejolley committed Apr 3, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −1 templates/single-product/short-description.php
  2. +8 −0 woocommerce-hooks.php
@@ -9,7 +9,7 @@
<div itemprop="description">
- <?php echo apply_filters( 'the_content', $post->post_excerpt ) ?>
+ <?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
</div>
View
@@ -152,3 +152,11 @@
/* Star Ratings */
add_action( 'comment_post', 'woocommerce_add_comment_rating', 1 );
add_filter( 'preprocess_comment', 'woocommerce_check_comment_rating', 0 );
+
+/* Text filters */
+add_filter( 'woocommerce_short_description', 'wptexturize' );
+add_filter( 'woocommerce_short_description', 'convert_smilies' );
+add_filter( 'woocommerce_short_description', 'convert_chars' );
+add_filter( 'woocommerce_short_description', 'wpautop' );
+add_filter( 'woocommerce_short_description', 'shortcode_unautop' );
+add_filter( 'woocommerce_short_description', 'prepend_attachment' );

0 comments on commit c21b70e

Please sign in to comment.