WordPress at Your Fingertips
function is not described

WC_Product_Importer::get_memory_limit() protected WC 1.0

Get memory limit

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

No Hooks.

Return

Int.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_memory_limit();

Code of WC_Product_Importer::get_memory_limit() WC 5.7.1

protected function get_memory_limit() {
	if ( function_exists( 'ini_get' ) ) {
		$memory_limit = ini_get( 'memory_limit' );
	} else {
		// Sensible default.
		$memory_limit = '128M';
	}

	if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
		// Unlimited, set to 32GB.
		$memory_limit = '32000M';
	}
	return intval( $memory_limit ) * 1024 * 1024;
}