* @since 2.5.0 * * @param int $loop * @param array $variation_data * @param WP_Post $variation */ do_action('woocommerce_variation_options_inventory', $loop, $variation_data, $variation); ?> </div> <?php } ?> <div> <?php woocommerce_wp_select(array('id' => "variable_stock_status{$loop}", 'name' => "variable_stock_status[{$loop}]", 'value' => $variation_object->get_stock_status('edit'), 'label' => __('Stock status', 'woocommerce'), 'options' => wc_get_product_stock_status_options(), 'desc_tip' => true, 'description' => __('Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce'), 'wrapper_class' => 'form-row form-row-full')); if (wc_product_weight_enabled()) { /* translators: %s: weight unit */ $label = sprintf(__('Weight (%s)', 'woocommerce'), esc_html(get_option('woocommerce_weight_unit'))); woocommerce_wp_text_input(array('id' => "variable_weight{$loop}", 'name' => "variable_weight[{$loop}]", 'value' => wc_format_localized_decimal($variation_object->get_weight('edit')), 'placeholder' => wc_format_localized_decimal($product_object->get_weight()), 'label' => $label, 'desc_tip' => true, 'description' => __('Weight in decimal form', 'woocommerce'), 'type' => 'text', 'data_type' => 'decimal', 'wrapper_class' => 'form-row form-row-first hide_if_variation_virtual')); } if (wc_product_dimensions_enabled()) { ?> <p class="form-field form-row dimensions_field hide_if_variation_virtual form-row-last"> <label for="product_length"><?php /* translators: %s: dimension unit */ printf(__('Dimensions (L×W×H) (%s)', 'woocommerce'), get_option('woocommerce_dimension_unit')); ?> </label> <?php echo wc_help_tip(__('Length x width x height in decimal form', 'woocommerce'));
<input type="checkbox" name="_featured" value="1"> <span class="checkbox-title"><?php _e('Featured', 'woocommerce'); ?> </span> </label> <br class="clear" /> <label class="alignleft"> <span class="title"><?php _e('In stock?', 'woocommerce'); ?> </span> <span class="input-text-wrap"> <select class="stock_status" name="_stock_status"> <?php foreach (wc_get_product_stock_status_options() as $key => $value) { echo '<option value="' . esc_attr($key) . '">' . $value . '</option>'; } ?> </select> </span> </label> <div class="stock_fields"> <?php if (get_option('woocommerce_manage_stock') == 'yes') { ?> <label class="alignleft manage_stock"> <input type="checkbox" name="_manage_stock" value="1"> <span class="checkbox-title"><?php
<div class="options_group"> <?php if (wc_product_sku_enabled()) { woocommerce_wp_text_input(array('id' => '_sku', 'value' => $product_object->get_sku('edit'), 'label' => '<abbr title="' . __('Stock Keeping Unit', 'woocommerce') . '">' . __('SKU', 'woocommerce') . '</abbr>', 'desc_tip' => true, 'description' => __('SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.', 'woocommerce'))); } do_action('woocommerce_product_options_sku'); if ('yes' === get_option('woocommerce_manage_stock')) { woocommerce_wp_checkbox(array('id' => '_manage_stock', 'value' => $product_object->get_manage_stock('edit') ? 'yes' : 'no', 'wrapper_class' => 'show_if_simple show_if_variable', 'label' => __('Manage stock?', 'woocommerce'), 'description' => __('Enable stock management at product level', 'woocommerce'))); do_action('woocommerce_product_options_stock'); echo '<div class="stock_fields show_if_simple show_if_variable">'; woocommerce_wp_text_input(array('id' => '_stock', 'value' => $product_object->get_stock_quantity('edit'), 'label' => __('Stock quantity', 'woocommerce'), 'desc_tip' => true, 'description' => __('Stock quantity. If this is a variable product this value will be used to control stock for all variations, unless you define stock at variation level.', 'woocommerce'), 'type' => 'number', 'custom_attributes' => array('step' => 'any'), 'data_type' => 'stock')); woocommerce_wp_select(array('id' => '_backorders', 'value' => $product_object->get_backorders('edit'), 'label' => __('Allow backorders?', 'woocommerce'), 'options' => wc_get_product_backorder_options(), 'desc_tip' => true, 'description' => __('If managing stock, this controls whether or not backorders are allowed. If enabled, stock quantity can go below 0.', 'woocommerce'))); do_action('woocommerce_product_options_stock_fields'); echo '</div>'; } woocommerce_wp_select(array('id' => '_stock_status', 'value' => $product_object->get_stock_status('edit'), 'wrapper_class' => 'hide_if_variable hide_if_external', 'label' => __('Stock status', 'woocommerce'), 'options' => wc_get_product_stock_status_options(), 'desc_tip' => true, 'description' => __('Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce'))); do_action('woocommerce_product_options_stock_status'); ?> </div> <div class="options_group show_if_simple show_if_variable"> <?php woocommerce_wp_checkbox(array('id' => '_sold_individually', 'value' => $product_object->get_sold_individually('edit') ? 'yes' : 'no', 'wrapper_class' => 'show_if_simple show_if_variable', 'label' => __('Sold individually', 'woocommerce'), 'description' => __('Enable this to only allow one of this item to be bought in a single order', 'woocommerce'))); do_action('woocommerce_product_options_sold_individually'); ?> </div> <?php do_action('woocommerce_product_options_inventory_product_data'); ?> </div>