Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Delete a product by ID using PHP in WooCommerce

$product_id = 108;
wp_delete_post( $myproduct->ID, true); // Set to False if you want to send them to Trash.
 
PREVIOUS NEXT
Tagged: #Delete #product #ID #PHP #WooCommerce
ADD COMMENT
Topic
Name
9+2 =