Filter get_adjacent_post to follow woocommerce product category

The get_adjacent_post() function has multiple arguments. The fourth and last one is the taxonomy, which per default is 'category':

$post_prev = get_adjacent_post( true, '', true, 'product_cat' );
$post_next = get_adjacent_post( true, '', false, 'product_cat' );