Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created April 11, 2025 09:30
Show Gist options
  • Save webtoffee-git/c68beb14d6269447c39a93a3f7d4fcb9 to your computer and use it in GitHub Desktop.
Save webtoffee-git/c68beb14d6269447c39a93a3f7d4fcb9 to your computer and use it in GitHub Desktop.
To change the Print Invoice button colour in WooCommerce order mail - By WebToffee (WooCommerce PDF Invoice, Packing Slips, Delivery Notes and Shipping labels)
<?php //do not coopy this line of code
add_filter("wt_pklist_alter_style_for_email_button", "wt_pklist_alter_document_button_style_email", 10, 2);
function wt_pklist_alter_document_button_style_email($style_arr, $template_type) {
$style_arr['background'] = '#ff0000'; //Change button background color
$style_arr['border-color'] = '#cc0000'; //Change border color
$style_arr['box-shadow'] = '0 1px 0 #990000'; //Change button shadow
return $style_arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment