Edit coupon, save product ID's in comma separates values as per core

This commit is contained in:
Gerhard 2014-03-06 08:52:34 +02:00
parent 518a8cffb2
commit ae85e64b2b
1 changed files with 2 additions and 2 deletions

View File

@ -342,11 +342,11 @@ class WC_API_Coupons extends WC_API_Resource {
}
if ( isset( $data['product_ids'] ) ) {
update_post_meta( $id, 'product_ids', array_filter( array_map( 'intval', $data['product_ids'] ) ) );
update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) );
}
if ( isset( $data['exclude_product_ids'] ) ) {
update_post_meta( $id, 'exclude_product_ids', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) );
update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) ) );
}
if ( isset( $data['usage_limit'] ) ) {