Created
May 9, 2024 12:20
-
-
Save webtoffee-git/632fb3bdeb2be290da99f2911b13b8b9 to your computer and use it in GitHub Desktop.
to alter/translate the 'Print Invoice' button string present on the WooCommerce email
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 add this line of code | |
add_filter("wt_pklist_alter_document_button_label","wt_pklist_alter_document_button_label_email",10,4); | |
function wt_pklist_alter_document_button_label_email($print_btn_label,$print,$loco,$template_type){ | |
if( 'invoice' === $template_type ){ | |
if( 'email' === $loco ){ | |
$print_btn_label = __("Print your Invoice","print-invoices-packing-slip-labels-for-woocommerce"); | |
} | |
} | |
return $print_btn_label; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment