File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
WooCommerce/Classes/Model Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 11import Foundation
2+ import WordPressAuthenticator
23
34/// For holding the custom help center content URL
45/// and analytics tracking values
@@ -14,20 +15,26 @@ struct CustomHelpCenterContent {
1415}
1516
1617extension CustomHelpCenterContent {
18+ enum Key : String {
19+ case step = " source_step "
20+ case flow = " source_flow "
21+ case url = " help_content_url "
22+ }
23+
1724 /// Initializes a `CustomHelpCenterContent` instance using `Step` and `Flow` from `AuthenticatorAnalyticsTracker`
1825 ///
19- init ? ( step: String , flow: String ) {
26+ init ? ( step: AuthenticatorAnalyticsTracker . Step , flow: AuthenticatorAnalyticsTracker . Flow ) {
2027 switch step {
21- case " start " where flow == " login_site_address " :
28+ case . start where flow == . loginWithSiteAddress :
2229 helpCenterContentURL = WooConstants . URLs. helpCenterForEnterStoreAddress. asURL ( )
2330 default :
2431 return nil
2532 }
2633
2734 trackingProperties = [
28- " source_step " : step,
29- " source_flow " : flow,
30- " help_content_url " : helpCenterContentURL. absoluteString
35+ Key . step . rawValue : step. rawValue ,
36+ Key . flow . rawValue : flow. rawValue ,
37+ Key . url . rawValue : helpCenterContentURL. absoluteString
3138 ]
3239 }
3340}
You can’t perform that action at this time.
0 commit comments