Saphali Woocommerce Russian - Version 1.8.4

Version Description

  • .
Download this release

Release Info

Developer Saphali
Plugin Icon wp plugin Saphali Woocommerce Russian
Version 1.8.4
Comparing to
See all releases

Code changes from version 1.8.3 to 1.8.4

Files changed (2) hide show
  1. readme.txt +5 -2
  2. saphali-woocommerce-lite.php +18 -8
readme.txt CHANGED
@@ -5,8 +5,8 @@ Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
5
  Donate link: https://money.yandex.ru/to/410011651211340
6
  Tags: woocommerce, woo commerce russian, russian ruble, ukrainian hryvnia, mod, manadger filds checkout
7
  Requires at least: WP 3.3 or higher & WooCommerce 1.6.6 or higher
8
- Tested up to: 4.9
9
- Stable tag: 1.8.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -76,6 +76,9 @@ define('SAPHALI_LITE_SYMBOL', 0 );
76
 
77
  == Changelog ==
78
 
 
 
 
79
  = 1.8.3 =
80
  * Небольшие правки.
81
 
5
  Donate link: https://money.yandex.ru/to/410011651211340
6
  Tags: woocommerce, woo commerce russian, russian ruble, ukrainian hryvnia, mod, manadger filds checkout
7
  Requires at least: WP 3.3 or higher & WooCommerce 1.6.6 or higher
8
+ Tested up to: 5.0
9
+ Stable tag: 1.8.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
76
 
77
  == Changelog ==
78
 
79
+ = 1.8.4 =
80
+ * Правка связанная с выводом задублированных значений полей в админке.
81
+
82
  = 1.8.3 =
83
  * Небольшие правки.
84
 
saphali-woocommerce-lite.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Saphali Woocommerce Russian
4
  Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
5
  Description: Saphali Woocommerce Russian - это бесплатный вордпресс плагин, который добавляет набор дополнений к интернет-магазину на Woocommerce.
6
- Version: 1.8.3
7
  Author: Saphali
8
  Author URI: http://saphali.com/
9
  Text Domain: saphali-woocommerce-lite
@@ -35,11 +35,12 @@ WC tested up to: 3.5
35
 
36
  // Подключение валюты и локализации
37
  define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
38
- define('SAPHALI_LITE_VERSION', '1.8.3' );
39
  define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
40
  class saphali_lite {
41
  var $email_order_id;
42
  var $fieldss;
 
43
  var $column_count_saphali;
44
  function __construct() {
45
  if ( version_compare( WOOCOMMERCE_VERSION, '2.2.0', '<' ) || version_compare( WOOCOMMERCE_VERSION, '2.5.0', '>' ) )
@@ -332,6 +333,9 @@ WC tested up to: 3.5
332
  jQuery("body").delegate("input[name=\"payment_method\"]", 'click', function(){
333
  corect_payment_method_filds ();
334
  });
 
 
 
335
  jQuery("body").delegate("input.shipping_method", 'click', function(){
336
  corect_shipping_method_filds ();
337
  });
@@ -355,8 +359,10 @@ WC tested up to: 3.5
355
 
356
  if (isset($field['public']) && $field['public'] ) {
357
  $address[str_replace($type . '_', '', $key)] = get_post_meta( $order->id, '_' . $key, true );
358
- if( !empty($address[str_replace($type . '_', '', $key)]) && ( strpos($key, 'new_fild') !== false) )
359
- echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[str_replace($type . '_', '', $key)].'<br />';
 
 
360
  }
361
  }
362
  }
@@ -369,8 +375,10 @@ WC tested up to: 3.5
369
  foreach ( $billing_data["order"] as $key => $field ) {
370
  if (isset($field['show']) && !$field['show'] || $key == 'order_comments') continue;
371
  $address[ str_replace('order_', '', $key) ] = get_post_meta( $order->id, '_' . $key, true );
372
- if( !empty($address[ str_replace('order_', '', $key) ]) && ( strpos($key, 'new_fild') === false) )
373
- echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[ str_replace('order_', '', $key) ] . '<br />';
 
 
374
  }
