WC_Product::set_reviews_allowed()publicWC 3.0.0

Set if reviews is allowed.

Метод класса: WC_Product{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Product = new WC_Product();
$WC_Product->set_reviews_allowed( $reviews_allowed );
$reviews_allowed(true|false) (обязательный)
Reviews allowed or not.

Список изменений

С версии 3.0.0 Введена.

Код WC_Product::set_reviews_allowed() WC 8.7.0

public function set_reviews_allowed( $reviews_allowed ) {
	$this->set_prop( 'reviews_allowed', wc_string_to_bool( $reviews_allowed ) );
}