File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ extension Site {
2727 }
2828 /// Returns the WooCommerce admin URL, or attempts to construct it from the site URL.
2929 ///
30- func adminURLFromSiteURLString ( ) -> URL ? {
31- guard let adminURL = URL ( string: self . adminURL) else {
32- let adminURLFromSiteURLString = self . url + " /wp-admin "
33- return URL ( string: adminURLFromSiteURLString) ?? nil
30+ func adminURLWithFallback ( ) -> URL ? {
31+ guard let adminURL = URL ( string: adminURL) else {
32+ let adminURLFromSiteURLString = url + " /wp-admin "
33+ return URL ( string: adminURLFromSiteURLString)
3434 }
3535 return adminURL
3636 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ final class HubMenuViewModel: ObservableObject {
3434 }
3535 var woocommerceAdminURL : URL {
3636 guard let urlString = stores. sessionManager. defaultSite? . adminURL, let url = URL ( string: urlString) else {
37- return stores. sessionManager. defaultSite? . adminURLFromSiteURLString ( ) ??
37+ return stores. sessionManager. defaultSite? . adminURLWithFallback ( ) ??
3838 WooConstants . URLs. blog. asURL ( )
3939 }
4040 return url
You can’t perform that action at this time.
0 commit comments