*/ private function get_response_for_file( string $filename ): array { $expiration_date = TransientFilesEngine::get_expiration_date( $filename ); $public_url = wc_get_container()->get( TransientFilesEngine::class )->get_public_url( $filename ); return array( 'receipt_url' => $public_url, 'expiration_date' => $expiration_date, ); } /** * Get the accepted arguments for the GET request. * * @return array[] The accepted arguments for the GET request. */ private function get_args_for_get_order_receipt(): array { return array( 'id' => array( 'description' => __( 'Unique identifier of the order.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), ); } /** * Get the schema for both the GET and the POST requests. * * @return array[] */ private function get_schema_for_get_and_post_order_receipt(): array { $schema = $this->get_base_schema(); $schema['properties'] = array( 'receipt_url' => array( 'description' => __( 'Public url of the receipt.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'expiration_date' => array( 'description' => __( 'Expiration date of the receipt, formatted as yyyy-mm-dd.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), ); return $schema; } /** * Get the accepted arguments for the POST request. * * @return array[] */ 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, ), ); } }
Warning: class_implements(): Class Automattic\WooCommerce\Internal\ReceiptRendering\ReceiptRenderingRestController does not exist and could not be loaded in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/AbstractInterfaceServiceProvider.php on line 61

Warning: foreach() argument must be of type array|object, bool given in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/AbstractInterfaceServiceProvider.php on line 61
Shop - NPS-Machines d'impression maroc