Product_Rating::get_data()

Summary

No summary available.

Source

File: src/BigCommerce/Templates/Product_Rating.php

	public function get_data() {
		/** @var Product $product */
		$product    = $this->options[ self::PRODUCT ];
		$sum        = $product->reviews_rating_sum;
		$count      = $product->reviews_count;
		$percentage = $this->get_percentage( $sum, $count );
		$stars      = $this->get_stars( $sum, $count );
		$permalink  = $this->options[ self::LINK ];

		return [
			self::PRODUCT    => $product,
			self::STARS      => $stars,
			self::PERCENTAGE => $percentage,
			self::COUNT      => $count,
			self::LINK       => $permalink,
		];
	}

User Contributed Notes

You must log in before being able to contribute a note or feedback.