Created
April 28, 2025 09:18
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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