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.8.7.0

apply_filters('woocommerce_short_description') is found 6 times:

  • /includes/legacy/api/v1/class-wc-api-products.php line 326
    			'shipping_taxable'   => $product->is_shipping_taxable(),
    			'shipping_class'     => $product->get_shipping_class(),
    			'shipping_class_id'  => ( 0 !== $product->get_shipping_class_id() ) ? $product->get_shipping_class_id() : null,
    			'description'        => apply_filters( 'the_content', $product->get_description() ),
    			'short_description'  => apply_filters( 'woocommerce_short_description', $product->get_short_description() ),
    			'reviews_allowed'    => $product->get_reviews_allowed(),
    			'average_rating'     => wc_format_decimal( $product->get_average_rating(), 2 ),
    			'rating_count'       => $product->get_rating_count(),
    			'related_ids'        => array_map( 'absint', array_values( wc_get_related_products( $product->get_id() ) ) ),
    			'upsell_ids'         => array_map( 'absint', $product->get_upsell_ids() ),
    			'cross_sell_ids'     => array_map( 'absint', $product->get_cross_sell_ids() ),
    
  • /includes/legacy/api/v2/class-wc-api-products.php line 752
    			'shipping_taxable'   => $product->is_shipping_taxable(),
    			'shipping_class'     => $product->get_shipping_class(),
    			'shipping_class_id'  => ( 0 !== $product->get_shipping_class_id() ) ? $product->get_shipping_class_id() : null,
    			'description'        => wpautop( do_shortcode( $product->get_description() ) ),
    			'short_description'  => apply_filters( 'woocommerce_short_description', $product->get_short_description() ),
    			'reviews_allowed'    => $product->get_reviews_allowed(),
    			'average_rating'     => wc_format_decimal( $product->get_average_rating(), 2 ),
    			'rating_count'       => $product->get_rating_count(),
    			'related_ids'        => array_map( 'absint', array_values( wc_get_related_products( $product->get_id() ) ) ),
    			'upsell_ids'         => array_map( 'absint', $product->get_upsell_ids() ),
    			'cross_sell_ids'     => array_map( 'absint', $product->get_cross_sell_ids() ),
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 1197
    			'shipping_taxable'   => $product->is_shipping_taxable(),
    			'shipping_class'     => $product->get_shipping_class(),
    			'shipping_class_id'  => ( 0 !== $product->get_shipping_class_id() ) ? $product->get_shipping_class_id() : null,
    			'description'        => wpautop( do_shortcode( $product->get_description() ) ),
    			'short_description'  => apply_filters( 'woocommerce_short_description', $product->get_short_description() ),
    			'reviews_allowed'    => $product->get_reviews_allowed(),
    			'average_rating'     => wc_format_decimal( $product->get_average_rating(), 2 ),
    			'rating_count'       => $product->get_rating_count(),
    			'related_ids'        => array_map( 'absint', array_values( wc_get_related_products( $product->get_id() ) ) ),
    			'upsell_ids'         => array_map( 'absint', $product->get_upsell_ids() ),
    			'cross_sell_ids'     => array_map( 'absint', $product->get_cross_sell_ids() ),
    
  • /includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php line 475
    			'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 700
    				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
    }
    
    global $post;
    
    $short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
    
    if ( ! $short_description ) {
    	return;
    }
    
    ?>
    

See this hook used in plugins: