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_less, $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. $wc_predictive_search_less->plugin_build_sass(); 
  31.  
  32. // Upgrade to 3.6.2 
  33. if( version_compare(get_option('wc_predictive_search_lite_version'), '3.6.2') === -1 ) { 
  34. update_option('wc_predictive_search_lite_version', '3.6.2'); 
  35.  
  36. update_option( 'wc_ps_upgraded_to_new_sync_data', 0 ); 
  37.  
  38. // Upgrade to 3.6.4 
  39. if( version_compare(get_option('wc_predictive_search_lite_version'), '3.6.4') === -1 ) { 
  40. update_option('wc_predictive_search_lite_version', '3.6.4'); 
  41.  
  42. include( WOOPS_DIR. '/includes/updates/update-3.6.4.php' ); 
  43.  
  44. update_option( 'wc_ps_upgraded_to_new_sync_data', 0 ); 
  45.  
  46. if( version_compare(get_option('wc_predictive_search_lite_version'), '3.7.0') === -1 ) { 
  47. // Set Settings Default from Admin Init 
  48. $wc_predictive_search_admin_init->set_default_settings(); 
  49.  
  50. // Build sass 
  51. $wc_predictive_search_less->plugin_build_sass(); 
  52.  
  53. if ( version_compare( get_option('wc_predictive_search_lite_version'), '4.0.0', '<' ) ) { 
  54. include( WOOPS_DIR. '/includes/updates/update-4.0.0.php' ); 
  55.  
  56. update_option('wc_predictive_search_lite_version', '4.0.2');