-
-
Save ryelle/d46ba0c5d6404040b6227c6c6a702807 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'woocommerce_after_shop_loop_item', 'sp_loop_product_description', 6 ); | |
add_action( 'woocommerce_after_shop_loop_item', 'sf_powerpack_add_shortcodes_short_description', 6 ); | |
function sf_powerpack_add_shortcodes_short_description() { | |
global $product; | |
$wc_product = wc_get_product( $product ); | |
if ( ! $wc_product ) { | |
return false; | |
} | |
$short_description = $wc_product->get_short_description(); | |
if ( '' !== $short_description ) { | |
echo '<div itemprop="description">' . do_shortcode( wpautop( wptexturize( $short_description ) ) ) . '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment