Automattic\WooCommerce\Internal\RestApi\Routes\V4\Refunds\Schema
RefundPreviewSchema::get_item_schema_properties
Return all properties for the item schema.
Method of the class: RefundPreviewSchema{}
No Hooks.
Returns
Array.
Usage
$RefundPreviewSchema = new RefundPreviewSchema(); $RefundPreviewSchema->get_item_schema_properties(): array;
Changelog
| Since 10.9.0 | Introduced. |
RefundPreviewSchema::get_item_schema_properties() RefundPreviewSchema::get item schema properties code WC 11.0.0
public function get_item_schema_properties(): array {
return array(
'breakdown' => array(
'description' => __( 'Refund breakdown by item type.', 'woocommerce' ),
'type' => 'object',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
'properties' => array(
'products' => $this->get_section_schema( 'products' ),
'shipping' => $this->get_section_schema( 'shipping' ),
'fees' => $this->get_section_schema( 'fees' ),
),
),
'subtotal' => array(
'description' => __( 'Grand subtotal of the refund preview (excluding tax).', 'woocommerce' ),
'type' => 'string',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
),
'tax' => array(
'description' => __( 'Grand tax total of the refund preview.', 'woocommerce' ),
'type' => 'string',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
),
'total' => array(
'description' => __( 'Grand total of the refund preview (tax-inclusive).', 'woocommerce' ),
'type' => 'string',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
),
'max_refundable' => array(
'description' => __( 'Maximum refundable amount remaining on the order.', 'woocommerce' ),
'type' => 'string',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
),
);
}