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', 'woocommerce-predictive-search' ), 'woocommerce_search_page_id', __('Woocommerce Predictive Search', 'woocommerce-predictive-search' ), '[woocommerce_search]' ); 
  4. WC_Predictive_Search_Functions::auto_create_page_for_wpml( $woocommerce_search_page_id, _x('woocommerce-search', 'page_slug', 'woocommerce-predictive-search' ), __('Woocommerce Predictive Search', 'woocommerce-predictive-search' ), '[woocommerce_search]' ); 
  5.  
  6. global $wc_predictive_search; 
  7. $wc_predictive_search->install_databases(); 
  8.  
  9. update_option('wc_predictive_search_lite_version', '4.0.2'); 
  10.  
  11. global $wc_predictive_search_admin_init; 
  12. delete_metadata( 'user', 0, $wc_predictive_search_admin_init->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true ); 
  13.  
  14. flush_rewrite_rules(); 
  15.  
  16. update_option( 'wc_predictive_search_had_sync_posts_data', 0 ); 
  17.  
  18. update_option('wc_predictive_search_just_installed', true);