Version Description
- Fix .
Download this release
Release Info
Developer | Saphali |
Plugin | Saphali Woocommerce Russian |
Version | 1.8.12 |
Comparing to | |
See all releases |
Code changes from version 1.8.11 to 1.8.12
- readme.txt +4 -2
- saphali-woocommerce-lite.php +28 -26
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: 5.
|
9 |
-
Stable tag: 1.8.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -75,6 +75,8 @@ define('SAPHALI_LITE_SYMBOL', 0 );
|
|
75 |
5. Управление количеством колонок в каталоге товаров и рубриках.
|
76 |
|
77 |
== Changelog ==
|
|
|
|
|
78 |
|
79 |
= 1.8.11 =
|
80 |
* Fix обработки ошибок.
|
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.8
|
9 |
+
Stable tag: 1.8.12
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
75 |
5. Управление количеством колонок в каталоге товаров и рубриках.
|
76 |
|
77 |
== Changelog ==
|
78 |
+
= 1.8.12 =
|
79 |
+
* Fix обработки ошибок.
|
80 |
|
81 |
= 1.8.11 =
|
82 |
* Fix обработки ошибок.
|
saphali-woocommerce-lite.php
CHANGED
@@ -3,13 +3,13 @@
|
|
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.
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
Text Domain: saphali-woocommerce-lite
|
10 |
Domain Path: /languages
|
11 |
WC requires at least: 1.6.6
|
12 |
-
WC tested up to: 5.
|
13 |
*/
|
14 |
|
15 |
|
@@ -35,7 +35,7 @@ WC tested up to: 5.1
|
|
35 |
|
36 |
// Подключение валюты и локализации
|
37 |
define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
|
38 |
-
define('SAPHALI_LITE_VERSION', '1.8.
|
39 |
define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
|
40 |
class saphali_lite {
|
41 |
var $email_order_id;
|
@@ -203,8 +203,8 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
203 |
}
|
204 |
|
205 |
foreach($keys as $key => $value) {
|
206 |
-
$s_m= in_array($_POST['shipping_method'], $value["pm"]) || in_array($_POST['shipping_method'][0], $value["pm"]) || in_array( preg_replace('/\:(.*)$/', '', $_POST['shipping_method'][0]), $value["pm"]);
|
207 |
-
if( !( in_array($_POST['payment_method'], $value["pm"]) || $s_m ) ) {
|
208 |
unset( $data[$key] );
|
209 |
}
|
210 |
}
|
@@ -254,12 +254,12 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
254 |
}
|
255 |
$is_e = false;
|
256 |
foreach($keys as $key => $value) {
|
257 |
-
$s_m = in_array($_POST['shipping_method'], $value["pm"]) || in_array($_POST['shipping_method'][0], $value["pm"]) || in_array( preg_replace('/\:(.*)$/', '', $_POST['shipping_method'][0]), $value["pm"]);
|
258 |
-
if( !( in_array($_POST['payment_method'], $value["pm"]) || $s_m ) ) {
|
259 |
unset( $_POST[$key] );
|
260 |
}
|
261 |
if( $value["r"] ) {
|
262 |
-
if(in_array($_POST['payment_method'], $value["pm"]) ) {
|
263 |
if( empty($_POST[$key])) {
|
264 |
$is_e = $this->remove_no_valid_filds($key, $value, $errors);
|
265 |
if( version_compare( WOOCOMMERCE_VERSION, '3.0.0', '<' ) ) {
|
@@ -793,7 +793,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
793 |
}
|
794 |
} elseif ($k_nf == 'type') {
|
795 |
// echo '<pre>';var_dump($v_nf_f);echo '</pre>';
|
796 |
-
$addFild[$method][$new_fild][$k_nf] = current($v_nf_f);
|
797 |
} else $addFild[$method][$new_fild][$k_nf] = $v_nf_f;
|
798 |
}
|
799 |
}
|
@@ -805,7 +805,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
805 |
foreach( array('billing', 'shipping', 'order') as $method)
|
806 |
if(is_array($filds[$method])) {
|
807 |
if(!isset($addFild[$method]) || isset($addFild[$method]) && !is_array($addFild[$method])) $addFild[$method] = array();
|
808 |
-
if(!is_array($_POST[$method])) $_POST[$method] = array();
|
809 |
$filds[$method] = array_merge($filds[$method] , $_POST[$method], $addFild[$method]);
|
810 |
|
811 |
foreach($filds[$method] as $key_post => $value_post) {
|
@@ -814,10 +814,11 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
814 |
if( !isset($global_f_checkout_fields[$method][$key_post]['type']) && (isset($filds[$method][$key_post]['type']) && $filds[$method][$key_post]['type'] != 'select' && $filds[$method][$key_post]['type'] != 'radio' && $filds[$method][$key_post]['type'] != 'checkbox' && $filds[$method][$key_post]['type'] != 'textarea' || !isset($filds[$method][$key_post]['type'])) ) unset($filds[$method][$key_post]['type'], $value_post["type"]);
|
815 |
|
816 |
|
817 |
-
|
|
|
818 |
$filds_new[$method][$filds[$method][$key_post]["order"]][$key_post]["public"] = false;
|
819 |
-
|
820 |
-
|
821 |
|
822 |
|
823 |
foreach($value_post as $k_post=> $v_post){
|
@@ -826,6 +827,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
826 |
$value_post[$k_post] = true;
|
827 |
} elseif(in_array($k_post, array('public','clear','required'))) { $filds[$method][$key_post][$k_post] = false; $value_post[$k_post] = false; if(!$filds[$method][$key_post][$k_post] && $k_post == 'public') unset($filds[$method][$key_post][$k_post]); }
|
828 |
}
|
|
|
829 |
$filds_new[$method][$filds[$method][$key_post]["order"]][$key_post] = $value_post;
|
830 |
|
831 |
unset($_POST[$method][$key_post]);
|
@@ -1013,25 +1015,25 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1013 |
|
1014 |
<select multiple="multiple" width="120px" name="billing[<?php echo $key?>][payment_method][]">
|
1015 |
<option value="0"<?php if( isset($value['payment_method']) && (
|
1016 |
-
is_array($value['payment_method']) && in_array('0', $value['payment_method']) ||
|
1017 |
empty($value['payment_method']) ) ||
|
1018 |
!isset($value['payment_method']) )
|
1019 |
echo 'selected';?>>Все</option>
|
1020 |
<?php
|
1021 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1022 |
if ( $gateway->enabled != 'yes' ) continue;
|
1023 |
-
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && is_array($value['payment_method']) && in_array($gateway->id, $value['payment_method']) ) echo 'selected';?>><?php echo $gateway->title; ?></option><?php
|
1024 |
}
|
1025 |
?>
|
1026 |
</select>
|
1027 |
</td>
|
1028 |
<td>
|
1029 |
<select multiple="multiple" width="120px" name="billing[<?php echo $key?>][shipping_method][]">
|
1030 |
-
<option value="0"<?php if( isset($value['shipping_method']) && ( is_array($value['shipping_method']) && in_array('0', $value['shipping_method']) || empty($value['shipping_method']) ) || !isset($value['shipping_method']) ) echo 'selected';?>>Все</option>
|
1031 |
<?php
|
1032 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1033 |
if ( $shipping->enabled == 'no' ) continue;
|
1034 |
-
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && is_array($value['shipping_method']) && in_array($act_id, $value['shipping_method']) ) echo 'selected';?>><?php echo $shipping->title ? $shipping->title: $shipping->method_title; ?></option><?php
|
1035 |
}
|
1036 |
?>
|
1037 |
</select>
|
@@ -1148,21 +1150,21 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1148 |
<td><input <?php if(isset($value['public']) && $value['public']) echo 'checked';?> type="checkbox" name="shipping[<?php echo $key?>][public]" /></td>
|
1149 |
<td>
|
1150 |
<select multiple="multiple" width="120px" name="shipping[<?php echo $key?>][payment_method][]">
|
1151 |
-
<option value="0" <?php if( isset($value['payment_method']) && ( in_array('0', $value['payment_method']) || empty($value['payment_method']) ) || !isset($value['payment_method']) ) echo 'selected';?>>Все</option>
|
1152 |
<?php
|
1153 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1154 |
if ( $gateway->enabled != 'yes' ) continue;
|
1155 |
-
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, $value['payment_method']) ) echo 'selected';?>><?php echo $gateway->title; ?></option><?php
|
1156 |
}
|
1157 |
?>
|
1158 |
</select>
|
1159 |
</td><td>
|
1160 |
<select multiple="multiple" width="120px" name="shipping[<?php echo $key?>][shipping_method][]">
|
1161 |
-
<option value="0" <?php if( isset($value['shipping_method']) && ( in_array('0', $value['shipping_method']) || empty($value['shipping_method']) ) || !isset($value['shipping_method']) ) echo 'selected';?>>Все</option>
|
1162 |
<?php
|
1163 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1164 |
if ( $shipping->enabled == 'no' ) continue;
|
1165 |
-
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, $value['shipping_method']) ) echo 'selected';?>><?php echo $shipping->title ? $shipping->title: $shipping->method_title; ?></option><?php
|
1166 |
}
|
1167 |
?>
|
1168 |
</select>
|
@@ -1342,7 +1344,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1342 |
<?php
|
1343 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1344 |
if ( $gateway->enabled != 'yes' ) continue;
|
1345 |
-
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, $value['payment_method']) ) echo 'selected';?>><?php echo str_replace("'", "\\'", $gateway->title); ?></option><?php
|
1346 |
}
|
1347 |
?>\
|
1348 |
</select>\
|
@@ -1352,7 +1354,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1352 |
<?php
|
1353 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1354 |
if ( $shipping->enabled == 'no' ) continue;
|
1355 |
-
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, $value['shipping_method']) ) echo 'selected';?>><?php $st = $shipping->title ? $shipping->title: $shipping->method_title; echo str_replace("'", "\\'", $st); ?></option><?php
|
1356 |
}
|
1357 |
?>\
|
1358 |
</select>\
|
@@ -1370,7 +1372,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1370 |
<?php
|
1371 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1372 |
if ( $gateway->enabled != 'yes' ) continue;
|
1373 |
-
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, $value['payment_method']) ) echo 'selected';?>><?php echo str_replace("'", "\\'", $gateway->title); ?></option><?php
|
1374 |
}
|
1375 |
?>\
|
1376 |
</select>\
|
@@ -1380,7 +1382,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1380 |
<?php
|
1381 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1382 |
if ( $shipping->enabled == 'no' ) continue;
|
1383 |
-
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, $value['shipping_method']) ) echo 'selected';?>><?php $st = $shipping->title ? $shipping->title: $shipping->method_title; echo str_replace("'", "\\'", $st); ?></option><?php
|
1384 |
}
|
1385 |
?>\
|
1386 |
</select>\
|
@@ -1817,7 +1819,7 @@ public function woocommerce_checkout_posted_data( $data ) {
|
|
1817 |
elseif ( version_compare( WOOCOMMERCE_VERSION, '3.0', '<' ) )
|
1818 |
$value_fild = $order->__get( $key );
|
1819 |
else $value_fild = get_post_meta( $order->get_id(), '_' . $key, true );
|
1820 |
-
if( $value_fild && in_array($field["type"] , array('select', 'radio')) && isset($field["options"][$value_fild]) ) {
|
1821 |
$value_fild = $field["options"][$value_fild];
|
1822 |
}
|
1823 |
if ( $value_fild && !empty($field['label']) )
|
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.12
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
Text Domain: saphali-woocommerce-lite
|
10 |
Domain Path: /languages
|
11 |
WC requires at least: 1.6.6
|
12 |
+
WC tested up to: 5.5
|
13 |
*/
|
14 |
|
15 |
|
35 |
|
36 |
// Подключение валюты и локализации
|
37 |
define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
|
38 |
+
define('SAPHALI_LITE_VERSION', '1.8.12' );
|
39 |
define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
|
40 |
class saphali_lite {
|
41 |
var $email_order_id;
|
203 |
}
|
204 |
|
205 |
foreach($keys as $key => $value) {
|
206 |
+
$s_m= in_array($_POST['shipping_method'], (array)$value["pm"]) || in_array($_POST['shipping_method'][0], (array)$value["pm"]) || in_array( preg_replace('/\:(.*)$/', '', $_POST['shipping_method'][0]), (array)$value["pm"]);
|
207 |
+
if( !( in_array($_POST['payment_method'], (array)$value["pm"]) || $s_m ) ) {
|
208 |
unset( $data[$key] );
|
209 |
}
|
210 |
}
|
254 |
}
|
255 |
$is_e = false;
|
256 |
foreach($keys as $key => $value) {
|
257 |
+
$s_m = in_array($_POST['shipping_method'], (array)$value["pm"]) || in_array($_POST['shipping_method'][0], (array)$value["pm"]) || in_array( preg_replace('/\:(.*)$/', '', $_POST['shipping_method'][0]), (array)$value["pm"]);
|
258 |
+
if( !( in_array($_POST['payment_method'], (array)$value["pm"]) || $s_m ) ) {
|
259 |
unset( $_POST[$key] );
|
260 |
}
|
261 |
if( $value["r"] ) {
|
262 |
+
if(in_array($_POST['payment_method'], (array)$value["pm"]) ) {
|
263 |
if( empty($_POST[$key])) {
|
264 |
$is_e = $this->remove_no_valid_filds($key, $value, $errors);
|
265 |
if( version_compare( WOOCOMMERCE_VERSION, '3.0.0', '<' ) ) {
|
793 |
}
|
794 |
} elseif ($k_nf == 'type') {
|
795 |
// echo '<pre>';var_dump($v_nf_f);echo '</pre>';
|
796 |
+
$addFild[$method][$new_fild][$k_nf] = is_array($v_nf_f) ? current($v_nf_f) : $v_nf_f;
|
797 |
} else $addFild[$method][$new_fild][$k_nf] = $v_nf_f;
|
798 |
}
|
799 |
}
|
805 |
foreach( array('billing', 'shipping', 'order') as $method)
|
806 |
if(is_array($filds[$method])) {
|
807 |
if(!isset($addFild[$method]) || isset($addFild[$method]) && !is_array($addFild[$method])) $addFild[$method] = array();
|
808 |
+
if( !isset($_POST[$method]) || isset($_POST[$method]) && !is_array($_POST[$method])) $_POST[$method] = array();
|
809 |
$filds[$method] = array_merge($filds[$method] , $_POST[$method], $addFild[$method]);
|
810 |
|
811 |
foreach($filds[$method] as $key_post => $value_post) {
|
814 |
if( !isset($global_f_checkout_fields[$method][$key_post]['type']) && (isset($filds[$method][$key_post]['type']) && $filds[$method][$key_post]['type'] != 'select' && $filds[$method][$key_post]['type'] != 'radio' && $filds[$method][$key_post]['type'] != 'checkbox' && $filds[$method][$key_post]['type'] != 'textarea' || !isset($filds[$method][$key_post]['type'])) ) unset($filds[$method][$key_post]['type'], $value_post["type"]);
|
815 |
|
816 |
|
817 |
+
if(@$filds[$method][$key_post]['public'] != 'on') {
|
818 |
+
if(isset($filds[$method][$key_post]["order"]))
|
819 |
$filds_new[$method][$filds[$method][$key_post]["order"]][$key_post]["public"] = false;
|
820 |
+
$fild_remove_filter[$method][] = $key_post;
|
821 |
+
} elseif(isset($filds[$method][$key_post]["order"])) {$filds_new[$method][$filds[$method][$key_post]["order"]][$key_post]["public"] = true;}
|
822 |
|
823 |
|
824 |
foreach($value_post as $k_post=> $v_post){
|
827 |
$value_post[$k_post] = true;
|
828 |
} elseif(in_array($k_post, array('public','clear','required'))) { $filds[$method][$key_post][$k_post] = false; $value_post[$k_post] = false; if(!$filds[$method][$key_post][$k_post] && $k_post == 'public') unset($filds[$method][$key_post][$k_post]); }
|
829 |
}
|
830 |
+
if(isset($filds[$method][$key_post]["order"]))
|
831 |
$filds_new[$method][$filds[$method][$key_post]["order"]][$key_post] = $value_post;
|
832 |
|
833 |
unset($_POST[$method][$key_post]);
|
1015 |
|
1016 |
<select multiple="multiple" width="120px" name="billing[<?php echo $key?>][payment_method][]">
|
1017 |
<option value="0"<?php if( isset($value['payment_method']) && (
|
1018 |
+
is_array($value['payment_method']) && in_array('0', (array)$value['payment_method']) ||
|
1019 |
empty($value['payment_method']) ) ||
|
1020 |
!isset($value['payment_method']) )
|
1021 |
echo 'selected';?>>Все</option>
|
1022 |
<?php
|
1023 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1024 |
if ( $gateway->enabled != 'yes' ) continue;
|
1025 |
+
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && is_array($value['payment_method']) && in_array($gateway->id, (array)$value['payment_method']) ) echo 'selected';?>><?php echo $gateway->title; ?></option><?php
|
1026 |
}
|
1027 |
?>
|
1028 |
</select>
|
1029 |
</td>
|
1030 |
<td>
|
1031 |
<select multiple="multiple" width="120px" name="billing[<?php echo $key?>][shipping_method][]">
|
1032 |
+
<option value="0"<?php if( isset($value['shipping_method']) && ( is_array($value['shipping_method']) && in_array('0', (array)$value['shipping_method']) || empty($value['shipping_method']) ) || !isset($value['shipping_method']) ) echo 'selected';?>>Все</option>
|
1033 |
<?php
|
1034 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1035 |
if ( $shipping->enabled == 'no' ) continue;
|
1036 |
+
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && is_array($value['shipping_method']) && in_array($act_id, (array)$value['shipping_method']) ) echo 'selected';?>><?php echo $shipping->title ? $shipping->title: $shipping->method_title; ?></option><?php
|
1037 |
}
|
1038 |
?>
|
1039 |
</select>
|
1150 |
<td><input <?php if(isset($value['public']) && $value['public']) echo 'checked';?> type="checkbox" name="shipping[<?php echo $key?>][public]" /></td>
|
1151 |
<td>
|
1152 |
<select multiple="multiple" width="120px" name="shipping[<?php echo $key?>][payment_method][]">
|
1153 |
+
<option value="0" <?php if( isset($value['payment_method']) && ( in_array('0', (array)$value['payment_method']) || empty($value['payment_method']) ) || !isset($value['payment_method']) ) echo 'selected';?>>Все</option>
|
1154 |
<?php
|
1155 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1156 |
if ( $gateway->enabled != 'yes' ) continue;
|
1157 |
+
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, (array)$value['payment_method']) ) echo 'selected';?>><?php echo $gateway->title; ?></option><?php
|
1158 |
}
|
1159 |
?>
|
1160 |
</select>
|
1161 |
</td><td>
|
1162 |
<select multiple="multiple" width="120px" name="shipping[<?php echo $key?>][shipping_method][]">
|
1163 |
+
<option value="0" <?php if( isset($value['shipping_method']) && ( in_array('0', (array)$value['shipping_method']) || empty($value['shipping_method']) ) || !isset($value['shipping_method']) ) echo 'selected';?>>Все</option>
|
1164 |
<?php
|
1165 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1166 |
if ( $shipping->enabled == 'no' ) continue;
|
1167 |
+
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, (array)$value['shipping_method']) ) echo 'selected';?>><?php echo $shipping->title ? $shipping->title: $shipping->method_title; ?></option><?php
|
1168 |
}
|
1169 |
?>
|
1170 |
</select>
|
1344 |
<?php
|
1345 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1346 |
if ( $gateway->enabled != 'yes' ) continue;
|
1347 |
+
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, (array)$value['payment_method']) ) echo 'selected';?>><?php echo str_replace("'", "\\'", $gateway->title); ?></option><?php
|
1348 |
}
|
1349 |
?>\
|
1350 |
</select>\
|
1354 |
<?php
|
1355 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1356 |
if ( $shipping->enabled == 'no' ) continue;
|
1357 |
+
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, (array)$value['shipping_method']) ) echo 'selected';?>><?php $st = $shipping->title ? $shipping->title: $shipping->method_title; echo str_replace("'", "\\'", $st); ?></option><?php
|
1358 |
}
|
1359 |
?>\
|
1360 |
</select>\
|
1372 |
<?php
|
1373 |
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
|
1374 |
if ( $gateway->enabled != 'yes' ) continue;
|
1375 |
+
?><option value="<?php echo $gateway->id; ?>" <?php if(isset($value['payment_method']) && in_array($gateway->id, (array)$value['payment_method']) ) echo 'selected';?>><?php echo str_replace("'", "\\'", $gateway->title); ?></option><?php
|
1376 |
}
|
1377 |
?>\
|
1378 |
</select>\
|
1382 |
<?php
|
1383 |
foreach ( $woocommerce->shipping->get_shipping_methods() as $act_id => $shipping ) {
|
1384 |
if ( $shipping->enabled == 'no' ) continue;
|
1385 |
+
?><option value="<?php echo $act_id; ?>" <?php if(isset($value['shipping_method']) && in_array($act_id, (array)$value['shipping_method']) ) echo 'selected';?>><?php $st = $shipping->title ? $shipping->title: $shipping->method_title; echo str_replace("'", "\\'", $st); ?></option><?php
|
1386 |
}
|
1387 |
?>\
|
1388 |
</select>\
|
1819 |
elseif ( version_compare( WOOCOMMERCE_VERSION, '3.0', '<' ) )
|
1820 |
$value_fild = $order->__get( $key );
|
1821 |
else $value_fild = get_post_meta( $order->get_id(), '_' . $key, true );
|
1822 |
+
if( $value_fild && isset($field["type"]) && in_array($field["type"] , array('select', 'radio')) && isset($field["options"][$value_fild]) ) {
|
1823 |
$value_fild = $field["options"][$value_fild];
|
1824 |
}
|
1825 |
if ( $value_fild && !empty($field['label']) )
|