375
  }
376
  foreach ( array( "shipping") as $type )
@@ -381,8 +389,10 @@ WC tested up to: 3.5
381
 
382
  if (isset($field['public']) && $field['public'] ) {
383
  $address[str_replace($type . '_', '', $key)] = get_post_meta( $order->id, '_' . $key, true );
384
- if( !empty($address[str_replace($type . '_', '', $key)]) && ( strpos($key, 'new_fild') === false) ) {
385
- echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[str_replace($type . '_', '', $key)].'<br />'; }
 
 
386
 
387
  }
388
  }
3
  Plugin Name: Saphali Woocommerce Russian
4
  Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
5
  Description: Saphali Woocommerce Russian - это бесплатный вордпресс плагин, который добавляет набор дополнений к интернет-магазину на Woocommerce.
6
+ Version: 1.8.4
7
  Author: Saphali
8
  Author URI: http://saphali.com/
9
  Text Domain: saphali-woocommerce-lite
35
 
36
  // Подключение валюты и локализации
37
  define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
38
+ define('SAPHALI_LITE_VERSION', '1.8.4' );
39
  define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
40
  class saphali_lite {
41
  var $email_order_id;
42
  var $fieldss;
43
+ var $unuque = array();
44
  var $column_count_saphali;
45
  function __construct() {
46
  if ( version_compare( WOOCOMMERCE_VERSION, '2.2.0', '<' ) || version_compare( WOOCOMMERCE_VERSION, '2.5.0', '>' ) )
333
  jQuery("body").delegate("input[name=\"payment_method\"]", 'click', function(){
334
  corect_payment_method_filds ();
335
  });
336
+ jQuery("body").on("payment_method_selected", function(){
337
+ corect_payment_method_filds ();
338
+ });
339
  jQuery("body").delegate("input.shipping_method", 'click', function(){
340
  corect_shipping_method_filds ();
341
  });
359
 
360
  if (isset($field['public']) && $field['public'] ) {
361
  $address[str_replace($type . '_', '', $key)] = get_post_meta( $order->id, '_' . $key, true );
362
+ if( version_compare( WOOCOMMERCE_VERSION, '3.0', '<' ) && !empty($address[str_replace($type . '_', '', $key)]) && ( strpos($key, 'new_fild') !== false) && (isset($this->unuque) && !in_array($key, $this->unuque) ) ) {
363
+ $this->unuque[] = $key;
364
+ echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[str_replace($type . '_', '', $key)].'<br />';
365
+ }
366
  }
367
  }
368
  }
375
  foreach ( $billing_data["order"] as $key => $field ) {
376
  if (isset($field['show']) && !$field['show'] || $key == 'order_comments') continue;
377
  $address[ str_replace('order_', '', $key) ] = get_post_meta( $order->id, '_' . $key, true );
378
+ if( version_compare( WOOCOMMERCE_VERSION, '3.0', '<' ) && !empty($address[ str_replace('order_', '', $key) ]) && ( strpos($key, 'new_fild') === false) && (isset($this->unuque) && !in_array($key, $this->unuque) ) ) {
379
+ $this->unuque[] = $key;
380
+ echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[ str_replace('order_', '', $key) ] . '<br />';
381
+ }
382
  }
383
  }
384
  foreach ( array( "shipping") as $type )
389
 
390
  if (isset($field['public']) && $field['public'] ) {
391
  $address[str_replace($type . '_', '', $key)] = get_post_meta( $order->id, '_' . $key, true );
392
+ if( version_compare( WOOCOMMERCE_VERSION, '3.0', '<' ) && !empty($address[str_replace($type . '_', '', $key)]) && ( strpos($key, 'new_fild') === false) && (isset($this->unuque) && !in_array($key, $this->unuque) ) ) {
393
+ $this->unuque[] = $key;
394
+ echo '<label><strong>'. $field['label']. ':</strong></label> ' . $address[str_replace($type . '_', '', $key)].'<br />';
395
+ }
396
 
397
  }
398
  }