Automattic\WooCommerce\Internal\ReceiptRendering
ReceiptRenderingRestController::get_args_for_create_order_receipt()
Get the accepted arguments for the POST request.
Method of the class: ReceiptRenderingRestController{}
No Hooks.
Return
Array[]
.
Usage
// private - for code of main (parent) class only $result = $this->get_args_for_create_order_receipt(): array;
ReceiptRenderingRestController::get_args_for_create_order_receipt() ReceiptRenderingRestController::get args for create order receipt code WC 9.3.3
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, ), ); }