This PR makes two improvements to the method WC_Product_Variable_Data_Store_Custom_Table::sync_managed_variation_stock_status():
It fixes a MySQL error when running the method for a variable product with no variations by adding a check to see if the variable product has any children before running the query to update them. This error was happening when running the PHPUnit test WC_Tests_Product_Variable::test_variable_product_auto_stock_status(). Commit 3c58da0
It adds a check to only update product variable children data if their stock status changed following the same pattern used by the WC core method with the same name. Commit
b212ae6
This PR makes two improvements to the method WC_Product_Variable_Data_Store_Custom_Table::sync_managed_variation_stock_status():