br_get_woocommerce_version

Public function to get WooCommerce version.

Description

(float|NULL) br_get_woocommerce_version(); 

Returns (float|NULL)


Usage

  1. if ( !function_exists( 'br_get_woocommerce_version' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-ajax-product-filters-for-woocommerce/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = br_get_woocommerce_version(); 
  7.  

Defined (1)

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

/includes/functions.php  
  1. function br_get_woocommerce_version() { 
  2. if ( ! function_exists( 'get_plugins' ) ) 
  3. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  4.  
  5. $plugin_folder = get_plugins( '/' . 'woocommerce' ); 
  6. $plugin_file = 'woocommerce.php'; 
  7.  
  8. if ( isset( $plugin_folder[$plugin_file]['Version'] ) ) { 
  9. return $plugin_folder[$plugin_file]['Version']; 
  10. } else { 
  11. return NULL;