woo_ps_lite_upgrade_plugin

The WooCommerce Predictive Search LITE woo ps lite upgrade plugin function.

Description

woo_ps_lite_upgrade_plugin(); 

Usage

  1. if ( !function_exists( 'woo_ps_lite_upgrade_plugin' ) ) { 
  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 = woo_ps_lite_upgrade_plugin(); 
  7.  

Defined (1)

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

/admin/wc-predictive-search-init.php  
  1. function woo_ps_lite_upgrade_plugin() { 
  2. global $wc_predictive_search_admin_init; 
  3.  
  4. // Upgrade to 2.0 
  5. if (version_compare(get_option('wc_predictive_search_lite_version'), '2.0') === -1) { 
  6. update_option('wc_predictive_search_lite_version', '2.0'); 
  7.  
  8. include( WOOPS_DIR. '/includes/updates/update-2.0.php' ); 
  9.  
  10. // Upgrade to 3.0 
  11. if(version_compare(get_option('wc_predictive_search_lite_version'), '3.0.0') === -1) { 
  12. update_option('wc_predictive_search_lite_version', '3.0.0'); 
  13.  
  14. include( WOOPS_DIR. '/includes/updates/update-3.0.php' ); 
  15.  
  16. // Upgrade to 3.2.0 
  17. if(version_compare(get_option('wc_predictive_search_lite_version'), '3.2.0') === -1) { 
  18. update_option('wc_predictive_search_lite_version', '3.2.0'); 
  19.  
  20. include( WOOPS_DIR. '/includes/updates/update-3.2.0.php' ); 
  21.  
  22. // Upgrade to 3.6.0 
  23. if( version_compare(get_option('wc_predictive_search_lite_version'), '3.6.0') === -1 ) { 
  24. update_option('wc_predictive_search_lite_version', '3.6.0'); 
  25.  
  26. // Set Settings Default from Admin Init 
  27. $wc_predictive_search_admin_init->set_default_settings(); 
  28.  
  29. // Build sass 
  30. global $wc_predictive_search_less; 
  31. $wc_predictive_search_less->plugin_build_sass(); 
  32.  
  33. update_option('wc_predictive_search_lite_version', '3.6.0');