woocommerce_pre_customer_bought_product
Usage
add_filter( 'woocommerce_pre_customer_bought_product', 'wp_kama_woocommerce_pre_customer_bought_product_filter', 10, 4 );
/**
* Function for `woocommerce_pre_customer_bought_product` filter-hook.
*
* @param $null
* @param $customer_email
* @param $user_id
* @param $product_id
*
* @return
*/
function wp_kama_woocommerce_pre_customer_bought_product_filter( $null, $customer_email, $user_id, $product_id ){
// filter...
return $null;
}
- $null
- -
- $customer_email
- -
- $user_id
- -
- $product_id
- -
Where the hook is called
woocommerce_pre_customer_bought_product
woocommerce/includes/wc-user-functions.php 408
$result = apply_filters( 'woocommerce_pre_customer_bought_product', null, $customer_email, $user_id, $product_id );