Add a fee to an order programmatically in Woocommerce 3
The WC_Abstract_Legacy_Order method add_fee() is deprecated and set_fee() method doesn’t exist for the WC_Order Class (exist only for WC_Cart and WC_API_Orders classes). To add a Fee to an order programmatically since Woocommerce 3, it’s a bit more complicated. There are some parameters to set as the Fee name, the tax status, the tax class (if … Read more