[REST API] Fixed values of product download type

This commit is contained in:
Claudio Sanches 2016-05-31 17:44:09 -03:00
parent 4dde06234a
commit e24e44ae09
1 changed files with 1 additions and 1 deletions

View File

@ -1240,7 +1240,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
// Download type.
if ( isset( $request['download_type'] ) ) {
update_post_meta( $product->id, '_download_type', wc_clean( $request['download_type'] ) );
update_post_meta( $product->id, '_download_type', 'standard' === $request['download_type'] ? '' : wc_clean( $request['download_type'] ) );
}
}