diff --git a/modules/product/commerce_product.module b/modules/product/commerce_product.module
index 5a2c186..6653804 100644
--- a/modules/product/commerce_product.module
+++ b/modules/product/commerce_product.module
@@ -727,7 +727,10 @@ function commerce_product_set_properties($product, $name, $value) {
  * The values returned will be keyed by SKU and appear as such in the textfield,
  * even though the preview in the autocomplete list shows "SKU: Title".
  */
-function commerce_product_autocomplete($entity_type, $field_name, $bundle, $string = '') {
+function commerce_product_autocomplete($entity_type = '', $field_name = '', $bundle = '', $string = '') {
+  if (empty($entity_type) || empty($field_name) || empty($bundle)) {
+    return MENU_NOT_FOUND;
+  }
   $field = field_info_field($field_name);
   $instance = field_info_instance($entity_type, $field_name, $bundle);
 
@@ -750,14 +753,16 @@ function commerce_product_autocomplete($entity_type, $field_name, $bundle, $stri
   array_splice($args, 0, 5 + $offset);
   $string = implode('/', $args);
 
-  // The user enters a comma-separated list of tags. We only autocomplete the last tag.
+  // The user enters a comma-separated list of tags. We only autocomplete the
+  // last tag.
   $tags_typed = drupal_explode_tags($string);
   $tag_last = drupal_strtolower(array_pop($tags_typed));
 
   if (!empty($tag_last)) {
     $prefix = count($tags_typed) ? implode(', ', $tags_typed) . ', ' : '';
 
-    // Determine the type of autocomplete match to use when searching for products.
+    // Determine the type of autocomplete match to use when searching
+    // for products.
     $match = isset($field['widget']['autocomplete_match']) ? $field['widget']['autocomplete_match'] : 'contains';
 
     // Get an array of matching products.
