You've already forked wc-composable-product
29 lines
619 B
PHP
29 lines
619 B
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* Minimal WC_Order_Item_Product stub for unit testing.
|
||
|
|
*/
|
||
|
|
class WC_Order_Item_Product extends WC_Data {
|
||
|
|
protected $product = null;
|
||
|
|
protected $quantity = 1;
|
||
|
|
|
||
|
|
public function get_product() {
|
||
|
|
return $this->product;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function set_product($product) {
|
||
|
|
$this->product = $product;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function get_quantity() {
|
||
|
|
return $this->quantity;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function set_quantity($quantity) {
|
||
|
|
$this->quantity = $quantity;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function add_meta_data($key, $value, $unique = false) {
|
||
|
|
$this->meta_data[$key] = $value;
|
||
|
|
}
|
||
|
|
}
|