Delete a Wholesale Product
This endpoint allows you to view all the wholesale products.
Method
Endpoint
DELETE
/wp-json/wholesale/v1/products/{product_id}
Path parameters
Required
Type
Description
product_id
yes
integer
The product ID.
Status: 200 OK
Deleting non-wholesale product
{
"id": 4294,
"name": "Premium Quality Test",
"slug": "premium-quality-test-2",
"permalink": "http://localhost/new/product/premium-quality-test-2/",
"date_created": "2021-03-15T03:49:57",
"date_created_gmt": "2021-03-15T03:49:57",
"date_modified": "2021-03-15T14:50:24",
"date_modified_gmt": "2021-03-15T14:50:24",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "",
"price": "21.99",
"regular_price": "21.99",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"tags": [],
"images": [],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>21.99</bdi></span>",
"related_ids": [
4296,
4303,
4299,
4307,
4291
],
"stock_status": "instock",
"wholesale_data": {
"wwpp_product_wholesale_visibility_filter": [
"all"
],
"wwpp_ignore_cat_level_wholesale_discount": "no",
"wwpp_ignore_role_level_wholesale_discount": "no"
}
}
Status: 404 Not found
Invalid ID
{
"code": "woocommerce_rest_product_invalid_id",
"message": "Invalid ID.",
"data": {
"status": 404
}
}
Note:
You can delete wholesale and non-wholesale products using this API.
Last updated