Merge pull request #12334 from sabbir1991/master
Fix toggle download and virtual in variation bulk action #12333
This commit is contained in:
commit
60f1fcf9e3
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue