WC_Product_Importer::memory_exceeded
Memory exceeded
Ensures the batch process never exceeds 90% of the maximum WordPress memory.
Метод класса: WC_Product_Importer{}
Хуки из метода
Возвращает
true|false.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->memory_exceeded();
Код WC_Product_Importer::memory_exceeded() WC Product Importer::memory exceeded WC 10.3.4
protected function memory_exceeded() {
$memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
$current_memory = memory_get_usage( true );
$return = false;
if ( $current_memory >= $memory_limit ) {
$return = true;
}
return apply_filters( 'woocommerce_product_importer_memory_exceeded', $return );
}