| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Product with dummy data. |
| 5 |
* A class to generate dummy data for product. Useful to render product module preview. |
| 6 |
* |
| 7 |
* @package Merchant |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit; // Exit if accessed directly |
| 12 |
} |
| 13 |
|
| 14 |
class Merchant_Product_Dummy { |
| 15 |
|
| 16 |
/** |
| 17 |
* Get id. |
| 18 |
* |
| 19 |
* @return int $id Product id. |
| 20 |
*/ |
| 21 |
public function get_id() { |
| 22 |
return 0; |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Get review count. |
| 27 |
* |
| 28 |
* @return int $review_count Review count. |
| 29 |
*/ |
| 30 |
public function get_review_count() { |
| 31 |
return 3; |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* Get average rating. |
| 36 |
* |
| 37 |
* @return int $average_rating Average rating. |
| 38 |
*/ |
| 39 |
public function get_average_rating() { |
| 40 |
return 3.50; |
| 41 |
} |
| 42 |
} |
| 43 |
|