wc_update_220_shipping

The WooCommerce wc update 220 shipping function.

Description

wc_update_220_shipping(); 

Usage

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

Defined (1)

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

/includes/wc-update-functions.php  
  1. function wc_update_220_shipping() { 
  2. $woocommerce_ship_to_destination = 'shipping'; 
  3.  
  4. if ( get_option( 'woocommerce_ship_to_billing_address_only' ) === 'yes' ) { 
  5. $woocommerce_ship_to_destination = 'billing_only'; 
  6. } elseif ( get_option( 'woocommerce_ship_to_billing' ) === 'yes' ) { 
  7. $woocommerce_ship_to_destination = 'billing'; 
  8.  
  9. add_option( 'woocommerce_ship_to_destination', $woocommerce_ship_to_destination, '', 'no' );