| @@ 392-394 (lines=3) @@ | ||
| 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'] ) ) ) ); |
|
| 394 | } |
|
| 395 | ||
| 396 | if ( isset( $data['exclude_product_ids'] ) ) { |
|
| 397 | update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) ) ); |
|
| @@ 396-398 (lines=3) @@ | ||
| 393 | update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) ); |
|
| 394 | } |
|
| 395 | ||
| 396 | if ( isset( $data['exclude_product_ids'] ) ) { |
|
| 397 | update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) ) ); |
|
| 398 | } |
|
| 399 | ||
| 400 | if ( isset( $data['usage_limit'] ) ) { |
|
| 401 | update_post_meta( $id, 'usage_limit', absint( $data['usage_limit'] ) ); |
|
| @@ 478-480 (lines=3) @@ | ||
| 475 | update_post_meta( $id, 'individual_use', ( $this->is_true( $data['individual_use'] ) ) ? 'yes' : 'no' ); |
|
| 476 | } |
|
| 477 | ||
| 478 | if ( isset( $data['product_ids'] ) ) { |
|
| 479 | update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) ); |
|
| 480 | } |
|
| 481 | ||
| 482 | if ( isset( $data['exclude_product_ids'] ) ) { |
|
| 483 | update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) ) ); |
|
| @@ 482-484 (lines=3) @@ | ||
| 479 | update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $data['product_ids'] ) ) ) ); |
|
| 480 | } |
|
| 481 | ||
| 482 | if ( isset( $data['exclude_product_ids'] ) ) { |
|
| 483 | update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $data['exclude_product_ids'] ) ) ) ); |
|
| 484 | } |
|
| 485 | ||
| 486 | if ( isset( $data['usage_limit'] ) ) { |
|
| 487 | update_post_meta( $id, 'usage_limit', absint( $data['usage_limit'] ) ); |
|