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.
- $dimension_string = apply_filters( 'woocommerce_format_dimensions', $dimension_string, $dimensions );
- if ( !empty( $dimension_string ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the woocommerce_format_dimensions callback
- function filter_woocommerce_format_dimensions( $dimension_string, $dimensions ) {
- // make filter magic happen here...
- return $dimension_string;
- };
- // add the filter
- add_filter( 'woocommerce_format_dimensions', 'filter_woocommerce_format_dimensions', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- 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
- return apply_filters( 'woocommerce_format_dimensions', $dimension_string, $dimensions );