Version Description
- Fixed the issue of displaying option value instead of option text in order details pages.
- Improved radio button display style.
Download this release
Release Info
Developer | ThemeHigh |
Plugin | WooCommerce Checkout Field Editor (Manager) Pro |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.9 to 1.4.0
- assets/css/thwcfd-public.css +4 -0
- checkout-form-designer.php +3 -3
- classes/class-thwcfd-checkout.php +7 -1
- classes/class-thwcfd-settings-general.php +1 -0
- classes/class-thwcfd-utils.php +14 -0
- readme.txt +6 -2
assets/css/thwcfd-public.css
CHANGED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.thwcfd-field-radio label.radio{
|
2 |
+
display: inline-block;
|
3 |
+
margin-right: 15px;
|
4 |
+
}
|
checkout-form-designer.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: Checkout Field Editor for WooCommerce
|
4 |
* Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
|
5 |
* Author: ThemeHigh
|
6 |
-
* Version: 1.
|
7 |
* Author URI: https://www.themehigh.com
|
8 |
* Plugin URI: https://www.themehigh.com
|
9 |
* Text Domain: woo-checkout-field-editor-pro
|
10 |
* Domain Path: /languages
|
11 |
* WC requires at least: 3.0.0
|
12 |
-
* WC tested up to: 3.8.
|
13 |
*/
|
14 |
|
15 |
if(!defined( 'ABSPATH' )) exit;
|
@@ -25,7 +25,7 @@ if (!function_exists('is_woocommerce_active')){
|
|
25 |
}
|
26 |
|
27 |
if(is_woocommerce_active()) {
|
28 |
-
define('THWCFD_VERSION', '1.
|
29 |
!defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
|
30 |
!defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
|
31 |
!defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
|
3 |
* Plugin Name: Checkout Field Editor for WooCommerce
|
4 |
* Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
|
5 |
* Author: ThemeHigh
|
6 |
+
* Version: 1.4.0
|
7 |
* Author URI: https://www.themehigh.com
|
8 |
* Plugin URI: https://www.themehigh.com
|
9 |
* Text Domain: woo-checkout-field-editor-pro
|
10 |
* Domain Path: /languages
|
11 |
* WC requires at least: 3.0.0
|
12 |
+
* WC tested up to: 3.8.1
|
13 |
*/
|
14 |
|
15 |
if(!defined( 'ABSPATH' )) exit;
|
25 |
}
|
26 |
|
27 |
if(is_woocommerce_active()) {
|
28 |
+
define('THWCFD_VERSION', '1.4.0');
|
29 |
!defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
|
30 |
!defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
|
31 |
!defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
|
classes/class-thwcfd-checkout.php
CHANGED
@@ -24,7 +24,8 @@ class THWCFD_Checkout {
|
|
24 |
$deps = array('jquery', 'select2');
|
25 |
|
26 |
wp_register_script('thwcfd-checkout-script', THWCFD_ASSETS_URL.'js/thwcfd-checkout.js', $deps, THWCFD_VERSION, $in_footer);
|
27 |
-
wp_enqueue_script('thwcfd-checkout-script');
|
|
|
28 |
}
|
29 |
}
|
30 |
|
@@ -232,6 +233,9 @@ class THWCFD_Checkout {
|
|
232 |
}
|
233 |
|
234 |
$type = isset($new_field['type']) ? $new_field['type'] : 'text';
|
|
|
|
|
|
|
235 |
|
236 |
if($type === 'select' || $type === 'radio'){
|
237 |
if(isset($new_field['options'])){
|
@@ -376,6 +380,7 @@ class THWCFD_Checkout {
|
|
376 |
if($value){
|
377 |
$label = isset($field['label']) && $field['label'] ? $field['label'] : $key;
|
378 |
$label = esc_attr($label);
|
|
|
379 |
|
380 |
$custom_field = array();
|
381 |
$custom_field['label'] = THWCFD_Utils::t($label);
|
@@ -408,6 +413,7 @@ class THWCFD_Checkout {
|
|
408 |
|
409 |
$label = esc_attr($label);
|
410 |
$value = wptexturize($value);
|
|
|
411 |
|
412 |
if(is_account_page()){
|
413 |
if(apply_filters( 'thwcfd_view_order_customer_details_table_view', true )){
|
24 |
$deps = array('jquery', 'select2');
|
25 |
|
26 |
wp_register_script('thwcfd-checkout-script', THWCFD_ASSETS_URL.'js/thwcfd-checkout.js', $deps, THWCFD_VERSION, $in_footer);
|
27 |
+
wp_enqueue_script('thwcfd-checkout-script');
|
28 |
+
wp_enqueue_style('thwcfd-checkout-style', THWCFD_ASSETS_URL . 'css/thwcfd-public.css', THWCFD_VERSION);
|
29 |
}
|
30 |
}
|
31 |
|
233 |
}
|
234 |
|
235 |
$type = isset($new_field['type']) ? $new_field['type'] : 'text';
|
236 |
+
|
237 |
+
$new_field['class'][] = 'thwcfd-field-wrapper';
|
238 |
+
$new_field['class'][] = 'thwcfd-field-'.$type;
|
239 |
|
240 |
if($type === 'select' || $type === 'radio'){
|
241 |
if(isset($new_field['options'])){
|
380 |
if($value){
|
381 |
$label = isset($field['label']) && $field['label'] ? $field['label'] : $key;
|
382 |
$label = esc_attr($label);
|
383 |
+
$value = THWCFD_Utils::get_option_text($field, $value);
|
384 |
|
385 |
$custom_field = array();
|
386 |
$custom_field['label'] = THWCFD_Utils::t($label);
|
413 |
|
414 |
$label = esc_attr($label);
|
415 |
$value = wptexturize($value);
|
416 |
+
$value = THWCFD_Utils::get_option_text($field, $value);
|
417 |
|
418 |
if(is_account_page()){
|
419 |
if(apply_filters( 'thwcfd_view_order_customer_details_table_view', true )){
|
classes/class-thwcfd-settings-general.php
CHANGED
@@ -612,6 +612,7 @@ class THWCFD_Settings_General {
|
|
612 |
if(THWCFD_Utils::is_active_custom_field($field) && isset($field['show_in_order']) && $field['show_in_order']){
|
613 |
$value = get_post_meta( $order_id, $name, true );
|
614 |
if(!empty($value)){
|
|
|
615 |
$label = isset($field['label']) && $field['label'] ? THWCFD_Utils::t($field['label']) : $name;
|
616 |
$html .= '<p><strong>'. $label .':</strong><br/> '. wptexturize($value) .'</p>';
|
617 |
}
|
612 |
if(THWCFD_Utils::is_active_custom_field($field) && isset($field['show_in_order']) && $field['show_in_order']){
|
613 |
$value = get_post_meta( $order_id, $name, true );
|
614 |
if(!empty($value)){
|
615 |
+
$value = THWCFD_Utils::get_option_text($field, $value);
|
616 |
$label = isset($field['label']) && $field['label'] ? THWCFD_Utils::t($field['label']) : $name;
|
617 |
$html .= '<p><strong>'. $label .':</strong><br/> '. wptexturize($value) .'</p>';
|
618 |
}
|
classes/class-thwcfd-utils.php
CHANGED
@@ -204,6 +204,20 @@ class THWCFD_Utils {
|
|
204 |
return $options_json;
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
public static function prepare_field_priority($fields, $order, $new=false){
|
208 |
$priority = '';
|
209 |
if(!$new){
|
204 |
return $options_json;
|
205 |
}
|
206 |
|
207 |
+
public static function get_option_text($field, $value){
|
208 |
+
$type = isset($field['type']) ? $field['type'] : false;
|
209 |
+
|
210 |
+
if($type === 'select' || $type === 'radio'){
|
211 |
+
$options = isset($field['options']) ? $field['options'] : array();
|
212 |
+
|
213 |
+
if(isset($options[$value]) && !empty($options[$value])){
|
214 |
+
$value = $options[$value];
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
return $value;
|
219 |
+
}
|
220 |
+
|
221 |
public static function prepare_field_priority($fields, $order, $new=false){
|
222 |
$priority = '';
|
223 |
if(!$new){
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://themehigh.com/
|
|
4 |
Tags: checkout field editor, woocommerce checkout field editor, checkout manager, woocommerce checkout manager, checkout field customizer, checkout form editor, checkout form customizer, checkout, WooCommerce checkout, checkout form designer, woocommerce checkout fields, woocommerce checkout addons
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -16,7 +16,7 @@ Checkout Field Editor (Checkout Manager) for WooCommerce - The best WooCommerce
|
|
16 |
If you are wondering how to add custom field in WooCommerce checkout page, you are at the right place. Checkout Field Editor for WooCommerce plugin provides an easy way to customise (add, edit, delete and change display order) your fields displayed on WooCommerce checkout page. This plugin requires WooCommerce to be installed, activated, and configured.
|
17 |
|
18 |
--------------------------------------------
|
19 |
-
https://www.youtube.com/watch?v=
|
20 |
--------------------------------------------
|
21 |
|
22 |
= Basic Version Features =
|
@@ -178,6 +178,10 @@ Yes. There is a button 'reset to default fields' to go back to the WooCommerce d
|
|
178 |
8. Newly added field
|
179 |
|
180 |
== Changelog ==
|
|
|
|
|
|
|
|
|
181 |
= 1.3.9 =
|
182 |
* Fixed the issue of not showing save button in field settings popup when more options added to select field after chaged the popup position.
|
183 |
|
4 |
Tags: checkout field editor, woocommerce checkout field editor, checkout manager, woocommerce checkout manager, checkout field customizer, checkout form editor, checkout form customizer, checkout, WooCommerce checkout, checkout form designer, woocommerce checkout fields, woocommerce checkout addons
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 1.4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
16 |
If you are wondering how to add custom field in WooCommerce checkout page, you are at the right place. Checkout Field Editor for WooCommerce plugin provides an easy way to customise (add, edit, delete and change display order) your fields displayed on WooCommerce checkout page. This plugin requires WooCommerce to be installed, activated, and configured.
|
17 |
|
18 |
--------------------------------------------
|
19 |
+
https://www.youtube.com/watch?v=_iKMe5lGIIM
|
20 |
--------------------------------------------
|
21 |
|
22 |
= Basic Version Features =
|
178 |
8. Newly added field
|
179 |
|
180 |
== Changelog ==
|
181 |
+
= 1.4.0 =
|
182 |
+
* Fixed the issue of displaying option value instead of option text in order details pages.
|
183 |
+
* Improved radio button display style.
|
184 |
+
|
185 |
= 1.3.9 =
|
186 |
* Fixed the issue of not showing save button in field settings popup when more options added to select field after chaged the popup position.
|
187 |
|