All product prices are wrapped in `span class=“amount”`. To make
themers lives easier let’s be consistent. When the product is free the
price should still be wrapped.
Remove real randomness and add transient caching to improve performance.
The above was not worth the cost of the query - only users refreshing a
product page would see a difference.
If ratings are not required, the total rating count was counting all
reviews which skewed the average rating. In other words, reviews with
no rating were counted as a “zero” rating in the average rating
calculation. This bug was introduced in
83a457b29c which provided a fix for #6839.
This change introduces a new product method `get_review_count()` which
can be used to accurately calculate the total number of reviews for a
product. Some instances of `get_rating_count()` were replaced with
`get_review_count()` where appropriate. Additionally, the
`single-product/rating.php` template was adjusted to display the
correct number of customer reviews and ratings in rich snippets. I’ve
also included the `bestRating` rich snippet detailed
[here](http://schema.org/AggregateRating). The version number was
adjusted to 2.3.2 on that template as I think this is a larger change.
SHA: 100b95a tweaked the `__get()` magic method in `WC_Product` to:
* only call `get_post_meta()` once; and
* set `$this->$key` to save the overhead of calling `__get()` every
time that property needs to be accessed.
However, in the process, it also set an empty value (`''`) - the default
return value of `get_post_meta()` for every single value accessed on
the product object, meaning that any calls to `isset()` after attempting
to get that value would return `true`, even if `metadata_exists()` for
that property would return false (and no value is set in memory).
- Renamed some 2.3 methods for consistency
- Allow more args to be passed to wc_price to control output
- Filter wc_price args which Closes#7188
- wc_get_price_decimal_separator function
- wc_get_price_thousand_separator function
- wc_get_price_decimals function