I was able to solve with a tip from the author of the Woocommerce plugin.
The same replied:
remove_action( 'woocommerce_before_shop_loop_item',
'woocommerce_template_loop_product_link_open', 10 );
add_action( 'woocommerce_before_shop_loop_item', 'YOUR_CUSTOM_FUNCTION_NAME', 10 );
With this I went to functions.php
of my child theme and added the following code:
remove_action( 'woocommerce_before_shop_loop_item',
'woocommerce_template_loop_product_link_open', 10 );
add_action( 'woocommerce_before_shop_loop_item',
'woocommerce_template_loop_product_link_open_personalizado', 10 );
function woocommerce_template_loop_product_link_open_personalizado() {
echo '<a href="' . get_the_permalink() . '" class="woocommerce-LoopProduct-link" target="_parent">';
}
This solved my question, I do not know if it is the best option, but it was the tip that one of the authors of Woocommerce sent. Follow the link for the answer: link