Automattic\WooCommerce\Internal\RestApi\Routes\V4\Orders\Schema

AbstractLineItemSchema::get_taxes_schemaprotectedWC 1.0

Get the taxes schema shared by line item schemas.

Метод класса: AbstractLineItemSchema{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_taxes_schema(): array;

Код AbstractLineItemSchema::get_taxes_schema() WC 10.4.2

protected function get_taxes_schema(): array {
	return array(
		'description' => __( 'Line taxes.', 'woocommerce' ),
		'type'        => 'array',
		'context'     => self::VIEW_EDIT_EMBED_CONTEXT,
		'readonly'    => true,
		'items'       => array(
			'type'       => 'object',
			'properties' => array(
				'id'       => array(
					'description' => __( 'Tax rate ID.', 'woocommerce' ),
					'type'        => 'integer',
					'context'     => self::VIEW_EDIT_EMBED_CONTEXT,
					'readonly'    => true,
				),
				'total'    => array(
					'description' => __( 'Tax total.', 'woocommerce' ),
					'type'        => 'string',
					'context'     => self::VIEW_EDIT_EMBED_CONTEXT,
					'readonly'    => true,
				),
				'subtotal' => array(
					'description' => __( 'Tax subtotal.', 'woocommerce' ),
					'type'        => 'string',
					'context'     => self::VIEW_EDIT_EMBED_CONTEXT,
					'readonly'    => true,
				),
			),
		),
	);
}