Add setter for description and delivery_time
This commit is contained in:
parent
e648edf38f
commit
081b1f9a33
|
@ -166,6 +166,26 @@ class WC_Shipping_Rate {
|
|||
$this->data['taxes'] = ! empty( $taxes ) && is_array( $taxes ) ? $taxes : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set rate description.
|
||||
*
|
||||
* @since 9.2.0
|
||||
* @param string $description Shipping rate description.
|
||||
*/
|
||||
public function set_description( $description ) {
|
||||
$this->data['description'] = (string) $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set rate delivery time.
|
||||
*
|
||||
* @since 9.2.0
|
||||
* @param string $delivery_time Shipping rate delivery time.
|
||||
*/
|
||||
public function set_delivery_time( $delivery_time ) {
|
||||
$this->data['delivery_time'] = (string) $delivery_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID for the rate. This is usually a combination of the method and instance IDs.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue