It’s missing the second argument because you didn’t tell WordPress you wanted it with your add_filter
call. By default, actions and filters only get one argument. Try this:
<?php
add_filter('woocommerce_get_price', 'custom_price', 10, 2);
function custom_price($price, $product) {
...
}