Skip to content

Commit

Permalink
Fix for issue qTranslate-Team#3 (additional error report)
Browse files Browse the repository at this point in the history
* Translate email subjects and email headings
  • Loading branch information
mweimerskirch committed Mar 22, 2015
1 parent 134fc96 commit 63fa1a0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions qwc-admin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
<?php
if(!defined('ABSPATH'))exit;

function qwc_add_filters_admin() {
$use_filters = array(
// Email subjects
'woocommerce_email_subject_customer_invoice_paid' => 10,
'woocommerce_email_subject_customer_invoice' => 10,
'woocommerce_email_subject_customer_completed_order' => 10,
'woocommerce_email_subject_low_stock' => 10,
'woocommerce_email_subject_no_stock' => 10,
'woocommerce_email_subject_backorder' => 10,

// Email headings
'woocommerce_email_heading_customer_invoice_paid' => 10,
'woocommerce_email_heading_customer_invoice' => 10,
'woocommerce_email_heading_customer_completed_order' => 10,
);

foreach ( $use_filters as $name => $priority ) {
add_filter( $name, 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage', $priority );
}
}
qwc_add_filters_admin();

add_filter('qtranslate_load_admin_page_config','qwc_add_admin_page_config');
function qwc_add_admin_page_config($page_configs)
{
Expand Down

0 comments on commit 63fa1a0

Please sign in to comment.