Great question — answering as the UphillTech team:
If you want to open link attached to image in a new tab for a external products in your shop page then edit your code like these remove_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open'); add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 15); add_action('woocommerce_before_shop_loop_item', 'woocommerce_add_aff_link_open', 10); add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_add_aff_link_close', 10); function woocommerce_add_aff_link_open(){ $product = wc_get_product(get_the_ID()); if( $product->is_type( 'external' ) ) { echo '<a target="_blank" href="' . $product->get_product_url()...
Full answer by Oleg Apanovich: https://stackoverflow.stackexchange.com/a/49259519 (CC BY-SA 3.0).
Need it done for your business? UphillTech.