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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / includes / admin / meta-boxes / views / html-product-data-inventory.php
woocommerce / includes / admin / meta-boxes / views Last commit date
html-order-download-permission.php 6 years ago html-order-fee.php 3 months ago html-order-item-meta.php 4 years ago html-order-item.php 9 months ago html-order-items.php 1 month ago html-order-notes.php 1 month ago html-order-refund.php 3 months ago html-order-shipping.php 3 months ago html-product-attribute-inner.php 1 month ago html-product-attribute.php 3 years ago html-product-data-advanced.php 5 months ago html-product-data-attributes.php 1 month ago html-product-data-general.php 2 months ago html-product-data-inventory.php 4 months ago html-product-data-linked-products.php 3 months ago html-product-data-panel.php 1 year ago html-product-data-shipping.php 3 years ago html-product-data-variations.php 1 month ago html-product-download.php 4 months ago html-product-variation-download.php 4 months ago html-variation-admin.php 1 month ago
html-product-data-inventory.php
204 lines
1 <?php
2 /**
3 * Displays the inventory tab in the product data meta box.
4 *
5 * @package WooCommerce\Admin
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 ?>
12 <div id="inventory_product_data" class="panel woocommerce_options_panel hidden">
13 <div class="options_group">
14 <?php
15 $info_img_url = WC_ADMIN_IMAGES_FOLDER_URL . '/icons/info.svg';
16
17 if ( wc_product_sku_enabled() ) {
18 woocommerce_wp_text_input(
19 array(
20 'id' => '_sku',
21 'value' => $product_object->get_sku( 'edit' ),
22 'label' => '<abbr title="' . esc_attr__( 'Stock Keeping Unit', 'woocommerce' ) . '">' . esc_html__( 'SKU', 'woocommerce' ) . '</abbr>',
23 'desc_tip' => true,
24 'description' => __( 'SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.', 'woocommerce' ),
25 )
26 );
27 }
28
29 do_action( 'woocommerce_product_options_sku' );
30
31 woocommerce_wp_text_input(
32 array(
33 'id' => '_global_unique_id',
34 'value' => $product_object->get_global_unique_id( 'edit' ),
35 // translators: %1$s GTIN %2$s UPC %3$s EAN %4$s ISBN.
36 'label' => sprintf( __( '%1$s, %2$s, %3$s, or %4$s', 'woocommerce' ), '<abbr title="' . esc_attr__( 'Global Trade Item Number', 'woocommerce' ) . '">' . esc_html__( 'GTIN', 'woocommerce' ) . '</abbr>', '<abbr title="' . esc_attr__( 'Universal Product Code', 'woocommerce' ) . '">' . esc_html__( 'UPC', 'woocommerce' ) . '</abbr>', '<abbr title="' . esc_attr__( 'European Article Number', 'woocommerce' ) . '">' . esc_html__( 'EAN', 'woocommerce' ) . '</abbr>', '<abbr title="' . esc_attr__( 'International Standard Book Number', 'woocommerce' ) . '">' . esc_html__( 'ISBN', 'woocommerce' ) . '</abbr>' ),
37 'desc_tip' => true,
38 'description' => __( 'Enter a barcode or any other identifier unique to this product. It can help you list this product on other channels or marketplaces.', 'woocommerce' ),
39 )
40 );
41
42 do_action( 'woocommerce_product_options_global_unique_id' );
43
44 ?>
45 <div class="inline notice woocommerce-message show_if_variable">
46 <img class="info-icon" src="<?php echo esc_url( $info_img_url ); ?>" />
47 <p>
48 <?php esc_html_e( 'Settings below apply to all variations without manual stock management enabled. ', 'woocommerce' ); ?> <a target="_blank" href="https://woocommerce.com/document/variable-product/"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a>
49 </p>
50 </div>
51 <?php
52
53 if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) {
54
55 woocommerce_wp_checkbox(
56 array(
57 'id' => '_manage_stock',
58 'value' => $product_object->get_manage_stock( 'edit' ) ? 'yes' : 'no',
59 'wrapper_class' => 'show_if_simple show_if_variable',
60 'label' => __( 'Stock management', 'woocommerce' ),
61 'description' => __( 'Track stock quantity for this product', 'woocommerce' ),
62 )
63 );
64
65 do_action( 'woocommerce_product_options_stock' );
66
67 echo '<div class="stock_fields show_if_simple show_if_variable">';
68
69 /**
70 * Filters product default stock amount.
71 *
72 * @since 10.6.0
73 *
74 * @param int $default_stock_amount Default stock amount. Default is 1.
75 */
76 $default_stock_amount = apply_filters( 'woocommerce_product_stock_default_amount', 1 );
77
78 woocommerce_wp_text_input(
79 array(
80 'id' => '_stock',
81 'value' => wc_stock_amount( $product_object->get_stock_quantity( 'edit' ) ?? $default_stock_amount ),
82 'label' => __( 'Quantity', 'woocommerce' ),
83 'desc_tip' => true,
84 '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' ),
85 'type' => 'number',
86 'custom_attributes' => array(
87 'step' => 'any',
88 ),
89 'data_type' => 'stock',
90 )
91 );
92
93 echo '<input type="hidden" name="_original_stock" value="' . esc_attr( wc_stock_amount( $product_object->get_stock_quantity( 'edit' ) ) ) . '" />';
94
95 $backorder_args = array(
96 'id' => '_backorders',
97 'value' => $product_object->get_backorders( 'edit' ),
98 'label' => __( 'Allow backorders?', 'woocommerce' ),
99 'options' => wc_get_product_backorder_options(),
100 );
101
102 /**
103 * Allow 3rd parties to control whether "Allow backorder?" option will use radio buttons or a select.
104 *
105 * @since 7.6.0
106 *
107 * @param bool If false, "Allow backorders?" will be shown as a select. Default: it will use radio buttons.
108 */
109 if ( apply_filters( 'woocommerce_product_allow_backorder_use_radio', true ) ) {
110 woocommerce_wp_radio( $backorder_args );
111 } else {
112 woocommerce_wp_select( $backorder_args );
113 }
114
115 woocommerce_wp_text_input(
116 array(
117 'id' => '_low_stock_amount',
118 'value' => $product_object->get_low_stock_amount( 'edit' ),
119 'placeholder' => sprintf(
120 /* translators: %d: Amount of stock left */
121 esc_attr__( 'Store-wide threshold (%d)', 'woocommerce' ),
122 esc_attr( get_option( 'woocommerce_notify_low_stock_amount' ) )
123 ),
124 'label' => __( 'Low stock threshold', 'woocommerce' ),
125 'desc_tip' => true,
126 'description' => __( 'When product stock reaches this amount you will be notified by email. It is possible to define different values for each variation individually. The shop default value can be set in Settings > Products > Inventory.', 'woocommerce' ),
127 'type' => 'number',
128 'custom_attributes' => array(
129 'step' => 'any',
130 ),
131 )
132 );
133
134 do_action( 'woocommerce_product_options_stock_fields' );
135
136 echo '</div>';
137 } else {
138
139 woocommerce_wp_note(
140 array(
141 'id' => '_manage_stock_disabled',
142 'label' => __( 'Stock management', 'woocommerce' ),
143 'label-aria-label' => __( 'Stock management disabled in store settings', 'woocommerce' ),
144 'message' => sprintf(
145 /* translators: %s: url for store settings */
146 __( 'Disabled in <a href="%s" aria-label="stock management store settings">store settings</a>.', 'woocommerce' ),
147 esc_url( 'admin.php?page=wc-settings&tab=products&section=inventory' )
148 ),
149 'wrapper_class' => 'show_if_simple show_if_variable',
150 )
151 );
152
153 }
154
155 $stock_status_options = wc_get_product_stock_status_options();
156 $stock_status_count = count( $stock_status_options );
157 $stock_status_args = array(
158 'id' => '_stock_status',
159 'value' => $product_object->get_stock_status( 'edit' ),
160 'wrapper_class' => 'stock_status_field hide_if_variable hide_if_external hide_if_grouped',
161 'label' => __( 'Stock status', 'woocommerce' ),
162 'options' => $stock_status_options,
163 'desc_tip' => true,
164 'description' => __( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ),
165 );
166
167 /**
168 * Allow 3rd parties to control whether the "Stock status" option will use radio buttons or a select.
169 *
170 * @since 7.6.0
171 *
172 * @param bool If false, the "Stock status" will be shown as a select. Default: it will use radio buttons.
173 */
174 if ( apply_filters( 'woocommerce_product_stock_status_use_radio', $stock_status_count <= 3 && $stock_status_count >= 1 ) ) {
175 woocommerce_wp_radio( $stock_status_args );
176 } else {
177 woocommerce_wp_select( $stock_status_args );
178 }
179
180 do_action( 'woocommerce_product_options_stock_status' );
181 ?>
182 </div>
183
184 <div class="inventory_sold_individually options_group show_if_simple show_if_variable">
185 <?php
186 woocommerce_wp_checkbox(
187 array(
188 'id' => '_sold_individually',
189 'value' => $product_object->get_sold_individually( 'edit' ) ? 'yes' : 'no',
190 'wrapper_class' => 'show_if_simple show_if_variable',
191 'label' => __( 'Sold individually', 'woocommerce' ),
192 'description' => __( 'Limit purchases to 1 item per order', 'woocommerce' ),
193 )
194 );
195
196 echo wc_help_tip( __( 'Check to let customers to purchase only 1 item in a single order. This is particularly useful for items that have limited quantity, for example art or handmade goods.', 'woocommerce' ) );
197
198 do_action( 'woocommerce_product_options_sold_individually' );
199 ?>
200 </div>
201
202 <?php do_action( 'woocommerce_product_options_inventory_product_data' ); ?>
203 </div>
204