Update class-wc-admin-cpt-product.php

To handle bulk edit of "Sold Individually".
(The view part will follow in the next edit)
This commit is contained in:
Gregory Karpinsky 2014-04-18 16:13:13 -04:00
parent 4afeb7926c
commit a45061b456
1 changed files with 10 additions and 0 deletions

View File

@ -859,6 +859,16 @@ class WC_Admin_CPT_Product extends WC_Admin_CPT {
if ( ! empty( $_REQUEST['_featured'] ) )
update_post_meta( $post_id, '_featured', stripslashes( $_REQUEST['_featured'] ) );
// Sold Individually
if ( ! empty( $_REQUEST['_sold_individually'] ) ) {
if ( $_REQUEST['_sold_individually'] == 'yes' ) {
update_post_meta( $post_id, '_sold_individually', 'yes' );
}
else {
update_post_meta( $post_id, '_sold_individually', '' );
}
}
// Handle price - remove dates and set to lowest
if ( $product->is_type( 'simple' ) || $product->is_type( 'external' ) ) {