(handle)_params
Usage
add_filter( '(handle)_params', 'wp_kama_handle_params_filter', 10, 2 );
/**
* Function for `(handle)_params` filter-hook.
*
* @param $array
* @param $string
*
* @return
*/
function wp_kama_handle_params_filter( $array, $string ){
// filter...
return $array;
}
- $array
- -
- $string
- -
Where the hook is called
(handle)_params
woocommerce/includes/class-wc-frontend-scripts.php 758
$params = apply_filters_deprecated( $handle . '_params', array( $params ), '3.0.0', 'woocommerce_get_script_data' );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-brands.php 74
add_filter( 'rest_product_collection_params', array( $this, 'rest_api_product_collection_params' ), 10, 2 );
woocommerce/src/Blocks/BlockTypes/ProductCollection/Controller.php 80
add_filter( 'rest_product_collection_params', array( $this, 'extend_rest_query_allowed_params' ), 10, 1 );
woocommerce/src/Blocks/BlockTypes/ProductQuery.php 86
add_filter( 'rest_product_collection_params', array( $this, 'extend_rest_query_allowed_params' ), 10, 1 );