In woocommerce I would like to open products in new tab when users click on product link or product image. Is it possible?
I’ve tested with this snippet, but it didn’t work for me! 🙁
remove_action( ‘woocommerce_before_shop_loop_item’,’woocommerce_template_loop_product_link_open’, 10 );
// add a hook to my custom function
add_action ( ‘woocommerce_before_shop_loop_item’, ‘ami_function_open_new_tab’, 10 );
function ami_function_open_new_tab() {
echo ‘‘;
}