Using filter hooks in WooCommerce

Filter hooks are called throughout are code using apply_filter( 'filter_name', $variable );. To manipulate the passed variable, you can do something like the following.

add_filter( 'filter_name', 'your_function_name' );

function your_function_name( $variable ) {
// Your code
return $variable;
}

With filters, you must return a value.