• Resolved dyszczo

    (@dyszczo)


    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?

    • This topic was modified 6 years, 10 months ago by dyszczo.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    The best place to get an answer to this would be from the developers of WooCommerce where they discuss features, fix bugs etc.

    While this is NOT a place to get support, it would be the place to look at the code and see if you can find issues where the change was made and why:

    https://github.com/woocommerce/woocommerce/issues

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Why so structural?’ is closed to new replies.