Version Description
Download this release
Release Info
Developer | johnclause |
Plugin | WooCommerce & qTranslate-X |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.3
- qwc-admin.php +83 -59
- readme.txt +25 -10
- woocommerce-qtranslate-x.php +2 -2
qwc-admin.php
CHANGED
@@ -45,33 +45,44 @@ function qwc_add_filters_admin() {
|
|
45 |
}
|
46 |
qwc_add_filters_admin();
|
47 |
|
|
|
48 |
add_filter('qtranslate_load_admin_page_config','qwc_add_admin_page_config');
|
49 |
function qwc_add_admin_page_config($page_configs)
|
50 |
{
|
51 |
{//post.php //since 1.0.1
|
52 |
-
$
|
53 |
-
$
|
54 |
-
|
55 |
-
|
56 |
-
$
|
57 |
-
|
58 |
-
|
59 |
-
$
|
60 |
-
|
61 |
-
$
|
62 |
-
$
|
63 |
-
|
64 |
-
//$
|
65 |
-
//$
|
66 |
-
|
67 |
-
|
68 |
-
$fields
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
//$fields[] = array( 'class' => 'attribute_values', 'encode' => 'display' );
|
72 |
|
73 |
-
|
74 |
-
|
75 |
}
|
76 |
|
77 |
{//edit.php?post_type=product&page=product_attributes
|
@@ -87,11 +98,11 @@ function qwc_add_admin_page_config($page_configs)
|
|
87 |
$f['fields'] = array();
|
88 |
$fields = &$f['fields']; // shorthand
|
89 |
|
90 |
-
$fields[] = array(
|
91 |
-
|
92 |
-
$fields[] = array( '
|
93 |
|
94 |
-
$page_config['forms'][] = $f;
|
95 |
$page_configs[] = $page_config;
|
96 |
}
|
97 |
|
@@ -111,6 +122,7 @@ function qwc_add_admin_page_config($page_configs)
|
|
111 |
//all input fields are ok from default qTranslate-X configuration
|
112 |
|
113 |
$fields[] = array( 'tag' => 'LABEL', 'container_class' => 'screen-options', 'encode' => 'display' );
|
|
|
114 |
$fields[] = array( 'tag' => 'H2', 'container_class' => 'wrap', 'encode' => 'display' );
|
115 |
$fields[] = array( 'tag' => 'H3', 'container_id' => 'col-left', 'encode' => 'display' );
|
116 |
$fields[] = array( 'id' => 'search-submit', 'attr' => 'value', 'encode' => 'display' );
|
@@ -135,10 +147,9 @@ function qwc_add_admin_page_config($page_configs)
|
|
135 |
$f['fields'] = array();
|
136 |
$fields = &$f['fields']; // shorthand
|
137 |
|
138 |
-
$fields[] = array( '
|
139 |
-
$fields[] = array( '
|
140 |
-
$fields[] = array(
|
141 |
-
//$fields[] = array( 'id' => '' );
|
142 |
|
143 |
$page_config['forms'][] = $f;
|
144 |
$page_configs[] = $page_config;
|
@@ -182,7 +193,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
182 |
$fields[] = array( 'id' => 'woocommerce_cheque_title' );
|
183 |
$fields[] = array( 'id' => 'woocommerce_cheque_description' );
|
184 |
$fields[] = array( 'id' => 'woocommerce_cheque_instructions' );
|
185 |
-
//$fields[] = array( 'id' => '' );
|
186 |
|
187 |
$page_config['forms'][] = $f;
|
188 |
$page_configs[] = $page_config;
|
@@ -204,7 +214,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
204 |
$fields[] = array( 'id' => 'woocommerce_cod_title' );
|
205 |
$fields[] = array( 'id' => 'woocommerce_cod_description' );
|
206 |
$fields[] = array( 'id' => 'woocommerce_cod_instructions' );
|
207 |
-
//$fields[] = array( 'id' => '' );
|
208 |
|
209 |
$page_config['forms'][] = $f;
|
210 |
$page_configs[] = $page_config;
|
@@ -226,7 +235,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
226 |
$fields[] = array( 'id' => 'woocommerce_paypal_title' );
|
227 |
$fields[] = array( 'id' => 'woocommerce_paypal_description' );
|
228 |
$fields[] = array( 'id' => 'woocommerce_paypal_instructions' );
|
229 |
-
//$fields[] = array( 'id' => '' );
|
230 |
|
231 |
$page_config['forms'][] = $f;
|
232 |
$page_configs[] = $page_config;
|
@@ -246,7 +254,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
246 |
$fields = &$f['fields']; // shorthand
|
247 |
|
248 |
$fields[] = array( 'id' => 'woocommerce_free_shipping_title' );
|
249 |
-
//$fields[] = array( 'id' => '' );
|
250 |
|
251 |
$page_config['forms'][] = $f;
|
252 |
$page_configs[] = $page_config;
|
@@ -266,7 +273,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
266 |
$fields = &$f['fields']; // shorthand
|
267 |
|
268 |
$fields[] = array( 'id' => 'woocommerce_flat_rate_title' );
|
269 |
-
//$fields[] = array( 'id' => '' );
|
270 |
|
271 |
$page_config['forms'][] = $f;
|
272 |
$page_configs[] = $page_config;
|
@@ -286,7 +292,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
286 |
$fields = &$f['fields']; // shorthand
|
287 |
|
288 |
$fields[] = array( 'id' => 'woocommerce_international_delivery_title' );
|
289 |
-
//$fields[] = array( 'id' => '' );
|
290 |
|
291 |
$page_config['forms'][] = $f;
|
292 |
$page_configs[] = $page_config;
|
@@ -306,7 +311,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
306 |
$fields = &$f['fields']; // shorthand
|
307 |
|
308 |
$fields[] = array( 'id' => 'woocommerce_local_delivery_title' );
|
309 |
-
//$fields[] = array( 'id' => '' );
|
310 |
|
311 |
$page_config['forms'][] = $f;
|
312 |
$page_configs[] = $page_config;
|
@@ -326,7 +330,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
326 |
$fields = &$f['fields']; // shorthand
|
327 |
|
328 |
$fields[] = array( 'id' => 'woocommerce_local_pickup_title' );
|
329 |
-
//$fields[] = array( 'id' => '' );
|
330 |
|
331 |
$page_config['forms'][] = $f;
|
332 |
$page_configs[] = $page_config;
|
@@ -348,11 +351,10 @@ function qwc_add_admin_page_config($page_configs)
|
|
348 |
$fields[] = array( 'id' => 'woocommerce_email_from_name' );
|
349 |
//$fields[] = array( 'id' => 'woocommerce_email_header_image' );
|
350 |
$fields[] = array( 'id' => 'woocommerce_email_footer_text' );
|
351 |
-
//$fields[] = array( 'id' => '' );
|
352 |
|
353 |
$page_config['forms'][] = $f;
|
354 |
$page_configs[] = $page_config;
|
355 |
-
}
|
356 |
|
357 |
{//tab=email§ion=wc_email_new_order
|
358 |
$page_config = array();
|
@@ -370,7 +372,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
370 |
$fields[] = array( 'id' => 'woocommerce_new_order_recipient' );
|
371 |
$fields[] = array( 'id' => 'woocommerce_new_order_subject' );
|
372 |
$fields[] = array( 'id' => 'woocommerce_new_order_heading' );
|
373 |
-
//$fields[] = array( 'id' => '' );
|
374 |
|
375 |
$page_config['forms'][] = $f;
|
376 |
$page_configs[] = $page_config;
|
@@ -392,7 +393,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
392 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_recipient' );
|
393 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_subject' );
|
394 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_heading' );
|
395 |
-
//$fields[] = array( 'id' => '' );
|
396 |
|
397 |
$page_config['forms'][] = $f;
|
398 |
$page_configs[] = $page_config;
|
@@ -414,7 +414,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
414 |
//$fields[] = array( 'id' => 'woocommerce_customer_processing_order_recipient' );
|
415 |
$fields[] = array( 'id' => 'woocommerce_customer_processing_order_subject' );
|
416 |
$fields[] = array( 'id' => 'woocommerce_customer_processing_order_heading' );
|
417 |
-
//$fields[] = array( 'id' => '' );
|
418 |
|
419 |
$page_config['forms'][] = $f;
|
420 |
$page_configs[] = $page_config;
|
@@ -437,11 +436,33 @@ function qwc_add_admin_page_config($page_configs)
|
|
437 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_heading' );
|
438 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_subject_downloadable' );
|
439 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_heading_downloadable' );
|
440 |
-
//$fields[] = array( 'id' => '' );
|
441 |
|
442 |
$page_config['forms'][] = $f;
|
443 |
$page_configs[] = $page_config;
|
444 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
{//tab=email§ion=wc_email_customer_invoice
|
447 |
$page_config = array();
|
@@ -460,7 +481,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
460 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_heading' );
|
461 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_subject_paid' );
|
462 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_heading_paid' );
|
463 |
-
//$fields[] = array( 'id' => '' );
|
464 |
|
465 |
$page_config['forms'][] = $f;
|
466 |
$page_configs[] = $page_config;
|
@@ -481,7 +501,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
481 |
|
482 |
$fields[] = array( 'id' => 'woocommerce_customer_note_subject' );
|
483 |
$fields[] = array( 'id' => 'woocommerce_customer_note_heading' );
|
484 |
-
//$fields[] = array( 'id' => '' );
|
485 |
|
486 |
$page_config['forms'][] = $f;
|
487 |
$page_configs[] = $page_config;
|
@@ -502,7 +521,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
502 |
|
503 |
$fields[] = array( 'id' => 'woocommerce_customer_reset_password_subject' );
|
504 |
$fields[] = array( 'id' => 'woocommerce_customer_reset_password_heading' );
|
505 |
-
//$fields[] = array( 'id' => '' );
|
506 |
|
507 |
$page_config['forms'][] = $f;
|
508 |
$page_configs[] = $page_config;
|
@@ -523,7 +541,6 @@ function qwc_add_admin_page_config($page_configs)
|
|
523 |
|
524 |
$fields[] = array( 'id' => 'woocommerce_customer_new_account_subject' );
|
525 |
$fields[] = array( 'id' => 'woocommerce_customer_new_account_heading' );
|
526 |
-
//$fields[] = array( 'id' => '' );
|
527 |
|
528 |
$page_config['forms'][] = $f;
|
529 |
$page_configs[] = $page_config;
|
@@ -606,19 +623,14 @@ add_filter('admin_url', 'qwc_admin_url_append_language');
|
|
606 |
* @since 1.1
|
607 |
*/
|
608 |
function qwc_admin_url_append_language_edit_page( $url ) {
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
$user_language = get_post_meta( $order_id, '_user_language', true );
|
617 |
|
618 |
-
if ( $user_language ) {
|
619 |
-
$url .= '?lang=' . $user_language;
|
620 |
-
}
|
621 |
-
}
|
622 |
return $url;
|
623 |
}
|
624 |
add_filter('admin_url', 'qwc_admin_url_append_language_edit_page' );
|
@@ -681,6 +693,18 @@ function qwc_admin_after_resend_order_emails($order) {
|
|
681 |
}
|
682 |
add_action( 'woocommerce_after_resend_order_email', 'qwc_admin_after_resend_order_emails' );
|
683 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
/*
|
685 |
Reminder for table handling
|
686 |
Line 436: function qtranxf_languageColumnHeader($columns){
|
45 |
}
|
46 |
qwc_add_filters_admin();
|
47 |
|
48 |
+
//add_filter('i18n_admin_config','qwc_add_admin_page_config');
|
49 |
add_filter('qtranslate_load_admin_page_config','qwc_add_admin_page_config');
|
50 |
function qwc_add_admin_page_config($page_configs)
|
51 |
{
|
52 |
{//post.php //since 1.0.1
|
53 |
+
if(!isset($page_configs['post'])) $page_configs['post'] = array();
|
54 |
+
$pgcfg = &$page_configs['post'];
|
55 |
+
//$page_config = array();
|
56 |
+
if(!isset($pgcfg['pages'])) $pgcfg['pages'] = array( 'post.php' => '', 'post-new.php' => '');
|
57 |
+
if(!isset($pgcfg['anchors'])) $pgcfg['anchors'] = array('post-body-content' => array('where'=>'first last'));
|
58 |
+
//$page_config['pages'] = array( 'post.php' => '');
|
59 |
+
//$page_config['anchors'] = array( 'post', 'woocommerce-product-data', 'postexcerpt' );
|
60 |
+
$pgcfg['anchors']['woocommerce-product-data'] = array( 'where' => 'before' );
|
61 |
+
|
62 |
+
if(!isset($pgcfg['forms'])) $pgcfg['forms'] = array();
|
63 |
+
if(!isset($pgcfg['forms']['post'])) $pgcfg['forms']['post'] = array();
|
64 |
+
if(!isset($pgcfg['forms']['post']['fields'])) $pgcfg['forms']['post']['fields'] = array();
|
65 |
+
//$f = array();
|
66 |
+
//$f['form'] = array( 'id' => 'post' );
|
67 |
+
//$f['fields'] = array();
|
68 |
+
//$fields = &$f['fields']; // shorthand
|
69 |
+
$fields = &$pgcfg['forms']['post']['fields'];
|
70 |
+
|
71 |
+
//Custom Product Attributes need more work
|
72 |
+
//$fields['inp-attribute_name'] = array( 'jquery' => 'input.attribute_name' );
|
73 |
+
//$fields['inp-attribute_values'] = array( 'jquery' => 'textarea[name^=attribute_values]', 'encode' => 'byseparator', 'separator' => '/\\s*\\|\\s*/' );
|
74 |
+
|
75 |
+
$fields['inp-variable_description'] = array( 'jquery' => 'textarea[name^=variable_description]' );
|
76 |
+
$fields['td-attribute_name'] = array( 'jquery' => 'td.attribute_name', 'encode' => 'display' );
|
77 |
+
$fields['strong-attribute_name'] = array( 'jquery' => 'strong.attribute_name', 'encode' => 'display' );
|
78 |
+
$fields['order_number'] = array( 'jquery' => '.order_number', 'encode' => 'display' );
|
79 |
+
$fields['display_meta'] = array( 'jquery' => '.display_meta', 'encode' => 'display' );
|
80 |
+
$fields['select-option'] = array( 'jquery' => 'select option', 'encode' => 'display' );
|
81 |
+
//$fields['attr_tax_optn'] = array( 'jquery' => 'select.attribute_taxonomy option', 'encode' => 'display' );
|
82 |
//$fields[] = array( 'class' => 'attribute_values', 'encode' => 'display' );
|
83 |
|
84 |
+
//$page_config['forms'][] = $f;
|
85 |
+
//$page_configs[] = $page_config;
|
86 |
}
|
87 |
|
88 |
{//edit.php?post_type=product&page=product_attributes
|
98 |
$f['fields'] = array();
|
99 |
$fields = &$f['fields']; // shorthand
|
100 |
|
101 |
+
$fields['attribute_label'] = array();
|
102 |
+
$fields['Name'] = array( 'jquery' => 'td a', 'container_id' => 'col-right', 'encode' => 'display' );
|
103 |
+
$fields['Terms'] = array( 'jquery' => 'td.attribute-terms', 'container_id' => 'col-right', 'encode' => 'display' );
|
104 |
|
105 |
+
$page_config['forms']['all'] = $f;
|
106 |
$page_configs[] = $page_config;
|
107 |
}
|
108 |
|
122 |
//all input fields are ok from default qTranslate-X configuration
|
123 |
|
124 |
$fields[] = array( 'tag' => 'LABEL', 'container_class' => 'screen-options', 'encode' => 'display' );
|
125 |
+
$fields['h1'] = array( 'jquery' => 'h1', 'container_class' => 'wrap', 'encode' => 'display' );
|
126 |
$fields[] = array( 'tag' => 'H2', 'container_class' => 'wrap', 'encode' => 'display' );
|
127 |
$fields[] = array( 'tag' => 'H3', 'container_id' => 'col-left', 'encode' => 'display' );
|
128 |
$fields[] = array( 'id' => 'search-submit', 'attr' => 'value', 'encode' => 'display' );
|
147 |
$f['fields'] = array();
|
148 |
$fields = &$f['fields']; // shorthand
|
149 |
|
150 |
+
$fields['subsubsub'] = array( 'jquery' => '.subsubsub', 'encode' => 'display' );
|
151 |
+
$fields['woocommerce_tax_classes'] = array( 'encode' => 'byline' );
|
152 |
+
$fields['woocommerce_price_display_suffix'] = array( );
|
|
|
153 |
|
154 |
$page_config['forms'][] = $f;
|
155 |
$page_configs[] = $page_config;
|
193 |
$fields[] = array( 'id' => 'woocommerce_cheque_title' );
|
194 |
$fields[] = array( 'id' => 'woocommerce_cheque_description' );
|
195 |
$fields[] = array( 'id' => 'woocommerce_cheque_instructions' );
|
|
|
196 |
|
197 |
$page_config['forms'][] = $f;
|
198 |
$page_configs[] = $page_config;
|
214 |
$fields[] = array( 'id' => 'woocommerce_cod_title' );
|
215 |
$fields[] = array( 'id' => 'woocommerce_cod_description' );
|
216 |
$fields[] = array( 'id' => 'woocommerce_cod_instructions' );
|
|
|
217 |
|
218 |
$page_config['forms'][] = $f;
|
219 |
$page_configs[] = $page_config;
|
235 |
$fields[] = array( 'id' => 'woocommerce_paypal_title' );
|
236 |
$fields[] = array( 'id' => 'woocommerce_paypal_description' );
|
237 |
$fields[] = array( 'id' => 'woocommerce_paypal_instructions' );
|
|
|
238 |
|
239 |
$page_config['forms'][] = $f;
|
240 |
$page_configs[] = $page_config;
|
254 |
$fields = &$f['fields']; // shorthand
|
255 |
|
256 |
$fields[] = array( 'id' => 'woocommerce_free_shipping_title' );
|
|
|
257 |
|
258 |
$page_config['forms'][] = $f;
|
259 |
$page_configs[] = $page_config;
|
273 |
$fields = &$f['fields']; // shorthand
|
274 |
|
275 |
$fields[] = array( 'id' => 'woocommerce_flat_rate_title' );
|
|
|
276 |
|
277 |
$page_config['forms'][] = $f;
|
278 |
$page_configs[] = $page_config;
|
292 |
$fields = &$f['fields']; // shorthand
|
293 |
|
294 |
$fields[] = array( 'id' => 'woocommerce_international_delivery_title' );
|
|
|
295 |
|
296 |
$page_config['forms'][] = $f;
|
297 |
$page_configs[] = $page_config;
|
311 |
$fields = &$f['fields']; // shorthand
|
312 |
|
313 |
$fields[] = array( 'id' => 'woocommerce_local_delivery_title' );
|
|
|
314 |
|
315 |
$page_config['forms'][] = $f;
|
316 |
$page_configs[] = $page_config;
|
330 |
$fields = &$f['fields']; // shorthand
|
331 |
|
332 |
$fields[] = array( 'id' => 'woocommerce_local_pickup_title' );
|
|
|
333 |
|
334 |
$page_config['forms'][] = $f;
|
335 |
$page_configs[] = $page_config;
|
351 |
$fields[] = array( 'id' => 'woocommerce_email_from_name' );
|
352 |
//$fields[] = array( 'id' => 'woocommerce_email_header_image' );
|
353 |
$fields[] = array( 'id' => 'woocommerce_email_footer_text' );
|
|
|
354 |
|
355 |
$page_config['forms'][] = $f;
|
356 |
$page_configs[] = $page_config;
|
357 |
+
}
|
358 |
|
359 |
{//tab=email§ion=wc_email_new_order
|
360 |
$page_config = array();
|
372 |
$fields[] = array( 'id' => 'woocommerce_new_order_recipient' );
|
373 |
$fields[] = array( 'id' => 'woocommerce_new_order_subject' );
|
374 |
$fields[] = array( 'id' => 'woocommerce_new_order_heading' );
|
|
|
375 |
|
376 |
$page_config['forms'][] = $f;
|
377 |
$page_configs[] = $page_config;
|
393 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_recipient' );
|
394 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_subject' );
|
395 |
$fields[] = array( 'id' => 'woocommerce_cancelled_order_heading' );
|
|
|
396 |
|
397 |
$page_config['forms'][] = $f;
|
398 |
$page_configs[] = $page_config;
|
414 |
//$fields[] = array( 'id' => 'woocommerce_customer_processing_order_recipient' );
|
415 |
$fields[] = array( 'id' => 'woocommerce_customer_processing_order_subject' );
|
416 |
$fields[] = array( 'id' => 'woocommerce_customer_processing_order_heading' );
|
|
|
417 |
|
418 |
$page_config['forms'][] = $f;
|
419 |
$page_configs[] = $page_config;
|
436 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_heading' );
|
437 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_subject_downloadable' );
|
438 |
$fields[] = array( 'id' => 'woocommerce_customer_completed_order_heading_downloadable' );
|
|
|
439 |
|
440 |
$page_config['forms'][] = $f;
|
441 |
$page_configs[] = $page_config;
|
442 |
}
|
443 |
+
|
444 |
+
{//tab=email§ion=wc_email_customer_refunded_order
|
445 |
+
$page_config = array();
|
446 |
+
$page_config['pages'] = array( 'admin.php' => 'page=wc-settings&tab=email§ion=wc_email_customer_refunded_order');
|
447 |
+
//$page_config['anchors'] = array( 'titlediv' );
|
448 |
+
|
449 |
+
$page_config['forms'] = array();
|
450 |
+
|
451 |
+
$f = array();
|
452 |
+
$f['form'] = array( 'id' => 'mainform' );
|
453 |
+
|
454 |
+
$f['fields'] = array();
|
455 |
+
$fields = &$f['fields']; // shorthand
|
456 |
+
|
457 |
+
$fields[] = array( 'id' => 'woocommerce_customer_refunded_order_subject_full' );
|
458 |
+
$fields[] = array( 'id' => 'woocommerce_customer_refunded_order_subject_partial' );
|
459 |
+
$fields[] = array( 'id' => 'woocommerce_customer_refunded_order_subject_partial' );
|
460 |
+
$fields[] = array( 'id' => 'woocommerce_customer_refunded_order_heading_partial' );
|
461 |
+
$fields[] = array( 'id' => 'woocommerce_customer_refunded_order_heading_full' );
|
462 |
+
|
463 |
+
$page_config['forms'][] = $f;
|
464 |
+
$page_configs[] = $page_config;
|
465 |
+
}
|
466 |
|
467 |
{//tab=email§ion=wc_email_customer_invoice
|
468 |
$page_config = array();
|
481 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_heading' );
|
482 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_subject_paid' );
|
483 |
$fields[] = array( 'id' => 'woocommerce_customer_invoice_heading_paid' );
|
|
|
484 |
|
485 |
$page_config['forms'][] = $f;
|
486 |
$page_configs[] = $page_config;
|
501 |
|
502 |
$fields[] = array( 'id' => 'woocommerce_customer_note_subject' );
|
503 |
$fields[] = array( 'id' => 'woocommerce_customer_note_heading' );
|
|
|
504 |
|
505 |
$page_config['forms'][] = $f;
|
506 |
$page_configs[] = $page_config;
|
521 |
|
522 |
$fields[] = array( 'id' => 'woocommerce_customer_reset_password_subject' );
|
523 |
$fields[] = array( 'id' => 'woocommerce_customer_reset_password_heading' );
|
|
|
524 |
|
525 |
$page_config['forms'][] = $f;
|
526 |
$page_configs[] = $page_config;
|
541 |
|
542 |
$fields[] = array( 'id' => 'woocommerce_customer_new_account_subject' );
|
543 |
$fields[] = array( 'id' => 'woocommerce_customer_new_account_heading' );
|
|
|
544 |
|
545 |
$page_config['forms'][] = $f;
|
546 |
$page_configs[] = $page_config;
|
623 |
* @since 1.1
|
624 |
*/
|
625 |
function qwc_admin_url_append_language_edit_page( $url ) {
|
626 |
+
if ( strpos( $url, 'admin-ajax.php' ) === false || !isset( $_GET['action'] ) || !isset( $_GET['post'] ) || $_GET['action'] != 'edit' ) return $url;
|
627 |
+
$order_id = absint( $_GET['post'] ); if(!$order_id) return $url;
|
628 |
+
$post = get_post( $order_id ); if(!$post) return $url;
|
629 |
+
if ( $post->post_type != 'shop_order' ) return $url;
|
630 |
+
|
631 |
+
$user_language = get_post_meta( $order_id, '_user_language', true );
|
632 |
+
if ( $user_language ) return $url . '?lang=' . $user_language;
|
|
|
633 |
|
|
|
|
|
|
|
|
|
634 |
return $url;
|
635 |
}
|
636 |
add_filter('admin_url', 'qwc_admin_url_append_language_edit_page' );
|
693 |
}
|
694 |
add_action( 'woocommerce_after_resend_order_email', 'qwc_admin_after_resend_order_emails' );
|
695 |
|
696 |
+
function qwc_admin_filters() {
|
697 |
+
global $pagenow;
|
698 |
+
switch($pagenow){
|
699 |
+
case 'admin.php':
|
700 |
+
if( isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'],'page=wc-settings&tab=checkout')!==false){
|
701 |
+
add_filter('woocommerce_gateway_title','qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage',5);
|
702 |
+
}
|
703 |
+
break;
|
704 |
+
}
|
705 |
+
}
|
706 |
+
qwc_admin_filters();
|
707 |
+
|
708 |
/*
|
709 |
Reminder for table handling
|
710 |
Line 436: function qtranxf_languageColumnHeader($columns){
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Developed by: qTranslate Team
|
|
3 |
Contributors: johnclause, michelweimerskirch
|
4 |
Tags: multilingual, language, bilingual, i18n, l10n, multilanguage, translation, WooCommerce
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3 or later
|
9 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QEXEK3HX8AR6U
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -13,7 +13,7 @@ Enables multilingual framework for plugin "WooCommerce - excelling eCommerce".
|
|
13 |
|
14 |
## Description ##
|
15 |
|
16 |
-
This plugin enables [qTranslate-X](https://wordpress.org/plugins/qtranslate-x/) multilingual framework (version 3.1 or later) for WordPress plugin [WooCommerce - excelling eCommerce](https://wordpress.org/plugins/woocommerce/) (version 2.3.5 or later).
|
17 |
|
18 |
After the activation, depending on your theme, you may need to do the following additional step to finalize the configuration:
|
19 |
|
@@ -21,6 +21,8 @@ After the activation, depending on your theme, you may need to do the following
|
|
21 |
|
22 |
This plugin is not supported by the authors on the WordPress forum due to its simplicity. If you find a field which is not translatable, follow the pattern how it is done in the code for other fields and make it translatable. Then submit a pull request at [GitHub](https://github.com/qTranslate-Team/woocommerce-qtranslate-x) to enable your changes for everyone else.
|
23 |
|
|
|
|
|
24 |
## Installation ##
|
25 |
|
26 |
Standard, as any other normal plugin hosted at WordPress.
|
@@ -35,25 +37,38 @@ Plugin does not have any configuration options, and no screenshots needed.
|
|
35 |
|
36 |
## Frequently Asked Questions ##
|
37 |
|
38 |
-
### How do I open a page with configuration options? ###
|
39 |
-
|
40 |
Plugin does not have any configuration options, simply activate it and it will enable the translation of relevant fields for WooCommerce back- and front-end.
|
41 |
|
42 |
-
### I submitted a question on support forum, but the authors did not respond? ###
|
43 |
-
|
44 |
This plugin is not supported by the authors on the WordPress forum due to its simplicity. If you find a field which is not translatable, follow the pattern how it is done in the code for other fields, and make it translatable. Then submit a pull request at [GitHub](https://github.com/qTranslate-Team/woocommerce-qtranslate-x) to enable your changes for everyone else.
|
45 |
|
46 |
## Upgrade Notice ##
|
47 |
|
48 |
-
|
|
|
49 |
|
50 |
## Known Issues ##
|
|
|
|
|
|
|
51 |
* Admin e-mails sent by pressing one of the buttons in column 'Actions' on order list page, `/wp-admin/edit.php?post_type=shop_order`, go in the original customer language used to submit the order. However, same e-mails sent using the "Resend order emails" option in order editor page, `/wp-admin/post.php?post=nnn&action=edit`, go in the mixed language of admin and customer. As a workaround, you can switch the admin language to the customer language before resending an e-mail (which shouldn't happen too often).
|
52 |
-
*
|
53 |
-
|
|
|
|
|
|
|
54 |
|
55 |
## Changelog ##
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
### 1.1 ###
|
58 |
* Improvement: during an order, the language currently used by the customer is stored along with the order meta data
|
59 |
* Improvement: complete order e-mails on admin side are now sent with the order's original language (only for orders made after this update). [[Issue #3]( https://github.com/qTranslate-Team/woocommerce-qtranslate-x/issues/3)]
|
3 |
Contributors: johnclause, michelweimerskirch
|
4 |
Tags: multilingual, language, bilingual, i18n, l10n, multilanguage, translation, WooCommerce
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 1.3
|
8 |
License: GPLv3 or later
|
9 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QEXEK3HX8AR6U
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
|
14 |
## Description ##
|
15 |
|
16 |
+
This plugin enables [qTranslate-X](https://wordpress.org/plugins/qtranslate-x/) multilingual framework (version 3.4.6.1 or later) for WordPress plugin [WooCommerce - excelling eCommerce](https://wordpress.org/plugins/woocommerce/) (version 2.3.5 or later).
|
17 |
|
18 |
After the activation, depending on your theme, you may need to do the following additional step to finalize the configuration:
|
19 |
|
21 |
|
22 |
This plugin is not supported by the authors on the WordPress forum due to its simplicity. If you find a field which is not translatable, follow the pattern how it is done in the code for other fields and make it translatable. Then submit a pull request at [GitHub](https://github.com/qTranslate-Team/woocommerce-qtranslate-x) to enable your changes for everyone else.
|
23 |
|
24 |
+
Is is a very good idea to review "[Known Issues](https://wordpress.org/plugins/woocommerce-qtranslate-x/other_notes/)" in order to have right expectations.
|
25 |
+
|
26 |
## Installation ##
|
27 |
|
28 |
Standard, as any other normal plugin hosted at WordPress.
|
37 |
|
38 |
## Frequently Asked Questions ##
|
39 |
|
40 |
+
### How do I open a page with configuration options? ###
|
|
|
41 |
Plugin does not have any configuration options, simply activate it and it will enable the translation of relevant fields for WooCommerce back- and front-end.
|
42 |
|
43 |
+
### I submitted a question on support forum, but the authors did not respond? ###
|
|
|
44 |
This plugin is not supported by the authors on the WordPress forum due to its simplicity. If you find a field which is not translatable, follow the pattern how it is done in the code for other fields, and make it translatable. Then submit a pull request at [GitHub](https://github.com/qTranslate-Team/woocommerce-qtranslate-x) to enable your changes for everyone else.
|
45 |
|
46 |
## Upgrade Notice ##
|
47 |
|
48 |
+
### 1.3 ###
|
49 |
+
This version recovers compatibility with the latest qTranslate-X 3.4.6.2.
|
50 |
|
51 |
## Known Issues ##
|
52 |
+
* Product Attribute may need to be re-saved (page `/wp-admin/edit.php?post_type=product&page=product_attributes&edit=xxx`) if they were created before installing this plugin: [WP Topic](https://wordpress.org/support/topic/how-to-translate-attribute-items-in-woocommerce?replies=1).
|
53 |
+
* Product Attribute values are shown in admin language and do not respond to LSB. This is a convinience feature, which needs more work to be intergarated, but otherwise it is functional and usable.
|
54 |
+
* Custom Product Attributes (which are entered directly on product edit page `/wp-admin/post.php?post=xxx&action=edit`) have to be entered in raw multilingual text, with values like `[:en]EN Val1[:de]DE Val1[:] | [:en]EN Val2[:de]DE Val2[:]`, leaving separator '|' outside of language tags. This piece has not yet been integrated on admin side, but once all is entered in raw multilingual format, it should work well at front end. Delete and freshly re-create an attribte under this plugin, if it was created before installing this plugin and it misbehaves.
|
55 |
* Admin e-mails sent by pressing one of the buttons in column 'Actions' on order list page, `/wp-admin/edit.php?post_type=shop_order`, go in the original customer language used to submit the order. However, same e-mails sent using the "Resend order emails" option in order editor page, `/wp-admin/post.php?post=nnn&action=edit`, go in the mixed language of admin and customer. As a workaround, you can switch the admin language to the customer language before resending an e-mail (which shouldn't happen too often).
|
56 |
+
* Use raw multilingual format with language tags `[:en]...[:]` or `{:en}...{:}` in any regualar field, which you wish to be multilingual. It most likely will be translated at front end appropriately. Report the field at [GitHub](https://github.com/qTranslate-Team/woocommerce-qtranslate-x/issues) if you found one that does not get translated at front end. Already known fileds: all fields on "Variable Product/Variations" section.
|
57 |
+
|
58 |
+
## Former Known Issues ##
|
59 |
+
* [Resolved in ver. 1.2] HTML header title on admin page `/wp-admin/edit-tags.php?taxonomy=xxx&post_type=product` displays raw multilingual values.
|
60 |
+
* [Resolved in ver. 1.2] Two buttons, "Add New XXX" and "Search XXX", on attribute editor page, `/wp-admin/edit-tags.php?taxonomy=xxx&post_type=product`, are displayed with raw multilingual text. This should be fixed with a later
|
61 |
|
62 |
## Changelog ##
|
63 |
|
64 |
+
### 1.3 ###
|
65 |
+
* Improvement: A copule of new multilingual fields.
|
66 |
+
* Fix: compatibility with the latest qTranslate-X 3.4.6.1 or later.
|
67 |
+
|
68 |
+
### 1.2 ###
|
69 |
+
* Improvement: Gateway names are translated on page `/wp-admin/admin.php?page=wc-settings&tab=checkout`.
|
70 |
+
* Improvement: page /wp-admin/admin.php?page=wc-settings&tab=email§ion=wc_email_customer_refunded_order [Pull Request #17](https://github.com/qTranslate-Team/woocommerce-qtranslate-x/issues/17).
|
71 |
+
|
72 |
### 1.1 ###
|
73 |
* Improvement: during an order, the language currently used by the customer is stored along with the order meta data
|
74 |
* Improvement: complete order e-mails on admin side are now sent with the order's original language (only for orders made after this update). [[Issue #3]( https://github.com/qTranslate-Team/woocommerce-qtranslate-x/issues/3)]
|
woocommerce-qtranslate-x.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce & qTranslate-X
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-qtranslate-x
|
5 |
* Description: Enables multilingual framework for plugin "WooCommerce".
|
6 |
-
* Version: 1.
|
7 |
* Author: qTranslate Team
|
8 |
* Author URI: http://qtranslatexteam.wordpress.com/about
|
9 |
* License: GPL2
|
@@ -12,7 +12,7 @@
|
|
12 |
*/
|
13 |
if(!defined('ABSPATH'))exit;
|
14 |
|
15 |
-
define('QWC_VERSION','1.
|
16 |
|
17 |
function qwc_init_language($url_info)
|
18 |
{
|
3 |
* Plugin Name: WooCommerce & qTranslate-X
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-qtranslate-x
|
5 |
* Description: Enables multilingual framework for plugin "WooCommerce".
|
6 |
+
* Version: 1.3
|
7 |
* Author: qTranslate Team
|
8 |
* Author URI: http://qtranslatexteam.wordpress.com/about
|
9 |
* License: GPL2
|
12 |
*/
|
13 |
if(!defined('ABSPATH'))exit;
|
14 |
|
15 |
+
define('QWC_VERSION','1.3');
|
16 |
|
17 |
function qwc_init_language($url_info)
|
18 |
{
|