The custom code for all products was set to $item->price = $item->price by default upon installing the module so I had to add the 2nd condition below in uc_custom_price.module at line 117 like this:

// $custom_code = !empty($node->custom_code) ?
$custom_code = (!empty($node->custom_code) AND ($node->custom_code != '$item->price = $item->price;') ) ?

to make sure it would fetch the code set for the product class in the Custom Pricing Settings.

Does that make sense?