woocp_init

The WooCommerce Compare Products LITE woocp init function.

Description

woocp_init(); 

Usage

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

Defined (1)

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

/admin/compare_init.php  
  1. function woocp_init() { 
  2. if ( get_option( 'a3rev_woocp_just_installed' ) ) { 
  3. delete_option( 'a3rev_woocp_just_installed' ); 
  4.  
  5. // Set Settings Default from Admin Init 
  6. global $wc_compare_admin_init; 
  7. $wc_compare_admin_init->set_default_settings(); 
  8.  
  9. // Build sass 
  10. global $wc_compare_less; 
  11. $wc_compare_less->plugin_build_sass(); 
  12.  
  13. update_option( 'a3rev_woocp_install_default_data_start', true ); 
  14. wp_redirect( admin_url( 'admin.php?page=woo-compare-features', 'relative' ) ); 
  15. exit; 
  16.  
  17. if ( get_option( 'a3rev_woocp_install_default_data_start' ) ) { 
  18. delete_option( 'a3rev_woocp_install_default_data_start' ); 
  19. include_once( WOOCP_DIR. '/includes/class-wc-compare-install.php' ); 
  20.