Created
March 25, 2024 06:52
-
-
Save webtoffee-git/1c7d2fc9c14e4acf5bacaf9083692acb to your computer and use it in GitHub Desktop.
Code to adjust the product image size in the product table- By WebToffee (Print invoice free)
This file contains 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('wt_pklist_alter_order_template_html','wf_pklist_alter_image_size',10,6); | |
function wf_pklist_alter_image_size($html, $template_type, $order, $box_packing, $order_package, $template_for_pdf) | |
{ | |
if($template_type == 'invoice') | |
{ | |
if(!empty($order)) | |
{ | |
$html.='<style> | |
.wfte_product_image_thumb | |
{ max-width:none !important; max-height:none !important; width:150px !important; } // change width to alter image size | |
</style>'; | |
} | |
} | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment