WC_Shipping::__get
Magic getter.
Method of the class: WC_Shipping{}
No Hooks.
Returns
Mixed.
Usage
$WC_Shipping = new WC_Shipping(); $WC_Shipping->__get( $name );
- $name(string) (required)
- Property name.
WC_Shipping::__get() WC Shipping:: get code WC 10.4.3
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();
}
}