wjecf_optional_include

Include the file once if it exists.

Description

wjecf_optional_include( (string) $filename ); 

Parameters (1)

0. $filename (string)
The filename.

Usage

  1. if ( !function_exists( 'wjecf_optional_include' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-extended-coupon-features/woocommerce-jos-autocoupon.php'; 
  3.  
  4. // The filename. 
  5. $filename = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wjecf_optional_include($filename); 
  9.  

Defined (1)

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

/woocommerce-jos-autocoupon.php  
  1. function wjecf_optional_include( $filename ) { 
  2. if ( ! file_exists( dirname( __FILE__ ) . '/' . $filename ) ) { 
  3. return false; 
  4.  
  5. include_once( $filename ); 
  6. return true;