• Hi Admin,

    Thank you for creating such useful plugin for wordpress! Really appreciated!
    However, during our day-to-day operation, it is very common that customer would like to add item to an existing order. We realise that if we add any item an other, all the metadata that used for the Unit plugin will not be added to the item, and hence, it will create confusion in the report.

    For example, a tray of frozen meat sell per 0.5kg on the website, which means, unit_qty = 1 but qty = 0.5 if created by the customer facing website. However, when our staff add the same item to the order, unti_qty will be missed, and qty = 1. And hence, the report that our purchasing team will be incorrect.

    Is there anyway the unit plugin metadata can be added when amend order manually?

    Thanks

    Sam

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Condless

    (@condless)

    Hi Sam,
    You’ll have to add the plugin metadata yourself.
    When the order is in ‘Pending payment’ status, make sure the order have metadata of:
    _has_unit_items = true
    and the relevant items have metadata of:
    _upw_measurement = weight
    Then you can add the unit_qty to the items and it’ll be displayed.

    Thread Starter samleemc

    (@samleemc)

    @condless Thanks for your feedback!
    Speaking of giving item metadata, I tried to amend item using the wordpress restful API. But whenever I tried to update the item that created by unit_weight plugin, and quantity is not integer, WP restful API will give me an error saying the quantity is not an integer and will not execute my API request to update the item in the order.

    Is there any way we can bypass this please?

    Thread Starter samleemc

    (@samleemc)

    I have follow your instruction above, and here is all my criteria:

    1. Order status : pending
    2. “_has_unit_items” = “true”
    3. the relevant items have metadata of:
      _upw_measurement = weight
    4. added unit_qty to the product metadata too

    But it is still not showing in the frontend.

    Plugin Author Condless

    (@condless)

    Hi,
    From WooCommerce 9.1 decimal quantity should be supported by the REST API.

    4. add also the following to the order item meta data:
    _unit_total = (the total cost of the item).

    Thread Starter samleemc

    (@samleemc)

    @condless

    Thanks for your reply!
    1. I am at Woocommerce 9.2.3, but still, decimal quantity is NOT supported on WooCommerce’s REST API

    4. Will try now

    Sam

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.