• Resolved khouya

    (@khouya)


    Hi!

    Is there a way we can only increase the font-size of the quantity column? Or make it turns red if we have more than 1?

    Thanks !

    • This topic was modified 4 years, 10 months ago by khouya.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

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

    (@alexmigf)

    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!

    Thread Starter khouya

    (@khouya)

    Ok Thanks !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Increase font size “quantity”’ is closed to new replies.