Changeset 3013867
- Timestamp:
- 12/24/2023 08:58:40 PM (2 years ago)
- Location:
- byconsole-woo-order-delivery-time/trunk
- Files:
-
- 3 edited
-
ByConsoleWooODT.php (modified) (13 diffs)
-
inc/bycwooodt_language_fields_setting.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
byconsole-woo-order-delivery-time/trunk/ByConsoleWooODT.php
r2961224 r3013867 12 12 * Description: Let your buyers to choose if order to deliver or pickup along with their chosen date and time (Need to have Woocommerce installed first). 13 13 14 * Version: 2.4. 614 * Version: 2.4.7 15 15 16 16 * Author: ByConsole … … 2088 2088 while(parseInt(next_slot_start_time_hour) <= parseInt(byc_delivery_end_time_hour)){ 2089 2089 2090 console.log('inside while');2091 2092 2090 next_slot_end_time_minute = parseInt(next_slot_start_time_minute) + 30; 2093 2091 2094 console.log(next_slot_end_time_minute);2095 2096 2092 if(parseInt(next_slot_end_time_minute) > 60){ 2097 2093 … … 2126 2122 next_slot_end_time_minute = next_slot_end_time_minute; 2127 2123 2128 console.log('-----check here------');2129 2130 console.log(next_slot_end_time_minute);2131 2132 2124 }else{ 2133 2125 … … 2155 2147 2156 2148 }; 2157 2158 console.log(object_literal);2159 2160 console.log('---------------------------------');2161 2162 2149 2163 2150 … … 2173 2160 2174 2161 } 2175 2176 console.log('Printing final object');2177 2162 2178 2163 }//ByConsoleWooODTCreateSlot … … 3435 3420 add_action( 'admin_footer', 'ajax_without_file' ); 3436 3421 3437 function ajax_without_file() { ?> 3422 function ajax_without_file() { 3423 3424 $nonce_ajax_update_option=wp_create_nonce('nonce_ajax_update_option'); 3425 3426 ?> 3438 3427 3439 3428 <script type="text/javascript" > … … 3455 3444 var bycwooodt_field_name = jQuery(this).attr('name'); 3456 3445 3457 //window.open('<?php echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit');3458 3459 //window.location ='<?php echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit';3446 //window.open('<?php //echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit'); 3447 3448 //window.location ='<?php //echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit'; 3460 3449 3461 3450 }); … … 3465 3454 var byconsolewooodt_admin_fields_array = jQuery("form.byconsolewooodt_fields_form").serialize(); 3466 3455 3467 console.log(byconsolewooodt_admin_fields_array);3456 //console.log(byconsolewooodt_admin_fields_array); 3468 3457 3469 3458 var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id'); … … 3483 3472 var byconsolewooodt_admin_fields_array = jQuery('form.byconsolewooodt_holiday_fields_form').serialize(); 3484 3473 3485 console.log(byconsolewooodt_admin_fields_array);3474 //console.log(byconsolewooodt_admin_fields_array); 3486 3475 3487 3476 var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id'); … … 3503 3492 var byconsolewooodt_admin_fields_array = jQuery('form.byconsolewooodt_location_fields_form').serialize(); 3504 3493 3505 console.log(byconsolewooodt_admin_fields_array);3494 //console.log(byconsolewooodt_admin_fields_array); 3506 3495 3507 3496 var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id'); … … 3523 3512 var byconsolewooodt_admin_fields_array = jQuery("form.byconsolewooodt_language_fields_form").serialize(); 3524 3513 3525 console.log(byconsolewooodt_admin_fields_array);3514 //console.log(byconsolewooodt_admin_fields_array); 3526 3515 3527 3516 var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id'); … … 3568 3557 3569 3558 3570 function bycwooodt_all_fields_setting_function(byconsolewooodt_admin_fields_array,bycwooodt_admin_fields,bycwooodt_loader_image_id,bycwooodt_update_succesfully_image_id ){3559 function bycwooodt_all_fields_setting_function(byconsolewooodt_admin_fields_array,bycwooodt_admin_fields,bycwooodt_loader_image_id,bycwooodt_update_succesfully_image_id,nonce_ajax_update_option){ 3571 3560 3572 3561 … … 3604 3593 'bycwooodt_admin_fields': bycwooodt_admin_fields ,// some additional data to send 3605 3594 3606 'bycwooodt_admin_fields_val_array': byconsolewooodt_admin_fields_array 3607 3595 'bycwooodt_admin_fields_val_array': byconsolewooodt_admin_fields_array, 3596 3597 'security': '<?php echo $nonce_ajax_update_option;?>' 3598 3599 }; 3600 3601 //alert('Hi...' + bycwooodt_loader_image_id); 3602 3603 jQuery.ajax({ 3604 3605 url: ajaxurl, // this will point to admin-ajax.php 3606 3607 type: 'POST', 3608 3609 data: dataVariable, 3610 3611 success: function (response) { 3612 3613 console.log(response); 3614 3615 jQuery("#"+bycwooodt_loader_image_id).css("display","none"); 3616 3617 jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","block"); 3618 3619 setTimeout(function() { 3620 3621 jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","none"); 3622 3623 }, 4000); 3624 3625 3626 3627 } 3628 3629 }); 3630 3631 } 3632 3633 </script> 3634 3635 <?php 3636 3637 } 3638 3639 add_action("wp_ajax_byconsolewooodt_admin_fields_setting_files" , "byconsolewooodt_admin_fields_setting_files"); 3640 3641 3642 function byconsolewooodt_admin_fields_setting_files(){ 3643 3644 global $wpdb; 3645 3646 global $woocommerce; 3647 3648 check_ajax_referer('nonce_ajax_update_option','security'); //@since 2.4.7 3649 3650 $bycwooodt_admin_fields = $_POST['bycwooodt_admin_fields']; 3651 3652 $bycwooodt_admin_fields = sanitize_text_field($bycwooodt_admin_fields); 3653 3654 3655 $current_user = wp_get_current_user(); 3656 3657 if ( $current_user->has_cap('manage_options') ) { //@since 2.4.7 3658 3659 if(in_array($bycwooodt_admin_fields,array("byconsolewooodt_odt_setting","byconsolewooodt_holidays_setting","byconsolewooodt_location_setting","bycwooodt_language_translate","byconsolewooodt_extra_options"))){ 3660 3661 $bycwooodt_admin_fields_val_array = $_POST['bycwooodt_admin_fields_val_array']; 3662 3663 parse_str($bycwooodt_admin_fields_val_array,$output); 3664 3665 $santized_array = array(); 3666 3667 foreach($output as $key=>$val){ 3668 3669 $sanitized_key = sanitize_key($key); 3670 3671 if(gettype($val)=='array'){ 3608 3672 3609 3610 }; 3611 3612 //alert('Hi...' + bycwooodt_loader_image_id); 3613 3614 jQuery.ajax({ 3615 3616 url: ajaxurl, // this will point to admin-ajax.php 3617 3618 type: 'POST', 3619 3620 data: dataVariable, 3621 3622 success: function (response) { 3623 3624 console.log(response); 3625 3626 jQuery("#"+bycwooodt_loader_image_id).css("display","none"); 3627 3628 jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","block"); 3629 3630 setTimeout(function() { 3631 3632 jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","none"); 3633 3634 }, 4000); 3635 3673 $santized_array_array = array(); 3674 3675 foreach($val as $val_key=>$val_val){ 3636 3676 3637 3638 } 3639 3640 }); 3677 $sanitized_val_key = sanitize_key($val_key); 3678 3679 3680 3681 if(gettype($val_val)=='array'){ 3682 3683 $santized_array_array_array = array(); 3684 3685 foreach($val_val as $val_val_kay=>$val_val_val){ 3686 3687 $sanitized_val_val_key = sanitize_key($val_val_key); 3688 3689 $sanitized_val_val_val = sanitize_text_field($val_val_val); 3690 3691 $santized_array_array_array[$val_val_key] = $sanitized_val_val_val; 3692 3693 } 3694 3695 $sanitized_val_val = $santized_array_array_array; ////////////////// 3696 3697 }else{ 3698 3699 $sanitized_val_val = sanitize_text_field($val_val); 3700 3701 } 3702 3703 $santized_array_array[$val_key] = $sanitized_val_val; 3704 3705 } 3706 3707 $sanitized_val = $santized_array_array; //////////////////////// 3708 3709 }else{ 3710 3711 $sanitized_val = sanitize_text_field($val); 3712 3713 } 3714 3715 $santized_array[$sanitized_key] = $sanitized_val; 3716 3717 } 3718 3719 3720 $serialized_santized_array=serialize($santized_array); 3721 3722 if(!is_serialized($serialized_santized_array)){ //@since 2.4.7 3723 3724 $bycwooodt_admin_fields_val_array=maybe_serialize($serialized_santized_array); 3725 } 3726 3727 update_option($bycwooodt_admin_fields, $bycwooodt_admin_fields_val_array ); 3728 3729 wp_die(); 3730 3731 } 3641 3732 3642 3733 } 3643 3734 3644 </script> 3645 3646 <?php 3647 3648 } 3649 3650 3651 add_action("wp_ajax_byconsolewooodt_admin_fields_setting_files" , "byconsolewooodt_admin_fields_setting_files"); 3652 3653 function byconsolewooodt_admin_fields_setting_files(){ 3654 3655 global $wpdb; 3656 3657 global $woocommerce; 3658 3659 //echo json_encode($_POST); 3660 3661 $bycwooodt_admin_fields = $_POST['bycwooodt_admin_fields']; 3662 3663 $_POST['bycwooodt_admin_fields_val_array']; 3664 3665 update_option($bycwooodt_admin_fields, $_POST['bycwooodt_admin_fields_val_array'] ); 3666 3667 wp_die(); 3668 3669 } 3670 3671 3672 ?> 3735 } 3736 3737 3738 ?> -
byconsole-woo-order-delivery-time/trunk/inc/bycwooodt_language_fields_setting.php
r2761126 r3013867 2 2 3 3 4 5 4 parse_str($bycwooodt_language_translate, $bycwooodt_language_translate_array); 6 5 -
byconsole-woo-order-delivery-time/trunk/readme.txt
r2961224 r3013867 4 4 Tags: WooCommerce, Delivery Date, Pickup Date, Delivery Time, Delivery Slot, Pickup Slot, Pickup Location, WooCommerce Delivery Date, WooCommerce Pickup Date, Delivery Time, Pickup Time, WooCommerce Delivery Time, WooCommerce Pickup Time, Delivery Date Time, WooODT, WooODT Lite. 5 5 Requires at least: 3.5 6 Tested up to: 6. 37 Stable tag: 2.4. 66 Tested up to: 6.4.2 7 Stable tag: 2.4.7 8 8 Requires PHP: 7.4 9 9 WC requires at least: 2.6 10 WC tested up to: 8. 0.110 WC tested up to: 8.4.0 11 11 License: GPLv2 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 345 345 == Change log == 346 346 347 = 2.4.7(25/12/2023) = 348 i) Vulnerability fixed. 349 347 350 = 2.4.6(31/08/2023) = 348 351 i) Undefined index notice resolved on checkout page when "Time field validation" checkbox is unchecked on "ODT Settings" tab on backend at "ODT Management" menu settings page. … … 600 603 == Upgrade Notice == 601 604 602 = 2.4. 6(31/08/2023) =603 i) Undefined index notice resolved on checkout page when "Time field validation" checkbox is unchecked on "ODT Settings" tab on backend at "ODT Management" menu settings page.605 = 2.4.7(25/12/2023) = 606 i) Vulnerability fixed.
Note: See TracChangeset
for help on using the changeset viewer.