Skip to content

Commit

Permalink
Hooks for short description - avoid the_content
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Apr 3, 2012
1 parent e21ac53 commit c21b70e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/single-product/short-description.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
8 changes: 8 additions & 0 deletions woocommerce-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.