WordPress at Your Fingertips
function is not described

WC_Product::set_reviews_allowed() public WC 3.0.0

Set if reviews is allowed.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_reviews_allowed( $reviews_allowed );
$reviews_allowed(true|false) (required)
Reviews allowed or not.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_reviews_allowed() WC 5.5.2

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