Merge pull request #12334 from sabbir1991/master

Fix toggle download and virtual in variation bulk action #12333
This commit is contained in:
Claudio Sanches 2016-11-14 14:11:30 -02:00 committed by GitHub
commit 60f1fcf9e3
1 changed files with 2 additions and 2 deletions

View File

@ -2399,7 +2399,7 @@ class WC_AJAX {
foreach ( $variations as $variation_id ) {
$_downloadable = get_post_meta( $variation_id, '_downloadable', true );
$is_downloadable = 'no' === $_downloadable ? 'yes' : 'no';
update_post_meta( $variation_id, '_downloadable', wc_clean( $is_downloadable ) );
update_post_meta( $variation_id, '_downloadable', $is_downloadable );
}
}
@ -2414,7 +2414,7 @@ class WC_AJAX {
foreach ( $variations as $variation_id ) {
$_virtual = get_post_meta( $variation_id, '_virtual', true );
$is_virtual = 'no' === $_virtual ? 'yes' : 'no';
update_post_meta( $variation_id, '_virtual', wc_clean( $is_virtual ) );
update_post_meta( $variation_id, '_virtual', $is_virtual );
}
}