WordPress at Your Fingertips
function is not described

WC_Product::set_download_limit() public WC 3.0.0

Set download limit.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_download_limit( $download_limit );
$download_limit(int|string) (required)
Product download limit.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_download_limit() WC 5.5.2

<?php
public function set_download_limit( $download_limit ) {
	$this->set_prop( 'download_limit', -1 === (int) $download_limit || '' === $download_limit ? -1 : absint( $download_limit ) );
}