How to change WooCommerce loop product title HTML output in single product page and archive page
The main problems with what you’ve got are tha your close bracket } for the is_product() case is in the wrong place: it should be before the elseif not at the bottom of the block. (This is what Tom meant by indenting your code correctly: if you’d indented each {…}, which your IDE will do … Read more