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 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.9.0 4.9.1 5.0.1 5.0.2 5.1.1 5.1.2 5.1.3 5.2.0 5.2.1 5.3.2 5.3.3.1 5.3.4 5.3.5 5.3.6 5.3.7
woocommerce-multilingual / classes / class-wcml-tracking-link.php
woocommerce-multilingual / classes Last commit date
API 1 week ago AdminDashboard 1 week ago AdminNotices 1 week ago AdminTexts 3 years ago Attributes 1 week ago Block 1 week ago CLI 5 years ago COT 1 week ago CacheInvalidate 1 week ago Container 1 week ago Coupons 1 week ago DisplayAsTranslated 1 week ago DownloadableFiles 1 week ago EditorScopedSync 1 week ago Email 1 week ago Endpoints 1 week ago Exporter 1 week ago HomeScreen 1 month ago Importer 1 week ago MO 1 week ago Multicurrency 1 week ago Options 1 week ago OrderItems 1 week ago Orders 1 week ago PaymentGateways 1 week ago Permalinks 1 week ago PointerUi 1 week ago PostHog 1 month ago Reports 1 week ago Rest 1 week ago Reviews 1 week ago RewriteRules 1 week ago StandAlone 1 week ago Synchronization 1 week ago TMDashboard 1 week ago Tax 1 week ago Terms 1 week ago TranslationControls 1 week ago TranslationJob 1 week ago User 1 week ago Utilities 1 week ago WcEmailSettings 1 week ago currencies 1 week ago media 1 week ago multi-currency 1 week ago order-property-filter 1 week ago pointers 1 week ago privacy 1 week ago product 1 week ago shortcodes 1 week ago taxonomy-translation 1 week ago templates 1 week ago url-filters 1 week ago urls 1 week ago wcml-setup 1 week ago class-wcml-admin-cookie.php 1 week ago class-wcml-tracking-link.php 1 week ago class-woocommerce-wpml.php 1 week ago
class-wcml-tracking-link.php
134 lines
1 <?php
2
3 class WCML_Tracking_Link {
4
5 const WPML_HOME = 'https://wpml.org/';
6 const WPML_ST_FAQ = 'https://wpml.org/faq/how-to-add-string-translation-to-your-site/';
7 const WPML_PURCHASE = 'https://wpml.org/purchase/';
8 const WPML_SUPPORT = 'https://wpml.org/forums/forum/english-support/';
9 const WPML_ACCOUNT = 'https://wpml.org/shop/account/';
10 const WPML_AUTO_TRANSLATION_DOC = 'https://wpml.org/documentation/automatic-translation/';
11
12 const WCML_MAIN_DOC = 'https://wpml.org/documentation/related-projects/woocommerce-multilingual/';
13 const WCML_MULTI_CURRENCY_DOC = 'https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/';
14 const WCML_CLEAR_CART_DOC = 'https://wpml.org/documentation/related-projects/woocommerce-multilingual/clearing-cart-contents-when-language-or-currency-change/';
15 const WCML_DISPLAY_AS_TRANSLATED_DOC = 'https://wpml.org/documentation/related-projects/woocommerce-multilingual/displaying-untranslated-products-in-secondary-languages/';
16 const WCML_TRANSLATE_EMAILS_DOC = 'https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce';
17 const WCML_TRANSLATE_EMAILS_CAMPAIGN = 'woocommerce-emails';
18
19 const WCML_BOOKINGS_DOC = 'https://wpml.org/documentation/woocommerce-extensions-compatibility/translating-woocommerce-bookings-woocommerce-multilingual/';
20 const WCML_BOOKINGS_CAMPAIGN = 'woocommerce-bookings';
21 const WCML_PRODUCT_ADDONS_DOC = 'https://wpml.org/documentation/woocommerce-extensions-compatibility/translating-woocommerce-product-add-ons-woocommerce-multilingual/';
22 const WCML_PRODUCT_ADDONS_CAMPAIGN = 'woocommerce-product-addons';
23 const WCML_TAB_MANAGER_DOC = 'https://wpml.org/documentation/woocommerce-extensions-compatibility/translating-woocommerce-tab-manager-woocommerce-multilingual/';
24 const WCML_TAB_MANAGER_CAMPAIGN = 'woocommerce-tab-manager';
25 const WCML_TABLE_RATE_SHIPPING_DOC = 'https://wpml.org/documentation/woocommerce-extensions-compatibility/translating-woocommerce-table-rate-shipping-woocommerce-multilingual/';
26 const WCML_TABLE_RATE_SHIPPING_CAMPAIGN = 'woocommerce-table-rate-shipping';
27 const WCML_SUBSCRIPTIONS_DOC = 'https://wpml.org/documentation/woocommerce-extensions-compatibility/translating-woocommerce-subscriptions-woocommerce-multilingual/';
28 const WCML_SUBSCRIPTIONS_CAMPAIGN = 'woocommerce-product-subscriptions';
29 const WCML_CUSTOM_PRODUCT_TABS_DOC = 'https://wpml.org/plugin/custom-product-tabs-for-woocommerce/';
30
31 const UTM_TERM_WIZARD = 'wcml-setup-wizard';
32
33 public static function generate( $link, $id = false, $params = [] ) {
34 $params = array_merge( [
35 'utm_source' => 'plugin',
36 'utm_medium' => 'gui',
37 'utm_campaign' => 'wcml',
38 ], $params );
39
40 $link = add_query_arg( $params, $link );
41
42 if ( $id ) {
43 $link .= $id;
44 }
45
46 return $link;
47 }
48
49 private static function getStandaloneParams( $isStandalone ) {
50 return $isStandalone ? [ 'utm_campaign' => 'wcml-standalone' ] : [];
51 }
52
53 public static function getWpmlHome( $isStandalone = false ) {
54 return self::generate( self::WPML_HOME, false, self::getStandaloneParams( $isStandalone ) );
55 }
56
57 public static function getWpmlStFaq( $isStandalone = false ) {
58 return self::generate( self::WPML_ST_FAQ, false, self::getStandaloneParams( $isStandalone ) );
59 }
60
61 public static function getWpmlPurchase( $isStandalone = false ) {
62 return self::generate( self::WPML_PURCHASE, false, self::getStandaloneParams( $isStandalone ) );
63 }
64
65 public static function getWpmlSupport() {
66 return self::generate( self::WPML_SUPPORT );
67 }
68
69 public static function getWpmlAccount() {
70 return self::generate( self::WPML_ACCOUNT );
71 }
72
73 public static function getWpmlAutoTranslationDoc() {
74 return self::generate( self::WPML_AUTO_TRANSLATION_DOC );
75 }
76
77 public static function getWcmlMainDoc( $id = false, $params = [] ) {
78 return self::generate( self::WCML_MAIN_DOC, $id, $params );
79 }
80
81 public static function getWcmlMultiCurrencyDoc( $id = false, $params = [] ) {
82 return self::generate( self::WCML_MULTI_CURRENCY_DOC, $id, $params );
83 }
84
85 public static function getWcmlClearCartDoc() {
86 return self::generate( self::WCML_CLEAR_CART_DOC );
87 }
88
89 public static function getWcmlDisplayAsTranslatedDoc( $params = [] ) {
90 return self::generate( self::WCML_DISPLAY_AS_TRANSLATED_DOC, false, $params );
91 }
92
93 public static function getWcmlTranslateEmailsDoc() {
94 return self::generate( self::WCML_TRANSLATE_EMAILS_DOC, false, [
95 'utm_campaign' => self::WCML_TRANSLATE_EMAILS_CAMPAIGN,
96 ] ) . '#translate-woocommerce-emails';
97 }
98
99 public static function getWcmlBookingsDoc() {
100 return self::generate( self::WCML_BOOKINGS_DOC, false, [
101 'utm_campaign' => self::WCML_BOOKINGS_CAMPAIGN,
102 ] );
103 }
104
105 public static function getWcmlProductAddonsDoc() {
106 return self::generate( self::WCML_PRODUCT_ADDONS_DOC, false, [
107 'utm_campaign' => self::WCML_PRODUCT_ADDONS_CAMPAIGN,
108 ] );
109 }
110
111 public static function getWcmlTabManagerDoc() {
112 return self::generate( self::WCML_TAB_MANAGER_DOC, false, [
113 'utm_campaign' => self::WCML_TAB_MANAGER_CAMPAIGN,
114 ] );
115 }
116
117 public static function getWcmlTableRateShippingDoc() {
118 return self::generate( self::WCML_TABLE_RATE_SHIPPING_DOC, false, [
119 'utm_campaign' => self::WCML_TABLE_RATE_SHIPPING_CAMPAIGN,
120 ] );
121 }
122
123 public static function getWcmlSubscriptionsDoc() {
124 return self::generate( self::WCML_SUBSCRIPTIONS_DOC, false, [
125 'utm_campaign' => self::WCML_SUBSCRIPTIONS_CAMPAIGN,
126 ] );
127 }
128
129 public static function getWcmlCustomProductTabs() {
130 return self::generate( self::WCML_CUSTOM_PRODUCT_TABS_DOC );
131 }
132
133 }
134