PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.1
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.1
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / advanced-reviews / class-product-dummy-data.php

class-product-dummy-data.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.1, at inc/modules/advanced-reviews/class-product-dummy-data.php

43 lines 645 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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