Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Last active September 30, 2015 19:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jameskoster/1852475 to your computer and use it in GitHub Desktop.
Save jameskoster/1852475 to your computer and use it in GitHub Desktop.
WooCommerce - Allow shortcodes in product excerpts
if (!function_exists('woocommerce_template_single_excerpt')) {
function woocommerce_template_single_excerpt( $post ) {
global $post;
if ($post->post_excerpt) echo '<div itemprop="description">' . do_shortcode(wpautop(wptexturize($post->post_excerpt))) . '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment