File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -312,15 +312,11 @@ private extension HelpAndSupportViewController {
312312
313313 /// Opens custom help center URL in a web view
314314 ///
315- func launchCustomHelpCenterWebPage( ) {
316- guard let customHelpCenterURL = customHelpCenterURL else {
317- return
318- }
319-
320- WebviewHelper . launch ( customHelpCenterURL, with: self )
315+ func launchCustomHelpCenterWebPage( url: URL ) {
316+ WebviewHelper . launch ( url, with: self )
321317
322318 ServiceLocator . analytics. track ( . supportHelpCenterViewed,
323- withProperties: [ " help_content_url " : customHelpCenterURL . absoluteString] )
319+ withProperties: [ " help_content_url " : url . absoluteString] )
324320 }
325321}
326322
@@ -331,12 +327,11 @@ private extension HelpAndSupportViewController {
331327 /// Help Center action
332328 ///
333329 func helpCenterWasPressed( ) {
334- guard customHelpCenterURL == nil else {
335- launchCustomHelpCenterWebPage ( )
336- return
330+ if let customHelpCenterURL = customHelpCenterURL {
331+ launchCustomHelpCenterWebPage ( url: customHelpCenterURL)
332+ } else {
333+ ZendeskProvider . shared. showHelpCenter ( from: self )
337334 }
338-
339- ZendeskProvider . shared. showHelpCenter ( from: self )
340335 }
341336
342337 /// Contact Support action
You can’t perform that action at this time.
0 commit comments