WooCommerce Checkout Manager - Version 3.5

Version Description

Select date function, included.

=

Download this release

Release Info

Developer Emark
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 3.5
Comparing to
See all releases

Code changes from version 3.4 to 3.5

Files changed (2) hide show
  1. readme.txt +14 -2
  2. woocommerce-checkout-manager.php +66 -6
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.trottyzone.com/donation/
4
  Tags: woocommerce, wc, wc checkout settings, remove checkout fields, woothemes, woo commerce, links, shipping, order, fields, plugin, checkout page, manager, checkout field, checkout manager,plugin for plugin, paypal, payment,require, required remove, woocommerce checkout manager, checkout field, checkout, checkout woocommerce
5
  Requires at least: 3.0
6
  Tested up to: 3.6
7
- Stable tag: 3.4
8
  License: GPLv2 or later
9
 
10
  Manages WooCommerce Checkout
@@ -24,6 +24,8 @@ Manages WooCommerce Checkout
24
 
25
  6. Choose to disable the fields title name Additional information on the checkout page and/or checkout details (summary) & Receipt.
26
 
 
 
27
  = Notes* =
28
  1. You must include the abbreviation for the custom field WITHOUT spaces.
29
  2. <a href="http://www.trottyzone.com/donate/">Donation</a> for this great plugin you love and also to keep continued development.
@@ -49,6 +51,10 @@ Request for adding new fields to the checkout page has been introduced. All you
49
 
50
  * Placeholder allows the customer, the ability to get the feel of what exactly is this field about.
51
 
 
 
 
 
52
  = Control each field Required Attribute =
53
  Add or Remove required attribute from each new field created.
54
 
@@ -177,6 +183,9 @@ fields positioning, fixed.
177
  = 3.4 =
178
  bug fixed.
179
 
 
 
 
180
  == Changelog ==
181
 
182
  = 1.0 =
@@ -243,4 +252,7 @@ code review
243
  fields positioning, fixed.
244
 
245
  = 3.4 =
246
- bug fixed.
 
 
 
4
  Tags: woocommerce, wc, wc checkout settings, remove checkout fields, woothemes, woo commerce, links, shipping, order, fields, plugin, checkout page, manager, checkout field, checkout manager,plugin for plugin, paypal, payment,require, required remove, woocommerce checkout manager, checkout field, checkout, checkout woocommerce
5
  Requires at least: 3.0
6
  Tested up to: 3.6
7
+ Stable tag: 3.5
8
  License: GPLv2 or later
9
 
10
  Manages WooCommerce Checkout
24
 
25
  6. Choose to disable the fields title name Additional information on the checkout page and/or checkout details (summary) & Receipt.
26
 
27
+ 7. You can choose between text or date fields to be inserted on checkout. *
28
+
29
  = Notes* =
30
  1. You must include the abbreviation for the custom field WITHOUT spaces.
31
  2. <a href="http://www.trottyzone.com/donate/">Donation</a> for this great plugin you love and also to keep continued development.
51
 
52
  * Placeholder allows the customer, the ability to get the feel of what exactly is this field about.
53
 
54
+ = Text and Date* =
55
+ Includes a handy drop down box with two options, to select either text or date field.
56
+ The date field, has a great design, where when you click the field for date, a pop up calender displays, where you can choose a number of dates, skip between months by clicking the arrows, clicking the day you would like inside of the month you selected, also it shows you the current date! Awesome isn't it.
57
+
58
  = Control each field Required Attribute =
59
  Add or Remove required attribute from each new field created.
60
 
183
  = 3.4 =
184
  bug fixed.
185
 
186
+ = 3.5 =
187
+ Select date function, included.
188
+
189
  == Changelog ==
190
 
191
  = 1.0 =
252
  fields positioning, fixed.
253
 
254
  = 3.4 =
255
+ bug fixed.
256
+
257
+ = 3.5 =
258
+ Select date function, included.
woocommerce-checkout-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: WooCommerce Checkout Manager
5
  Plugin URI: http://www.trottyzone.com/product/woocommerce-checkout-manager-pro
6
  Description: Manages WooCommerce Checkout fields
7
- Version: 3.4
8
  Author: Ephrain Marchan
9
  Author URI: http://www.trottyzone.com
10
  License: GPLv2 or later
