I agree it makes more sense to backup code+db together, but sometimes folks operate more liberally with updting/downgrading WC code (probably because it’s easier to upload new zip package than to restore db to a specific point in time).
Let’s have a simple example: Let’s say we decide to migrate coupons from wp_posts
to wp_wc_coupons
in WC 8.3. We can build 8.3 in a way that it can work with coupons in both locations. But once you migrate the coupons to the new location in the db, you cannot really go back to WC 8.2 code, as your coupons will not work (8.2 knows nothing about the new coupon location). Thus, updating the code to WC 8.3 and then updating the db once you see things are working fine could be reasonable way of updating the site.
Not saying this is bulletproof, but that’s my guess about why this was implemented years ago.
As for actual usage, @doffine got it right. Ideally by using a code snippet plugin (so that you don’t need to reapply this every time you update WP/WC), you should add the following code:
add_filter( 'woocommerce_enable_auto_update_db', '__return_true' );
-
This reply was modified 1 year, 6 months ago by Peter Fabian.