wc_set_time_limit

Wrapper for set_time_limit to see if it is enabled.

Description

wc_set_time_limit( (int) $limit = 0 ); 

Parameters (1)

0. $limit — Optional. (int)
The limit.

Usage

  1. if ( !function_exists( 'wc_set_time_limit' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; 
  3.  
  4. // The limit. 
  5. $limit = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_set_time_limit($limit); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-core-functions.php  
  1. function wc_set_time_limit( $limit = 0 ) { 
  2. if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { 
  3. @set_time_limit( $limit );