Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter knhark59

    (@knhark59)

    Thanks for the response.

    It would be nice to be able to get a single tax rate without knowing the id ahead of time, so I don’t have to download all tax rate records to search them.

    Are there any searchable fields in taxes?

    knhark59

    (@knhark59)

    @enricodeleo

    I have the most recent versions of WooCommerce and the API, but I still get the “Product quantity must be a positive float” error.

    I can set the quantity to zero on the Edit Order page in the gui, but not via the API.

    I looked at the pull request, and found the class-wc-orders-controller.php file on my system. I changed the line as indicated in your pull request (the change was not in my version). It now deletes the line when I set the quantity to zero.

    I just installed WordPress, WooCommerce and the API plugin just a week ago, so I think I’ve got the latest versions.

    Ken

    knhark59

    (@knhark59)

    I am setting the quantity to .0001. This seems to get past the “must be a positive float” error and the order appears to be updated with 0 qty. Maybe it’s rounding, but it appears to be zero and the other values also get zeroed out.

    I hate trying to “trick” the system this way, but it appears to work. Cancelling and recreating the order is not a good option for us.

    Not sure if it will create some other problem (divide by zero or something) down the line, but it appears to be okay now.

    @claudiosanches: Any thoughts?

    Ken

    I believe we have the latest version of WordPress, but I cannot update line item quantity with “0”. Still get “Product quantity must be a positive float” error.

    My JSON looks like:
    {“line_items”:[{“id”:”54″,”sku”:”MYPART”,”quantity”:”0″,”price”:”5.00″},{“sku”:”MYPART”,”quantity”:”12″,”price”:”10.00″}]}

    So, I am zeroing out the original line and creating a new one.

    What version of WP do I need?

    Thanks,
    Ken

Viewing 4 replies - 1 through 4 (of 4 total)