ID ); $regular_price_max=$_product->get_regular_price(); $regular_price=get_post_meta($post->ID, 'phoen_regular_price',true); $gen_settings=get_post_meta( $post->ID, 'phoen_arbpw_calander_mode', true ); $restrict_days=isset($gen_settings["restrict_days"])?$gen_settings["restrict_days"]:''; if(empty($gen_settings)){ $work_hours=isset($gen_settings["work_hours"])?'':1; $product_enable_book=1; }else{ $product_enable_book=$gen_settings['product_enable_book']; $work_hours=isset($gen_settings["work_hours"])?$gen_settings["work_hours"]:''; } $working_hours=isset($gen_settings['working_hours'])?$gen_settings['working_hours']:''; $timeslot=isset($gen_settings['timeslot'])?$gen_settings['timeslot']:''; if($working_hours !=='' && is_array($working_hours)){ $fromTime=$working_hours['fromTime']; $toTime=$working_hours['toTime']; $start_time = date("h:i a", strtotime($fromTime)); $end_time = date("h:i a", strtotime($toTime)); } ?>
$start_date, 'toTime'=>$end_date, ); } $minimum_booking=isset($_POST['minimum_booking'])?sanitize_text_field($_POST['minimum_booking']):''; $maximum_booking=isset($_POST['maximum_booking'])?sanitize_text_field($_POST['maximum_booking']):''; $first_booking=isset($_POST['first_booking'])?sanitize_text_field($_POST['first_booking']):''; $first_day=isset($_POST['first_day'])?sanitize_text_field($_POST['first_day']):''; $timeslot=isset($_POST['timeslot'])?sanitize_text_field($_POST['timeslot']):''; $product_type=isset($_POST['product-type'])?sanitize_text_field($_POST['product-type']):''; $product_price= isset($_POST['_regular_price1']) ? absint($_POST['_regular_price1']):'0'; if(isset($_POST['_regular_price1'])){ update_post_meta( $post_id, 'phoen_regular_price', "$product_price" ); } $phoe_arbpw_value = array( 'product_enable_book'=>$enable_book, 'product_calc_mode'=>$calc_mode, 'product_days_to_sel'=>$days_to_sel, 'pickertype'=>$pickertype, 'work_hours'=>$work_hours, 'working_hours'=>$wh, 'timeslot'=>$timeslot, 'minimum_booking'=>$minimum_booking, 'maximum_booking'=>$maximum_booking, 'first_booking'=>$first_booking, 'first_day'=>$first_day ); update_post_meta( $post_id, 'phoen_arbpw_calander_mode', $phoe_arbpw_value ); } add_action('woocommerce_process_product_meta', 'phoen_arbpw_process_product_meta_custom_tab_calander'); add_action('woocommerce_product_data_panels', 'phoen_arbpw_custom_tab_options_calander'); ?>