Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Hooks for short description - avoid the_content

  • Loading branch information...
commit c21b70e483e6f604cdecb5fb0ccc058e501fe8ef 1 parent e21ac53
@mikejolley mikejolley authored
View
2  templates/single-product/short-description.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
8 woocommerce-hooks.php
@@ -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' );
Please sign in to comment.
Something went wrong with that request. Please try again.