WC_Coupon::set_short_info
Sets the coupon parameters from a reapply information set generated with 'get_short_info'.
Method of the class: WC_Coupon{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Coupon = new WC_Coupon(); $WC_Coupon->set_short_info( $info );
- $info(string) (required)
- JSON string with reapply information as returned by
'get_short_info'.
WC_Coupon::set_short_info() WC Coupon::set short info code WC 10.7.0
public function set_short_info( string $info ) {
$data = self::parse_short_info( $info );
$this->set_id( $data['id'] );
$this->set_code( $data['code'] );
$this->set_discount_type_core( $data['discount_type'], false );
$this->set_amount( $data['amount'] );
$this->set_free_shipping( $data['free_shipping'] );
}