| @@ 364-366 (lines=3) @@ | ||
| 361 | update_post_meta( $post->ID, 'individual_use', ( true === $request['individual_use'] ) ? 'yes' : 'no' ); |
|
| 362 | } |
|
| 363 | ||
| 364 | if ( isset( $request['product_ids'] ) ) { |
|
| 365 | update_post_meta( $post->ID, 'product_ids', implode( ',', array_filter( array_map( 'intval', $request['product_ids'] ) ) ) ); |
|
| 366 | } |
|
| 367 | ||
| 368 | if ( isset( $request['exclude_product_ids'] ) ) { |
|
| 369 | update_post_meta( $post->ID, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $request['exclude_product_ids'] ) ) ) ); |
|
| @@ 368-370 (lines=3) @@ | ||
| 365 | update_post_meta( $post->ID, 'product_ids', implode( ',', array_filter( array_map( 'intval', $request['product_ids'] ) ) ) ); |
|
| 366 | } |
|
| 367 | ||
| 368 | if ( isset( $request['exclude_product_ids'] ) ) { |
|
| 369 | update_post_meta( $post->ID, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $request['exclude_product_ids'] ) ) ) ); |
|
| 370 | } |
|
| 371 | ||
| 372 | if ( isset( $request['usage_limit'] ) ) { |
|
| 373 | update_post_meta( $post->ID, 'usage_limit', absint( $request['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'] ) ); |
|