ddw_wcde_woocommerce_current

Check for current WooCommerce version (branch).

Description

ddw_wcde_woocommerce_current(); 

Usage

  1. if ( !function_exists( 'ddw_wcde_woocommerce_current' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-german-de_de/woocommerce-de.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ddw_wcde_woocommerce_current(); 
  7.  

Defined (1)

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

/woocommerce-de.php  
  1. function ddw_wcde_woocommerce_current() { 
  2.  
  3. /** Get WooCommerce version constants */ 
  4. $wc_branch = ( defined( 'WC_VERSION' ) ) ? WC_VERSION : 'foo'; 
  5.  
  6. /** Check WooCommerce versions */ 
  7. if ( version_compare( $wc_branch, '2.2.0', '>=' ) ) { 
  8.  
  9. return TRUE; 
  10.  
  11. } elseif ( version_compare( $wc_branch, '2.2.0', '<' ) ) { 
  12. //} else { 
  13. return FALSE; 
  14.  
  15. } // end if 
  16.  
  17. } // end of function ddw_wcde_woocommerce_current