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:
parent
4afeb7926c
commit
a45061b456
|
@ -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' ) ) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue