Suporte » Plugins e hacks » Woocommerce price suffix if category

  • Hi

    I needed to set a price suffix for products on my site, and the way I did it was to override Woocommerce loop/price.php:

    <span class="price"><?php esc_html_e( 'from', 'chaitan' )?> <?php echo $price_html; ?></span>

    But i need to have this suffix on specific categories.

    How can I do that? I tried:

    <span class="price">
        	<?php if (is_category( '415' )) 
        	    esc_html_e( 'from', 'chaitan' )
        	    <?php echo $price_html; ?></span>

    but no success…

  • O tópico ‘Woocommerce price suffix if category’ está fechado a novas respostas.