Skip to content

Instantly share code, notes, and snippets.

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/1c7d2fc9c14e4acf5bacaf9083692acb to your computer and use it in GitHub Desktop.
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)
<?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