Allow for decimals in comissions

Can you please allow for decimals in commissions of the vendor plugin?

As far as I can see the only thing which should be adjusted is in class-wc-product-vendors-utils.php:164

This line:
return absint( str_replace( ‘%’, ”, trim( $commission ) ) );

should actually be:
return abs( floatval( str_replace(‘%’, ”, trim( $commission ) ) ) );

Current Status


Last updated: April 28, 2016

1 comment

Log in to comment on this feature request.

  1. Marco Betschart says:

    Actually it should even be something like the following, to also allow a comma as decimal separator:

    return abs( floatval( str_replace( ‘,’, ‘.’, str_replace(‘%’, ”, trim( $commission ) ) ) ) );


The most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment