Class WC_REST_Product_Variations_Controller
REST API variations controller class.
- WP_REST_Controller
-
WC_REST_Controller
-
WC_REST_Posts_Controller
-
WC_REST_CRUD_Controller
-
WC_REST_Legacy_Products_Controller
-
WC_REST_Products_Controller
-
WC_REST_Product_Variations_Controller
Extends: WC_REST_Products_Controller
Located at api/class-wc-rest-product-variations-controller.php
Methods summary
public
|
|
public
|
|
protected
|
|
public
WP_REST_Response
|
#
prepare_object_for_response(
Prepare a single variation output for response. |
protected
array
|
|
protected
WP_Error|
|
#
prepare_object_for_database( WP_REST_Request $request, boolean $creating = false )
Prepare a single variation for create or update. |
public
|
|
public
boolean|WP_Error|WP_REST_Response
|
|
public
array
|
|
protected
array
|
|
public
array
|
Methods inherited from WC_REST_Products_Controller
get_attribute_options()
,
get_attribute_taxonomy_label()
,
get_attribute_taxonomy_name()
,
get_attributes()
,
get_collection_params()
,
get_default_attributes()
,
get_downloads()
,
get_images()
,
get_product_data()
,
get_taxonomy_terms()
,
save_default_attributes()
,
save_downloadable_files()
,
save_product_shipping_data()
,
save_taxonomy_terms()
,
set_product_images()
Methods inherited from WC_REST_Legacy_Products_Controller
add_post_meta_fields()
,
delete_post()
,
get_post_types()
,
get_product_menu_order()
,
prepare_item_for_response()
,
query_args()
,
save_product_images()
,
save_product_meta()
,
save_variations_data()
,
set_product_meta()
,
update_post_meta_fields()
Methods inherited from WC_REST_CRUD_Controller
create_item()
,
delete_item_permissions_check()
,
get_item()
,
get_item_permissions_check()
,
get_items()
,
get_objects()
,
get_permalink()
,
save_object()
,
update_item()
,
update_item_permissions_check()
Methods inherited from WC_REST_Posts_Controller
batch_items_permissions_check()
,
create_item_permissions_check()
,
get_allowed_query_vars()
,
get_items_permissions_check()
,
prepare_items_query()
Methods inherited from WC_REST_Controller
add_additional_fields_schema()
,
add_meta_query()
,
check_batch_limit()
,
get_normalized_rest_base()
,
get_public_batch_schema()
,
validate_setting_checkbox_field()
,
validate_setting_image_width_field()
,
validate_setting_multiselect_field()
,
validate_setting_radio_field()
,
validate_setting_select_field()
,
validate_setting_text_field()
,
validate_setting_textarea_field()
Properties summary
protected
string
|
$namespace
Endpoint namespace. |
#
'wc/v2'
|
protected
string
|
$rest_base
Route base. |
#
'products/(?P<product_id>[\d]+)/variations'
|
protected
string
|
$post_type
Post type. |
#
'product_variation'
|