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 4 years, 9 months ago by
alexmigf.