This commit is contained in:
Mike Jolley 2017-03-01 15:05:24 +00:00
parent 3508578831
commit 2dd8ec743a
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
if ( $data instanceof WC_Coupon ) { if ( $data instanceof WC_Coupon ) {
$this->set_id( absint( $data->get_id() ) ); $this->set_id( absint( $data->get_id() ) );
} elseif ( $coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $data ) ) { } elseif ( $coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $data ) ) {
wc_doing_it_wrong( 'woocommerce_get_shop_coupon_data', 'Reading a manual coupon via woocommerce_get_shop_coupon_data has been deprecated. Please sent an instance of WC_Coupon instead.', '2.7' ); wc_doing_it_wrong( 'woocommerce_get_shop_coupon_data', 'Reading a manual coupon via woocommerce_get_shop_coupon_data has been deprecated. Please create an instance of WC_Coupon instead.', '2.7' );
$this->read_manual_coupon( $data, $coupon ); $this->read_manual_coupon( $data, $coupon );
} elseif ( is_numeric( $data ) && 'shop_coupon' === get_post_type( $data ) ) { } elseif ( is_numeric( $data ) && 'shop_coupon' === get_post_type( $data ) ) {
$this->set_id( $data ); $this->set_id( $data );