add_filter( ‚wc_product_table_open_products_in_new_tab’, ‚__return_true’ );

add_filter( ‚woocommerce_loop_add_to_cart_link’, ‚businessbloomer_add_target_blank’, 10, 2 );

function businessbloomer_add_target_blank( $product, $args ){

$link = sprintf( ‚%s‚,
esc_url( $product->add_to_cart_url() ),
esc_attr( isset( $args[‚quantity’] ) ? $args[‚quantity’] : 1 ),
esc_attr( isset( $args[‚class’] ) ? $args[‚class’] : ‚button’ ),
isset( $args[‚attributes’] ) ? wc_implode_html_attributes( $args[‚attributes’] ) : ”,
esc_html( $product->add_to_cart_text() )
);

return $link;

}