wc_predictive_install

The WooCommerce Predictive Search LITE wc predictive install function.

Description

wc_predictive_install(); 

Usage

  1. if ( !function_exists( 'wc_predictive_install' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-predictive-search-lite/admin/wc-predictive-search-init.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_predictive_install(); 
  7.  

Defined (1)

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

/admin/wc-predictive-search-init.php  
  1. function wc_predictive_install() { 
  2. global $wpdb; 
  3. $woocommerce_search_page_id = WC_Predictive_Search_Functions::create_page( _x('woocommerce-search', 'page_slug', 'woops'), 'woocommerce_search_page_id', __('Woocommerce Predictive Search', 'woops'), '[woocommerce_search]' ); 
  4. WC_Predictive_Search_Functions::auto_create_page_for_wpml( $woocommerce_search_page_id, _x('woocommerce-search', 'page_slug', 'woops'), __('Woocommerce Predictive Search', 'woops'), '[woocommerce_search]' ); 
  5.  
  6. // Set Settings Default from Admin Init 
  7. global $wc_predictive_search_admin_init; 
  8. $wc_predictive_search_admin_init->set_default_settings(); 
  9.  
  10. global $wc_predictive_search; 
  11. $wc_predictive_search->install_databases(); 
  12.  
  13. update_option('wc_predictive_search_lite_version', '3.6.0'); 
  14.  
  15. // Build sass 
  16. global $wc_predictive_search_less; 
  17. $wc_predictive_search_less->plugin_build_sass(); 
  18.  
  19. delete_metadata( 'user', 0, $wc_predictive_search_admin_init->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true ); 
  20.  
  21. flush_rewrite_rules(); 
  22.  
  23. update_option('wc_predictive_search_just_installed', true);