improved handling of stock options to save changes to a variable product
This commit is contained in:
parent
928e4ae4c0
commit
bce502f455
|
@ -1450,10 +1450,11 @@ class WC_Meta_Box_Product_Data {
|
|||
$variation_id = absint( $variable_post_id[ $i ] );
|
||||
|
||||
// Checkboxes
|
||||
$is_virtual = isset( $variable_is_virtual[ $i ] ) ? 'yes' : 'no';
|
||||
$is_downloadable = isset( $variable_is_downloadable[ $i ] ) ? 'yes' : 'no';
|
||||
$post_status = isset( $variable_enabled[ $i ] ) ? 'publish' : 'private';
|
||||
$manage_stock = isset( $variable_manage_stock[ $i ] ) ? 'yes' : 'no';
|
||||
$is_virtual = isset( $variable_is_virtual[ $i ] ) ? 'yes' : 'no';
|
||||
$is_downloadable = isset( $variable_is_downloadable[ $i ] ) ? 'yes' : 'no';
|
||||
$post_status = isset( $variable_enabled[ $i ] ) ? 'publish' : 'private';
|
||||
$parent_manage_stock = isset( $_POST['_manage_stock'] ) ? 'yes' : 'no';
|
||||
$manage_stock = ( isset( $variable_manage_stock[ $i ] ) && 'yes' == $parent_manage_stock ) ? 'yes' : 'no';
|
||||
|
||||
// Generate a useful post title
|
||||
$variation_post_title = sprintf( __( 'Variation #%s of %s', 'woocommerce' ), absint( $variation_id ), esc_html( get_the_title( $post_id ) ) );
|
||||
|
|
Loading…
Reference in New Issue