wc_coupons_enabled

Check if coupons are enabled.

Description

(array) wc_coupons_enabled(); 

Filterable.

Returns (array)


Usage

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

Defined (1)

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

/includes/wc-coupon-functions.php  
  1. function wc_coupons_enabled() { 
  2. return apply_filters( 'woocommerce_coupons_enabled', 'yes' === get_option( 'woocommerce_enable_coupons' ) );