I'm trying to get the download links in the order summary and My Account section to open in a new tab. I just the filter call below to add target="blank", but the links still open in the same tab. Looking for some advice.
add_filter( 'woocommerce_available_download_link', 'vd_download_links_new_tab' );
function vd_download_links_new_tab( $variable ) {
$variable = '<a href="' . esc_url( $download['download_url'] ) . '" target="blank">' . $download['download_name'] . '</a>';
return $variable;
}
Background info: I have a variable product with downloadable variants. File Download Method in WooCommerce settings is set to Redirect only.