$defaults = array(
          'name' => $name,
          'display_title' => $tax_type['title'],
          'description' => '',
          'display_inclusive' => FALSE,
          'round_mode' => COMMERCE_ROUND_NONE,
          'rule' => 'commerce_tax_type_' . $name,
          'module' => $module,

but the hook docs example code just has:

  $tax_types['sales_tax'] = array(
    'title' => t('Sales tax'),
    'display_inclusive' => FALSE,

and the docblock:

 *   - title: the title of the tax type
 *   - display_title: a display title for the tax type suitable for presenting
 *     to customers if necessary; defaults to the title
 *   - description: a short description of the tax type
 *   - display_inclusive: boolean indicating whether or not prices containing
 *     this tax will include the tax amount in the displayed price; defaults
 *     to FALSE
 *   - rule: name to use for a default product pricing rule that calculates
 *     taxes of this type for line items; defaults to 'commerce_tax_type_[name]'
 *     but can be set to NULL to not create any default Rule
 *   - admin_list: boolean defined by the Tax UI module determining whether or
 *     not the tax type should appear in the admin list


rszrama’s picture

Title: hook_commerce_tax_type_info() doesn't match that in commerce_tax_types() » Add round_mode to hook_commerce_tax_type_info() docs
Category: bug » task
Status: Active » Fixed

Not sure what the bug is here, but it looks like we just need to add round_mode to the documentation, right? Easily fixed.

(Note that the default value of the admin_list parameter is added in via the Tax UI module, not commerce_tax_types().)

Commit: http://drupalcode.org/project/commerce.git/commitdiff/b4be96f

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.