Get Tags specific to Category using WooCommerce plugin

Finally solve the problem:

t1.taxonomy = 'product_cat' AND p1.post_status="publish" AND terms1.term_id IN (".$args['categories'].") AND
t2.taxonomy = 'product_tag' AND p2.post_status="publish"

In the functions.php

t1.taxonomy = 'category' AND p1.post_status="publish" AND terms1.term_id IN (".$args['categories'].") AND t2.taxonomy = 'post_tag' AND p2.post_status="publish"

rename category to product_cat, and post_tag with product_tag.