File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
WooCommerce/Classes/ViewRelated/Products/Edit Product Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -223,8 +223,17 @@ final class ProductFormViewController<ViewModel: ProductFormViewModelProtocol>:
223223 return
224224 }
225225
226- // TODO: Show authenticated WebView
227- WebviewHelper . launch ( url, with: self )
226+ let credentials = ServiceLocator . stores. sessionManager. defaultCredentials
227+ guard let username = credentials? . username,
228+ let token = credentials? . authToken,
229+ let site = ServiceLocator . stores. sessionManager. defaultSite else {
230+ return
231+ }
232+
233+ let configuration = WebViewControllerConfiguration ( url: url)
234+ configuration. authenticate ( site: site, username: username, token: token)
235+ let vc = WebKitViewController ( configuration: configuration)
236+ present ( vc, animated: true )
228237 }
229238
230239 // MARK: Navigation actions
You can’t perform that action at this time.
0 commit comments