wc_update_209_brazillian_state

The WooCommerce wc update 209 brazillian state function.

Description

wc_update_209_brazillian_state(); 

Usage

  1. if ( !function_exists( 'wc_update_209_brazillian_state' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-update-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_update_209_brazillian_state(); 
  7.  

Defined (1)

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

/includes/wc-update-functions.php  
  1. function wc_update_209_brazillian_state() { 
  2. global $wpdb; 
  3.  
  4. // Update brazillian state codes 
  5. $wpdb->update( 
  6. $wpdb->postmeta,  
  7. array( 
  8. 'meta_value' => 'BA',  
  9. ),  
  10. array( 
  11. 'meta_key' => '_billing_state',  
  12. 'meta_value' => 'BH',  
  13. ); 
  14. $wpdb->update( 
  15. $wpdb->postmeta,  
  16. array( 
  17. 'meta_value' => 'BA',  
  18. ),  
  19. array( 
  20. 'meta_key' => '_shipping_state',  
  21. 'meta_value' => 'BH',  
  22. ); 
  23. $wpdb->update( 
  24. $wpdb->usermeta,  
  25. array( 
  26. 'meta_value' => 'BA',  
  27. ),  
  28. array( 
  29. 'meta_key' => 'billing_state',  
  30. 'meta_value' => 'BH',  
  31. ); 
  32. $wpdb->update( 
  33. $wpdb->usermeta,  
  34. array( 
  35. 'meta_value' => 'BA',  
  36. ),  
  37. array( 
  38. 'meta_key' => 'shipping_state',  
  39. 'meta_value' => 'BH',  
  40. );