parent
59d3fb5224
commit
753a22734f
|
@ -800,7 +800,6 @@ class WC_Meta_Box_Product_Data {
|
|||
$variation_data['_thumbnail_id'] = absint( $variation_data['_thumbnail_id'] );
|
||||
$variation_data['image'] = $variation_data['_thumbnail_id'] ? wp_get_attachment_thumb_url( $variation_data['_thumbnail_id'] ) : '';
|
||||
$variation_data['shipping_class'] = $shipping_classes && ! is_wp_error( $shipping_classes ) ? current( $shipping_classes )->term_id : '';
|
||||
$variation_data['_stock'] = wc_stock_amount( $variation_data['_stock'] );
|
||||
|
||||
// Stock BW compat
|
||||
if ( '' !== $variation_data['_stock'] ) {
|
||||
|
|
|
@ -112,7 +112,7 @@ extract( $variation_data );
|
|||
<div class="show_if_variation_manage_stock" style="display: none;">
|
||||
<p class="form-row form-row-first">
|
||||
<label><?php _e( 'Stock Qty:', 'woocommerce' ); ?> <a class="tips" data-tip="<?php _e( 'Enter a quantity to enable stock management at variation level, or leave blank to use the parent product\'s options.', 'woocommerce' ); ?>" href="#">[?]</a></label>
|
||||
<input type="number" size="5" name="variable_stock[<?php echo $loop; ?>]" value="<?php if ( isset( $_stock ) ) echo esc_attr( $_stock ); ?>" step="any" />
|
||||
<input type="number" size="5" name="variable_stock[<?php echo $loop; ?>]" value="<?php if ( isset( $_stock ) ) echo esc_attr( wc_stock_amount( $_stock ) ); ?>" step="any" />
|
||||
</p>
|
||||
<p class="form-row form-row-last">
|
||||
<label><?php _e( 'Allow Backorders?', 'woocommerce' ); ?></label>
|
||||
|
|
Loading…
Reference in New Issue