parent
c5055ed2f7
commit
504a216582
|
@ -165,11 +165,13 @@ class WC_Order_Item_Product extends WC_Order_Item {
|
|||
*
|
||||
* @param array $data Key/Value pairs
|
||||
*/
|
||||
public function set_variation( $data ) {
|
||||
public function set_variation( $data = array() ) {
|
||||
if ( is_array( $data ) ) {
|
||||
foreach ( $data as $key => $value ) {
|
||||
$this->add_meta_data( str_replace( 'attribute_', '', $key ), $value, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set properties based on passed in product object.
|
||||
|
|
Loading…
Reference in New Issue