wchau_get_option

The WooCommerce Hear About Us wchau get option function.

Description

wchau_get_option( (string) $name, (string) $default = '' ); 

Parameters (2)

0. $name (string)
The name.
1. $default — Optional. (string) => ''
The default.

Usage

  1. if ( !function_exists( 'wchau_get_option' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-hear-about-us/includes/wchau-functions.php'; 
  3.  
  4. // The name. 
  5. $name = ''; 
  6.  
  7. // The default. 
  8. $default = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wchau_get_option($name, $default); 
  12.  

Defined (1)

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

/includes/wchau-functions.php  
  1. function wchau_get_option( $name, $default = "" ) { 
  2. $filtered = get_option( apply_filters( 'wchau_get_option', $name ), $default ); 
  3.  
  4. if(empty($filtered)) { 
  5. return get_option($name, $default); 
  6.  
  7. return $filtered;