woocommerce_pre_customer_bought_product
Использование
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
- -
Где вызывается хук
woocommerce_pre_customer_bought_product
woocommerce/includes/wc-user-functions.php 324
$result = apply_filters( 'woocommerce_pre_customer_bought_product', null, $customer_email, $user_id, $product_id );