Author: miahtech

Adding a custom short description to all products with Category of…

  1. Navigate to the functions.php file

function filter_woocommerce_short_description( $post_excerpt ) {
    global $post;
    if ( has_term( "slugofcategoryinquestion", "product_cat", $post->ID ) ) {
        $post_excerpt .= "Due to Brexit, delivery times have been affected, you may still make your purchase, however please give us a call for a better understanding of when you could expect your item." . "<br/>";
    return $post_excerpt; 
add_filter( 'woocommerce_short_description','filter_woocommerce_short_description',10, 1 );