/** * Load Shipping and tax content * * @since 2.4 * * @param object $post * @param integer $post_id * * @return void */ public function load_shipping_tax_content($post, $post_id) { $user_id = get_current_user_id(); $processing_time = dokan_get_shipping_processing_times(); $_required_tax = get_post_meta($post_id, '_required_tax', true); $_disable_shipping = get_post_meta($post_id, '_disable_shipping', true) ? get_post_meta($post_id, '_disable_shipping', true) : 'no'; $_additional_price = get_post_meta($post_id, '_additional_price', true); $_additional_qty = get_post_meta($post_id, '_additional_qty', true); $_processing_time = get_post_meta($post_id, '_dps_processing_time', true); $dps_shipping_type_price = get_user_meta($user_id, '_dps_shipping_type_price', true); $dps_additional_qty = get_user_meta($user_id, '_dps_additional_qty', true); $dps_pt = get_user_meta($user_id, '_dps_pt', true); $classes_options = $this->get_tax_class_option(); $porduct_shipping_pt = $_processing_time ? $_processing_time : $dps_pt; dokan_get_template_part('products/product-shipping-content', '', array('pro' => true, 'post' => $post, 'post_id' => $post_id, 'user_id' => $user_id, 'processing_time' => $processing_time, '_required_tax' => $_required_tax, '_disable_shipping' => $_disable_shipping, '_additional_price' => $_additional_price, '_additional_qty' => $_additional_qty, '_processing_time' => $_processing_time, 'dps_shipping_type_price' => $dps_shipping_type_price, 'dps_additional_qty' => $dps_additional_qty, 'dps_pt' => $dps_pt, 'classes_options' => $classes_options, 'porduct_shipping_pt' => $porduct_shipping_pt)); }
<?php global $post; $user_id = get_current_user_id(); $processing_time = dokan_get_shipping_processing_times(); $_additional_price = get_post_meta($post->ID, '_additional_price', true); $_additional_qty = get_post_meta($post->ID, '_additional_qty', true); $_processing_time = get_post_meta($post->ID, '_dps_processing_time', true); $dps_shipping_type_price = get_user_meta($user_id, '_dps_shipping_type_price', true); $dps_additional_qty = get_user_meta($user_id, '_dps_additional_qty', true); $dps_pt = get_user_meta($user_id, '_dps_pt', true); $porduct_shipping_pt = $_processing_time ? $_processing_time : $dps_pt; ?> <?php do_action('dokan_product_options_shipping_before'); ?> <div class="dokan-form-horizontal dokan-product-shipping"> <input type="hidden" name="product_shipping_class" value="0"> <?php if ('yes' == get_option('woocommerce_calc_shipping')) { ?> <div class="dokan-form-group"> <label class="dokan-w4 dokan-control-label" for="_disable_shipping"><?php _e('Disable Shipping', 'dokan'); ?> </label> <div class="dokan-w8 dokan-text-left"> <?php dokan_post_input_box($post->ID, '_disable_shipping', array('label' => __('Disable shipping for this product', 'dokan')), 'checkbox');
/** * Get a single processing time string * * @param string $index * @return string */ function dokan_get_processing_time_value($index) { $times = dokan_get_shipping_processing_times(); if (isset($times[$index])) { return $times[$index]; } }