Hello, I want to achieve the next:
I have added the next code to functions.php:
function themeprefix_custom_price_message( $price ) {
global $post;
if(!is_product()) {
$text = '<span style="font-size:14px; line-height: 1; color: #e70000; padding-bottom:10px; font-weight:700;" class="precio-descuento">50% OFF en el 2do artÃculo</span>';
return $text . ' ' . $price;
}else{
return $price;
}
}
add_filter( 'woocommerce_get_price_html', 'themeprefix_custom_price_message', 10, 2 );
add_filter( 'woocommerce_cart_item_price', 'themeprefix_custom_price_message', 10, 2 );
This add a message before price for to category products, this is working fine, but for to sliders woodmart is not working.
Look the images that i attached.
How can I add this string to sliders woodmart?
Attachments:
You must be
logged in to view attached files.