wccs__options_page

The WooCommerce Checkout Manager wccs options page function.

Description

wccs__options_page(); 

Usage

  1. if ( !function_exists( 'wccs__options_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/woocommerce-checkout-manager.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wccs__options_page(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-checkout-manager.php  
  1. function wccs__options_page() { 
  2. if ( !current_user_can('manage_options') ) {  
  3. wp_die( __('You do not have sufficient permissions to access this page.', 'woocommerce-checkout-manager') );  
  4.  
  5. $htmlshippingabbr = array( 'country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode' ); 
  6. $htmlbillingabbr = array( 'country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode', 'email', 'phone' ); 
  7. $upload_dir = wp_upload_dir(); 
  8. $hidden_field_name = 'mccs_submit_hidden'; 
  9. $hidden_wccs_reset = "my_new_field_reset"; 
  10. $options = get_option( 'wccs_settings' ); 
  11. $options2 = get_option( 'wccs_settings2' ); 
  12. $options3 = get_option( 'wccs_settings3' ); 
  13.  
  14. if( isset($_POST[ $hidden_wccs_reset ]) && $_POST[ $hidden_wccs_reset ] == 'Y' ) { 
  15. delete_option('wccs_settings'); 
  16. delete_option('wccs_settings2'); 
  17. delete_option('wccs_settings3'); 
  18.  
  19. $defaults = array( 
  20. 'checkness' => array( 
  21. 'position' => 'after_billing_form',  
  22. 'wooccm_notification_email' => ''.get_option('admin_email').'',  
  23. 'payment_method_t' => true,  
  24. 'shipping_method_t' => true,  
  25. 'payment_method_d' => __('Payment Method', 'woocommerce-checkout-manager'),  
  26. 'shipping_method_d' => __('Shipping Method', 'woocommerce-checkout-manager'),  
  27. 'time_stamp_title' => __('Order Time', 'woocommerce-checkout-manager'),  
  28. ),  
  29.  
  30. ); 
  31.  
  32. $shipping = array( 'country' => 'Country', 'first_name' => 'First Name', 'last_name' => 'Last Name', 'company' => 'Company Name', 'address_1' => 'Address', 'address_2' => '', 'city' => 'Town/ City', 'state' => 'State', 'postcode' => 'Zip' ); 
  33.  
  34. $ship = 0; 
  35. foreach( $shipping as $name => $value ) : 
  36.  
  37. $defaults2['shipping_buttons'][$ship]['label'] = __(''.$value.'', 'woocommerce'); 
  38. $defaults2['shipping_buttons'][$ship]['cow'] = $name; 
  39. $defaults2['shipping_buttons'][$ship]['checkbox'] = 'true'; 
  40. $defaults2['shipping_buttons'][$ship]['order'] = $ship + 1; 
  41. $defaults2['shipping_buttons'][$ship]['type'] = 'wooccmtext'; 
  42.  
  43. if ( $name == 'country') { 
  44. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide'; 
  45. }  
  46.  
  47. if ( $name == 'first_name') { 
  48. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-first'; 
  49.  
  50. if ( $name == 'last_name') { 
  51. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-last'; 
  52. $defaults2['shipping_buttons'][$ship]['clear_row'] = true; 
  53.  
  54. if ( $name == 'company') { 
  55. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide'; 
  56. }  
  57.  
  58. if ( $name == 'address_1') { 
  59. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide'; 
  60. $defaults2['shipping_buttons'][$ship]['placeholder'] = __('Street address', 'woocommerce'); 
  61. }  
  62.  
  63. if ( $name == 'address_2') { 
  64. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide'; 
  65. $defaults2['shipping_buttons'][$ship]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce'); 
  66. }  
  67.  
  68. if ( $name == 'city') { 
  69. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide'; 
  70. $defaults2['shipping_buttons'][$ship]['placeholder'] = __('Town / City', 'woocommerce'); 
  71. }  
  72.  
  73. if ( $name == 'state') { 
  74. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-first'; 
  75. }  
  76.  
  77. if ( $name == 'postcode') { 
  78. $defaults2['shipping_buttons'][$ship]['position'] = 'form-row-last'; 
  79. $defaults2['shipping_buttons'][$ship]['placeholder'] = __('Postcode / Zip', 'woocommerce'); 
  80. $defaults2['shipping_buttons'][$ship]['clear_row'] = true; 
  81. }  
  82.  
  83. $ship++; 
  84. endforeach; 
  85.  
  86.  
  87. $billing = array( 'country' => 'Country', 'first_name' => 'First Name', 'last_name' => 'Last Name', 'company' => 'Company Name', 'address_1' => 'Address', 'address_2' => '', 'city' => 'Town/ City', 'state' => 'State', 'postcode' => 'Zip', 'email' => 'Email Address', 'phone' => 'Phone' ); 
  88.  
  89. $bill = 0; 
  90. foreach( $billing as $name => $value ) : 
  91.  
  92. $defaults3['billing_buttons'][$bill]['label'] = __(''.$value.'', 'woocommerce'); 
  93. $defaults3['billing_buttons'][$bill]['cow'] = $name; 
  94. $defaults3['billing_buttons'][$bill]['checkbox'] = 'true'; 
  95. $defaults3['billing_buttons'][$bill]['order'] = $bill + 1;  
  96. $defaults3['billing_buttons'][$bill]['type'] = 'wooccmtext'; 
  97.  
  98. if ( $name == 'country') { 
  99. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide'; 
  100. }  
  101.  
  102. if ( $name == 'first_name') { 
  103. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-first'; 
  104. }  
  105.  
  106. if ( $name == 'last_name') { 
  107. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-last'; 
  108. $defaults3['billing_buttons'][$bill]['clear_row'] = true; 
  109. }  
  110.  
  111. if ( $name == 'company') { 
  112. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide'; 
  113. }  
  114.  
  115. if ( $name == 'address_1') { 
  116. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide'; 
  117. $defaults3['billing_buttons'][$bill]['placeholder'] = __('Street address', 'woocommerce'); 
  118. }  
  119.  
  120. if ( $name == 'address_2') { 
  121. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide'; 
  122. $defaults3['billing_buttons'][$bill]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce'); 
  123. }  
  124.  
  125. if ( $name == 'city') { 
  126. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide'; 
  127. $defaults3['billing_buttons'][$bill]['placeholder'] = __('Town / City', 'woocommerce'); 
  128. }  
  129.  
  130. if ( $name == 'state') { 
  131. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-first'; 
  132. }  
  133.  
  134. if ( $name == 'postcode') { 
  135. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-last'; 
  136. $defaults3['billing_buttons'][$bill]['placeholder'] = __('Postcode / Zip', 'woocommerce'); 
  137. $defaults3['billing_buttons'][$bill]['clear_row'] = true; 
  138. }  
  139.  
  140. if ( $name == 'email') { 
  141. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-first'; 
  142. }  
  143.  
  144. if ( $name == 'phone') { 
  145. $defaults3['billing_buttons'][$bill]['position'] = 'form-row-last'; 
  146. $defaults3['billing_buttons'][$bill]['clear_row'] = true; 
  147.  
  148. $bill++; 
  149. endforeach; 
  150.  
  151. add_option( 'wccs_settings' , $defaults ); 
  152. add_option( 'wccs_settings2' , $defaults2 ); 
  153. add_option( 'wccs_settings3' , $defaults3 ); 
  154.  
  155.  
  156. echo '<script type="text/javascript">window.location.href="'.$_SERVER['PHP_SELF'].'?page=woocommerce-checkout-manager";</script><noscript><meta http-equiv="refresh" content="0;url='.$_SERVER['PHP_SELF'].'?page=woocommerce-checkout-manager" /></noscript>';exit;  
  157.  
  158. echo '<script type="text/javascript" src="'.plugins_url('/woocommerce/assets/js/jquery-blockui/jquery.blockUI.js').'"></script>'; 
  159. echo '<div class="refreshwooccm">'; 
  160.  
  161. if ( get_option('wooccm_update_notice') != 'yep' ) { 
  162.  
  163. // display error 
  164. settings_errors(); 
  165.  
  166. // Now display the settings editing screen 
  167. echo '<div class="wrap"></div>'; 
  168.  
  169. // header 
  170. echo '<div style="clear:both;"> 
  171. <h2 class="nav-tab-wrapper add_tip_wrap"> 
  172. <span class="wooccm_name_heading">' . __( 'WooCommerce Checkout Manager', 'woocommerce-checkout-manager' ) . '</span> 
  173. <a class="nav-tab general-tab nav-tab-active">' . __( 'General', 'woocommerce-checkout-manager' ) . '</a> 
  174. <a class="nav-tab billing-tab">' . __( 'Billing', 'woocommerce-checkout-manager' ) . '</a> 
  175. <a class="nav-tab shipping-tab">' . __( 'Shipping', 'woocommerce-checkout-manager' ) . '</a> 
  176. <a class="nav-tab additional-tab">' . __( 'Additional', 'woocommerce-checkout-manager' ) . '</a> 
  177. <a class="nav-tab star" href="https://wordpress.org/support/view/plugin-reviews/woocommerce-checkout-manager?filter=5"><div id="star-five" title="'.__('Like the plugin? Rate it! On WordPress.org', 'woocommerce-checkout-manager' ) . '"><div class="star-rating"><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div></div></div></a> 
  178. </h2> 
  179. </div>'; 
  180. ?> 
  181.  
  182. <?php do_action('run_color_innerpicker'); ?> 
  183.  
  184.  
  185. <form name="reset_form" class="reset_form" method="post" action=""> 
  186. <input type="hidden" name="<?php echo $hidden_wccs_reset; ?>" value="Y"> 
  187. <input type="submit" name="submit" id="wccs_reset_submit" class="button button-hero" value="Reset"> 
  188. </form> 
  189.  
  190.  
  191.  
  192. <?php require(plugin_dir_path( __FILE__ ).'includes/classes/import.php'); ?> 
  193.  
  194.  
  195.  
  196.  
  197. <form name="wooccmform2" method="post" action="options.php" id="frm2"> 
  198.  
  199. <?php settings_fields( 'wccs_options2' ); ?> 
  200.  
  201. <input type="submit" style="display:none;" name="Submit" class="save-shipping wccs_submit_button button button-primary button-hero" value="<?php _e( 'Save Changes', 'woocommerce-checkout-manager' ); ?>" /> 
  202.  
  203. <!-- SHIPPING SECTION --> 
  204.  
  205. <table class="widefat shipping-wccs-table shipping-semi" style="display:none;" border="1" name="shipping_table"> 
  206.  
  207. <thead> 
  208. <tr> 
  209. <th style="width:3%;" class="shipping-wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>">#</th> 
  210.  
  211. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlheadship.php'); ?> 
  212.  
  213. <th width="1%" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><strong>X</strong><!-- remove --></th> 
  214. </tr> 
  215. </thead> 
  216.  
  217.  
  218.  
  219. <tbody> 
  220.  
  221. <?php 
  222. if ( isset ( $options2['shipping_buttons'] ) ) : 
  223.  
  224. $shipping = array( 'country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode' ); 
  225.  
  226. for ( $ix = 0; $ix < count( $options2['shipping_buttons'] ); $ix++ ) : 
  227.  
  228. if ( ! isset( $options2['shipping_buttons'][$ix] ) ) 
  229. break; 
  230.  
  231. ?> 
  232.  
  233. <tr valign="top" class="shipping-wccs-row"> 
  234.  
  235. <td style="display:none;" class="shipping-wccs-order-hidden" > 
  236. <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $ix; ?>][order]" value="<?php echo (empty( $options2['shipping_buttons'][$ix]['order'])) ? $ix : $options2['shipping_buttons'][$ix]['order']; ?>" /> 
  237. </td> 
  238.  
  239. <td class="shipping-wccs-order" title="<?php esc_attr_e( 'Change order', 'woocommerce-checkout-manager' ); ?>"><?php echo $ix+1; ?></td> 
  240.  
  241. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodyship.php'); ?> 
  242.  
  243. <?php if( in_array( $options2['shipping_buttons'][$ix]['cow'], $shipping) ) { ?> 
  244. <td style="text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $ix; ?>][disabled]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$ix]['disabled'])) echo "checked='checked'"; ?> /></td> 
  245. <?php } else {  
  246. echo '<td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" >×</a></td>'; 
  247. } ?> 
  248.  
  249. </tr> 
  250.  
  251. <?php endfor; endif; ?> 
  252. <!-- Empty --> 
  253.  
  254. <?php $ix = 999; ?> 
  255.  
  256. <tr valign="top" class="shipping-wccs-clone" > 
  257.  
  258. <td style="display:none;" class="shipping-wccs-order-hidden" > 
  259. <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $ix; ?>][order]" value="<?php echo $ix; ?>" /> 
  260. </td> 
  261.  
  262. <td class="shipping-wccs-order" title="<?php esc_attr_e( 'Change order', 'woocommerce-checkout-manager' ); ?>"><?php echo $ix; ?></td> 
  263.  
  264. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodycloneship.php'); ?> 
  265.  
  266. <td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;">×</a></td> 
  267.  
  268. </tr> 
  269. </tbody>  
  270. </table> 
  271.  
  272.  
  273. <div class="shipping-wccs-table-footer shipping-semi" style="display:none;"> 
  274. <a href="javascript:;" id="shipping-wccs-add-button" class="button-secondary"><?php _e( '+ Add New Field' , 'woocommerce-checkout-manager' ); ?></a> 
  275. </div> 
  276. <!-- END SHIPPING SECTION --> 
  277.  
  278. </form> 
  279.  
  280.  
  281. <form name="wooccmform3" method="post" action="options.php" id="frm3"> 
  282.  
  283. <?php settings_fields( 'wccs_options3' ); ?> 
  284.  
  285. <input type="submit" name="Submit" style="display:none;" class="save-billing wccs_submit_button button button-primary button-hero" value="<?php _e( 'Save Changes', 'woocommerce-checkout-manager' ); ?>" /> 
  286.  
  287.  
  288. <!-- BILLING SECTION --> 
  289.  
  290. <table class="widefat billing-wccs-table billing-semi" style="display:none;" border="1" name="billing_table"> 
  291.  
  292. <thead> 
  293. <tr> 
  294. <th style="width:3%;" class="billing-wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>">#</th> 
  295.  
  296. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlheadbill.php'); ?> 
  297.  
  298. <th width="1%" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><strong>X</strong><!-- remove --></th> 
  299. </tr> 
  300. </thead> 
  301.  
  302.  
  303.  
  304. <tbody> 
  305.  
  306. <?php 
  307. if ( isset ( $options3['billing_buttons'] ) ) : 
  308.  
  309. $billing = array( 'country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode', 'email', 'phone' ); 
  310.  
  311. for ( $i = 0; $i < count( $options3['billing_buttons'] ); $i++ ) : 
  312.  
  313. if ( ! isset( $options3['billing_buttons'][$i] ) ) 
  314. break; 
  315.  
  316. ?> 
  317.  
  318. <tr valign="top" class="billing-wccs-row"> 
  319. <td style="display:none;" class="billing-wccs-order-hidden" > 
  320. <input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo (empty( $options3['billing_buttons'][$i]['order'])) ? $i : $options3['billing_buttons'][$i]['order']; ?>" /> 
  321. </td> 
  322. <td class="billing-wccs-order" title="<?php esc_attr_e( 'Change order', 'woocommerce-checkout-manager' ); ?>"><?php echo $i+1; ?></td> 
  323.  
  324. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodybill.php'); ?> 
  325.  
  326. <?php if( in_array($options3['billing_buttons'][$i]['cow'], $billing) ) { ?> 
  327. <td style="text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['disabled'])) echo "checked='checked'"; ?> /></td> 
  328. <?php } else {  
  329. echo '<td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;">×</a></td>'; 
  330. } ?> 
  331.  
  332. </tr> 
  333.  
  334. <?php endfor; endif; ?> 
  335. <!-- Empty --> 
  336.  
  337. <?php $i = 999; ?> 
  338.  
  339. <tr valign="top" class="billing-wccs-clone" > 
  340.  
  341. <td style="display:none;" class="billing-wccs-order-hidden"><input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" /></td> 
  342.  
  343. <td class="billing-wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>"><?php echo $i; ?></td> 
  344.  
  345. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodyclonebill.php'); ?> 
  346.  
  347. <td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;" >×</a></td> 
  348.  
  349. </tr> 
  350. </tbody>  
  351. </table> 
  352.  
  353.  
  354. <div class="billing-wccs-table-footer billing-semi" style="display:none;"> 
  355. <a href="javascript:;" id="billing-wccs-add-button" class="button-secondary"><?php _e( '+ Add New Field' , 'woocommerce-checkout-manager' ); ?></a> 
  356. </div> 
  357.  
  358. <!-- END BILLING SECTION -->  
  359.  
  360. </form> 
  361.  
  362.  
  363. <form name="wooccmform" method="post" action="options.php" id="frm1"> 
  364.  
  365.  
  366. <?php settings_fields( 'wccs_options' ); ?> 
  367.  
  368. <input type="submit" name="Submit" class="save-additional wccs_submit_button button button-primary button-hero" value="<?php _e( 'Save Changes', 'woocommerce-checkout-manager' ); ?>" /> 
  369.  
  370.  
  371. <div id="general-semi-nav"> 
  372.  
  373. <div id="main-nav-left"> 
  374. <ul> 
  375. <li class="upload_class current"><a title="Upload">Upload</a></li> 
  376. <li class="address_fields_class"><a title="Address Fields">Hide Address Fields</a></li> 
  377. <li class="checkout_notice_class"><a title="Checkout Notice">Checkout Notice</a></li> 
  378. <li class="switches_class"><a title="Switches">Switches</a></li> 
  379. <li class="order_notes_class"><a title="Order Notes">Handlers</a></li> 
  380. <li class="custom_css_class"><a title="Custom CSS">Custom CSS</a></li> 
  381. </ul> 
  382. </div> 
  383.  
  384.  
  385. <div id="content-nav-right" class="general-vibe"> 
  386.  
  387. <?php 
  388. // file upload options section 
  389. require(plugin_dir_path( __FILE__ ).'includes/classes/file_upload/upload_settings.php');  
  390. ?> 
  391.  
  392.  
  393.  
  394. <!-- ADDITIONAL SECTION --> 
  395.  
  396.  
  397. <table class="widefat wccs-table additional-semi" style="display:none;" border="1" name="additional_table"> 
  398.  
  399. <thead> 
  400. <tr> 
  401. <th style="width:3%;" class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>">#</th> 
  402.  
  403. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlheadadd.php'); ?> 
  404.  
  405. <th width="1%" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><strong>X</strong><!-- remove --></th> 
  406. </tr> 
  407. </thead> 
  408.  
  409.  
  410.  
  411. <tbody> 
  412.  
  413. <?php 
  414. if ( isset ( $options['buttons'] ) ) : 
  415.  
  416. for ( $iz = 0; $iz < count( $options['buttons'] ); $iz++ ) : 
  417.  
  418. if ( ! isset( $options['buttons'][$iz] ) ) 
  419. break; 
  420.  
  421. ?> 
  422.  
  423. <tr valign="top" class="wccs-row"> 
  424. <td style="display:none;" class="wccs-order-hidden" > 
  425. <input type="hidden" name="wccs_settings[buttons][<?php echo $iz; ?>][order]" value="<?php echo (empty( $options['buttons'][$iz]['order'])) ? $iz : $options['buttons'][$iz]['order']; ?>" /> 
  426. </td> 
  427.  
  428. <td class="wccs-order" title="<?php esc_attr_e( 'Change order', 'woocommerce-checkout-manager' ); ?>"><?php echo $iz+1; ?></td> 
  429.  
  430. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodyadd.php'); ?> 
  431.  
  432. <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Remove Field' , 'woocommerce-checkout-manager' ); ?>">×</a></td> 
  433.  
  434. </tr> 
  435.  
  436. <?php endfor; endif; ?> 
  437. <!-- Empty --> 
  438.  
  439. <?php $iz = 999; ?> 
  440.  
  441. <tr valign="top" class="wccs-clone" > 
  442.  
  443. <td style="display:none;" class="wccs-order-hidden"><input type="hidden" name="wccs_settings[buttons][<?php echo $iz; ?>][order]" value="<?php echo $iz; ?>" /></td> 
  444.  
  445. <td class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>"><?php echo $iz; ?></td> 
  446.  
  447. <?php require(plugin_dir_path( __FILE__ ).'includes/templates/htmlbodycloneadd.php'); ?> 
  448.  
  449. <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Remove Field' , 'woocommerce-checkout-manager' ); ?>">×</a></td> 
  450.  
  451. </tr> 
  452. </tbody>  
  453. </table> 
  454.  
  455.  
  456. <div class="wccs-table-footer additional-semi" style="display:none;"> 
  457. <a href="javascript:;" id="wccs-add-button" class="button-secondary"><?php _e( '+ Add New Field' , 'woocommerce-checkout-manager' ); ?></a> 
  458. </div> 
  459.  
  460. <!-- END ADDITIONAL SECTION --> 
  461.  
  462.  
  463.  
  464.  
  465. <div class="widefat general-semi address_fields" border="1" style="display:none;"> 
  466.  
  467. <div class="section"> 
  468. <h3 class="heading"><?php _e('Disable Billing Address fields for certain products', 'woocommerce-checkout-manager'); ?></h3> 
  469.  
  470. <div class="option"> 
  471. <input type="text" name="wccs_settings[checkness][productssave]" style="width: 100%;" value="<?php echo (empty($options['checkness']['productssave'])) ? '' : $options['checkness']['productssave']; ?>" /> 
  472. <h3 class="heading address"><div class="info-of"><?php _e('To get product number, goto the listing of WooCoommerce Products then hover over each product and you will see ID. Example', 'woocommerce-checkout-manager'); ?> "ID: 3651"</div></h3> 
  473. </div> 
  474. </div> 
  475.  
  476. </div> 
  477.  
  478.  
  479. <div class="widefat general-semi order_notes" border="1" style="display:none;"> 
  480.  
  481. <div class="section"> 
  482. <h3 class="heading"> 
  483. <?php _e('Order Notes', 'woocommerce-checkout-manager'); ?> 
  484. </h3> 
  485.  
  486.  
  487. <div style="float:left;width: 46%;" class="option"> 
  488. <input style="width: 100%;clear:both;" name="wccs_settings[checkness][noteslabel]" type="text" value="<?php echo $options['checkness']['noteslabel']; ?>" /> 
  489. <div class="info-of" style="font-weight:700;margin-top:5px;text-align:center;"><?php _e('Order Notes Label', 'woocommerce-checkout-manager'); ?></div> 
  490. </div> 
  491.  
  492. <div style="float:left;width: 47%;" class="option"> 
  493. <input style="width: 100%;clear:both;" name="wccs_settings[checkness][notesplaceholder]" type="text" value="<?php echo (empty($options['checkness']['notesplaceholder'])) ? '' : $options['checkness']['notesplaceholder']; ?>" /> 
  494. <div class="info-of" style="font-weight:700;margin-top:5px;text-align:center;"><?php _e('Order Notes Placeholder', 'woocommerce-checkout-manager'); ?></div> 
  495. </div> 
  496.  
  497. <h3 class="heading checkbox" style="clear:both;"> 
  498. <div class="option"> 
  499. <input name="wccs_settings[checkness][notesenable]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['notesenable'])) echo "checked='checked'"; ?> /><span></span> 
  500. <div class="info-of"><?php _e('Disable Order Notes.', 'woocommerce-checkout-manager'); ?></div> 
  501. </div> 
  502. </h3> 
  503.  
  504. </div> 
  505.  
  506.  
  507. <div class="section"> 
  508. <h3 class="heading"><?php _e('Time order was purchased', 'woocommerce-checkout-manager'); ?></h3> 
  509.  
  510. <div style="float:left;width: 46%;" class="option"> 
  511. <input style="width: 100%;clear:both;" name="wccs_settings[checkness][time_stamp_title]" type="text" value="<?php echo $options['checkness']['time_stamp_title']; ?>" /> 
  512. <div class="info-of" style="font-weight:700;margin-top:5px;text-align:center;"><?php _e('Order time title', 'woocommerce-checkout-manager'); ?></div> 
  513. </div> 
  514.  
  515. <div style="float:left;width: 47%;" class="option"> 
  516. <input style="width: 100%;clear:both;" name="wccs_settings[checkness][set_timezone]" type="text" value="<?php echo (empty($options['checkness']['set_timezone'])) ? '' : $options['checkness']['set_timezone']; ?>" /> 
  517. <div class="info-of" style="font-weight:700;margin-top:5px;text-align:center;"><?php _e('Set TimeZone', 'woocommerce-checkout-manager'); ?></div> 
  518. </div> 
  519.  
  520. <h3 class="heading checkbox" style="clear:both;"> 
  521. <div class="option"> 
  522. <input name="wccs_settings[checkness][time_stamp]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['time_stamp'])) echo "checked='checked'"; ?> /><span></span> 
  523. <div class="info-of"><?php _e('Enable display of order time.', 'woocommerce-checkout-manager'); ?></div> 
  524. </div> 
  525. <div class="option"> 
  526. <input name="wccs_settings[checkness][twenty_hour]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['twenty_hour]'])) echo "checked='checked'"; ?> /><span></span> 
  527. <div class="info-of"><?php _e('Enable 24 hour time.', 'woocommerce-checkout-manager'); ?></div> 
  528. </div> 
  529. </h3> 
  530. </div> 
  531.  
  532.  
  533.  
  534.  
  535. <div class="section"> 
  536. <h3 class="heading"><?php _e('Payment method used by customer', 'woocommerce-checkout-manager'); ?></h3> 
  537.  
  538. <div class="option"> 
  539. <input style="width: 50%;" name="wccs_settings[checkness][payment_method_d]" type="text" value="<?php echo $options['checkness']['payment_method_d']; ?>" /> 
  540. </div> 
  541.  
  542. <h3 class="heading checkbox"> 
  543. <div class="option"> 
  544. <input name="wccs_settings[checkness][payment_method_t]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['payment_method_t'])) echo "checked='checked'"; ?> /><span></span> 
  545. <div class="info-of"><?php _e('Enable display of payment method.', 'woocommerce-checkout-manager'); ?></div> 
  546. </div> 
  547. </h3> 
  548. </div> 
  549.  
  550.  
  551.  
  552.  
  553. <div class="section"> 
  554. <h3 class="heading"><?php _e('Shipping method used by customer', 'woocommerce-checkout-manager'); ?></h3> 
  555.  
  556. <div class="option"> 
  557. <input style="width: 50%;" name="wccs_settings[checkness][shipping_method_d]" type="text" value="<?php echo $options['checkness']['shipping_method_d']; ?>" /> 
  558. </div> 
  559.  
  560. <h3 class="heading checkbox"> 
  561. <div class="option"> 
  562. <input name="wccs_settings[checkness][shipping_method_t]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['shipping_method_t'])) echo "checked='checked'"; ?> /><span></span> 
  563. <div class="info-of"><?php _e('Enable display of shipping method.', 'woocommerce-checkout-manager'); ?></div> 
  564. </div> 
  565. </h3> 
  566. </div> 
  567.  
  568.  
  569.  
  570. <div class="section"> 
  571. <h3 class="heading"><?php _e('Default sate code for checkout.', 'woocommerce-checkout-manager'); ?></h3> 
  572.  
  573. <div class="option"> 
  574. <input placeholder="ND" style="width: 50%;" name="wccs_settings[checkness][per_state]" type="text" value="<?php echo (empty($options['checkness']['per_state'])) ? '' : $options['checkness']['per_state']; ?>" /> 
  575. </div> 
  576.  
  577. <h3 class="heading checkbox"> 
  578. <div class="option"> 
  579. <input name="wccs_settings[checkness][per_state_check]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['per_state_check'])) echo "checked='checked'"; ?> /><span></span> 
  580. <div class="info-of"><?php _e('Enable default sate code.', 'woocommerce-checkout-manager'); ?></div> 
  581. </div> 
  582. </h3> 
  583. </div> 
  584.  
  585.  
  586. <br /> 
  587.  
  588.  
  589. </div> 
  590.  
  591.  
  592.  
  593. <div class="widefat general-semi custom_css" border="1" style="display:none;"> 
  594.  
  595. <div class="section"> 
  596. <h3 class="heading"><?php _e('Custom CSS', 'woocommerce-checkout-manager'); ?></strong></h3> 
  597.  
  598. <h3 class="heading checkbox"> 
  599.  
  600. <div class="option"> 
  601. <div class="info-of"> 
  602. <?php _e('CSS language stands for Cascading Style Sheets which is used to style html content. You can change the fonts size, colours, margins of content, which lines to show or input, adjust height, width, background images etc.', 'woocommerce-checkout-manager'); ?> 
  603. <?php _e('Get help in our', 'woocommerce-checkout-manager'); ?> <a href="http://www.trottyzone.com/forums/forum/wordpress-plugins/"><?php _e('Support Forum', 'woocommerce-checkout-manager'); ?></a>. 
  604. </div> 
  605. </div> 
  606. </h3> 
  607.  
  608. <textarea type="text" name="wccs_settings[checkness][custom_css_w]" style="height:200px;width: 100%;"><?php echo (empty($options['checkness']['custom_css_w'])) ? '' : $options['checkness']['custom_css_w']; ?></textarea> 
  609. </div> 
  610. </div> 
  611.  
  612.  
  613.  
  614.  
  615.  
  616. <div class="widefat general-semi checkout_notices" border="1" style="display:none;" > 
  617.  
  618. <div class="section"> 
  619. <h3 class="heading"><?php _e('Position for notification one', 'woocommerce-checkout-manager'); ?></h3> 
  620.  
  621. <h3 class="heading checkbox"> 
  622. <div class="option"> 
  623. <input style="float:left;" name="wccs_settings[checkness][checkbox1]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['checkbox1'])) echo "checked='checked'"; ?> /><span></span> 
  624. <div class="info-of"><?php _e('Before Customer Address Fields', 'woocommerce-checkout-manager'); ?></div> 
  625. </div> 
  626. </h3> 
  627.  
  628.  
  629. <h3 class="heading checkbox"> 
  630. <div class="option"> 
  631. <input style="float:left;" name="wccs_settings[checkness][checkbox2]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['checkbox2'])) echo "checked='checked'"; ?> /><span></span> 
  632. <div class="info-of"><?php _e('Before Order Summary', 'woocommerce-checkout-manager'); ?></div> 
  633. </div> 
  634. </h3> 
  635.  
  636. <div class="option"> 
  637. <div class="info-of"><?php _e('Notification text area: You can use class', 'woocommerce-checkout-manager'); ?> "woocommerce-info" <?php _e('for the same design as WooCommerce Coupon.', 'woocommerce-checkout-manager'); ?></div> 
  638. <textarea style="width:100%;height:150px;" name="wccs_settings[checkness][text1]" type="textarea"><?php echo (empty($options['checkness']['text1'] )) ? '' : esc_attr( $options['checkness']['text1'] ); ?></textarea> 
  639. </div> 
  640.  
  641. </div> 
  642.  
  643.  
  644.  
  645. <div class="section"> 
  646. <h3 class="heading"><?php _e('Position for notification two', 'woocommerce-checkout-manager'); ?></h3> 
  647.  
  648. <h3 class="heading checkbox"> 
  649. <div class="option"> 
  650. <input style="float:left;" name="wccs_settings[checkness][checkbox3]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['checkbox3'])) echo "checked='checked'"; ?> /></th><span></span> 
  651. <div class="info-of"><?php _e('Before Customer Address Fields', 'woocommerce-checkout-manager'); ?></div> 
  652. </div> 
  653. </h3> 
  654.  
  655. <h3 class="heading checkbox"> 
  656. <div class="option"> 
  657. <input style="float:left;" name="wccs_settings[checkness][checkbox4]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['checkbox4'])) echo "checked='checked'"; ?> /></th><span></span> 
  658. <div class="info-of"><?php _e('Before Order Summary', 'woocommerce-checkout-manager'); ?></div> 
  659. </div> 
  660. </h3> 
  661.  
  662. <div class="option"> 
  663. <div class="info-of"><?php _e('Notification text area: You can use class', 'woocommerce-checkout-manager'); ?> "woocommerce-info" <?php _e('for the same design as WooCommerce Coupon.', 'woocommerce-checkout-manager'); ?></div> 
  664. <textarea style="width:100%;height:150px;" name="wccs_settings[checkness][text2]" type="textarea"><?php echo (empty( $options['checkness']['text2'] )) ? '' : esc_attr( $options['checkness']['text2'] ); ?></textarea> 
  665. </div> 
  666. </div>  
  667. </div> 
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. <div class="widefat general-semi switches" border="1" style="display:none;"> 
  675.  
  676. <div class="section"><h3 class="heading"><?php _e('General Switches', 'woocommerce-checkout-manager'); ?></h3></div> 
  677. <div class="section"> 
  678. <h3 class="heading checkbox">  
  679. <div class="option"> 
  680. <input name="wccs_settings[checkness][additional_info]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['additional_info'])) echo "checked='checked'"; ?> /><span></span> 
  681. <div class="info-of"><?php _e('Remove Additional Information title', 'woocommerce-checkout-manager'); ?></div> 
  682. </div> 
  683. </h3> 
  684. </div> 
  685.  
  686.  
  687.  
  688. <div class="section"> 
  689. <h3 class="heading checkbox"> 
  690. <div class="option"> 
  691. <input name="wccs_settings[checkness][admin_translation]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['admin_translation'])) echo "checked='checked'"; ?> /><span></span> 
  692. <div class="info-of"><?php _e('Translate WooCCM Options Panel', 'woocommerce-checkout-manager'); ?></div> 
  693. </div> 
  694. </h3> 
  695. </div> 
  696.  
  697.  
  698.  
  699. <div class="section"> 
  700. <h3 class="heading checkbox"> 
  701. <div class="option"> 
  702. <input name="wccs_settings[checkness][auto_create_wccm_account]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['auto_create_wccm_account'])) echo "checked='checked'"; ?> /><span></span> 
  703. <div class="info-of"><?php _e('Hide registration checkbox', 'woocommerce-checkout-manager'); ?></div> 
  704. </div> 
  705. </h3> 
  706. </div> 
  707.  
  708.  
  709. <div class="section"> 
  710. <h3 class="heading checkbox"> 
  711. <div class="option"> 
  712. <input name="wccs_settings[checkness][retainval]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['retainval'])) echo "checked='checked'"; ?> /><span></span> 
  713. <div class="info-of"><?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?></div> 
  714. </div> 
  715. </h3> 
  716. </div> 
  717.  
  718. <div class="section"> 
  719. <h3 class="heading checkbox"> 
  720. <div class="option"> 
  721. <input name="wccs_settings[checkness][abbreviation]" type="checkbox" value="true" <?php if ( !empty ($options['checkness']['abbreviation'])) echo "checked='checked'"; ?> /><span></span> 
  722. <div class="info-of"><?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?></div> 
  723. </div> 
  724. </h3> 
  725. </div> 
  726.  
  727. <div class="section"><h3 class="heading"><?php _e('Additional Fields Positions', 'woocommerce-checkout-manager'); ?></h3></div> 
  728.  
  729. <div class="section"> 
  730. <h3 class="heading checkbox radio"> 
  731. <div class="option"> 
  732. <input name="wccs_settings[checkness][position]" type="radio" value="before_shipping_form" <?php checked( $options['checkness']['position'], 'before_shipping_form' ); ?> /> 
  733. <div class="info-of"><?php _e('Before Shipping Form', 'woocommerce-checkout-manager'); ?></div> 
  734. </div> 
  735. </h3> 
  736. </div> 
  737.  
  738.  
  739. <div class="section"> 
  740. <h3 class="heading checkbox radio"> 
  741. <div class="option"> 
  742. <input name="wccs_settings[checkness][position]" type="radio" value="after_shipping_form" <?php checked( $options['checkness']['position'], 'after_shipping_form' ); ?> /> 
  743. <div class="info-of"><?php _e('After Shipping Form', 'woocommerce-checkout-manager'); ?></div> 
  744. </div> 
  745. </h3> 
  746. </div> 
  747.  
  748.  
  749. <div class="section"> 
  750. <h3 class="heading checkbox radio"> 
  751. <div class="option"> 
  752. <input name="wccs_settings[checkness][position]" type="radio" value="before_billing_form" <?php checked( $options['checkness']['position'], 'before_billing_form' ); ?> /> 
  753. <div class="info-of"><?php _e('Before Billing Form', 'woocommerce-checkout-manager'); ?></div> 
  754. </div> 
  755. </h3> 
  756. </div> 
  757.  
  758.  
  759. <div class="section"> 
  760. <h3 class="heading checkbox radio"> 
  761. <div class="option"> 
  762. <input name="wccs_settings[checkness][position]" type="radio" value="after_billing_form" <?php checked( $options['checkness']['position'], 'after_billing_form' ); ?> /> 
  763. <div class="info-of"><?php _e('After Billing Form', 'woocommerce-checkout-manager'); ?></div> 
  764. </div> 
  765. </h3> 
  766. </div> 
  767.  
  768.  
  769. <div class="section"> 
  770. <h3 class="heading checkbox radio"> 
  771. <div class="option"> 
  772. <input name="wccs_settings[checkness][position]" type="radio" value="after_order_notes" <?php checked( $options['checkness']['position'], 'after_order_notes' ); ?> /> 
  773. <div class="info-of"><?php _e('After Order Notes', 'woocommerce-checkout-manager'); ?></div> 
  774. </div> 
  775. </h3> 
  776. </div> 
  777.  
  778.  
  779.  
  780.  
  781.  
  782. </div> 
  783.  
  784.  
  785. </div> 
  786. </div>  
  787. </form> 
  788. </div> 
  789.  
  790.  
  791.  
  792. <?php