WC_Product_Importer::time_exceeded
Time exceeded.
Ensures the batch never exceeds a sensible time limit. A timeout limit of 30s is common on shared hosting.
Method of the class: WC_Product_Importer{}
Hooks from the method
Returns
true|false.
Usage
// protected - for code of main (parent) or child class $result = $this->time_exceeded();
WC_Product_Importer::time_exceeded() WC Product Importer::time exceeded code WC 10.3.6
protected function time_exceeded() {
$finish = $this->start_time + apply_filters( 'woocommerce_product_importer_default_time_limit', 20 ); // 20 seconds
$return = false;
if ( time() >= $finish ) {
$return = true;
}
return apply_filters( 'woocommerce_product_importer_time_exceeded', $return );
}