|
@@ 2419-2425 (lines=7) @@
|
| 2416 |
|
* @param array $variations |
| 2417 |
|
* @param array $data |
| 2418 |
|
*/ |
| 2419 |
|
private static function variation_bulk_action_toggle_downloadable( $variations, $data ) { |
| 2420 |
|
foreach ( $variations as $variation_id ) { |
| 2421 |
|
$_downloadable = get_post_meta( $variation_id, '_downloadable', true ); |
| 2422 |
|
$is_downloadable = 'no' === $_downloadable ? 'yes' : 'no'; |
| 2423 |
|
update_post_meta( $variation_id, '_downloadable', wc_clean( $is_downloadable ) ); |
| 2424 |
|
} |
| 2425 |
|
} |
| 2426 |
|
|
| 2427 |
|
/** |
| 2428 |
|
* Bulk action - Toggle Virtual Checkbox. |
|
@@ 2434-2440 (lines=7) @@
|
| 2431 |
|
* @param array $variations |
| 2432 |
|
* @param array $data |
| 2433 |
|
*/ |
| 2434 |
|
private static function variation_bulk_action_toggle_virtual( $variations, $data ) { |
| 2435 |
|
foreach ( $variations as $variation_id ) { |
| 2436 |
|
$_virtual = get_post_meta( $variation_id, '_virtual', true ); |
| 2437 |
|
$is_virtual = 'no' === $_virtual ? 'yes' : 'no'; |
| 2438 |
|
update_post_meta( $variation_id, '_virtual', wc_clean( $is_virtual ) ); |
| 2439 |
|
} |
| 2440 |
|
} |
| 2441 |
|
|
| 2442 |
|
/** |
| 2443 |
|
* Bulk action - Toggle Manage Stock Checkbox. |