woocommerce_format_dimensions

The WooCommerce woocommerce format dimensions hook.

Description

apply_filters( 'woocommerce_format_dimensions', (unknown) $dimension_string, (unknown) $dimensions ); 

Parameters (2)

0. $dimension_string (unknown)
The dimension string.
1. $dimensions (unknown)
The dimensions.

Usage

To run the hook, copy the example below.
  1. $dimension_string = apply_filters( 'woocommerce_format_dimensions', $dimension_string, $dimensions ); 
  2.  
  3. if ( !empty( $dimension_string ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_format_dimensions callback 
  2. function filter_woocommerce_format_dimensions( $dimension_string, $dimensions ) { 
  3. // make filter magic happen here... 
  4. return $dimension_string
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_format_dimensions', 'filter_woocommerce_format_dimensions', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_format_dimensions', 'filter_woocommerce_format_dimensions', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/wc-formatting-functions.php  
  1. return apply_filters( 'woocommerce_format_dimensions', $dimension_string, $dimensions );