yith_woocompare_constructor

The YITH WooCommerce Compare yith woocompare constructor function.

Description

yith_woocompare_constructor(); 

Usage

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

Defined (1)

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

/init.php  
  1. function yith_woocompare_constructor() { 
  2.  
  3. global $woocommerce; 
  4.  
  5. if ( ! isset( $woocommerce ) || ! function_exists( 'WC' ) ) { 
  6. return; 
  7. elseif ( defined( 'YITH_WOOCOMPARE_PREMIUM' ) ) { 
  8. deactivate_plugins( plugin_basename( __FILE__ ) ); 
  9. return; 
  10.  
  11. load_plugin_textdomain( 'yith-woocommerce-compare', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' ); 
  12.  
  13. // Load required classes and functions 
  14. require_once('includes/class.yith-woocompare-helper.php'); 
  15. require_once('includes/functions.yith-woocompare.php'); 
  16. require_once('widgets/class.yith-woocompare-widget.php'); 
  17. require_once('includes/class.yith-woocompare.php'); 
  18.  
  19. // Let's start the game! 
  20. global $yith_woocompare; 
  21. $yith_woocompare = new YITH_Woocompare();