Hello @khouya
You can do that very easily with in our Premium Templates extension, you just need to add the snippet below to the customizer custom styles:
.quantity.multiple { color:red; }
Alternatively, you can use a filter:
add_filter('wpo_wcpdf_order_item_data', 'wpo_wcpdf_mark_qty_red', 10, 3);
function wpo_wcpdf_mark_qty_red( $data, $order, $document_type)
{
if( !empty($order) && $document_type == 'invoice' ) {
if( $data['quantity'] > 1 ) {
$data['quantity'] = '<span style="color:red;">'.$data['quantity'].'</span>';
}
}
return $data;
}
If you never worked with filters please read this documentation: How to use filters
-
This reply was modified 6 years ago by
alexmigf.
Thread Starter
khouya
(@khouya)
That’s very nice ! Thank you ! It works.
I’ve just bought the Premium Templates extension yesterday 😉
-
This reply was modified 6 years ago by
khouya.
Hello @khouya
We appreciate that. If you need more help you have to contact us by email because we can’t provide support for paid products here in the forums.
Have a great day!