getMessage(), Log::ERROR, Log::CONTEXT_GENERAL); } } // B. Safe defaults for order sync (existing users only) if (get_option('_ACTIONWEAR_ORDER_SYNC_TRIGGER') === false) { update_option('_ACTIONWEAR_ORDER_SYNC_TRIGGER', 'disabled'); } if (get_option('_ACTIONWEAR_ORDER_TEST_MODE') === false) { update_option('_ACTIONWEAR_ORDER_TEST_MODE', 1); } // C. Initialize version tracking for What's New overlay add_option('_ACTIONWEAR_LAST_SEEN_VERSION', ''); // D. Align wc_created with actual WooCommerce products try { $result = Sync::alignWcCreated(); Log::write("Migration 1.2.0: wc_created aligned - marked={$result['marked']}, reset={$result['reset']}", Log::INFO, Log::CONTEXT_GENERAL); } catch (\Throwable $th) { Log::write("Migration 1.2.0: Failed to align wc_created - " . $th->getMessage(), Log::ERROR, Log::CONTEXT_GENERAL); } } } }