wc_product_enable_dimensions_display

wc_product_enable_dimensions_display

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('wc_product_enable_dimensions_display') is found 3 times:

  • /includes/legacy/abstract-wc-legacy-product.php line 633
    	 * @return bool
    	 */
    	public function enable_dimensions_display() {
    		wc_deprecated_function( 'WC_Product::enable_dimensions_display', '3.0' );
    		return apply_filters( 'wc_product_enable_dimensions_display', true ) && ( $this->has_dimensions() || $this->has_weight() || $this->child_has_weight() || $this->child_has_dimensions() );
    	}
    
    	/**
    	 * Returns the product rating in html format.
    	 *
    	 * @deprecated 3.0.0
    
  • /includes/wc-template-functions.php line 1903
    			);
    		}
    
    		// Additional information tab - shows attributes.
    		if ( $product && ( $product->has_attributes() || apply_filters( 'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ) ) ) {
    			$tabs['additional_information'] = array(
    				'title'    => __( 'Additional information', 'woocommerce' ),
    				'priority' => 20,
    				'callback' => 'woocommerce_product_additional_information_tab',
    			);
    		}
    
  • /includes/wc-template-functions.php line 3560
    function wc_display_product_attributes( $product ) {
    	$product_attributes = array();
    
    	// Display weight and dimensions before attribute list.
    	$display_dimensions = apply_filters( 'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() );
    
    	if ( $display_dimensions && $product->has_weight() ) {
    		$product_attributes['weight'] = array(
    			'label' => __( 'Weight', 'woocommerce' ),
    			'value' => wc_format_weight( $product->get_weight() ),
    		);