WC_Product::set_average_rating()
Set average rating. Read only.
Метод класса: WC_Product{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Product = new WC_Product(); $WC_Product->set_average_rating( $average );
- $average(float) (обязательный)
- Product average rating.
Код WC_Product::set_average_rating() WC Product::set average rating WC 9.2.3
public function set_average_rating( $average ) { $this->set_prop( 'average_rating', wc_format_decimal( $average ) ); }