Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog
AsyncGenerator::raise_resource_limits
Raises the memory and execution time limits for the current process before heavy work begins.
These only affect the current process and never lower an already higher limit. They cannot override a hard host/server request timeout or Action Scheduler's failure period.
Method of the class: AsyncGenerator{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->raise_resource_limits(): void;
AsyncGenerator::raise_resource_limits() AsyncGenerator::raise resource limits code WC 11.0.0
private function raise_resource_limits(): void {
wp_raise_memory_limit( 'admin' );
// Raise the time limit up front: the walker only resets it after each batch, so the initial
// product query and the first batch would otherwise run under the request's (possibly low) limit.
$batch_time_limit = $this->get_batch_time_limit();
if ( $batch_time_limit > 0 ) {
wc_set_time_limit( $batch_time_limit );
}
}