You are here

function commerce_option_set_exists in Commerce Product Option 7

Checks to see if a given option set exists

Parameters

$set_id: The machine-readable name of the set.

Return value

TRUE or FALSE indicating whether or not the option set exists.

File

./commerce_option.module, line 331

Code

function commerce_option_set_exists($set_id) {

  // Look for a match of the set.
  if ($match_id = db_query('SELECT set_id FROM {commerce_option_set} WHERE set_id = :set', array(
    ':set' => $set_id,
  ))
    ->fetchField()) {
    return FALSE;
  }
  return TRUE;
}