@@ -70,7 +70,9 @@ add_action( 'admin_init', 'wccs_register_setting' );
70
 
71
  } else { // non-admin enqueues, actions, and filters
72
  // hook to get option values and dynamically render css to support the tab classes
73
-
 
 
74
 
75
  }
76
 
@@ -129,14 +131,14 @@ update_option( 'wccs_settings', $options );
129
 
130
  // header
131
 
132
- echo "<h2>" . __( 'WooCommerce Checkout Manager', 'woocommerce-checkout-manager' ) . " Pro</h2>";
133
 
134
  // settings form
135
 
136
  ?>
137
 
138
  <div style="float:right;font-weight:700;color:red;">
139
- PLEASE <a href="http://www.trottyzone.com/donate/">DONATE </a><3
140
  <form style="margin-bottom:-10px;" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
141
  <input type="hidden" name="cmd" value="_s-xclick">
142
  <input type="hidden" name="hosted_button_id" value="5TFAJB5686N8L">
@@ -616,6 +618,7 @@ width: 100%;
616
  <th style="width:5%;" class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>"></th>
617
  <th><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
618
  <th><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
 
619
  <th width="10%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
620
  <th width="12%"><?php _e('Required Attribute' , 'woocommerce-checkout-manager' ); ?></th>
621
  <th scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><!-- remove --></th>
@@ -650,7 +653,18 @@ width: 100%;
650
  <td><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]"
651
  value="<?php echo esc_attr( $options['buttons'][$i][placeholder] ); ?>" /></td>
652
 
653
- <td><input type="text" maxlength="5" name="wccs_settings[buttons][<?php echo $i; ?>][cow]"
 
 
 
 
 
 
 
 
 
 
 
654
  value="<?php echo esc_attr( $options['buttons'][$i][cow] ); ?>" /></td>
655
 
656
 
@@ -676,6 +690,15 @@ width: 100%;
676
  <td><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]"
677
  title="<?php esc_attr_e( 'Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
678
 
 
 
 
 
 
 
 
 
 
679
  <td><input type="text" maxlength="5" name="wccs_settings[buttons][<?php echo $i; ?>][cow]"
680
  title="<?php esc_attr_e( 'Abbreviation (No spaces)', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
681
 
@@ -1019,6 +1042,7 @@ add_action('woocommerce_after_checkout_billing_form', 'wccs_add_title');
1019
  function wccs_custom_checkout_field( $checkout ) {
1020
 
1021
  $options = get_option( 'wccs_settings' );
 
1022
  if ( count( $options['buttons'] ) > 0 ) : ?>
1023
 
1024
  <?php
@@ -1032,7 +1056,7 @@ if ( count( $options['buttons'] ) > 0 ) : ?>
1032
  ?>
1033
  <?php
1034
 
1035
- if ( ! empty( $btn['label'] ) )
1036
 
1037
  woocommerce_form_field( ''.$btn['cow'].'' , array(
1038
  'type' => 'text',
@@ -1043,6 +1067,42 @@ if ( ! empty( $btn['label'] ) )
1043
 
1044
  ), $checkout->get_value( ''.$btn['cow'].'' ));
1045
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1046
  ?>
1047
  <?php
1048
  $i++;
4
  Plugin Name: WooCommerce Checkout Manager
5
  Plugin URI: http://www.trottyzone.com/product/woocommerce-checkout-manager-pro
6
  Description: Manages WooCommerce Checkout fields
7
+ Version: 3.5
8
  Author: Ephrain Marchan
9
  Author URI: http://www.trottyzone.com
10
  License: GPLv2 or later
70
 
71
  } else { // non-admin enqueues, actions, and filters
72
  // hook to get option values and dynamically render css to support the tab classes
73
+
74
+ wp_enqueue_script('jquery-ui-datepicker');
75
+ wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
76
 
77
  }
78
 
131
 
132
  // header
133
 
134
+ echo "<h2>" . __( 'WooCommerce Checkout Manager', 'woocommerce-checkout-manager' ) . "</h2>";
135
 
136
  // settings form
137
 
138
  ?>
139
 
140
  <div style="float:right;font-weight:700;color:red;">
141
+ Love this plugin? PLEASE <a href="http://www.trottyzone.com/donate/">DONATE </a><3 ... ALOT! of Time and Effort has been put into this
142
  <form style="margin-bottom:-10px;" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
