Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Checkout::add_data_to_error_object( WP_Error $error, array $data, int $http_status_code, bool $include_cart = false )

Adds additional data to the WP_Error object.


Description Description


Parameters Parameters

$error

(Required) The error object to add the cart to.

$data

(Required) The data to add to the error object.

$http_status_code

(Required) The HTTP status code this error should return.

$include_cart

(Optional) Whether the cart should be included in the error data.

Default value: false


Top ↑

Source Source

File: packages/woocommerce-blocks/src/StoreApi/Routes/Checkout.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.