woocommerce_calc_shipping_backwards_compatibility

Woocommerce_calc_shipping was an option used to determine if shipping was enabled prior to version 2.6.0.

Description

(string) woocommerce_calc_shipping_backwards_compatibility( $value ); 

This has since been replaced with wc_shipping_enabled() function and the woocommerce_ship_to_countries setting.

Returns (string)

Parameters (1)

0. $value
The value.

Usage

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

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_calc_shipping_backwards_compatibility( $value ) { 
  2. if ( defined( 'WC_UPDATING' ) ) { 
  3. return $value; 
  4. return 'disabled' === get_option( 'woocommerce_ship_to_countries' ) ? 'no' : 'yes';