Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created April 28, 2025 09:18
Show Gist options
  • Save webtoffee-git/ade2dc35743b0a843841d7947aecd297 to your computer and use it in GitHub Desktop.
Save webtoffee-git/ade2dc35743b0a843841d7947aecd297 to your computer and use it in GitHub Desktop.
Modify the font size of the text in the Product Table and Summary Table of the Invoice document - By WebToffee ( WooCommerce PDF Invoices, Packing Slips, Delivery Notes, and Shipping Labels)
<?php //do not copy this line of code
add_filter('wf_pklist_alter_template_html', 'wt_pklist_change_product_table_body_bg_font', 10, 2);
function wt_pklist_change_product_table_body_bg_font($html, $template_type) {
if ('invoice' === $template_type) { // or 'packinglist' if needed
$html .= '<style type="text/css">
.wfte_product_table_head th {
font-size: 18px; /* Font size for header */
}
.wfte_product_table_body td,
.wfte_payment_summary_table_body td {
font-size: 16px; /* Font size for body */
}
</style>';
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment