Unfortunately, in my store all of the product quantities are in float. I used the below code to accept float value as a quantity in my website.
// Removes the WooCommerce filter, that is validating the quantity to be an int
remove_filter('woocommerce_stock_amount', 'intval');
// Add a filter, that validates the quantity to be a float
add_filter('woocommerce_stock_amount', 'floatval');
But, when I trying to create a order using API from my mobile app is not accepting the float value.
$woocommerce->post('orders', $getData);
anybody help me, how can I create a order using woocommerce api to accept float quantities.