woocommerce_short_description

woocommerce_short_description

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_short_description') is found 3 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php line 480
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    'status'                => $product->get_status(),
    'featured'              => $product->is_featured(),
    'catalog_visibility'    => $product->get_catalog_visibility(),
    'description'           => wpautop( do_shortcode( $product->get_description() ) ),
    'short_description'     => apply_filters( 'woocommerce_short_description', $product->get_short_description() ),
    'sku'                   => $product->get_sku(),
    'price'                 => $product->get_price(),
    'regular_price'         => $product->get_regular_price(),
    'sale_price'            => $product->get_sale_price() ? $product->get_sale_price() : '',
    'date_on_sale_from'     => $product->get_date_on_sale_from() ? date( 'Y-m-d', $product->get_date_on_sale_from()->getTimestamp() ) : '',
    'date_on_sale_to'       => $product->get_date_on_sale_to() ? date( 'Y-m-d', $product->get_date_on_sale_to()->getTimestamp() ) : '',
  • /includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php line 725
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    case 'description':
        $base_data['description'] = 'view' === $context ? wpautop( do_shortcode( $product->get_description() ) ) : $product->get_description( $context );
        break;
    case 'short_description':
        $base_data['short_description'] = 'view' === $context ? apply_filters( 'woocommerce_short_description', $product->get_short_description() ) : $product->get_short_description( $context );
        break;
    case 'sku':
        $base_data['sku'] = $product->get_sku( $context );
        break;
    case 'price':
        $base_data['price'] = $product->get_price( $context );
  • /templates/single-product/short-description.php line 24
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    }
     
    global $post;
     
    $short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
     
    if ( ! $short_description ) {
        return;
    }
     
    ?>

See this hook used in plugins: