WC_Shipping::__get()publicWC 1.0

Magic getter.

Method of the class: WC_Shipping{}

No Hooks.

Return

Mixed.

Usage

$WC_Shipping = new WC_Shipping();
$WC_Shipping->__get( $name );
$name(string) (required)
Property name.

WC_Shipping::__get() code WC 8.7.0

public function __get( $name ) {
	// Grab from cart for backwards compatibility with versions prior to 3.2.
	if ( 'shipping_total' === $name ) {
		return WC()->cart->get_shipping_total();
	}
	if ( 'shipping_taxes' === $name ) {
		return WC()->cart->get_shipping_taxes();
	}
}