WC_Shipping::__get( string $name )

Magic getter.


Description Description


Parameters Parameters

$name

(Required) Property name.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/class-wc-shipping.php

	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();
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.