use function_exists instead of version_compare

This commit is contained in:
Ron Rennick 2019-01-17 16:14:53 -04:00
parent 9337ca51e4
commit dad1ffb4c9
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ add_filter( 'woocommerce_attribute_label', 'wp_kses_post', 100 );
/**
* Short Description (excerpt).
*/
if ( version_compare( $wp_version, '5.0', '>=' ) ) {
if ( function_exists( 'do_blocks' ) ) {
add_filter( 'woocommerce_short_description', 'do_blocks', 9 );
}
add_filter( 'woocommerce_short_description', 'wptexturize' );