• Resolved lockmac

    (@lockmac)


    I’ve just upgraded to WooCommerce 3.0.4 and am trying to get my plugin working.

    I’ve noticed that when I update a custom field against an Order using update_post_meta, it doesn’t update the cache.

    I know this because hen I then create a new WC_Order and run the function update_status (to change the status of an order), it uses the previous value against the custom meta field that I previously updated and reverts it back.

    With the new version of Woocommerce, what is the correct way to update meta fields against an order? I’ve looked through WC_Order, the abstract classes etc and whilst they contain methods to update things like billing address etc, they don’t have anything about updating custom meta.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘What is the correct way to update meta fields in Woocommerce?’ is closed to new replies.