in ac-addon-woocommerce/classes/Editing/ShopOrder/Status.php:35 we are using new WC_Order, but by doing this we are bypassing the factory and the hook woocommerce_order_class that allows changing the class.
Now, it does no checks so potentially any class could be placed here and deliver a fatal, but I suppose that is not our concern?
If we want to fix this, and I recommend we do, we should replace all new WC_Order instances to use the order factory instead by using wc_get_order
in
ac-addon-woocommerce/classes/Editing/ShopOrder/Status.php:35
we are usingnew WC_Order
, but by doing this we are bypassing the factory and the hookwoocommerce_order_class
that allows changing the class.Now, it does no checks so potentially any class could be placed here and deliver a fatal, but I suppose that is not our concern?
If we want to fix this, and I recommend we do, we should replace all
new WC_Order
instances to use the order factory instead by usingwc_get_order