/** * Delete an order with a given ID. * * @since 1.4 * * @param string $id The ShoppPurchase ID to delete. * @return bool True if deleted successfully, false otherwise. **/ public function delete($id) { $Purchase = new ShoppPurchase($id); if (!$Purchase->exists()) { return false; } $Purchase->delete_purchased(); $Purchase->delete(); return true; }