WordPress at Your Fingertips
function is not described

WC_Cart_Totals::get_default_item_props() protected WC 3.2.0

Get default blank set of props used per item.

{} It's a method of the class: WC_Cart_Totals{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_default_item_props();

Changelog

Since 3.2.0 Introduced.

Code of WC_Cart_Totals::get_default_item_props() WC 5.9.0

protected function get_default_item_props() {
	return (object) array(
		'object'             => null,
		'tax_class'          => '',
		'taxable'            => false,
		'quantity'           => 0,
		'product'            => false,
		'price_includes_tax' => false,
		'subtotal'           => 0,
		'subtotal_tax'       => 0,
		'subtotal_taxes'     => array(),
		'total'              => 0,
		'total_tax'          => 0,
		'taxes'              => array(),
	);
}