Why so structural?
-
While I was developing a plugin depentent on WooCommerce I found some rather strange refactor approach in the WC code. The reduce_order_stock method from WC_Order class was extracted and put into library file wc-stock-functions.php as standard function without OOP context.
I’m wondering why decision like that could be made? If the purpose of this change was to slim down the WC_Order class I could easly imagine that the WC_Order_Stock or even WC_Stock class could be written to deal with the stock managing issues.
Why would developers reduce the OOP and enlarge static function base?The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Why so structural?’ is closed to new replies.