| @@ 742-745 (lines=4) @@ | ||
| 739 | * Set the price |
|
| 740 | */ |
|
| 741 | public function set_price($data,$id) { |
|
| 742 | if(isset($data['price']) && ''!== $data['price']){ |
|
| 743 | $price = preg_replace("/[^0-9,.]/", "", $data['price']); |
|
| 744 | $this->save_custom_field($price,'price',$id); |
|
| 745 | } |
|
| 746 | } |
|
| 747 | ||
| 748 | /** |
|
| @@ 752-756 (lines=5) @@ | ||
| 749 | * Set the duration |
|
| 750 | */ |
|
| 751 | public function set_duration($data,$id) { |
|
| 752 | if(isset($data['days']) && !empty($data['days'])){ |
|
| 753 | $price = $data['days']; |
|
| 754 | $price = preg_replace("/[^0-9,.]/", "", $price); |
|
| 755 | $this->save_custom_field($price,'duration',$id); |
|
| 756 | } |
|
| 757 | } |
|
| 758 | ||
| 759 | ||