143
  <input type="hidden" name="cmd" value="_s-xclick">
144
  <input type="hidden" name="hosted_button_id" value="5TFAJB5686N8L">
618
  <th style="width:5%;" class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>"></th>
619
  <th><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
620
  <th><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
621
+ <th width="15%"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
622
  <th width="10%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
623
  <th width="12%"><?php _e('Required Attribute' , 'woocommerce-checkout-manager' ); ?></th>
624
  <th scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><!-- remove --></th>
653
  <td><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]"
654
  value="<?php echo esc_attr( $options['buttons'][$i][placeholder] ); ?>" /></td>
655
 
656
+ <td>
657
+ <select name="wccs_settings[buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
658
+ <option value="text" <?php selected( $options['buttons'][$i][type], 'text' ); ?>>Text</option>
659
+ <option value="date" <?php selected( $options['buttons'][$i][type], 'date' ); ?>>Date</option>
660
+ <option value="checkbox" <?php selected( $options['buttons'][$i][type], 'checkbox' ); ?> disabled>Checkbox</option>
661
+ </select>
662
+ </td>
663
+
664
+
665
+
666
+
667
+ <td><input type="text" maxlength="10" name="wccs_settings[buttons][<?php echo $i; ?>][cow]"
668
  value="<?php echo esc_attr( $options['buttons'][$i][cow] ); ?>" /></td>
669
 
670
 
690
  <td><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]"
691
  title="<?php esc_attr_e( 'Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
692
 
693
+ <td>
694
+ <select name="wccs_settings[buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
695
+ <option value="text" >Text</option>
696
+ <option value="date" >Date</option>
697
+ <option value="checkbox" disabled>Checkbox</option>
698
+ </select>
699
+ </td>
700
+
701
+
702
  <td><input type="text" maxlength="5" name="wccs_settings[buttons][<?php echo $i; ?>][cow]"
703
  title="<?php esc_attr_e( 'Abbreviation (No spaces)', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
704
 
1042
  function wccs_custom_checkout_field( $checkout ) {
1043
 
1044
  $options = get_option( 'wccs_settings' );
1045
+
1046
  if ( count( $options['buttons'] ) > 0 ) : ?>
1047
 
1048
  <?php
1056
  ?>
1057
  <?php
1058
 
1059
+ if ( ! empty( $btn['label'] ) && ($btn['type'] == 'text') ) {
1060
 
1061
  woocommerce_form_field( ''.$btn['cow'].'' , array(
1062
  'type' => 'text',
1067
 
1068
  ), $checkout->get_value( ''.$btn['cow'].'' ));
1069
 
1070
+ }
1071
+
1072
+ if ( ! empty( $btn['label'] ) && ($btn['type'] == 'date') ) {
1073
+
1074
+ echo '<script type="text/javascript">
1075
+
1076
+ jQuery(document).ready(function() {
1077
+ jQuery(".MyDate-'.$btn['cow'].' #'.$btn['cow'].'").datepicker({
1078
+ dateFormat : "dd-mm-yy"
1079
+ });
1080
+ });
1081
+
1082
+ </script>';
1083
+
1084
+ woocommerce_form_field( ''.$btn['cow'].'' , array(
1085
+ 'type' => 'text',
1086
+ 'class' => array('wccs-field-class MyDate-'.$btn['cow'].' wccs-form-row-wide'),
1087
+ 'label' => ''.$btn['label'].'',
1088
+ 'required' => $btn['checkbox'],
1089
+ 'placeholder' => ''.$btn['placeholder'].'',
1090
+
1091
+ ), $checkout->get_value( ''.$btn['cow'].'' ));
1092
+
1093
+ }
1094
+
1095
+ if ( ! empty( $btn['label'] ) && ($btn['type'] == 'checkbox') ) {
1096
+ woocommerce_form_field( ''.$btn['cow'].'' , array(
1097
+ 'type' => 'checkbox',
1098
+ 'class' => array('wccs-field-class wccs-form-row-wide'),
1099
+ 'label' => ''.$btn['label'].'',
1100
+ 'required' => $btn['checkbox'],
1101
+ 'placeholder' => ''.$btn['placeholder'].'',
1102
+
1103
+ ), $checkout->get_value( ''.$btn['cow'].'' ));
1104
+ }
1105
+
1106
  ?>
1107
  <?php
1108
  $i++;