Error updating order amount using coupon

My English is not good,
But when I updated the order status, the coupon existed, but there was no coupon discount in the amount calculation part. I removed the coupon and added the coupon myself and it returned to normal. As soon as I pressed Update Order, the same error appeared again.

I used debug mode and saw the message

[21-Nov-2023 06:47:28 UTC] post_status was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_woocommerce_remove_order_coupon’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::remove_order_coupon, WC_Abstract_Order->remove_coupon, WC_Abstract_Order->recalculate_coupons, WC_Abstract_Order->calculate_totals, WC_Abstract_Order->calculate_taxes, WC_Abstract_Order->update_taxes, WC_Order->save, WC_Abstract_Order->save, WC_Abstract_Order->save_items, WC_Data->delete, WC_Data_Store->delete, Abstract_WC_Order_Item_Type_Data_Store->delete, do_action(‘woocommerce_before_delete_order_item’), WP_Hook->do_action, WP_Hook->apply_filters, WSAL\WP_Sensors\WooCommerce_Sensor::event_order_items_removed, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.

I recorded a video showing this error
Video download:

  • This topic was modified 3 hours, 11 minutes ago by ming0923.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer