• I’m using WooCommerce in Argentina. Here, to represent floating numbers I use the comma as the decimal separator. Well, while I am using the Gateways Fees and Discounts sub-module included in Booster Payment & Gateways module, when typing fees or discounts with decimal part (eg: 11,1112), Booster for WooCommerce fails to recognize them as floating numbers, and uses only the integer part of them (ie: 11). Booster for WooCommerce does not expect to receive floating values represented using the comma as the decimal separator.

    My solution (temporary) was to add a line of code in the class-wcj-payment-gateways-fees.php file (inside \wp-content\plugins\woocommerce-jetpack\includes):

    After the line (205):

    $fee_value = get_option ('wcj_gateways_fees_value_' $current_gateway.);

    I added:

    $fee_value = str_replace (',', $fee_value '.');

    I don’t use ‘.’ as thousands separator in fees or discounts, and because of that there is no risk for me of having more than one ‘.’ in the final numbers. Of course this is only a temporary patch.

    I do not know if this problem with the decimal separator exists in other modules, but I suggest that at least you fix the code inside the Gateways Fees and Discounts module.

    Regards,
    Hernando Mankus

    https://wordpress.org/plugins/woocommerce-jetpack/

Viewing 1 replies (of 1 total)
  • Thread Starter soydigital

    (@soydigital)

    correction of the previous text:

    After the line (205):

    $fee_value = get_option( 'wcj_gateways_fees_value_' . $current_gateway );

    I added:
    $fee_value = str_replace(',', '.', $fee_value);

Viewing 1 replies (of 1 total)
  • The topic ‘Gateways Fees and Discounts – Problem and Solution’ is closed to new replies.