Skip to content

Instantly share code, notes, and snippets.

View Annaick's full-sized avatar
🏠
Working from home

MERN Developer Annaick

🏠
Working from home
  • Fianarantsoa / Madagascar
View GitHub Profile
@webtoffee-git
webtoffee-git / function.php
Created May 9, 2024 12:20
to alter/translate the 'Print Invoice' button string present on the WooCommerce email
<?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");
}
}