| @@ 420-422 (lines=3) @@ | ||
| 417 | update_post_meta( $id, 'expiry_date', $this->get_coupon_expiry_date( wc_clean( $data['expiry_date'] ) ) ); |
|
| 418 | } |
|
| 419 | ||
| 420 | if ( isset( $data['enable_free_shipping'] ) ) { |
|
| 421 | update_post_meta( $id, 'free_shipping', ( true === $data['enable_free_shipping'] ) ? 'yes' : 'no' ); |
|
| 422 | } |
|
| 423 | ||
| 424 | if ( isset( $data['product_category_ids'] ) ) { |
|
| 425 | update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $data['product_category_ids'] ) ) ); |
|
| @@ 506-508 (lines=3) @@ | ||
| 503 | update_post_meta( $id, 'expiry_date', $this->get_coupon_expiry_date( wc_clean( $data['expiry_date'] ) ) ); |
|
| 504 | } |
|
| 505 | ||
| 506 | if ( isset( $data['enable_free_shipping'] ) ) { |
|
| 507 | update_post_meta( $id, 'free_shipping', ( $this->is_true( $data['enable_free_shipping'] ) ) ? 'yes' : 'no' ); |
|
| 508 | } |
|
| 509 | ||
| 510 | if ( isset( $data['product_category_ids'] ) ) { |
|
| 511 | update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $data['product_category_ids'] ) ) ); |
|