includes/api/class-wc-api-coupons.php 1 location
|
@@ 416-418 (lines=3) @@
|
| 413 |
|
update_post_meta( $id, 'usage_count', absint( $data['usage_count'] ) ); |
| 414 |
|
} |
| 415 |
|
|
| 416 |
|
if ( isset( $data['expiry_date'] ) ) { |
| 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' ); |
includes/cli/class-wc-cli-coupon.php 1 location
|
@@ 502-504 (lines=3) @@
|
| 499 |
|
update_post_meta( $id, 'usage_count', absint( $data['usage_count'] ) ); |
| 500 |
|
} |
| 501 |
|
|
| 502 |
|
if ( isset( $data['expiry_date'] ) ) { |
| 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' ); |