How to use commerce_cart_order_product_line_item_delete? I've set up my own custom module structure, and am trying to implement commerce_cart_order_product_line_item_delete. At it's most basic level, i'm trying to delete line item 70 from order 1 in my cart with the following code in my module:

&lt;?php
    commerce_cart_order_product_line_item_delete(1,70,FALSE);
?&gt;


I'm getting this error on the page:

Fatal error: Call to undefined function commerce_entity_reference_delete() in /Users/[username]/Documents/Sites/[site_name]/profiles/commerce_kickstart/modules/contrib/commerce/modules/cart/commerce_cart.module on line 1268

I've tried other methods, like the code on this page:

http://dropbucket.org/node/358

but i can't seem figure out how to find a product's ID, and in the end, I want to delete a line item from a cart which could potentially have two entries of the same product. don't want to delete the whole product from the cart... hope that makes sense.

What am I missing? 
thanks!
The function accepts the $commerce_order object not just the order_id. You could try

commerce_cart_order_product_line_item_delete($order, 70);


commerce_entity_reference_delete is defined in commerce.module so it should be available, if commerce is enabled and at current version.