| @@ 388-390 (lines=3) @@ | ||
| 385 | update_post_meta( $id, 'coupon_amount', wc_format_decimal( $data['amount'] ) ); |
|
| 386 | } |
|
| 387 | ||
| 388 | if ( isset( $data['individual_use'] ) ) { |
|
| 389 | update_post_meta( $id, 'individual_use', ( true === $data['individual_use'] ) ? 'yes' : 'no' ); |
|
| 390 | } |
|
| 391 | ||
| 392 | if ( isset( $data['product_ids'] ) ) { |
|
| 393 | update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) ); |
|
| @@ 478-480 (lines=3) @@ | ||
| 475 | update_post_meta( $id, 'coupon_amount', wc_format_decimal( $data['amount'] ) ); |
|
| 476 | } |
|
| 477 | ||
| 478 | if ( isset( $data['individual_use'] ) ) { |
|
| 479 | update_post_meta( $id, 'individual_use', ( true === $data['individual_use'] ) ? 'yes' : 'no' ); |
|
| 480 | } |
|
| 481 | ||
| 482 | if ( isset( $data['product_ids'] ) ) { |
|
| 483 | update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) ); |
|