Automattic\WooCommerce\Internal\ReceiptRendering
ReceiptRenderingRestController::get_args_for_create_order_receipt
Get the accepted arguments for the POST request.
Метод класса: ReceiptRenderingRestController{}
Хуков нет.
Возвращает
Массив[].
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_args_for_create_order_receipt(): array;
Код ReceiptRenderingRestController::get_args_for_create_order_receipt() ReceiptRenderingRestController::get args for create order receipt WC 10.3.6
private function get_args_for_create_order_receipt(): array {
return array(
'id' => array(
'description' => __( 'Unique identifier of the order.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'expiration_date' => array(
'description' => __( 'Expiration date formatted as yyyy-mm-dd.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
'default' => null,
),
'expiration_days' => array(
'description' => __( 'Number of days to be added to the current date to get the expiration date.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'readonly' => true,
'default' => 1,
),
'force_new' => array(
'description' => __( 'True to force the creation of a new receipt even if one already exists and has not expired yet.', 'woocommerce' ),
'type' => 'boolean',
'required' => false,
'context' => array( 'view', 'edit' ),
'readonly' => true,
'default' => false,
),
);
}