woocommerce_price_filter_widget_max_amount

The WooCommerce woocommerce price filter widget max amount hook.

Description

apply_filters( 'woocommerce_price_filter_widget_max_amount', (unknown) $max ); 

Parameters (1)

0. $max (unknown)
The max.

Usage

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

Defined (1)

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

/includes/widgets/class-wc-widget-price-filter.php  
  1. <input type="text" id="max_price" name="max_price" value="' . esc_attr( $max_price ) . '" data-max="' . esc_attr( apply_filters( 'woocommerce_price_filter_widget_max_amount', $max ) ) . '" placeholder="' . esc_attr__( 'Max price', 'woocommerce' ) . '" />