From f019fb40b6dc910339edee00edef5277cbcf43b5 Mon Sep 17 00:00:00 2001 From: Giovanni Cascione Date: Wed, 30 Mar 2022 00:29:04 +0200 Subject: [PATCH 1/2] WC: fixed admin translations for product attributes --- modules/woo-commerce/qwc-admin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/woo-commerce/qwc-admin.php b/modules/woo-commerce/qwc-admin.php index f309dfb2..6a28a508 100644 --- a/modules/woo-commerce/qwc-admin.php +++ b/modules/woo-commerce/qwc-admin.php @@ -45,6 +45,8 @@ function qtranxf_wc_add_filters_admin() { qtranxf_wc_add_filters_admin(); +add_filter('woocommerce_attribute_taxonomies','qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage'); + add_action( 'admin_enqueue_scripts', 'qtranxf_wc_add_admin_styles' ); function qtranxf_wc_add_admin_styles() { wp_enqueue_style( 'qtranxf_wc_qtranslate_admin', plugins_url( '/qwc-admin.css', __FILE__ ), array(), QTX_VERSION ); From 425ba936dc1e5f3c35c8e146707b55e8b1ac759b Mon Sep 17 00:00:00 2001 From: Herr Vigg Date: Thu, 31 Mar 2022 23:48:02 +0200 Subject: [PATCH 2/2] Move filter to `qtranxf_wc_add_filters_admin` --- modules/woo-commerce/qwc-admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/woo-commerce/qwc-admin.php b/modules/woo-commerce/qwc-admin.php index 6a28a508..cafffcd4 100644 --- a/modules/woo-commerce/qwc-admin.php +++ b/modules/woo-commerce/qwc-admin.php @@ -41,12 +41,12 @@ function qtranxf_wc_add_filters_admin() { foreach ( $email_common as $name => $priority ) { add_filter( $name, 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage', $priority ); } + + add_filter( 'woocommerce_attribute_taxonomies' , 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage' ); } qtranxf_wc_add_filters_admin(); -add_filter('woocommerce_attribute_taxonomies','qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage'); - add_action( 'admin_enqueue_scripts', 'qtranxf_wc_add_admin_styles' ); function qtranxf_wc_add_admin_styles() { wp_enqueue_style( 'qtranxf_wc_qtranslate_admin', plugins_url( '/qwc-admin.css', __FILE__ ), array(), QTX_VERSION );