Automattic\WooCommerce\Internal\RestApi\Routes\V4\Refunds\Schema
RefundPreviewSchema::get_item_schema_properties
Return all properties for the item schema.
Метод класса: RefundPreviewSchema{}
Хуков нет.
Возвращает
Массив.
Использование
$RefundPreviewSchema = new RefundPreviewSchema(); $RefundPreviewSchema->get_item_schema_properties(): array;
Список изменений
| С версии 10.9.0 | Введена. |
Код RefundPreviewSchema::get_item_schema_properties() RefundPreviewSchema::get item schema properties WC 11.0.1
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,
),
);
}