Automattic\WooCommerce\Internal\RestApi\Routes\V4\Orders\Schema
AbstractLineItemSchema::get_taxes_schema
Get the taxes schema shared by line item schemas.
Method of the class: AbstractLineItemSchema{}
No Hooks.
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_taxes_schema(): array;
AbstractLineItemSchema::get_taxes_schema() AbstractLineItemSchema::get taxes schema code WC 10.4.3
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,
),
),
),
);
}