WC_REST_Orders_V2_Controller
REST API Orders controller class.
Description Description
Source Source
File: includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
Methods Methods
- filter_writable_props — Only return writable props from schema.
- get_collection_params — Get the query params for collections.
- get_formatted_item_data — Get formatted item data.
- get_item_schema — Get the Order's schema, conforming to JSON Schema.
- get_object — Get object. Return false if object is not of required type.
- get_order_item_data — Expands an order item to get its data.
- get_order_statuses — Get order statuses without prefixes.
- get_product_id — Gets the product ID from the SKU or posted ID.
- item_is_null — Helper method to check if the resource ID associated with the provided item is null.
- maybe_set_item_meta_data — Maybe set item meta if posted.
- maybe_set_item_prop — Maybe set an item prop if the value was posted.
- maybe_set_item_props — Maybe set item props if the values were posted.
- merge_meta_item_with_formatted_meta_display_attributes — Merge the `$formatted_meta_data` `display_key` and `display_value` attribute values into the corresponding {@link WC_Meta_Data}. Returns the merged array.
- prepare_coupon_lines — Create or update an order coupon.
- prepare_fee_lines — Create or update an order fee.
- prepare_line_items — Create or update a line item.
- prepare_links — Prepare links for the request.
- prepare_object_for_database — Prepare a single order for create or update.
- prepare_object_for_response — Prepare a single order output for response.
- prepare_objects_query — Prepare objects query.
- prepare_shipping_lines — Create or update an order shipping method.
- register_routes — Register the routes for orders.
- save_object — Save an object data.
- set_item — Wrapper method to create/update order items.
- update_address — Update address.