Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created May 30, 2022 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webtoffee-git/b25432d551af54317603b229a4929b15 to your computer and use it in GitHub Desktop.
Save webtoffee-git/b25432d551af54317603b229a4929b15 to your computer and use it in GitHub Desktop.
To alter the invoice product table row height (https://www.webtoffee.com/product/woocommerce-pdf-invoices-packing-slips/)
<?php // do not copy this line of code
add_filter('wf_pklist_add_custom_css','wf_pklist_alter_line_height',10,3);
function wf_pklist_alter_line_height($custom_css, $template_type, $template_for_pdf)
{
if($template_type=='invoice')
{
//You can specify the line-height from below
$custom_css.='.wfte_product_table_body .product_td b{line-height: 6px !important;}';
if($template_for_pdf)
{
$custom_css.=".wfte_product_table_body .product_td b{line-height: 6px !important;} ";
}
}
return $custom_css;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment