Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress - Version 1.0.4

Version Description

Download this release

Release Info

Developer Nikschavan
Plugin Icon Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress
Version 1.0.4
Comparing to
See all releases

Version 1.0.4

Files changed (98) hide show
  1. admin/assets/css/admin-menu-settings-rtl.css +292 -0
  2. admin/assets/css/admin-menu-settings.css +292 -0
  3. admin/assets/css/flow-admin-edit-rtl.css +91 -0
  4. admin/assets/css/flow-admin-edit.css +91 -0
  5. admin/assets/css/global-admin-rtl.css +790 -0
  6. admin/assets/css/global-admin.css +790 -0
  7. admin/assets/css/setup-wizard-rtl.css +1125 -0
  8. admin/assets/css/setup-wizard.css +1125 -0
  9. admin/assets/fonts/cartflows.eot +0 -0
  10. admin/assets/fonts/cartflows.svg +11 -0
  11. admin/assets/fonts/cartflows.ttf +0 -0
  12. admin/assets/fonts/cartflows.woff +0 -0
  13. admin/assets/js/admin-menu-settings.js +312 -0
  14. admin/assets/js/flow-admin-edit.js +147 -0
  15. admin/assets/js/global-admin.js +119 -0
  16. admin/assets/js/setup-wizard.js +141 -0
  17. admin/meta-assets/css/admin-edit-rtl.css +184 -0
  18. admin/meta-assets/css/admin-edit.css +184 -0
  19. admin/meta-assets/js/admin-edit.js +810 -0
  20. assets/css/checkout-template-divi-rtl.css +151 -0
  21. assets/css/checkout-template-divi.css +151 -0
  22. assets/css/checkout-template-rtl.css +814 -0
  23. assets/css/checkout-template.css +824 -0
  24. assets/css/frontend-rtl.css +991 -0
  25. assets/css/frontend.css +991 -0
  26. assets/css/import-rtl.css +811 -0
  27. assets/css/import.css +813 -0
  28. assets/images/400x400.jpg +0 -0
  29. assets/images/cartflows-icon.svg +18 -0
  30. assets/images/cartflows-logo.svg +50 -0
  31. assets/images/cartflows-small.svg +21 -0
  32. assets/images/start-scratch.jpg +0 -0
  33. assets/js/checkout-template.js +232 -0
  34. assets/js/frontend.js +19 -0
  35. assets/js/import.js +1171 -0
  36. assets/js/rest-api.js +209 -0
  37. cartflows.php +24 -0
  38. changelog.txt +18 -0
  39. classes/batch-process/class-cartflows-batch-process-elementor.php +64 -0
  40. classes/batch-process/class-cartflows-batch-process.php +125 -0
  41. classes/batch-process/class-cartflows-importer-elementor.php +70 -0
  42. classes/batch-process/helpers/class-wp-async-request.php +164 -0
  43. classes/batch-process/helpers/class-wp-background-process.php +515 -0
  44. classes/class-cartflows-admin-fields.php +156 -0
  45. classes/class-cartflows-admin.php +398 -0
  46. classes/class-cartflows-api.php +376 -0
  47. classes/class-cartflows-bsf-updater.php +110 -0
  48. classes/class-cartflows-cloning.php +429 -0
  49. classes/class-cartflows-compatibility.php +224 -0
  50. classes/class-cartflows-default-meta.php +552 -0
  51. classes/class-cartflows-elementor-compatibility.php +66 -0
  52. classes/class-cartflows-flow-frontend.php +199 -0
  53. classes/class-cartflows-frontend.php +319 -0
  54. classes/class-cartflows-functions.php +387 -0
  55. classes/class-cartflows-helper.php +273 -0
  56. classes/class-cartflows-importer-core.php +269 -0
  57. classes/class-cartflows-importer.php +1036 -0
  58. classes/class-cartflows-loader.php +416 -0
  59. classes/class-cartflows-logger.php +101 -0
  60. classes/class-cartflows-meta-fields.php +940 -0
  61. classes/class-cartflows-meta.php +51 -0
  62. classes/class-cartflows-session.php +245 -0
  63. classes/class-cartflows-update.php +77 -0
  64. classes/class-cartflows-utils.php +344 -0
  65. classes/class-cartflows-wizard.php +447 -0
  66. classes/fields/typography/class-cartflows-font-families.php +312 -0
  67. classes/fields/typography/google-fonts.json +8771 -0
  68. classes/index.php +9 -0
  69. includes/admin/cartflows-admin.php +35 -0
  70. includes/admin/cartflows-general-bck.php +47 -0
  71. includes/admin/cartflows-general.php +127 -0
  72. languages/cartflows.pot +1048 -0
  73. modules/checkout/class-cartflows-checkout.php +48 -0
  74. modules/checkout/classes/class-cartflows-checkout-markup.php +942 -0
  75. modules/checkout/classes/class-cartflows-checkout-meta.php +757 -0
  76. modules/checkout/templates/embed/checkout-template-simple.php +30 -0
  77. modules/checkout/templates/wcf-template.php +58 -0
  78. modules/flow/class-cartflows-flow.php +48 -0
  79. modules/flow/classes/class-cartflows-flow-loader.php +58 -0
  80. modules/flow/classes/class-cartflows-flow-meta.php +743 -0
  81. modules/flow/classes/class-cartflows-flow-post-type.php +281 -0
  82. modules/flow/classes/class-cartflows-flow-shortcodes.php +173 -0
  83. modules/flow/classes/class-cartflows-step-post-meta.php +43 -0
  84. modules/flow/classes/class-cartflows-step-post-type.php +449 -0
  85. modules/flow/templates/index.php +8 -0
  86. modules/flow/templates/template-canvas.php +39 -0
  87. modules/flow/templates/template-default.php +44 -0
  88. modules/flow/view/meta-flow-steps.php +147 -0
  89. modules/index.php +9 -0
  90. modules/landing/class-cartflows-landing.php +48 -0
  91. modules/landing/classes/class-cartflows-landing-markup.php +133 -0
  92. modules/landing/classes/class-cartflows-landing-meta.php +266 -0
  93. modules/thankyou/class-cartflows-thankyou.php +48 -0
  94. modules/thankyou/classes/class-cartflows-thankyou-markup.php +242 -0
  95. modules/thankyou/classes/class-cartflows-thankyou-meta.php +405 -0
  96. modules/widgets/class-cartflows-next-step.php +155 -0
  97. modules/widgets/class-cartflows-widgets.php +58 -0
  98. readme.txt +42 -0
admin/assets/css/admin-menu-settings-rtl.css ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .notice:not(.wcf-notice) {
2
+ display: none;
3
+ }
4
+ .wcf-flex {
5
+ -js-display: flex;
6
+ display: -webkit-box;
7
+ display: -webkit-flex;
8
+ display: -moz-box;
9
+ display: -ms-flexbox;
10
+ display: flex;
11
+ -webkit-box-align: center;
12
+ -webkit-align-items: center;
13
+ -moz-box-align: center;
14
+ -ms-flex-align: center;
15
+ align-items: center;
16
+ -webkit-flex-wrap: wrap;
17
+ -ms-flex-wrap: wrap;
18
+ flex-wrap: wrap;
19
+ -webkit-align-content: center;
20
+ -ms-flex-line-pack: center;
21
+ align-content: center;
22
+ }
23
+
24
+ .form-field p.wcf-p {
25
+ margin: 1em 0;
26
+ }
27
+
28
+ .wcf-container {
29
+ max-width: 930px;
30
+ margin: 0 auto;
31
+ padding: 0 20px;
32
+ box-sizing: border-box;
33
+ }
34
+ .wcf-menu-page-wrapper .wrap {
35
+ margin: 0 auto;
36
+ }
37
+
38
+ .wcf-container #poststuff h2 {
39
+ padding: 12px 12px;
40
+ }
41
+ .wcf-container .postbox .hndle {
42
+ background: #ffffff;
43
+ border-bottom: 1px solid #e6e6e6;
44
+ }
45
+
46
+ .wcf-menu-page-wrapper{
47
+ right: -20px;
48
+ position: relative;
49
+ width: calc( 100% + 20px);
50
+ }
51
+
52
+ .wcf-menu-page-wrapper a {
53
+ text-decoration: none;
54
+ }
55
+
56
+ .wcf-general-form-wrap {
57
+ width: 680px;
58
+ }
59
+
60
+ .wcf-general-list .inside {
61
+ padding: 0;
62
+ margin: 0;
63
+ }
64
+
65
+ .wcf-list-section .wcf-widget-list li {
66
+ -js-display: flex;
67
+ display: -webkit-box;
68
+ display: -webkit-flex;
69
+ display: -moz-box;
70
+ display: -ms-flexbox;
71
+ display: flex;
72
+ -webkit-box-align: center;
73
+ -webkit-align-items: center;
74
+ -moz-box-align: center;
75
+ -ms-flex-align: center;
76
+ align-items: center;
77
+ -webkit-flex-wrap: wrap;
78
+ -ms-flex-wrap: wrap;
79
+ flex-wrap: wrap;
80
+ -webkit-align-content: center;
81
+ -ms-flex-line-pack: center;
82
+ align-content: center;
83
+ padding: 10px 12px;
84
+ -moz-box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
85
+ -webkit-box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
86
+ box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
87
+ margin-bottom: 0;
88
+ }
89
+
90
+ .wcf-list-section .wcf-widget-list li:nth-child(even) {
91
+ background-color: #fbfbfb;
92
+ }
93
+
94
+ .wcf-list-section .wcf-widget-list .activate {
95
+ border-right: 3px solid #008ec2;
96
+ padding-right: 12px;
97
+ }
98
+
99
+ .wcf-widget-list a {
100
+ text-decoration: none;
101
+ }
102
+
103
+ .wcf-widget-link-wrapper {
104
+ -js-display: flex;
105
+ display: -webkit-box;
106
+ display: -webkit-flex;
107
+ display: -moz-box;
108
+ display: -ms-flexbox;
109
+ display: flex;
110
+ -webkit-box-align: center;
111
+ -webkit-align-items: center;
112
+ -moz-box-align: center;
113
+ -ms-flex-align: center;
114
+ align-items: center;
115
+ -webkit-flex-wrap: wrap;
116
+ -ms-flex-wrap: wrap;
117
+ flex-wrap: wrap;
118
+ -webkit-align-content: center;
119
+ -ms-flex-line-pack: center;
120
+ align-content: center;
121
+ display: -webkit-flex;
122
+ -webkit-flex-direction: row-reverse;
123
+ flex-direction: row-reverse;
124
+ flex: auto;
125
+ }
126
+
127
+ .wcf-widget-list li a:before {
128
+ display: inline-block;
129
+ margin-left: 2px;
130
+ font: normal 20px/1 'dashicons';
131
+ -webkit-font-smoothing: antialiased;
132
+ -moz-osx-font-smoothing: grayscale;
133
+ vertical-align: top;
134
+ }
135
+
136
+ .wcf-widget-link-wrapper a:nth-child(even) {
137
+ margin: 0 10px;
138
+ }
139
+
140
+ .wcf-container .postbox .hndle {
141
+ background: #f7f7f7;
142
+ border-bottom: 2px solid #e6e6e6;
143
+ }
144
+ .wcf-container .postbox ul{
145
+ margin: 0;
146
+ }
147
+ .wcf-widget-list a{
148
+ line-height: 1.6;
149
+ }
150
+ .wcf-widget-list a:focus{
151
+ box-shadow: none;
152
+ }
153
+
154
+ .wcf-branding-list{
155
+ margin:0;
156
+ }
157
+
158
+ /* Update icon. */
159
+ .wcf-widget-link-wrapper a.updating-message:before {
160
+ color: #f56e28;
161
+ content: "\f463";
162
+ }
163
+
164
+ /* Spins the update icon. */
165
+ .wcf-widget-link-wrapper a.updating-message:before {
166
+ -webkit-animation: rotation 2s infinite linear;
167
+ animation: rotation 2s infinite linear;
168
+ }
169
+
170
+ /* Header */
171
+ .wcf-menu-page-header.general .wcf-container,
172
+ .wcf-menu-page-header.branding .wcf-container,
173
+ .wcf-container.wcf-general,
174
+ .wcf-container.wcf-branding-wrapper {
175
+ max-width: 930px;
176
+ }
177
+ .wcf-title {
178
+ flex: auto;
179
+ align-content: flex-start;
180
+ text-align: right;
181
+ }
182
+ .wcf-title a,
183
+ .wcf-title span {
184
+ display: block;
185
+ outline: none;
186
+ box-shadow: none;
187
+ font-size: 1.5rem;
188
+ color: #333333;
189
+ font-weight: 500;
190
+ }
191
+
192
+ .wcf-header-icon {
193
+ width: 200px;
194
+ vertical-align: bottom;
195
+ }
196
+ .wcf-top-links {
197
+ flex: auto;
198
+ text-align: left;
199
+ font-weight: 500;
200
+ }
201
+ .wcf-menu-page-header {
202
+ background-color: #fff;
203
+ text-align: center;
204
+ padding: 20px 0;
205
+ margin-bottom: 20px;
206
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
207
+ }
208
+
209
+ .wcf-logo {
210
+ max-width: 170px;
211
+ }
212
+
213
+ /* Spinner */
214
+ .wcf-button-spinner:before {
215
+ font: normal 20px/.5 dashicons;
216
+ speak: none;
217
+ display: inline-block;
218
+ padding: 0;
219
+ top: 8px;
220
+ right: -4px;
221
+ position: relative;
222
+ vertical-align: top;
223
+ content: "\f463";
224
+ }
225
+
226
+ .wcf-button-spinner.loading:before {
227
+ -webkit-animation: rotation 1s infinite linear;
228
+ animation: rotation 1s infinite linear;
229
+ }
230
+
231
+
232
+ /* New CSS */
233
+ .wcf-setting-tab-wrapper .wcf-setting-tab {
234
+ padding: 10px 15px;
235
+ display: flex;
236
+ flex-wrap: wrap;
237
+ }
238
+
239
+ .wcf-setting-tab-wrapper .wcf-tab-title {
240
+ width: 40%;
241
+ }
242
+
243
+ .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
244
+ width: 60%;
245
+ text-align: left;
246
+ }
247
+
248
+ /** Settings Page - Introduction Box */
249
+ #wcf-menu-page .introduction iframe {
250
+ width: 100%;
251
+ vertical-align: middle;
252
+ }
253
+ #wcf-menu-page .introduction .iframe-wrap {
254
+ margin: -6px -12px 0px -12px;
255
+ }
256
+
257
+
258
+ /* Form Fields */
259
+ .form-field-label,
260
+ .form-field-data {
261
+ display: inline-block;
262
+ padding-left: 5px;
263
+ }
264
+ .form-field-actions {
265
+ display: inline-block;
266
+ margin-right: 15px;
267
+ }
268
+ .form-field-actions a {
269
+ margin: 0 0 0 12px;
270
+ }
271
+ .form-field-actions span.dashicons {
272
+ margin: 0 0 0 5px;
273
+ }
274
+ .form-field-desc {
275
+ margin: 5px 0 0;
276
+ }
277
+ #poststuff .general-settings-form .inside {
278
+ margin: 2em 0 0;
279
+ }
280
+ .general-settings-form .form-field {
281
+ border-bottom: 1px solid #e6e6e6;
282
+ display: block;
283
+ width: 100%;
284
+ margin: 0 0 1em;
285
+ padding: 0 0 1em;
286
+ }
287
+ .general-settings-form .form-field:first-child {
288
+ margin: 1em 0 1em;
289
+ }
290
+ .general-settings-form .form-field:last-child {
291
+ border: none;
292
+ }
admin/assets/css/admin-menu-settings.css ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .notice:not(.wcf-notice) {
2
+ display: none;
3
+ }
4
+ .wcf-flex {
5
+ -js-display: flex;
6
+ display: -webkit-box;
7
+ display: -webkit-flex;
8
+ display: -moz-box;
9
+ display: -ms-flexbox;
10
+ display: flex;
11
+ -webkit-box-align: center;
12
+ -webkit-align-items: center;
13
+ -moz-box-align: center;
14
+ -ms-flex-align: center;
15
+ align-items: center;
16
+ -webkit-flex-wrap: wrap;
17
+ -ms-flex-wrap: wrap;
18
+ flex-wrap: wrap;
19
+ -webkit-align-content: center;
20
+ -ms-flex-line-pack: center;
21
+ align-content: center;
22
+ }
23
+
24
+ .form-field p.wcf-p {
25
+ margin: 1em 0;
26
+ }
27
+
28
+ .wcf-container {
29
+ max-width: 930px;
30
+ margin: 0 auto;
31
+ padding: 0 20px;
32
+ box-sizing: border-box;
33
+ }
34
+ .wcf-menu-page-wrapper .wrap {
35
+ margin: 0 auto;
36
+ }
37
+
38
+ .wcf-container #poststuff h2 {
39
+ padding: 12px 12px;
40
+ }
41
+ .wcf-container .postbox .hndle {
42
+ background: #ffffff;
43
+ border-bottom: 1px solid #e6e6e6;
44
+ }
45
+
46
+ .wcf-menu-page-wrapper{
47
+ left: -20px;
48
+ position: relative;
49
+ width: calc( 100% + 20px);
50
+ }
51
+
52
+ .wcf-menu-page-wrapper a {
53
+ text-decoration: none;
54
+ }
55
+
56
+ .wcf-general-form-wrap {
57
+ width: 680px;
58
+ }
59
+
60
+ .wcf-general-list .inside {
61
+ padding: 0;
62
+ margin: 0;
63
+ }
64
+
65
+ .wcf-list-section .wcf-widget-list li {
66
+ -js-display: flex;
67
+ display: -webkit-box;
68
+ display: -webkit-flex;
69
+ display: -moz-box;
70
+ display: -ms-flexbox;
71
+ display: flex;
72
+ -webkit-box-align: center;
73
+ -webkit-align-items: center;
74
+ -moz-box-align: center;
75
+ -ms-flex-align: center;
76
+ align-items: center;
77
+ -webkit-flex-wrap: wrap;
78
+ -ms-flex-wrap: wrap;
79
+ flex-wrap: wrap;
80
+ -webkit-align-content: center;
81
+ -ms-flex-line-pack: center;
82
+ align-content: center;
83
+ padding: 10px 12px;
84
+ -moz-box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
85
+ -webkit-box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
86
+ box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1) inset;
87
+ margin-bottom: 0;
88
+ }
89
+
90
+ .wcf-list-section .wcf-widget-list li:nth-child(even) {
91
+ background-color: #fbfbfb;
92
+ }
93
+
94
+ .wcf-list-section .wcf-widget-list .activate {
95
+ border-left: 3px solid #008ec2;
96
+ padding-left: 12px;
97
+ }
98
+
99
+ .wcf-widget-list a {
100
+ text-decoration: none;
101
+ }
102
+
103
+ .wcf-widget-link-wrapper {
104
+ -js-display: flex;
105
+ display: -webkit-box;
106
+ display: -webkit-flex;
107
+ display: -moz-box;
108
+ display: -ms-flexbox;
109
+ display: flex;
110
+ -webkit-box-align: center;
111
+ -webkit-align-items: center;
112
+ -moz-box-align: center;
113
+ -ms-flex-align: center;
114
+ align-items: center;
115
+ -webkit-flex-wrap: wrap;
116
+ -ms-flex-wrap: wrap;
117
+ flex-wrap: wrap;
118
+ -webkit-align-content: center;
119
+ -ms-flex-line-pack: center;
120
+ align-content: center;
121
+ display: -webkit-flex;
122
+ -webkit-flex-direction: row-reverse;
123
+ flex-direction: row-reverse;
124
+ flex: auto;
125
+ }
126
+
127
+ .wcf-widget-list li a:before {
128
+ display: inline-block;
129
+ margin-right: 2px;
130
+ font: normal 20px/1 'dashicons';
131
+ -webkit-font-smoothing: antialiased;
132
+ -moz-osx-font-smoothing: grayscale;
133
+ vertical-align: top;
134
+ }
135
+
136
+ .wcf-widget-link-wrapper a:nth-child(even) {
137
+ margin: 0 10px;
138
+ }
139
+
140
+ .wcf-container .postbox .hndle {
141
+ background: #f7f7f7;
142
+ border-bottom: 2px solid #e6e6e6;
143
+ }
144
+ .wcf-container .postbox ul{
145
+ margin: 0;
146
+ }
147
+ .wcf-widget-list a{
148
+ line-height: 1.6;
149
+ }
150
+ .wcf-widget-list a:focus{
151
+ box-shadow: none;
152
+ }
153
+
154
+ .wcf-branding-list{
155
+ margin:0;
156
+ }
157
+
158
+ /* Update icon. */
159
+ .wcf-widget-link-wrapper a.updating-message:before {
160
+ color: #f56e28;
161
+ content: "\f463";
162
+ }
163
+
164
+ /* Spins the update icon. */
165
+ .wcf-widget-link-wrapper a.updating-message:before {
166
+ -webkit-animation: rotation 2s infinite linear;
167
+ animation: rotation 2s infinite linear;
168
+ }
169
+
170
+ /* Header */
171
+ .wcf-menu-page-header.general .wcf-container,
172
+ .wcf-menu-page-header.branding .wcf-container,
173
+ .wcf-container.wcf-general,
174
+ .wcf-container.wcf-branding-wrapper {
175
+ max-width: 930px;
176
+ }
177
+ .wcf-title {
178
+ flex: auto;
179
+ align-content: flex-start;
180
+ text-align: left;
181
+ }
182
+ .wcf-title a,
183
+ .wcf-title span {
184
+ display: block;
185
+ outline: none;
186
+ box-shadow: none;
187
+ font-size: 1.5rem;
188
+ color: #333333;
189
+ font-weight: 500;
190
+ }
191
+
192
+ .wcf-header-icon {
193
+ width: 200px;
194
+ vertical-align: bottom;
195
+ }
196
+ .wcf-top-links {
197
+ flex: auto;
198
+ text-align: right;
199
+ font-weight: 500;
200
+ }
201
+ .wcf-menu-page-header {
202
+ background-color: #fff;
203
+ text-align: center;
204
+ padding: 20px 0;
205
+ margin-bottom: 20px;
206
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
207
+ }
208
+
209
+ .wcf-logo {
210
+ max-width: 170px;
211
+ }
212
+
213
+ /* Spinner */
214
+ .wcf-button-spinner:before {
215
+ font: normal 20px/.5 dashicons;
216
+ speak: none;
217
+ display: inline-block;
218
+ padding: 0;
219
+ top: 8px;
220
+ left: -4px;
221
+ position: relative;
222
+ vertical-align: top;
223
+ content: "\f463";
224
+ }
225
+
226
+ .wcf-button-spinner.loading:before {
227
+ -webkit-animation: rotation 1s infinite linear;
228
+ animation: rotation 1s infinite linear;
229
+ }
230
+
231
+
232
+ /* New CSS */
233
+ .wcf-setting-tab-wrapper .wcf-setting-tab {
234
+ padding: 10px 15px;
235
+ display: flex;
236
+ flex-wrap: wrap;
237
+ }
238
+
239
+ .wcf-setting-tab-wrapper .wcf-tab-title {
240
+ width: 40%;
241
+ }
242
+
243
+ .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
244
+ width: 60%;
245
+ text-align: right;
246
+ }
247
+
248
+ /** Settings Page - Introduction Box */
249
+ #wcf-menu-page .introduction iframe {
250
+ width: 100%;
251
+ vertical-align: middle;
252
+ }
253
+ #wcf-menu-page .introduction .iframe-wrap {
254
+ margin: -6px -12px 0px -12px;
255
+ }
256
+
257
+
258
+ /* Form Fields */
259
+ .form-field-label,
260
+ .form-field-data {
261
+ display: inline-block;
262
+ padding-right: 5px;
263
+ }
264
+ .form-field-actions {
265
+ display: inline-block;
266
+ margin-left: 15px;
267
+ }
268
+ .form-field-actions a {
269
+ margin: 0 12px 0 0;
270
+ }
271
+ .form-field-actions span.dashicons {
272
+ margin: 0 5px 0 0;
273
+ }
274
+ .form-field-desc {
275
+ margin: 5px 0 0;
276
+ }
277
+ #poststuff .general-settings-form .inside {
278
+ margin: 2em 0 0;
279
+ }
280
+ .general-settings-form .form-field {
281
+ border-bottom: 1px solid #e6e6e6;
282
+ display: block;
283
+ width: 100%;
284
+ margin: 0 0 1em;
285
+ padding: 0 0 1em;
286
+ }
287
+ .general-settings-form .form-field:first-child {
288
+ margin: 1em 0 1em;
289
+ }
290
+ .general-settings-form .form-field:last-child {
291
+ border: none;
292
+ }
admin/assets/css/flow-admin-edit-rtl.css ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .post-type-cartflows_flow.post-php .page-title-action {
2
+ display: none;
3
+ }
4
+
5
+ .wcf-flow-steps-meta-actions {
6
+ margin: 1em 0 2em 0;
7
+ }
8
+ .wcf-setup-default-steps {
9
+ padding: 10px;
10
+ border: 1px solid #e5e5e5;
11
+ display: inline-block;
12
+ }
13
+ .wcf-flow-steps-meta-box {
14
+ display: block;
15
+ clear: both;
16
+ }
17
+ .wcf-flow-settings {
18
+ display: flex;
19
+ clear: both;
20
+ }
21
+ .wcf-flow-steps-wrap {
22
+ display: inline-block;
23
+ width: 30%;
24
+ padding-left: 1em;
25
+ border-left: 1px solid #e5e5e5;
26
+ }
27
+ .wcf-flow-steps-data-wrap {
28
+ display: inline-block;
29
+ width: 70%;
30
+ padding: 1em 1.5em;
31
+ }
32
+
33
+ .wcf-step-content {
34
+ display: none;
35
+ }
36
+
37
+ .wcf-add-flow-step-data th,
38
+ .wcf-add-flow-step-data td {
39
+ padding: 0 0 10px 10px;
40
+ }
41
+
42
+ .wcf-word-wrap{
43
+ width: 55%;
44
+ display: inline-flex;
45
+ }
46
+
47
+ .wcf-import-step-content{
48
+ display: table;
49
+ }
50
+
51
+ .wcf-import-step-message,
52
+ .wcf-import-step-button{
53
+ display: table-cell;
54
+ vertical-align: middle;
55
+ }
56
+
57
+ .wcf-import-step-message p{
58
+ margin:0px;
59
+ padding: 0px;
60
+ text-align: justify;
61
+ padding-left: 15px;
62
+ }
63
+
64
+ /* Invalide Step */
65
+ .wcf-step-wrap.invalid-step {
66
+ pointer-events: none;
67
+ }
68
+ .wcf-step-wrap.invalid-step .wcf-step-delete{
69
+ pointer-events: auto;
70
+ }
71
+ .wcf-step-wrap.invalid-step .wcf-step .wcf-flow-badge {
72
+ color: red;
73
+ }
74
+
75
+ .wcf-no-product-badge{
76
+ color: #FFFFFF;
77
+ background-color: #f16334;
78
+ padding: 0.3em .6em 0.3em;
79
+ font-size: 0.7em;
80
+ font-weight: 600;
81
+ border-radius: 0px;
82
+ line-height: 0.7em;
83
+ margin-right: 10px;
84
+ text-align: center;
85
+ vertical-align: middle;
86
+ }
87
+
88
+ .wcf-step-wrap.wcf-no-product-step{
89
+ border-right: 3px solid #f16334;
90
+ }
91
+
admin/assets/css/flow-admin-edit.css ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .post-type-cartflows_flow.post-php .page-title-action {
2
+ display: none;
3
+ }
4
+
5
+ .wcf-flow-steps-meta-actions {
6
+ margin: 1em 0 2em 0;
7
+ }
8
+ .wcf-setup-default-steps {
9
+ padding: 10px;
10
+ border: 1px solid #e5e5e5;
11
+ display: inline-block;
12
+ }
13
+ .wcf-flow-steps-meta-box {
14
+ display: block;
15
+ clear: both;
16
+ }
17
+ .wcf-flow-settings {
18
+ display: flex;
19
+ clear: both;
20
+ }
21
+ .wcf-flow-steps-wrap {
22
+ display: inline-block;
23
+ width: 30%;
24
+ padding-right: 1em;
25
+ border-right: 1px solid #e5e5e5;
26
+ }
27
+ .wcf-flow-steps-data-wrap {
28
+ display: inline-block;
29
+ width: 70%;
30
+ padding: 1em 1.5em;
31
+ }
32
+
33
+ .wcf-step-content {
34
+ display: none;
35
+ }
36
+
37
+ .wcf-add-flow-step-data th,
38
+ .wcf-add-flow-step-data td {
39
+ padding: 0 10px 10px 0;
40
+ }
41
+
42
+ .wcf-word-wrap{
43
+ width: 55%;
44
+ display: inline-flex;
45
+ }
46
+
47
+ .wcf-import-step-content{
48
+ display: table;
49
+ }
50
+
51
+ .wcf-import-step-message,
52
+ .wcf-import-step-button{
53
+ display: table-cell;
54
+ vertical-align: middle;
55
+ }
56
+
57
+ .wcf-import-step-message p{
58
+ margin:0px;
59
+ padding: 0px;
60
+ text-align: justify;
61
+ padding-right: 15px;
62
+ }
63
+
64
+ /* Invalide Step */
65
+ .wcf-step-wrap.invalid-step {
66
+ pointer-events: none;
67
+ }
68
+ .wcf-step-wrap.invalid-step .wcf-step-delete{
69
+ pointer-events: auto;
70
+ }
71
+ .wcf-step-wrap.invalid-step .wcf-step .wcf-flow-badge {
72
+ color: red;
73
+ }
74
+
75
+ .wcf-no-product-badge{
76
+ color: #FFFFFF;
77
+ background-color: #f16334;
78
+ padding: 0.3em .6em 0.3em;
79
+ font-size: 0.7em;
80
+ font-weight: 600;
81
+ border-radius: 0px;
82
+ line-height: 0.7em;
83
+ margin-left: 10px;
84
+ text-align: center;
85
+ vertical-align: middle;
86
+ }
87
+
88
+ .wcf-step-wrap.wcf-no-product-step{
89
+ border-left: 3px solid #f16334;
90
+ }
91
+
admin/assets/css/global-admin-rtl.css ADDED
@@ -0,0 +1,790 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * ************************************************
3
+ * Plugin Name: Cartflows
4
+ * Plugin URL: https://cartflows.com/
5
+ * Description: CartFlows for WooCommerce.
6
+ * Author: Brainstorm Force
7
+ * Author URI: https://www.brainstormforce.com/
8
+ * Version: 1.0
9
+ * ************************************************
10
+ */
11
+
12
+ /**
13
+ * *********************
14
+ * Cartflows Font Icon
15
+ * *********************
16
+ */
17
+ @font-face {
18
+ font-family: 'cartflows-icon';
19
+ src: url('../fonts/cartflows.eot?vgky31');
20
+ src: url('../fonts/cartflows.eot?vgky31#iefix') format('embedded-opentype'),
21
+ url('../fonts/cartflows.ttf?vgky31') format('truetype'),
22
+ url('../fonts/cartflows.woff?vgky31') format('woff'),
23
+ url('../fonts/cartflows.svg?vgky31#cartflows') format('svg');
24
+ font-weight: normal;
25
+ font-style: normal;
26
+ }
27
+
28
+ [class^="cartflows-icon"], [class*=" cartflows-icon"] {
29
+ font-family: 'cartflows-icon' !important;
30
+ speak: none;
31
+ font-style: normal;
32
+ font-weight: normal;
33
+ font-variant: normal;
34
+ text-transform: none;
35
+ line-height: 1;
36
+ -webkit-font-smoothing: antialiased;
37
+ -moz-osx-font-smoothing: grayscale;
38
+ }
39
+
40
+ .cartflows-icon:before {
41
+ content: "\e900";
42
+ color: #f16334;
43
+ }
44
+
45
+
46
+ /**
47
+ *
48
+ * Step Meta - All Page Css
49
+ */
50
+
51
+ .post-type-cartflows_step #delete-action {
52
+ display: none;
53
+ }
54
+
55
+ /*
56
+ * ************************
57
+ * Post page Name & Button
58
+ * ************************
59
+ */
60
+
61
+ .post-type-cartflows_flow .wrap{
62
+ margin: 25px 2px 0 20px;
63
+ }
64
+
65
+ .wcf-notice-back-edit-flow .dashicons {
66
+ vertical-align: text-bottom;
67
+ }
68
+
69
+ .post-type-cartflows_flow .wcf-notice-back-edit-flow{
70
+ margin-top: 30px;
71
+ }
72
+
73
+ .post-type-cartflows_flow .wcf-notice-back-edit-flow .button-primary{
74
+ height: 30px;
75
+ }
76
+ .wcf-notice-back-edit-flow .dashicons-arrow-left-alt{
77
+ vertical-align: text-bottom;
78
+ }
79
+
80
+ /*
81
+ * ************************
82
+ * Add Flow Popup Window
83
+ * 1. Overlay
84
+ * 2. Popup Box Alignment
85
+ * 3. Buttons & Textbox
86
+ * 4. wcf-choose-type-box
87
+ * ************************
88
+ */
89
+
90
+ .wcf-overlay , .wcf-overlay-newstep {
91
+ display: none;
92
+ position: fixed;
93
+ width: 100%;
94
+ height: 100%;
95
+ background: rgba(0,0,0,0.6);
96
+ top: 0;
97
+ right: 0;
98
+ }
99
+
100
+ .wcf-popup .wcf-popup-header{
101
+ padding: 12px 20px;
102
+ overflow: hidden;
103
+ }
104
+
105
+ .wcf-popup .wcf-popup-header label{
106
+ color: #fff;
107
+ font-weight: 600;
108
+ float: right;
109
+ }
110
+ .wcf-popup, .wcf-popup-newstep {
111
+ display: none;
112
+ width: 600px;
113
+ top: 50%;
114
+ right: 50%;
115
+ position: fixed;
116
+ background: #ffffff;
117
+ transform: translate( 50%, -50% );
118
+ padding: 0px;
119
+ }
120
+
121
+ .wcf-close , .wcf-close-newstep{
122
+ position: relative;
123
+ width: 20px;
124
+ height: 20px;
125
+ float: left;
126
+ background: transparent;
127
+ color: #ffff;
128
+ font-size: 18px;
129
+ line-height: 14px;
130
+ text-align: center;
131
+ border-radius: 999px;
132
+ cursor: pointer;
133
+ }
134
+
135
+ .wcf-close .dashicons-no-alt{
136
+ vertical-align: middle;
137
+ }
138
+
139
+ .wcf-content {
140
+ text-align: right;
141
+ padding: 20px;;
142
+ }
143
+
144
+ .wcf-submit-wrap {
145
+ text-align: left;
146
+ margin: 25px 0 0 0;
147
+ }
148
+
149
+ .wcf-overlay.show,
150
+ .wcf-popup.show,
151
+ .wcf-overlay-newstep.show,
152
+ .wcf-popup-newstep.show
153
+ {
154
+ display: block;
155
+ }
156
+
157
+ .wcf-content input[type='text'] {
158
+ background-color: transparent;
159
+ box-shadow: none;
160
+ border:none;
161
+ border-bottom: 1px #ddd solid;
162
+ padding: 10px 0 10px;
163
+ width: 100%;
164
+ font-size: 15px;
165
+ }
166
+ .wcf-content input[type='text']:focus {
167
+ border-bottom: 1px #5b9dd9 solid;
168
+ }
169
+
170
+ .wcf-popup .wcf-choose-type-box{
171
+ width: 100%;
172
+ position: relative;
173
+ margin: 0 auto;
174
+ text-align: center;
175
+ padding: 0 0 15px 0;
176
+ overflow: overlay;
177
+ }
178
+
179
+ .wcf-popup .wcf-choose-type-box .wcf-default-type-box,
180
+ .wcf-popup .wcf-choose-type-box .wcf-import-type-box{
181
+ flex: 0 0 50%;
182
+ width: 46%;
183
+ float: right;
184
+ padding: 10px;
185
+ }
186
+
187
+ .wcf-default-type-box .wcf-default-type-content,
188
+ .wcf-import-type-box .wcf-import-type-content{
189
+ text-align: center;
190
+ padding: 0 0px 15px;
191
+ }
192
+
193
+ .wcf-default-type-box .wcf-default-type-content h3,
194
+ .wcf-import-type-box .wcf-import-type-content h3{
195
+ line-height: 1.4em;
196
+ }
197
+
198
+ .wcf-default-type-content:hover h3,
199
+ .wcf-import-type-content:hover h3{
200
+ color: rgb(0, 133, 186, 1)
201
+ }
202
+
203
+ .wcf-default-type-content h3 .dashicons,
204
+ .wcf-import-type-content h3 .dashicons{
205
+ vertical-align: middle;
206
+ }
207
+
208
+ .wcf-default-type-content .wcf-create-flow .dashicons-plus,
209
+ .wcf-import-type-content .wcf-create-flow .dashicons-plus{
210
+ vertical-align: middle;
211
+ }
212
+
213
+ /**
214
+ * ************************
215
+ * Flow Setting Meta Box
216
+ * ************************
217
+ */
218
+
219
+ .wcf-tooltip-text{
220
+ background: #444;
221
+ border-radius: 3px;
222
+ color: #fff;
223
+ height: auto;
224
+ right: 56px;
225
+ margin-top: 10px;
226
+ max-width: 150px;
227
+ position: absolute;
228
+ padding: 6px 10px;
229
+ top: auto;
230
+ display: none;
231
+ z-index: 10000;
232
+ }
233
+
234
+ .wcf-tooltip-text::before {
235
+ border-right: 5px solid transparent;
236
+ border-left: 5px solid transparent;
237
+ border-top: 5px solid transparent;
238
+ border-bottom: 5px solid #444;
239
+ bottom: auto;
240
+ content: " ";
241
+ font-size: 0;
242
+ right: 56px;
243
+ line-height: 0;
244
+ margin-right: -5px;
245
+ position: absolute;
246
+ top: -10px;
247
+ width: 0;
248
+ }
249
+
250
+ .display_tool_tip{
251
+ display: block;
252
+ }
253
+
254
+ /*.wcf-tooltip::before {
255
+ position: absolute;
256
+ top: 48px;
257
+ left: 53px;
258
+ background-color: #444;
259
+ border-radius: 5px;
260
+ color: #fff;
261
+ content: attr(data-tooltip);
262
+ padding: 0.5rem;
263
+ text-transform: none;
264
+ -webkit-transition: all 0.5s ease;
265
+ transition: all 0.5s ease;
266
+ width: 160px;
267
+ height: auto;
268
+ line-height: 1em;
269
+ }
270
+
271
+ .wcf-tooltip::after {
272
+ position: absolute;
273
+ top: auto;
274
+ bottom: 170px;
275
+ left: 115px;
276
+ border-left: 5px solid transparent;
277
+ border-right: 5px solid transparent;
278
+ border-top: 5px solid transparent;
279
+ border-bottom: 5px solid #444;
280
+ content: " ";
281
+ font-size: 0;
282
+ line-height: 0;
283
+ margin-left: -5px;
284
+ width: 0;
285
+ }
286
+
287
+
288
+ .wcf-tooltip.display_toot_tip::before,
289
+ .wcf-tooltip.display_toot_tip::after {
290
+ opacity: 1;
291
+ -webkit-transition: all 0.75s ease;
292
+ transition: all 0.75s ease;
293
+ word-break: break-all;
294
+ }
295
+
296
+ .wcf-tooltip::before,
297
+ .wcf-tooltip::after {
298
+ color: #efefef;
299
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
300
+ font-size: 13px;
301
+ opacity: 0;
302
+ pointer-events: none;
303
+ text-align: center;
304
+ }*/
305
+
306
+ .wcf-flow-sandbox-table .wcf-field-row .wcf-field-row-content{
307
+ width: 100%;
308
+ }
309
+
310
+ /**
311
+ * ******************************************************
312
+ * Shortcode Box on the Head Section of Checkout Meta Box
313
+ * ******************************************************
314
+ */
315
+ #field-wcf-shortcode{
316
+ display: none;
317
+ margin-right: 5px;
318
+ vertical-align: top;
319
+ line-height: 0;
320
+ }
321
+
322
+ /*
323
+ * ************************
324
+ * Css For
325
+ * 1. Flow Metabox
326
+ * 2. Textboxes
327
+ * 3. Select
328
+ * 4. Buttons
329
+ * 5. Steps Boxes
330
+ * ************************
331
+ */
332
+
333
+ /*
334
+ * ***************************************
335
+ * Flow Page Css (After removing meta box)
336
+ * 1. Step Badges
337
+ * ***************************************
338
+ */
339
+
340
+ .wcf-flow-steps-meta-box{
341
+ margin-top: 20px;
342
+ }
343
+
344
+ .wcf-flow-steps-meta-box .wcf-flow-settings{
345
+ width: 100%;
346
+ display: block;
347
+ }
348
+
349
+ .wcf-flow-steps-meta-box .wcf-new-step-badge
350
+ {
351
+ background-color: #0073aa;
352
+ color: #fff;
353
+ }
354
+
355
+ .wcf-flow-steps-meta-box .wcf-new-step-badge,
356
+ .wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
357
+ .wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
358
+ color: #000;
359
+ background-color: #E3E4E8;
360
+ padding: 0.3em .6em 0.3em;
361
+ font-size: 0.7em;
362
+ font-weight: 600;
363
+ border-radius: 0px;
364
+ line-height: 0.7em;
365
+ margin-right: 10px;
366
+ text-align: center;
367
+ vertical-align: middle;
368
+ }
369
+
370
+ #wcf-flow-settings .inside{
371
+ margin: 10px 0 0;
372
+ }
373
+
374
+ .wcf-flow-settings .wcf-flow-steps-data-wrap {
375
+ padding: 0 1em 1.5em;
376
+ }
377
+ .wcf-flow-settings .wcf-flow-steps-wrap{
378
+ border-left:none;
379
+ background-color: transparent;
380
+ width: 100%;
381
+ padding: 0px;
382
+ }
383
+
384
+ .wcf-flow-settings .wcf-step-left-content,
385
+ .wcf-flow-settings .wcf-steps-action-buttons{
386
+ display: inline-block;
387
+ width: 49%;
388
+ vertical-align: middle;
389
+ font-size: 13px;
390
+ line-height: 3em;
391
+ }
392
+
393
+ .wcf-flow-settings .wcf-step-left-content{
394
+ text-align: right;
395
+ }
396
+
397
+ .wcf-step-left-content .dashicons{
398
+ vertical-align: middle;
399
+ width: 1em;
400
+ height: 1em;
401
+ font-size: 1.5em;
402
+ line-height: 1em;
403
+ }
404
+
405
+ .wcf-flow-settings .wcf-steps-action-buttons{
406
+ text-align: left;
407
+ }
408
+
409
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
410
+ display: inline-block;
411
+ font-size: 1em;
412
+ line-height: 1em;
413
+ vertical-align: middle;
414
+ text-align: center;
415
+ margin-right: 15px;
416
+ text-decoration: none;
417
+ }
418
+
419
+ .wcf-flow-settings .wcf-action-button .dashicons{
420
+ pointer-events: none;
421
+ font-size: 1.5em;
422
+ width: 1em;
423
+ height: 1em;
424
+ vertical-align: middle;
425
+ }
426
+
427
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
428
+ display: inline-block;
429
+ line-height: 1.5em;
430
+ }
431
+
432
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-step{
433
+ color: #444;
434
+ border: none;
435
+ background-color: #fff;
436
+ box-shadow: 0px 0px 2px 0px #ddd;
437
+ padding: 15px 10px;
438
+ cursor: move;
439
+ }
440
+
441
+
442
+ .wcf-new-step-highlight{
443
+ border-right: 3px #0073aa solid;
444
+ }
445
+
446
+ .wcf-popup input[type='radio']
447
+ {
448
+ margin-top: 0px;
449
+ }
450
+
451
+ .wcf-popup label{
452
+ font-size: 16px;
453
+ }
454
+
455
+ .wcf-step-wrap {
456
+ margin-bottom: 15px;
457
+ }
458
+
459
+ #wcf-sandbox-settings .inside{
460
+ margin: 15px 0 10px;
461
+ }
462
+
463
+ .wcf-general-metabox-wrap .wcf-field-row{
464
+ display: inline-flex;
465
+ width: 100%;
466
+ }
467
+
468
+ .wcf-general-metabox-wrap .wcf-field-desc {
469
+ padding: 6px 0 0;
470
+ }
471
+
472
+ /*
473
+ * *****************************
474
+ * Custom classes for common use
475
+ * *****************************
476
+ */
477
+
478
+ .pull-right{
479
+ float: left;
480
+ }
481
+
482
+ .pull-left{
483
+ float: right;
484
+ }
485
+
486
+ .text-error {
487
+ border-bottom: 1px #FF5050 solid !important;
488
+ }
489
+
490
+ #show_error {
491
+ font-style: italic;
492
+ color: #FF5050
493
+ }
494
+
495
+ .wp-ui-text-primary {
496
+ color: #0073aa;
497
+ }
498
+
499
+ .wcf-column-left{
500
+ width: 25%;
501
+ float: right;
502
+ position: relative;
503
+ max-width: 300px;
504
+ }
505
+
506
+ .wcf-column-right{
507
+ width: 75%;
508
+ float: right;
509
+ position: relative;
510
+ background-color: #fff;
511
+ }
512
+
513
+ .wcf-import-step-content{
514
+ border-top: 1px #ddd solid;
515
+ padding-top: 10px;
516
+ margin-top: 30px;
517
+ }
518
+
519
+ /*
520
+ * ************************
521
+ * Display Template div css
522
+ * 1 Add, View & Import Buttons & Icons
523
+ * ************************
524
+ */
525
+
526
+ .wcf-flow-steps-data-wrap .wcf-step-content a .dashicons {
527
+ vertical-align: middle;
528
+ }
529
+
530
+ /*
531
+ * ************************************************
532
+ * Meta Boxs (All)
533
+ * 1. Setting Meta Box (#wcf-step-settings)
534
+ * 2. Checkout layout Meta Box (#wcf-checkout-settings)
535
+ * 3. Downsell Meta Box (#wcf-offer-settings)
536
+ * 4. Thank You Meta Box (#wcf-thankyou-settings)
537
+ * 5. Upsell Meta Box (#wcf-upsell-settings)
538
+ * ************************************************
539
+ */
540
+ .wcf-repeat-notice,
541
+ #wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
542
+ border-top: 1px #ddd solid;
543
+ margin-top: 10px;
544
+ padding-top: 20px;
545
+ }
546
+
547
+ .wcf-repeat-notice p{
548
+ margin: 5px 0px;
549
+ }
550
+
551
+ /*
552
+ * Inside Div css for all the metaboxes
553
+ */
554
+ #wcf-ladning-settings .inside,
555
+ #wcf-checkout-settings .inside,
556
+ #wcf-offer-settings .inside,
557
+ #wcf-upsell-settings .inside,
558
+ #wcf-thankyou-settings .inside{
559
+ margin:0px;
560
+ padding: 0px;
561
+ line-height: 0.9em;
562
+ }
563
+
564
+ /**
565
+ * ****************************
566
+ * 1. Container
567
+ * 2. Row
568
+ * 3. Content Divs
569
+ * 4. Button Divs
570
+ * 5. Alignment Classes
571
+ * ****************************
572
+ */
573
+ .wcf-table-container{
574
+ display: inline-block;
575
+ width: 100%;
576
+ max-width: 100%;
577
+ background-color: #fafafa;
578
+ margin-top: 0px;
579
+ line-height:1.2;
580
+ }
581
+
582
+
583
+ .wcf-column-right .wcf-field-section .wcf-field-section-heading{
584
+ color: #333;
585
+ padding: 10px 0 5px;
586
+ text-decoration: none;
587
+ font-size: 15px;
588
+ font-weight: 600;
589
+ }
590
+
591
+ .show_box
592
+ {
593
+ display: block!important;
594
+ }
595
+
596
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-field-row-content{
597
+ width: 100%;
598
+ border:1px solid #e5e5e5;
599
+ }
600
+
601
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-cpf-row{
602
+ border:none;
603
+ margin-bottom: 0px;
604
+ }
605
+
606
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-cpf-add-row{
607
+ padding: 0px 8px 10px;
608
+ background-color: #f9f9f9;
609
+ }
610
+
611
+ .wcf-table-container .wcf-column-right .wcf-field-row-heading{
612
+ font-size: 12px;
613
+ width: 30%;
614
+ height: 100%;
615
+ display: inline-block;
616
+ line-height: 1.5em;
617
+ vertical-align: middle;
618
+ min-height: 28px;
619
+ }
620
+ .wcf-table-container .wcf-column-right .wcf-field-row-content{
621
+ width: auto;
622
+ display: inline-block;
623
+ font-size: 12px;
624
+ vertical-align: middle;
625
+ }
626
+
627
+ .wcf-table-container .wcf-column-right .wcf-field-row-heading .dashicons {
628
+ line-height: 1.3em;
629
+ margin-right: 5px;
630
+ }
631
+
632
+ .wcf-cb-fields{
633
+ width: 50%;
634
+ float: right;
635
+ }
636
+
637
+ .wcf-cb-fields .wcf-field-row-heading,
638
+ .wcf-sb-fields .wcf-field-row-heading{
639
+ width: 50% !important;
640
+ }
641
+
642
+ .wcf-cb-fields .wcf-field-row-content,
643
+ .wcf-sb-fields .wcf-field-row-content{
644
+ width: 50% !important;
645
+ }
646
+
647
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container .select2-selection--single{
648
+ margin: 0px;
649
+ }
650
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container .select2-selection--single .select2-selection__rendered{
651
+ outline: none;
652
+ }
653
+
654
+ .wcf-table-container .wcf-column-right .wcf-field-row input[type="text"],
655
+ .wcf-table-container .wcf-column-right .wcf-field-row input[type="number"],
656
+ .wcf-table-container .wcf-column-right .wcf-field-row select,
657
+ .wcf-table-container .wcf-column-right .wcf-field-row textarea,
658
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container--default{
659
+ width: 300px;
660
+ max-width: 100%;
661
+ }
662
+
663
+ .wcf-table-container .wcf-column-right .wcf-field-row .wp-picker-container input[type=text].wp-color-picker{
664
+ width: 65px;
665
+ }
666
+ #wcf-step-settings .inside .wcf-checkout-table .field-wcf-step-type .wcf-field-row-content select{
667
+ border: none;
668
+ border-bottom: 1px #ccc solid;
669
+ box-shadow: none;
670
+ padding: 5px;
671
+ width: 30%;
672
+ }
673
+
674
+ /*
675
+ * ************************************
676
+ * All Page Types Setting's Meta Box
677
+ * Contains
678
+ * Checkout Metabox
679
+ * Upsell Metabox
680
+ * Downsell Metabox
681
+ * Thank You Metabox
682
+ * ************************************
683
+ */
684
+ .wcf-table-container .wcf-tab-wrapper{
685
+ background: #fafafa;
686
+ border:none;
687
+ margin: 0px 0 0;
688
+ }
689
+
690
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab{
691
+ background: transparent;
692
+ border-bottom: 1px #eee solid;
693
+ display: block;
694
+ margin: 0;
695
+ color: #0073aa;
696
+ line-height: 1em;
697
+ }
698
+
699
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab .wcf-tab-title{
700
+ margin-right: .200em;
701
+ margin-left: .618em;
702
+ }
703
+
704
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab.active{
705
+ background-color: #eee;
706
+ color: #555;
707
+ }
708
+
709
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab .dashicons{
710
+ font-size: initial;
711
+ width: auto;
712
+ height: auto;
713
+ }
714
+
715
+ .wcf-table-container .wcf-tab-content{
716
+ border: 1px #ddd solid;
717
+ border-left: none;
718
+ border-top: none;
719
+ border-bottom: none;
720
+ min-height: 149px;
721
+ overflow: hidden;
722
+ padding: 10px 0px;
723
+ }
724
+
725
+ .wcf-table-container .wcf-column-right .wcf-field-row,
726
+ .wcf-table-container .wcf-column-right .wcf-field-row,
727
+ .wcf-table-container .wcf-column-right .wcf-field-row,
728
+ .wcf-table-container .wcf-column-right .wcf-field-row{
729
+ padding: 10px 20px;
730
+ overflow: hidden;
731
+ }
732
+
733
+ .wcf-table-container .wcf-checkout-style .wcf-cs-fields-options,
734
+ .wcf-table-container .wcf-checkout-style .wcf-cs-button-options{
735
+ display: none;
736
+ }
737
+
738
+ .wcf-repeatables-wrap .wcf-repeatable-row{
739
+ background: #fff;
740
+ border:none;
741
+ margin-bottom: 5px;
742
+ }
743
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields{
744
+ padding: 0px;
745
+ }
746
+
747
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-row-actions{
748
+ float: none;
749
+ display: inline-block;
750
+ text-align: center;
751
+ margin-right: 15px;
752
+ }
753
+
754
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-remove{
755
+ vertical-align: middle;
756
+ padding: 5px;
757
+ line-height: inherit;
758
+ font-size: 13px;
759
+ }
760
+
761
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-remove .dashicons{
762
+ vertical-align: middle;
763
+ font-size: inherit;
764
+ }
765
+
766
+ .field-wcf-tq-advance-options-fields{
767
+ border-top: 1px solid #DDD;
768
+ margin-top: 15px;
769
+ }
770
+
771
+ /**
772
+ * ******************************
773
+ * Field - Post Meta Typography
774
+ * ******************************
775
+ */
776
+ .wcf-metabox-wrap .select2-container--default .select2-selection--single {
777
+ border: 1px solid #ddd;
778
+ box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
779
+ background-color: #fff;
780
+ color: #32373c;
781
+ outline: none;
782
+ transition: 0.05s border-color ease-in-out;
783
+ border-radius: 0;
784
+ font-size: 13px;
785
+ }
786
+
787
+ .wcf-metabox-wrap .select2-container--default .select2-search--dropdown .select2-search__field {
788
+ border: 1px solid #ddd;
789
+ box-shadow: none;
790
+ }
admin/assets/css/global-admin.css ADDED
@@ -0,0 +1,790 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * ************************************************
3
+ * Plugin Name: Cartflows
4
+ * Plugin URL: https://cartflows.com/
5
+ * Description: CartFlows for WooCommerce.
6
+ * Author: Brainstorm Force
7
+ * Author URI: https://www.brainstormforce.com/
8
+ * Version: 1.0
9
+ * ************************************************
10
+ */
11
+
12
+ /**
13
+ * *********************
14
+ * Cartflows Font Icon
15
+ * *********************
16
+ */
17
+ @font-face {
18
+ font-family: 'cartflows-icon';
19
+ src: url('../fonts/cartflows.eot?vgky31');
20
+ src: url('../fonts/cartflows.eot?vgky31#iefix') format('embedded-opentype'),
21
+ url('../fonts/cartflows.ttf?vgky31') format('truetype'),
22
+ url('../fonts/cartflows.woff?vgky31') format('woff'),
23
+ url('../fonts/cartflows.svg?vgky31#cartflows') format('svg');
24
+ font-weight: normal;
25
+ font-style: normal;
26
+ }
27
+
28
+ [class^="cartflows-icon"], [class*=" cartflows-icon"] {
29
+ font-family: 'cartflows-icon' !important;
30
+ speak: none;
31
+ font-style: normal;
32
+ font-weight: normal;
33
+ font-variant: normal;
34
+ text-transform: none;
35
+ line-height: 1;
36
+ -webkit-font-smoothing: antialiased;
37
+ -moz-osx-font-smoothing: grayscale;
38
+ }
39
+
40
+ .cartflows-icon:before {
41
+ content: "\e900";
42
+ color: #f16334;
43
+ }
44
+
45
+
46
+ /**
47
+ *
48
+ * Step Meta - All Page Css
49
+ */
50
+
51
+ .post-type-cartflows_step #delete-action {
52
+ display: none;
53
+ }
54
+
55
+ /*
56
+ * ************************
57
+ * Post page Name & Button
58
+ * ************************
59
+ */
60
+
61
+ .post-type-cartflows_flow .wrap{
62
+ margin: 25px 20px 0 2px;
63
+ }
64
+
65
+ .wcf-notice-back-edit-flow .dashicons {
66
+ vertical-align: text-bottom;
67
+ }
68
+
69
+ .post-type-cartflows_flow .wcf-notice-back-edit-flow{
70
+ margin-top: 30px;
71
+ }
72
+
73
+ .post-type-cartflows_flow .wcf-notice-back-edit-flow .button-primary{
74
+ height: 30px;
75
+ }
76
+ .wcf-notice-back-edit-flow .dashicons-arrow-left-alt{
77
+ vertical-align: text-bottom;
78
+ }
79
+
80
+ /*
81
+ * ************************
82
+ * Add Flow Popup Window
83
+ * 1. Overlay
84
+ * 2. Popup Box Alignment
85
+ * 3. Buttons & Textbox
86
+ * 4. wcf-choose-type-box
87
+ * ************************
88
+ */
89
+
90
+ .wcf-overlay , .wcf-overlay-newstep {
91
+ display: none;
92
+ position: fixed;
93
+ width: 100%;
94
+ height: 100%;
95
+ background: rgba(0,0,0,0.6);
96
+ top: 0;
97
+ left: 0;
98
+ }
99
+
100
+ .wcf-popup .wcf-popup-header{
101
+ padding: 12px 20px;
102
+ overflow: hidden;
103
+ }
104
+
105
+ .wcf-popup .wcf-popup-header label{
106
+ color: #fff;
107
+ font-weight: 600;
108
+ float: left;
109
+ }
110
+ .wcf-popup, .wcf-popup-newstep {
111
+ display: none;
112
+ width: 600px;
113
+ top: 50%;
114
+ left: 50%;
115
+ position: fixed;
116
+ background: #ffffff;
117
+ transform: translate( -50%, -50% );
118
+ padding: 0px;
119
+ }
120
+
121
+ .wcf-close , .wcf-close-newstep{
122
+ position: relative;
123
+ width: 20px;
124
+ height: 20px;
125
+ float: right;
126
+ background: transparent;
127
+ color: #ffff;
128
+ font-size: 18px;
129
+ line-height: 14px;
130
+ text-align: center;
131
+ border-radius: 999px;
132
+ cursor: pointer;
133
+ }
134
+
135
+ .wcf-close .dashicons-no-alt{
136
+ vertical-align: middle;
137
+ }
138
+
139
+ .wcf-content {
140
+ text-align: left;
141
+ padding: 20px;;
142
+ }
143
+
144
+ .wcf-submit-wrap {
145
+ text-align: right;
146
+ margin: 25px 0 0 0;
147
+ }
148
+
149
+ .wcf-overlay.show,
150
+ .wcf-popup.show,
151
+ .wcf-overlay-newstep.show,
152
+ .wcf-popup-newstep.show
153
+ {
154
+ display: block;
155
+ }
156
+
157
+ .wcf-content input[type='text'] {
158
+ background-color: transparent;
159
+ box-shadow: none;
160
+ border:none;
161
+ border-bottom: 1px #ddd solid;
162
+ padding: 10px 0 10px;
163
+ width: 100%;
164
+ font-size: 15px;
165
+ }
166
+ .wcf-content input[type='text']:focus {
167
+ border-bottom: 1px #5b9dd9 solid;
168
+ }
169
+
170
+ .wcf-popup .wcf-choose-type-box{
171
+ width: 100%;
172
+ position: relative;
173
+ margin: 0 auto;
174
+ text-align: center;
175
+ padding: 0 0 15px 0;
176
+ overflow: overlay;
177
+ }
178
+
179
+ .wcf-popup .wcf-choose-type-box .wcf-default-type-box,
180
+ .wcf-popup .wcf-choose-type-box .wcf-import-type-box{
181
+ flex: 0 0 50%;
182
+ width: 46%;
183
+ float: left;
184
+ padding: 10px;
185
+ }
186
+
187
+ .wcf-default-type-box .wcf-default-type-content,
188
+ .wcf-import-type-box .wcf-import-type-content{
189
+ text-align: center;
190
+ padding: 0 0px 15px;
191
+ }
192
+
193
+ .wcf-default-type-box .wcf-default-type-content h3,
194
+ .wcf-import-type-box .wcf-import-type-content h3{
195
+ line-height: 1.4em;
196
+ }
197
+
198
+ .wcf-default-type-content:hover h3,
199
+ .wcf-import-type-content:hover h3{
200
+ color: rgb(0, 133, 186, 1)
201
+ }
202
+
203
+ .wcf-default-type-content h3 .dashicons,
204
+ .wcf-import-type-content h3 .dashicons{
205
+ vertical-align: middle;
206
+ }
207
+
208
+ .wcf-default-type-content .wcf-create-flow .dashicons-plus,
209
+ .wcf-import-type-content .wcf-create-flow .dashicons-plus{
210
+ vertical-align: middle;
211
+ }
212
+
213
+ /**
214
+ * ************************
215
+ * Flow Setting Meta Box
216
+ * ************************
217
+ */
218
+
219
+ .wcf-tooltip-text{
220
+ background: #444;
221
+ border-radius: 3px;
222
+ color: #fff;
223
+ height: auto;
224
+ left: 56px;
225
+ margin-top: 10px;
226
+ max-width: 150px;
227
+ position: absolute;
228
+ padding: 6px 10px;
229
+ top: auto;
230
+ display: none;
231
+ z-index: 10000;
232
+ }
233
+
234
+ .wcf-tooltip-text::before {
235
+ border-left: 5px solid transparent;
236
+ border-right: 5px solid transparent;
237
+ border-top: 5px solid transparent;
238
+ border-bottom: 5px solid #444;
239
+ bottom: auto;
240
+ content: " ";
241
+ font-size: 0;
242
+ left: 56px;
243
+ line-height: 0;
244
+ margin-left: -5px;
245
+ position: absolute;
246
+ top: -10px;
247
+ width: 0;
248
+ }
249
+
250
+ .display_tool_tip{
251
+ display: block;
252
+ }
253
+
254
+ /*.wcf-tooltip::before {
255
+ position: absolute;
256
+ top: 48px;
257
+ left: 53px;
258
+ background-color: #444;
259
+ border-radius: 5px;
260
+ color: #fff;
261
+ content: attr(data-tooltip);
262
+ padding: 0.5rem;
263
+ text-transform: none;
264
+ -webkit-transition: all 0.5s ease;
265
+ transition: all 0.5s ease;
266
+ width: 160px;
267
+ height: auto;
268
+ line-height: 1em;
269
+ }
270
+
271
+ .wcf-tooltip::after {
272
+ position: absolute;
273
+ top: auto;
274
+ bottom: 170px;
275
+ left: 115px;
276
+ border-left: 5px solid transparent;
277
+ border-right: 5px solid transparent;
278
+ border-top: 5px solid transparent;
279
+ border-bottom: 5px solid #444;
280
+ content: " ";
281
+ font-size: 0;
282
+ line-height: 0;
283
+ margin-left: -5px;
284
+ width: 0;
285
+ }
286
+
287
+
288
+ .wcf-tooltip.display_toot_tip::before,
289
+ .wcf-tooltip.display_toot_tip::after {
290
+ opacity: 1;
291
+ -webkit-transition: all 0.75s ease;
292
+ transition: all 0.75s ease;
293
+ word-break: break-all;
294
+ }
295
+
296
+ .wcf-tooltip::before,
297
+ .wcf-tooltip::after {
298
+ color: #efefef;
299
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
300
+ font-size: 13px;
301
+ opacity: 0;
302
+ pointer-events: none;
303
+ text-align: center;
304
+ }*/
305
+
306
+ .wcf-flow-sandbox-table .wcf-field-row .wcf-field-row-content{
307
+ width: 100%;
308
+ }
309
+
310
+ /**
311
+ * ******************************************************
312
+ * Shortcode Box on the Head Section of Checkout Meta Box
313
+ * ******************************************************
314
+ */
315
+ #field-wcf-shortcode{
316
+ display: none;
317
+ margin-left: 5px;
318
+ vertical-align: top;
319
+ line-height: 0;
320
+ }
321
+
322
+ /*
323
+ * ************************
324
+ * Css For
325
+ * 1. Flow Metabox
326
+ * 2. Textboxes
327
+ * 3. Select
328
+ * 4. Buttons
329
+ * 5. Steps Boxes
330
+ * ************************
331
+ */
332
+
333
+ /*
334
+ * ***************************************
335
+ * Flow Page Css (After removing meta box)
336
+ * 1. Step Badges
337
+ * ***************************************
338
+ */
339
+
340
+ .wcf-flow-steps-meta-box{
341
+ margin-top: 20px;
342
+ }
343
+
344
+ .wcf-flow-steps-meta-box .wcf-flow-settings{
345
+ width: 100%;
346
+ display: block;
347
+ }
348
+
349
+ .wcf-flow-steps-meta-box .wcf-new-step-badge
350
+ {
351
+ background-color: #0073aa;
352
+ color: #fff;
353
+ }
354
+
355
+ .wcf-flow-steps-meta-box .wcf-new-step-badge,
356
+ .wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
357
+ .wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
358
+ color: #000;
359
+ background-color: #E3E4E8;
360
+ padding: 0.3em .6em 0.3em;
361
+ font-size: 0.7em;
362
+ font-weight: 600;
363
+ border-radius: 0px;
364
+ line-height: 0.7em;
365
+ margin-left: 10px;
366
+ text-align: center;
367
+ vertical-align: middle;
368
+ }
369
+
370
+ #wcf-flow-settings .inside{
371
+ margin: 10px 0 0;
372
+ }
373
+
374
+ .wcf-flow-settings .wcf-flow-steps-data-wrap {
375
+ padding: 0 1em 1.5em;
376
+ }
377
+ .wcf-flow-settings .wcf-flow-steps-wrap{
378
+ border-right:none;
379
+ background-color: transparent;
380
+ width: 100%;
381
+ padding: 0px;
382
+ }
383
+
384
+ .wcf-flow-settings .wcf-step-left-content,
385
+ .wcf-flow-settings .wcf-steps-action-buttons{
386
+ display: inline-block;
387
+ width: 49%;
388
+ vertical-align: middle;
389
+ font-size: 13px;
390
+ line-height: 3em;
391
+ }
392
+
393
+ .wcf-flow-settings .wcf-step-left-content{
394
+ text-align: left;
395
+ }
396
+
397
+ .wcf-step-left-content .dashicons{
398
+ vertical-align: middle;
399
+ width: 1em;
400
+ height: 1em;
401
+ font-size: 1.5em;
402
+ line-height: 1em;
403
+ }
404
+
405
+ .wcf-flow-settings .wcf-steps-action-buttons{
406
+ text-align: right;
407
+ }
408
+
409
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
410
+ display: inline-block;
411
+ font-size: 1em;
412
+ line-height: 1em;
413
+ vertical-align: middle;
414
+ text-align: center;
415
+ margin-left: 15px;
416
+ text-decoration: none;
417
+ }
418
+
419
+ .wcf-flow-settings .wcf-action-button .dashicons{
420
+ pointer-events: none;
421
+ font-size: 1.5em;
422
+ width: 1em;
423
+ height: 1em;
424
+ vertical-align: middle;
425
+ }
426
+
427
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
428
+ display: inline-block;
429
+ line-height: 1.5em;
430
+ }
431
+
432
+ .wcf-flow-settings .wcf-flow-steps-wrap .wcf-step{
433
+ color: #444;
434
+ border: none;
435
+ background-color: #fff;
436
+ box-shadow: 0px 0px 2px 0px #ddd;
437
+ padding: 15px 10px;
438
+ cursor: move;
439
+ }
440
+
441
+
442
+ .wcf-new-step-highlight{
443
+ border-left: 3px #0073aa solid;
444
+ }
445
+
446
+ .wcf-popup input[type='radio']
447
+ {
448
+ margin-top: 0px;
449
+ }
450
+
451
+ .wcf-popup label{
452
+ font-size: 16px;
453
+ }
454
+
455
+ .wcf-step-wrap {
456
+ margin-bottom: 15px;
457
+ }
458
+
459
+ #wcf-sandbox-settings .inside{
460
+ margin: 15px 0 10px;
461
+ }
462
+
463
+ .wcf-general-metabox-wrap .wcf-field-row{
464
+ display: inline-flex;
465
+ width: 100%;
466
+ }
467
+
468
+ .wcf-general-metabox-wrap .wcf-field-desc {
469
+ padding: 6px 0 0;
470
+ }
471
+
472
+ /*
473
+ * *****************************
474
+ * Custom classes for common use
475
+ * *****************************
476
+ */
477
+
478
+ .pull-right{
479
+ float: right;
480
+ }
481
+
482
+ .pull-left{
483
+ float: left;
484
+ }
485
+
486
+ .text-error {
487
+ border-bottom: 1px #FF5050 solid !important;
488
+ }
489
+
490
+ #show_error {
491
+ font-style: italic;
492
+ color: #FF5050
493
+ }
494
+
495
+ .wp-ui-text-primary {
496
+ color: #0073aa;
497
+ }
498
+
499
+ .wcf-column-left{
500
+ width: 25%;
501
+ float: left;
502
+ position: relative;
503
+ max-width: 300px;
504
+ }
505
+
506
+ .wcf-column-right{
507
+ width: 75%;
508
+ float: left;
509
+ position: relative;
510
+ background-color: #fff;
511
+ }
512
+
513
+ .wcf-import-step-content{
514
+ border-top: 1px #ddd solid;
515
+ padding-top: 10px;
516
+ margin-top: 30px;
517
+ }
518
+
519
+ /*
520
+ * ************************
521
+ * Display Template div css
522
+ * 1 Add, View & Import Buttons & Icons
523
+ * ************************
524
+ */
525
+
526
+ .wcf-flow-steps-data-wrap .wcf-step-content a .dashicons {
527
+ vertical-align: middle;
528
+ }
529
+
530
+ /*
531
+ * ************************************************
532
+ * Meta Boxs (All)
533
+ * 1. Setting Meta Box (#wcf-step-settings)
534
+ * 2. Checkout layout Meta Box (#wcf-checkout-settings)
535
+ * 3. Downsell Meta Box (#wcf-offer-settings)
536
+ * 4. Thank You Meta Box (#wcf-thankyou-settings)
537
+ * 5. Upsell Meta Box (#wcf-upsell-settings)
538
+ * ************************************************
539
+ */
540
+ .wcf-repeat-notice,
541
+ #wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
542
+ border-top: 1px #ddd solid;
543
+ margin-top: 10px;
544
+ padding-top: 20px;
545
+ }
546
+
547
+ .wcf-repeat-notice p{
548
+ margin: 5px 0px;
549
+ }
550
+
551
+ /*
552
+ * Inside Div css for all the metaboxes
553
+ */
554
+ #wcf-ladning-settings .inside,
555
+ #wcf-checkout-settings .inside,
556
+ #wcf-offer-settings .inside,
557
+ #wcf-upsell-settings .inside,
558
+ #wcf-thankyou-settings .inside{
559
+ margin:0px;
560
+ padding: 0px;
561
+ line-height: 0.9em;
562
+ }
563
+
564
+ /**
565
+ * ****************************
566
+ * 1. Container
567
+ * 2. Row
568
+ * 3. Content Divs
569
+ * 4. Button Divs
570
+ * 5. Alignment Classes
571
+ * ****************************
572
+ */
573
+ .wcf-table-container{
574
+ display: inline-block;
575
+ width: 100%;
576
+ max-width: 100%;
577
+ background-color: #fafafa;
578
+ margin-top: 0px;
579
+ line-height:1.2;
580
+ }
581
+
582
+
583
+ .wcf-column-right .wcf-field-section .wcf-field-section-heading{
584
+ color: #333;
585
+ padding: 10px 0 5px;
586
+ text-decoration: none;
587
+ font-size: 15px;
588
+ font-weight: 600;
589
+ }
590
+
591
+ .show_box
592
+ {
593
+ display: block!important;
594
+ }
595
+
596
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-field-row-content{
597
+ width: 100%;
598
+ border:1px solid #e5e5e5;
599
+ }
600
+
601
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-cpf-row{
602
+ border:none;
603
+ margin-bottom: 0px;
604
+ }
605
+
606
+ .wcf-table-container .wcf-column-right .wcf-custom-field-box .wcf-cpf-add-row{
607
+ padding: 0px 8px 10px;
608
+ background-color: #f9f9f9;
609
+ }
610
+
611
+ .wcf-table-container .wcf-column-right .wcf-field-row-heading{
612
+ font-size: 12px;
613
+ width: 30%;
614
+ height: 100%;
615
+ display: inline-block;
616
+ line-height: 1.5em;
617
+ vertical-align: middle;
618
+ min-height: 28px;
619
+ }
620
+ .wcf-table-container .wcf-column-right .wcf-field-row-content{
621
+ width: auto;
622
+ display: inline-block;
623
+ font-size: 12px;
624
+ vertical-align: middle;
625
+ }
626
+
627
+ .wcf-table-container .wcf-column-right .wcf-field-row-heading .dashicons {
628
+ line-height: 1.3em;
629
+ margin-left: 5px;
630
+ }
631
+
632
+ .wcf-cb-fields{
633
+ width: 50%;
634
+ float: left;
635
+ }
636
+
637
+ .wcf-cb-fields .wcf-field-row-heading,
638
+ .wcf-sb-fields .wcf-field-row-heading{
639
+ width: 50% !important;
640
+ }
641
+
642
+ .wcf-cb-fields .wcf-field-row-content,
643
+ .wcf-sb-fields .wcf-field-row-content{
644
+ width: 50% !important;
645
+ }
646
+
647
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container .select2-selection--single{
648
+ margin: 0px;
649
+ }
650
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container .select2-selection--single .select2-selection__rendered{
651
+ outline: none;
652
+ }
653
+
654
+ .wcf-table-container .wcf-column-right .wcf-field-row input[type="text"],
655
+ .wcf-table-container .wcf-column-right .wcf-field-row input[type="number"],
656
+ .wcf-table-container .wcf-column-right .wcf-field-row select,
657
+ .wcf-table-container .wcf-column-right .wcf-field-row textarea,
658
+ .wcf-table-container .wcf-column-right .wcf-field-row .select2-container--default{
659
+ width: 300px;
660
+ max-width: 100%;
661
+ }
662
+
663
+ .wcf-table-container .wcf-column-right .wcf-field-row .wp-picker-container input[type=text].wp-color-picker{
664
+ width: 65px;
665
+ }
666
+ #wcf-step-settings .inside .wcf-checkout-table .field-wcf-step-type .wcf-field-row-content select{
667
+ border: none;
668
+ border-bottom: 1px #ccc solid;
669
+ box-shadow: none;
670
+ padding: 5px;
671
+ width: 30%;
672
+ }
673
+
674
+ /*
675
+ * ************************************
676
+ * All Page Types Setting's Meta Box
677
+ * Contains
678
+ * Checkout Metabox
679
+ * Upsell Metabox
680
+ * Downsell Metabox
681
+ * Thank You Metabox
682
+ * ************************************
683
+ */
684
+ .wcf-table-container .wcf-tab-wrapper{
685
+ background: #fafafa;
686
+ border:none;
687
+ margin: 0px 0 0;
688
+ }
689
+
690
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab{
691
+ background: transparent;
692
+ border-bottom: 1px #eee solid;
693
+ display: block;
694
+ margin: 0;
695
+ color: #0073aa;
696
+ line-height: 1em;
697
+ }
698
+
699
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab .wcf-tab-title{
700
+ margin-left: .200em;
701
+ margin-right: .618em;
702
+ }
703
+
704
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab.active{
705
+ background-color: #eee;
706
+ color: #555;
707
+ }
708
+
709
+ .wcf-table-container .wcf-tab-wrapper .wcf-tab .dashicons{
710
+ font-size: initial;
711
+ width: auto;
712
+ height: auto;
713
+ }
714
+
715
+ .wcf-table-container .wcf-tab-content{
716
+ border: 1px #ddd solid;
717
+ border-right: none;
718
+ border-top: none;
719
+ border-bottom: none;
720
+ min-height: 149px;
721
+ overflow: hidden;
722
+ padding: 10px 0px;
723
+ }
724
+
725
+ .wcf-table-container .wcf-column-right .wcf-field-row,
726
+ .wcf-table-container .wcf-column-right .wcf-field-row,
727
+ .wcf-table-container .wcf-column-right .wcf-field-row,
728
+ .wcf-table-container .wcf-column-right .wcf-field-row{
729
+ padding: 10px 20px;
730
+ overflow: hidden;
731
+ }
732
+
733
+ .wcf-table-container .wcf-checkout-style .wcf-cs-fields-options,
734
+ .wcf-table-container .wcf-checkout-style .wcf-cs-button-options{
735
+ display: none;
736
+ }
737
+
738
+ .wcf-repeatables-wrap .wcf-repeatable-row{
739
+ background: #fff;
740
+ border:none;
741
+ margin-bottom: 5px;
742
+ }
743
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields{
744
+ padding: 0px;
745
+ }
746
+
747
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-row-actions{
748
+ float: none;
749
+ display: inline-block;
750
+ text-align: center;
751
+ margin-left: 15px;
752
+ }
753
+
754
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-remove{
755
+ vertical-align: middle;
756
+ padding: 5px;
757
+ line-height: inherit;
758
+ font-size: 13px;
759
+ }
760
+
761
+ .wcf-repeatables-wrap .wcf-repeatable-row-standard-fields .wcf-repeatable-remove .dashicons{
762
+ vertical-align: middle;
763
+ font-size: inherit;
764
+ }
765
+
766
+ .field-wcf-tq-advance-options-fields{
767
+ border-top: 1px solid #DDD;
768
+ margin-top: 15px;
769
+ }
770
+
771
+ /**
772
+ * ******************************
773
+ * Field - Post Meta Typography
774
+ * ******************************
775
+ */
776
+ .wcf-metabox-wrap .select2-container--default .select2-selection--single {
777
+ border: 1px solid #ddd;
778
+ box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
779
+ background-color: #fff;
780
+ color: #32373c;
781
+ outline: none;
782
+ transition: 0.05s border-color ease-in-out;
783
+ border-radius: 0;
784
+ font-size: 13px;
785
+ }
786
+
787
+ .wcf-metabox-wrap .select2-container--default .select2-search--dropdown .select2-search__field {
788
+ border: 1px solid #ddd;
789
+ box-shadow: none;
790
+ }
admin/assets/css/setup-wizard-rtl.css ADDED
@@ -0,0 +1,1125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ background: #f1f1f1;
3
+ margin: 0 20px;
4
+ }
5
+
6
+ body {
7
+ /* background: #fff; */
8
+ color: #444;
9
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
10
+ margin: 140px auto 25px;
11
+ padding: 20px 20px 10px 20px;
12
+ max-width: 700px;
13
+ /* -webkit-font-smoothing: subpixel-antialiased; */
14
+ /* box-shadow: 0 1px 3px rgba(0,0,0,0.13); */
15
+ }
16
+
17
+ a {
18
+ color: #0073aa;
19
+ }
20
+
21
+ a:hover,
22
+ a:active {
23
+ color: #00a0d2;
24
+ }
25
+
26
+ a:focus {
27
+ color: #124964;
28
+ box-shadow:
29
+ 0 0 0 1px #5b9dd9,
30
+ 0 0 2px 1px rgba(30, 140, 190, .8);
31
+ }
32
+
33
+ .ie8 a:focus {
34
+ outline: #5b9dd9 solid 1px;
35
+ }
36
+
37
+ h1, h2 {
38
+ clear: both;
39
+ color: #666;
40
+ font-size: 24px;
41
+ padding: 0;
42
+ padding-bottom: 7px;
43
+ font-weight: 400;
44
+ }
45
+
46
+ h3 {
47
+ font-size: 16px;
48
+ }
49
+
50
+ p, li, dd, dt {
51
+ padding-bottom: 2px;
52
+ font-size: 14px;
53
+ line-height: 1.5;
54
+ }
55
+
56
+ code, .code {
57
+ font-family: Consolas, Monaco, monospace;
58
+ }
59
+
60
+ ul, ol, dl {
61
+ padding: 5px 22px 5px 5px;
62
+ }
63
+
64
+ a img {
65
+ border:0
66
+ }
67
+ abbr {
68
+ border: 0;
69
+ font-variant: normal;
70
+ }
71
+
72
+ fieldset {
73
+ border: 0;
74
+ padding: 0;
75
+ margin: 0;
76
+ }
77
+
78
+ label {
79
+ cursor: pointer;
80
+ }
81
+
82
+ #logo {
83
+ margin: 6px 0 14px 0;
84
+ padding: 0 0 7px 0;
85
+ border-bottom: none;
86
+ text-align:center
87
+ }
88
+ #logo a {
89
+ background-image: url(../images/w-logo-blue.png?ver=20131202);
90
+ background-image: none, url(../images/wordpress-logo.svg?ver=20131107);
91
+ background-size: 84px;
92
+ background-position: center top;
93
+ background-repeat: no-repeat;
94
+ color: #444; /* same as login.css */
95
+ height: 84px;
96
+ font-size: 20px;
97
+ font-weight: 400;
98
+ line-height: 1.3em;
99
+ margin: -130px auto 25px;
100
+ padding: 0;
101
+ text-decoration: none;
102
+ width: 84px;
103
+ text-indent: -9999px;
104
+ outline: none;
105
+ overflow: hidden;
106
+ display: block;
107
+ }
108
+
109
+ #logo a:focus {
110
+ box-shadow: none;
111
+ }
112
+
113
+ .step {
114
+ margin: 20px 0 15px;
115
+ }
116
+ .step, th {
117
+ text-align: right;
118
+ padding: 0;
119
+ }
120
+ body {
121
+ margin: 100px auto 100px auto;
122
+ box-shadow: none;
123
+ background: #f1f1f1;
124
+ padding: 0;
125
+ max-width: 800px;
126
+ }
127
+
128
+ a {
129
+ text-decoration: none;
130
+ }
131
+
132
+ #cartflows-logo {
133
+ border: 0;
134
+ margin: 0 0 24px;
135
+ padding: 0;
136
+ text-align: center
137
+ }
138
+
139
+ #cartflows-logo img {
140
+ max-width: 50%;
141
+ }
142
+
143
+ /* Wizard Steps */
144
+ .cartflows-setup-wizard-steps,
145
+ .cartflows-setup-steps {
146
+ padding: 0 0 24px;
147
+ margin: 0;
148
+ list-style: none;
149
+ overflow: hidden;
150
+ color: #ccc;
151
+ width: 100%;
152
+ display: -webkit-inline-flex;
153
+ display: -ms-inline-flexbox;
154
+ display: inline-flex
155
+ }
156
+
157
+ .cartflows-setup-wizard-steps li,
158
+ .cartflows-setup-steps li {
159
+ width: 33%;
160
+ float: right;
161
+ padding: 0 0 .8em;
162
+ margin: 0;
163
+ text-align: center;
164
+ position: relative;
165
+ border-bottom: 4px solid #ccc;
166
+ line-height: 1.4em
167
+ }
168
+
169
+ .cartflows-setup-wizard-steps li:before,
170
+ .cartflows-setup-steps li:before {
171
+ content: "";
172
+ border: 4px solid #ccc;
173
+ border-radius: 100%;
174
+ width: 4px;
175
+ height: 4px;
176
+ position: absolute;
177
+ bottom: 0;
178
+ right: 50%;
179
+ margin-right: -6px;
180
+ margin-bottom: -8px;
181
+ background: #fff
182
+ }
183
+
184
+ .cartflows-setup-wizard-steps li.active,
185
+ .cartflows-setup-steps li.active {
186
+ border-color: #0085ba;
187
+ color: #0085ba
188
+ }
189
+
190
+ .cartflows-setup-wizard-steps li.active:before,
191
+ .cartflows-setup-steps li.active:before {
192
+ border-color: #0085ba
193
+ }
194
+
195
+ .cartflows-setup-wizard-steps li.done,
196
+ .cartflows-setup-steps li.done {
197
+ border-color: #0085ba;
198
+ color: #0085ba
199
+ }
200
+
201
+ .cartflows-setup-wizard-steps li.done:before,
202
+ .cartflows-setup-steps li.done:before {
203
+ border-color: #0085ba;
204
+ background: #0085ba
205
+ }
206
+
207
+ .cartflows-setup-wizard-content a,
208
+ .cartflows-setup-content a {
209
+ color: #0085ba
210
+ }
211
+
212
+ .cartflows-setup-wizard-content a:focus,
213
+ .cartflows-setup-content a:focus,
214
+ .cartflows-setup-wizard-content a:hover,
215
+ .cartflows-setup-content a:hover {
216
+ color: #111
217
+ }
218
+
219
+ /* Wizard Content */
220
+ .cartflows-setup-wizard-content,
221
+ .cartflows-setup-content {
222
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .13);
223
+ padding: 24px 24px 0;
224
+ background: #fff;
225
+ overflow: hidden;
226
+ zoom: 1
227
+ }
228
+
229
+ .cartflows-setup-wizard-content h1,
230
+ .cartflows-setup-content h1,
231
+ .cartflows-setup-wizard-content h2,
232
+ .cartflows-setup-content h2,
233
+ .cartflows-setup-wizard-content h3,
234
+ .cartflows-setup-content h3,
235
+ .cartflows-setup-wizard-content table,
236
+ .cartflows-setup-content table {
237
+ margin: 0 0 24px;
238
+ border: 0;
239
+ padding: 0;
240
+ color: #666;
241
+ clear: none
242
+ }
243
+
244
+ .cartflows-setup-wizard-content p,
245
+ .cartflows-setup-content p {
246
+ margin: 0 0 24px
247
+ }
248
+
249
+ .cartflows-setup-wizard-content p,
250
+ .cartflows-setup-content p,
251
+ .cartflows-setup-wizard-content table,
252
+ .cartflows-setup-content table {
253
+ font-size: 1em;
254
+ line-height: 1.75em;
255
+ color: #666
256
+ }
257
+
258
+ .cartflows-setup-wizard-content .cartflows-table,
259
+ .cartflows-setup-content .cartflows-table {
260
+ width: 100%;
261
+ }
262
+
263
+ .cartflows-setup-wizard-content .form-table th,
264
+ .cartflows-setup-content .form-table th {
265
+ width: 40%;
266
+ vertical-align: top;
267
+ font-weight: 400
268
+ }
269
+
270
+ .cartflows-setup-wizard-content .form-table td,
271
+ .cartflows-setup-content .form-table td {
272
+ vertical-align: top
273
+ }
274
+
275
+ .cartflows-setup-wizard-content .form-table td input,
276
+ .cartflows-setup-content .form-table td input,
277
+ .cartflows-setup-wizard-content .form-table td select,
278
+ .cartflows-setup-content .form-table td select {
279
+ box-sizing: border-box;
280
+ color: inherit;
281
+ }
282
+
283
+ .cartflows-setup-wizard-content .form-table td input:not([type='checkbox']),
284
+ .cartflows-setup-wizard-content .form-table td select {
285
+ width: 50%;
286
+ }
287
+
288
+ .cartflows-setup-wizard-content .form-table td .description,
289
+ .cartflows-setup-content .form-table td .description {
290
+ line-height: 1.5em;
291
+ display: block;
292
+ margin-top: .25em;
293
+ color: #999;
294
+ font-style: italic
295
+ }
296
+
297
+ .cartflows-setup-wizard-content .form-table td .input-checkbox,
298
+ .cartflows-setup-content .form-table td .input-checkbox,
299
+ .cartflows-setup-wizard-content .form-table td .input-radio,
300
+ .cartflows-setup-content .form-table td .input-radio {
301
+ width: auto;
302
+ box-sizing: inherit;
303
+ padding: inherit;
304
+ margin: 0 0 0 .5em;
305
+ box-shadow: none
306
+ }
307
+
308
+ /* Update icon. */
309
+ .updating-message:before {
310
+ margin-left: 5px;
311
+ content: "\f463";
312
+ display: inline-block;
313
+ font-size: 20px;
314
+ line-height: 1;
315
+ font-family: dashicons;
316
+ text-decoration: inherit;
317
+ font-weight: normal;
318
+ font-style: normal;
319
+ vertical-align: text-bottom;
320
+ text-align: center;
321
+ transition: color .1s ease-in 0;
322
+ -webkit-font-smoothing: antialiased;
323
+ -moz-osx-font-smoothing: grayscale;
324
+ }
325
+
326
+ /* Spins the update icon. */
327
+ .updating-message:before {
328
+ -webkit-animation: rotation 2s infinite linear;
329
+ animation: rotation 2s infinite linear;
330
+ }
331
+
332
+ @-webkit-keyframes rotation {
333
+ 0% {
334
+ -webkit-transform: rotate(0deg);
335
+ transform: rotate(0deg);
336
+ }
337
+ 100% {
338
+ -webkit-transform: rotate(359deg);
339
+ transform: rotate(359deg);
340
+ }
341
+ }
342
+
343
+ @keyframes rotation {
344
+ 0% {
345
+ -webkit-transform: rotate(0deg);
346
+ transform: rotate(0deg);
347
+ }
348
+ 100% {
349
+ -webkit-transform: rotate(359deg);
350
+ transform: rotate(359deg);
351
+ }
352
+ }
353
+
354
+ /* Content Bottom Buttons */
355
+ .cartflows-setup-actions {
356
+ display: flex;
357
+ margin-bottom: 1.5em;
358
+ }
359
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions,
360
+ .cartflows-setup .cartflows-setup-actions {
361
+ justify-content: space-between;
362
+ }
363
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .button,
364
+ .cartflows-setup .cartflows-setup-actions .button {
365
+ font-size: 1em;
366
+ padding: .5em 1em;
367
+ line-height: 1em;
368
+ margin-left: .5em;
369
+ margin-bottom: 2px;
370
+ height: auto;
371
+ border-radius: 4px
372
+ }
373
+
374
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .skip-button,
375
+ .cartflows-setup .cartflows-setup-actions .skip-button {
376
+ margin-right: 10px;
377
+ margin-left: 0;
378
+ }
379
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .button.button-primary,
380
+ .cartflows-setup .cartflows-setup-actions .button.button-primary {
381
+ opacity: 1;
382
+ height: auto;
383
+ line-height: 2;
384
+ padding: 0 1.2em;
385
+ }
386
+
387
+ .aiosrs-pro-return-to-dashboard {
388
+ font-size: .85em;
389
+ color: #b5b5b5;
390
+ margin: 1.18em 0;
391
+ display: block;
392
+ text-align: center
393
+ }
394
+
395
+ /* Theme Config Page */
396
+ .wp-core-ui .aiosrs-pro-basic-config .ast-color-picker {
397
+ vertical-align: top;
398
+ margin-left: 7px;
399
+ }
400
+ .wp-core-ui .aiosrs-pro-basic-config .wp-picker-clear {
401
+ width: 70px;
402
+ }
403
+ /* Ready Page */
404
+ .cartflows-setup-wizard-content .twitter-share-button,
405
+ .cartflows-setup-content .twitter-share-button {
406
+ float: left
407
+ }
408
+
409
+ /**
410
+ * Site Identity
411
+ */
412
+ .cartflows-setup-wizard-content select,
413
+ .cartflows-setup-content select,
414
+ .cartflows-setup-wizard-content input,
415
+ .cartflows-setup-content input {
416
+ border: 1px solid #f1f1f1;
417
+ padding: 0.5em;
418
+ border-radius: 3px;
419
+ font-size: 14px;
420
+ }
421
+
422
+ .wp-picker-active .wp-picker-holder {
423
+ position: absolute;
424
+ z-index: 9;
425
+ }
426
+
427
+ .cartflows-setup-wizard-next-steps .button-hero:last-child,
428
+ .cartflows-setup-next-steps .button-hero:last-child {
429
+ margin-bottom: 0em;
430
+ }
431
+ .cartflows-setup-wizard-next-steps .button-hero,
432
+ .cartflows-setup-next-steps .button-hero {
433
+ margin-bottom: 1em;
434
+ }
435
+
436
+ .wcf-wizard-next-steps {
437
+ border: 1px solid #eee;
438
+ border-radius: 4px;
439
+ list-style: none;
440
+ padding: 0;
441
+ margin-bottom: 2em;
442
+ }
443
+ .wcf-wizard-next-steps .wcf-wizard-next-step-item:first-child {
444
+ border-top: 0;
445
+ }
446
+ .wcf-wizard-next-steps .wcf-wizard-next-step-item {
447
+ display: -webkit-box;
448
+ display: flex;
449
+ border-top: 1px solid #eee;
450
+ }
451
+ .wcf-wizard-next-steps li {
452
+ padding: 0;
453
+ }
454
+ .wcf-wizard-next-steps .wcf-wizard-next-step-description {
455
+ -webkit-box-flex: 1;
456
+ flex-grow: 1;
457
+ margin: 1.5em;
458
+ }.wcf-wizard-next-steps .wcf-wizard-next-step-action {
459
+ -webkit-box-flex: 0;
460
+ flex-grow: 0;
461
+ display: -webkit-box;
462
+ display: flex;
463
+ -webkit-box-align: center;
464
+ align-items: center;
465
+ }
466
+ .wcf-wizard-next-steps p.next-step-heading {
467
+ margin: 0;
468
+ font-size: .95em;
469
+ font-weight: 400;
470
+ font-variant: all-petite-caps;
471
+ }
472
+ .wc-setup-content p {
473
+ margin: 20px 0;
474
+ font-size: 1em;
475
+ line-height: 1.75em;
476
+ color: #666;
477
+ }.wcf-wizard-next-steps h3.next-step-description {
478
+ margin: 0;
479
+ font-size: 16px;
480
+ font-weight: 600;
481
+ }
482
+ .wc-setup-content h1,
483
+ .wc-setup-content h2,
484
+ .wc-setup-content h3,
485
+ .wc-setup-content table {
486
+ margin: 0 0 20px;
487
+ border: 0;
488
+ padding: 0;
489
+ color: #666;
490
+ clear: none;
491
+ font-weight: 500;
492
+ }.wcf-wizard-next-steps p.next-step-extra-info {
493
+ margin: 0;
494
+ }
495
+ .wc-setup-content p:last-child {
496
+ margin-bottom: 0;
497
+ }
498
+ .wc-setup-content p {
499
+ margin: 20px 0;
500
+ font-size: 1em;
501
+ line-height: 1.75em;
502
+ color: #666;
503
+ }.wcf-wizard-next-steps .wcf-wizard-next-step-action .button {
504
+ margin: 1em 1.5em;
505
+ }
506
+ .cartflows-setup-content .wc-setup-actions {
507
+ overflow: hidden;
508
+ margin: 20px 0 0;
509
+ position: relative;
510
+ }
511
+
512
+ /**
513
+ * Step: Last
514
+ */
515
+ .cartflows-setup-wizard-next-steps-last ul,
516
+ .cartflows-setup-next-steps-last ul {
517
+ padding: 0;
518
+ }
519
+ .cartflows-setup-wizard-next-steps-last li i,
520
+ .cartflows-setup-next-steps-last li i {
521
+ padding-left: 10px;
522
+ }
523
+ .cartflows-setup-wizard-next-steps-last li,
524
+ .cartflows-setup-next-steps-last li {
525
+ list-style-type: none;
526
+ padding: 0;
527
+ }
528
+
529
+ /**
530
+ * Schema template
531
+ */
532
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap {
533
+ display: inline-block;
534
+ background: #f1f1f1;
535
+ border: 1px solid #d8d8d8;
536
+ padding: 10px 5px;
537
+ width: calc( 33% - 8px);
538
+ text-align: center;
539
+ margin-left: 10px;
540
+ margin-bottom: 10px;
541
+ cursor: pointer;
542
+ box-sizing: border-box;
543
+ overflow: hidden;
544
+ vertical-align: middle;
545
+ font-size: 16px;
546
+ }
547
+
548
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap:nth-child(3n) {
549
+ margin-left:0;
550
+ }
551
+
552
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap.selected,
553
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap:hover {
554
+ background: #d6d6d6;
555
+ border-color: #b9b9b9;
556
+ }
557
+
558
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap i {
559
+ font-size: 18px;
560
+ height: 18px;
561
+ vertical-align: middle;
562
+ display: block;
563
+ margin: auto;
564
+ }
565
+
566
+ .aiosrs-pro-basic-config td {
567
+ padding: 0;
568
+ }
569
+
570
+ .cartflows-setup-wizard-content .cartflows-table,
571
+ .cartflows-setup-content .cartflows-table {
572
+ border: 1px solid #f1f1f1;
573
+ border-radius: 4px;
574
+ }
575
+
576
+ .cartflows-setup-wizard-content .form-table th,
577
+ .cartflows-setup-content .aiosrs-pro-schema-ready th,
578
+ .cartflows-setup-wizard-content .form-table td,
579
+ .cartflows-setup-content .aiosrs-pro-schema-ready td,
580
+ .cartflows-setup-wizard-content .form-table .button-hero,
581
+ .cartflows-setup-content .aiosrs-pro-schema-ready .button-hero {
582
+ font-size: 16px;
583
+ font-size: 1rem;
584
+ }
585
+
586
+ .cartflows-setup-wizard-content .aiosrs-pro-schema-ready td,
587
+ .cartflows-setup-content .aiosrs-pro-schema-ready td {
588
+ padding-left: 0;
589
+ }
590
+
591
+ .cartflows-setup-wizard .wizard-close-link,
592
+ .cartflows-setup .wizard-close-link {
593
+ color: #ccc;
594
+ box-shadow: none;
595
+ }
596
+
597
+ /**
598
+ * Hide tooltip text
599
+ */
600
+ .cartflows-setup-wizard .ui-helper-hidden-accessible,
601
+ .cartflows-setup .ui-helper-hidden-accessible {
602
+ display: none;
603
+ }
604
+
605
+ .cartflows-setup-wizard .ui-widget-content.bsf-aiosrs-schema-ui-tooltip,
606
+ .cartflows-setup .ui-widget-content.bsf-aiosrs-schema-ui-tooltip {
607
+ font-size: 14px;
608
+ }
609
+
610
+ .aiosrs-pro-schema-ready .button-primary.button-hero {
611
+ text-align: center;
612
+ }
613
+
614
+ /**
615
+ * Schema Pro On-Boarding
616
+ */
617
+ .cartflows-setup-wizard .cartflows-setup-wizard-content .button-next,
618
+ .cartflows-setup-wizard-content.welcome-content-wrap .button-close {
619
+ margin-right: 10px;
620
+ }
621
+
622
+ .cartflows-setup-wizard-content.social-profiles-content-wrap input[type="text"] {
623
+ width: 100%;
624
+ }
625
+
626
+ .cartflows-setup-wizard-content.success-content-wrap .form-table td {
627
+ width: 45%;
628
+ text-align: center;
629
+ padding-left: 0;
630
+ }
631
+
632
+ .cartflows-setup-wizard-content.success-content-wrap .form-table td.space {
633
+ width: 10%;
634
+ }
635
+
636
+ .cartflows-setup-wizard-content.general-setting-content-wrap .form-table select {
637
+ min-width: 50%;
638
+ }
639
+
640
+ .cartflows-setup-wizard-content.general-setting-content-wrap .form-table input[type="text"] {
641
+ width: 100%;
642
+ }
643
+
644
+ .cartflows-setup-wizard-content.general-setting-content-wrap .custom-field-wrapper {
645
+ display: inline-block;
646
+ width: 48%;
647
+ vertical-align: middle;
648
+ }
649
+
650
+ .cartflows-setup-wizard-content.general-setting-content-wrap .site-logo-custom-wrap {
651
+ vertical-align: top;
652
+ }
653
+
654
+ /**
655
+ * Custom Image Select
656
+ */
657
+ .cartflows-setup-wizard-content.general-setting-content-wrap .image-field-wrap {
658
+ position: relative;
659
+ display: inline-block;
660
+ }
661
+
662
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-select .dashicons {
663
+ font-size: 1.2em;
664
+ width: 1em;
665
+ height: 1em;
666
+ line-height: 1em;
667
+ margin-left: 5px;
668
+ vertical-align: middle;
669
+ }
670
+
671
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-remove {
672
+ display:none;
673
+ position: absolute;
674
+ background: rgba(255,255,255,.7);
675
+ left: 0;
676
+ }
677
+
678
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-remove {
679
+ font-size: 15px;
680
+ width: 1em;
681
+ height: 1em;
682
+ }
683
+
684
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select {
685
+ display: none;
686
+ }
687
+
688
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-remove {
689
+ display: inline-block;
690
+ }
691
+
692
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img {
693
+ max-width: 100%;
694
+ display: inline-block;
695
+ }
696
+
697
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img img {
698
+ max-height: 50px;
699
+ }
700
+
701
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img img {
702
+ vertical-align: middle;
703
+ max-width: 300px;
704
+ }
705
+
706
+ .close-button-wrapper {
707
+ text-align: center;
708
+ margin: 1em 0;
709
+ }
710
+
711
+ .close-button-wrapper a.button-close .dashicons {
712
+ vertical-align: middle;
713
+ font-size: 1.3em;
714
+ line-height: .9;
715
+ width: 1em;
716
+ height: 1em;
717
+ }
718
+
719
+ .close-button-wrapper .button {
720
+ font-size: 1em;
721
+ padding: 5px 15px;
722
+ height: auto;
723
+ background: #fff;
724
+ }
725
+
726
+ .cartflows-setup-wizard-content.welcome-content-wrap ul {
727
+ margin-top: 0;
728
+ }
729
+ .cartflows-setup-wizard-content.welcome-content-wrap ul li {
730
+ font-size: inherit;
731
+ color: #666;
732
+ }
733
+
734
+ .cartflows-setup-wizard-content .no-margin {
735
+ margin: 0 auto;
736
+ }
737
+
738
+ .cartflows-setup-wizard-content.global-schemas-content-wrap {
739
+ overflow: initial;
740
+ }
741
+
742
+ .cartflows-setup-wizard-content.global-schemas-content-wrap .cartflows-setup-wizard-actions {
743
+ padding-bottom: 24px;
744
+ margin-bottom: 0;
745
+ }
746
+
747
+ /* Meta Box Heading
748
+ ------------------------------------------------------*/
749
+ #aiosrs-schema-settings .inside {
750
+ margin: 0;
751
+ padding: 0;
752
+ }
753
+
754
+ #aiosrs-schema-settings .nav-tab-wrapper {
755
+ border-bottom: 0;
756
+ }
757
+
758
+ #aiosrs-schema-settings .nav-tab-wrapper ul {
759
+ margin: 0;
760
+ }
761
+
762
+ /* Tooltips */
763
+ .cartflows-heading-help {
764
+ color: #b3b3b3;
765
+ float: left;
766
+ font-size: 18px;
767
+ cursor: help;
768
+ }
769
+
770
+ .ui-widget-content.bsf-aiosrs-schema-ui-tooltip {
771
+ background: #333;
772
+ border-width: 1px;
773
+ border-color: #333;
774
+ -webkit-border-radius: 3px;
775
+ border-radius: 3px;
776
+ -webkit-box-shadow: -1px 0px 2px 0px rgba(214, 214, 214, 0.5);
777
+ box-shadow: -1px 0px 2px 0px rgba(214, 214, 214, 0.5);
778
+ color: #dedede;
779
+ max-width: 250px;
780
+ text-align: center;
781
+ padding: 7px;
782
+ text-rendering: optimizeLegibility;
783
+ text-shadow: none;
784
+ z-index: 9999;
785
+ }
786
+
787
+ /* Table */
788
+ .cartflows-table {
789
+ border: none;
790
+ border-bottom: 5px solid #f0f0f0;
791
+ }
792
+
793
+ .cartflows-.widefat {
794
+ border-width: 0;
795
+ border-bottom-width: 2px;
796
+ }
797
+ .cartflows-.widefat:last-child {
798
+ border-bottom-width: 1px;
799
+ }
800
+
801
+ /* Rows */
802
+ .cartflows-row td:before, .cartflows-row td:after {
803
+ display: table;
804
+ content: " ";
805
+ }
806
+
807
+ .cartflows-row td:after {
808
+ clear: both;
809
+ }
810
+
811
+ .cartflows-row td {
812
+ zoom: 1;
813
+ vertical-align: middle;
814
+ }
815
+
816
+ .cartflows-row td * {
817
+ vertical-align: middle;
818
+ }
819
+
820
+ .cartflows-row:last-child td {
821
+ border-bottom: none;
822
+ }
823
+
824
+ /* Row Heading */
825
+ .cartflows-row-heading {
826
+ border-left: 1px solid #f1f1f1;
827
+ padding: 15px;
828
+ width: 25%;
829
+ vertical-align: middle;
830
+ }
831
+
832
+ .cartflows-row-heading label {
833
+ display: inline-block;
834
+ font-size: 13px;
835
+ line-height: 1.4em;
836
+ font-weight: bold;
837
+ padding: 0;
838
+ margin: 0 0 3px;
839
+ color: #333;
840
+ }
841
+
842
+ /* Row Content */
843
+ .cartflows-table .cartflows-row-content {
844
+ padding: 15px 10px;
845
+ position: relative;
846
+ width: 75%;
847
+ }
848
+
849
+ .cartflows-row-content p:last-child {
850
+ margin-bottom: 0;
851
+ }
852
+
853
+ .bsf-aiosrs-schema-padding {
854
+ width: 110px;
855
+ }
856
+
857
+ .bsf-aiosrs-schema-padding-bottom-wrap {
858
+ margin-top: 5px;
859
+ }
860
+
861
+ /* Row Inputs */
862
+ .cartflows-row-content select {
863
+ width: 100%;
864
+ }
865
+
866
+ .cartflows-row-content .bsf-aiosrs-schema-action-desc.ast-no-desc {
867
+ margin-top: 0;
868
+ }
869
+
870
+ .cartflows-row-content .bsf-aiosrs-schema-action-desc {
871
+ margin-top: 10px;
872
+ }
873
+
874
+ /* Settings Meta Box
875
+ ------------------------------------------------------*/
876
+ #bsf-aiosrs-schema-settings .inside {
877
+ margin: 0;
878
+ padding: 0;
879
+ }
880
+
881
+ /* Builder Buttons Meta Box
882
+ ------------------------------------------------------*/
883
+ #bsf-aiosrs-schema-buttons .inside {
884
+ margin: 0;
885
+ padding: 15px;
886
+ }
887
+
888
+ #bsf-aiosrs-schema-buttons .button {
889
+ margin-left: 5px;
890
+ }
891
+
892
+ /* Rule Settings
893
+ ------------------------------------------------------*/
894
+
895
+ /* Rule Forms */
896
+ .bsf-aiosrs-schema-saved-rule {
897
+ -js-display: flex;
898
+ display: -webkit-box;
899
+ display: -webkit-flex;
900
+ display: -moz-box;
901
+ display: -ms-flexbox;
902
+ display: flex;
903
+ padding: 0 0 8px 0;
904
+ }
905
+
906
+ .bsf-aiosrs-schema-saved-rule-select {
907
+ width: 100%;
908
+ }
909
+
910
+ .bsf-aiosrs-schema-rule-objects {
911
+ display: none;
912
+ }
913
+
914
+ .bsf-aiosrs-schema-rule-objects-visible {
915
+ -js-display: flex;
916
+ display: -webkit-box;
917
+ display: -webkit-flex;
918
+ display: -moz-box;
919
+ display: -ms-flexbox;
920
+ display: flex;
921
+ }
922
+
923
+ .cartflows-row-content .bsf-aiosrs-schema-rule-objects-visible select {
924
+ width: 50%;
925
+ }
926
+
927
+ .bsf-aiosrs-schema-rule-objects-visible .bsf-aiosrs-schema-rule-objects {
928
+ display: inline;
929
+ margin-right: 7px;
930
+ }
931
+
932
+ .bsf-aiosrs-schema-remove-rule-button {
933
+ display: none;
934
+ margin-top: 5px;
935
+ text-align: left;
936
+ width: 33px;
937
+ }
938
+
939
+ .bsf-aiosrs-schema-remove-rule {
940
+ color: #000;
941
+ cursor: pointer;
942
+ opacity: 0.2;
943
+ }
944
+
945
+ .bsf-aiosrs-schema-remove-rule:hover {
946
+ color: #d54e21;
947
+ opacity: 1;
948
+ }
949
+
950
+ .bsf-aiosrs-schema-add-rule {
951
+ float: right;
952
+ margin-left: 8px;
953
+ min-width: 150px;
954
+ }
955
+
956
+ .bsf-aiosrs-schema-add-rule .button {
957
+ text-align: center;
958
+ width: 100%;
959
+ }
960
+
961
+ /* Location Rules */
962
+ .bsf-aiosrs-schema-locations-form {
963
+ display: none;
964
+ }
965
+
966
+ /* Exclusion Rules */
967
+ .bsf-aiosrs-schema-exclusion-rules {
968
+ display: none;
969
+ }
970
+
971
+ /* Color Picker */
972
+ .cartflows-row .wp-picker-holder {
973
+ position: absolute;
974
+ z-index: 1;
975
+ }
976
+
977
+ .cartflows-row .iris-border .iris-picker-inner {
978
+ left: 0;
979
+ }
980
+
981
+ .cartflows-row-content .bsf-aiosrs-schema-type {
982
+ width: auto;
983
+ }
984
+
985
+ .cartflows-table .bsf-aiosrs-schema-fixed-text-wrap,
986
+ .cartflows-table .bsf-aiosrs-schema-custom-text-wrap {
987
+ width: calc( 55% - 5px );
988
+ display: inline-block;
989
+ }
990
+ .cartflows-table .bsf-aiosrs-schema-meta-field {
991
+ width: calc( 45% - 5px );
992
+ display: inline-block;
993
+ }
994
+
995
+ .cartflows-table .bsf-aiosrs-schema-custom-text-wrap input {
996
+ width: 100%;
997
+ }
998
+
999
+ .cartflows-table .bsf-custom-remove-image,
1000
+ .cartflows-table .update-custom-image,
1001
+ .cartflows-table .bsf-hidden-field,
1002
+ .bsf-custom-image-selected button.bsf-custom-select-image {
1003
+ display: none;
1004
+ }
1005
+
1006
+ .bsf-custom-image-selected .bsf-custom-remove-image {
1007
+ display: inline-block;
1008
+ }
1009
+
1010
+ .select-custom-image,
1011
+ .bsf-custom-image-selected .update-custom-image {
1012
+ display: block;
1013
+ }
1014
+
1015
+ .bsf-custom-remove-image .dashicons {
1016
+ padding: 0;
1017
+ }
1018
+
1019
+ .bsf-custom-image-label {
1020
+ margin-right: 5px;
1021
+ display: inline-block;
1022
+ }
1023
+
1024
+ .bsf-aiosrs-schema-specific-field-wrap {
1025
+ display: inline-block;
1026
+ width: 50%;
1027
+ }
1028
+
1029
+ .bsf-aiosrs-guideline-link i {
1030
+ font-size: 1rem;
1031
+ width: auto;
1032
+ }
1033
+
1034
+ /**
1035
+ * Repeater Style
1036
+ */
1037
+ .aiosrs-pro-repeater-table {
1038
+ width: 100%;
1039
+ border: 1px solid #f1f1f1;
1040
+ padding: 10px;
1041
+ }
1042
+
1043
+ .aiosrs-pro-repeater-table-wrap {
1044
+ position: relative;
1045
+ margin-bottom: 1em;
1046
+ }
1047
+
1048
+ .cartflows-row:first-child {
1049
+ line-height: 0;
1050
+ height: 0;
1051
+ }
1052
+
1053
+ .bsf-repeater-close {
1054
+ position: absolute;
1055
+ top: 0;
1056
+ left: 0;
1057
+ padding: 2px;
1058
+ border: 1px solid #f1f1f1;
1059
+ }
1060
+
1061
+ .bsf-repeater-add-new-btn {
1062
+ float: left;
1063
+ width: 100px;
1064
+ }
1065
+
1066
+ .aiosrs-pro-repeater-table .cartflows-row-heading,
1067
+ .aiosrs-pro-repeater-table .cartflows-row-content {
1068
+ border: 0;
1069
+ padding: 0;
1070
+ width: 100%;
1071
+ display: inline-block;
1072
+ }
1073
+
1074
+ .aiosrs-pro-repeater-table .cartflows-row-heading label,
1075
+ .aiosrs-pro-repeater-table .cartflows-row-content {
1076
+ line-height: 1;
1077
+ }
1078
+
1079
+ .aiosrs-pro-repeater-table .cartflows-row td:before,
1080
+ .aiosrs-pro-repeater-table .cartflows-row td:after {
1081
+ display: none;
1082
+ }
1083
+
1084
+ .bsf-aiosrs-schema-type-wrap .aiosrs-pro-repeater-table-wrap:first-of-type:last-of-type .bsf-repeater-close {
1085
+ opacity: .3;
1086
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
1087
+ pointer-events: none;
1088
+ }
1089
+
1090
+ .cartflows-row-repeater-type > .cartflows-row-heading {
1091
+ vertical-align: top;
1092
+ padding-top: 25px;
1093
+ }
1094
+
1095
+ .wp-schema-pro-tooltip-wrapper {
1096
+ font-size: 14px;
1097
+ line-height: 18px;
1098
+ }
1099
+
1100
+ .wp-schema-pro-tooltip-wrapper .wp-schema-pro-tooltip-icon {
1101
+ line-height: 1.5;
1102
+ vertical-align: middle;
1103
+ }
1104
+
1105
+ .cartflows-setup-wizard-content.advanced-settings-content-wrap .label-wrapper{
1106
+ display: flex;
1107
+ -webkit-box-pack: justify;
1108
+ -ms-flex-pack: justify;
1109
+ justify-content: space-between;
1110
+ }
1111
+
1112
+ /* Text meant only for screen readers */
1113
+ .screen-reader-text {
1114
+ border: 0;
1115
+ clip: rect(1px, 1px, 1px, 1px);
1116
+ -webkit-clip-path: inset(50%);
1117
+ clip-path: inset(50%);
1118
+ height: 1px;
1119
+ margin: -1px;
1120
+ overflow: hidden;
1121
+ padding: 0;
1122
+ position: absolute;
1123
+ width: 1px;
1124
+ word-wrap: normal !important;
1125
+ }
admin/assets/css/setup-wizard.css ADDED
@@ -0,0 +1,1125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ background: #f1f1f1;
3
+ margin: 0 20px;
4
+ }
5
+
6
+ body {
7
+ /* background: #fff; */
8
+ color: #444;
9
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
10
+ margin: 140px auto 25px;
11
+ padding: 20px 20px 10px 20px;
12
+ max-width: 700px;
13
+ /* -webkit-font-smoothing: subpixel-antialiased; */
14
+ /* box-shadow: 0 1px 3px rgba(0,0,0,0.13); */
15
+ }
16
+
17
+ a {
18
+ color: #0073aa;
19
+ }
20
+
21
+ a:hover,
22
+ a:active {
23
+ color: #00a0d2;
24
+ }
25
+
26
+ a:focus {
27
+ color: #124964;
28
+ box-shadow:
29
+ 0 0 0 1px #5b9dd9,
30
+ 0 0 2px 1px rgba(30, 140, 190, .8);
31
+ }
32
+
33
+ .ie8 a:focus {
34
+ outline: #5b9dd9 solid 1px;
35
+ }
36
+
37
+ h1, h2 {
38
+ clear: both;
39
+ color: #666;
40
+ font-size: 24px;
41
+ padding: 0;
42
+ padding-bottom: 7px;
43
+ font-weight: 400;
44
+ }
45
+
46
+ h3 {
47
+ font-size: 16px;
48
+ }
49
+
50
+ p, li, dd, dt {
51
+ padding-bottom: 2px;
52
+ font-size: 14px;
53
+ line-height: 1.5;
54
+ }
55
+
56
+ code, .code {
57
+ font-family: Consolas, Monaco, monospace;
58
+ }
59
+
60
+ ul, ol, dl {
61
+ padding: 5px 5px 5px 22px;
62
+ }
63
+
64
+ a img {
65
+ border:0
66
+ }
67
+ abbr {
68
+ border: 0;
69
+ font-variant: normal;
70
+ }
71
+
72
+ fieldset {
73
+ border: 0;
74
+ padding: 0;
75
+ margin: 0;
76
+ }
77
+
78
+ label {
79
+ cursor: pointer;
80
+ }
81
+
82
+ #logo {
83
+ margin: 6px 0 14px 0;
84
+ padding: 0 0 7px 0;
85
+ border-bottom: none;
86
+ text-align:center
87
+ }
88
+ #logo a {
89
+ background-image: url(../images/w-logo-blue.png?ver=20131202);
90
+ background-image: none, url(../images/wordpress-logo.svg?ver=20131107);
91
+ background-size: 84px;
92
+ background-position: center top;
93
+ background-repeat: no-repeat;
94
+ color: #444; /* same as login.css */
95
+ height: 84px;
96
+ font-size: 20px;
97
+ font-weight: 400;
98
+ line-height: 1.3em;
99
+ margin: -130px auto 25px;
100
+ padding: 0;
101
+ text-decoration: none;
102
+ width: 84px;
103
+ text-indent: -9999px;
104
+ outline: none;
105
+ overflow: hidden;
106
+ display: block;
107
+ }
108
+
109
+ #logo a:focus {
110
+ box-shadow: none;
111
+ }
112
+
113
+ .step {
114
+ margin: 20px 0 15px;
115
+ }
116
+ .step, th {
117
+ text-align: left;
118
+ padding: 0;
119
+ }
120
+ body {
121
+ margin: 100px auto 100px auto;
122
+ box-shadow: none;
123
+ background: #f1f1f1;
124
+ padding: 0;
125
+ max-width: 800px;
126
+ }
127
+
128
+ a {
129
+ text-decoration: none;
130
+ }
131
+
132
+ #cartflows-logo {
133
+ border: 0;
134
+ margin: 0 0 24px;
135
+ padding: 0;
136
+ text-align: center
137
+ }
138
+
139
+ #cartflows-logo img {
140
+ max-width: 50%;
141
+ }
142
+
143
+ /* Wizard Steps */
144
+ .cartflows-setup-wizard-steps,
145
+ .cartflows-setup-steps {
146
+ padding: 0 0 24px;
147
+ margin: 0;
148
+ list-style: none;
149
+ overflow: hidden;
150
+ color: #ccc;
151
+ width: 100%;
152
+ display: -webkit-inline-flex;
153
+ display: -ms-inline-flexbox;
154
+ display: inline-flex
155
+ }
156
+
157
+ .cartflows-setup-wizard-steps li,
158
+ .cartflows-setup-steps li {
159
+ width: 33%;
160
+ float: left;
161
+ padding: 0 0 .8em;
162
+ margin: 0;
163
+ text-align: center;
164
+ position: relative;
165
+ border-bottom: 4px solid #ccc;
166
+ line-height: 1.4em
167
+ }
168
+
169
+ .cartflows-setup-wizard-steps li:before,
170
+ .cartflows-setup-steps li:before {
171
+ content: "";
172
+ border: 4px solid #ccc;
173
+ border-radius: 100%;
174
+ width: 4px;
175
+ height: 4px;
176
+ position: absolute;
177
+ bottom: 0;
178
+ left: 50%;
179
+ margin-left: -6px;
180
+ margin-bottom: -8px;
181
+ background: #fff
182
+ }
183
+
184
+ .cartflows-setup-wizard-steps li.active,
185
+ .cartflows-setup-steps li.active {
186
+ border-color: #0085ba;
187
+ color: #0085ba
188
+ }
189
+
190
+ .cartflows-setup-wizard-steps li.active:before,
191
+ .cartflows-setup-steps li.active:before {
192
+ border-color: #0085ba
193
+ }
194
+
195
+ .cartflows-setup-wizard-steps li.done,
196
+ .cartflows-setup-steps li.done {
197
+ border-color: #0085ba;
198
+ color: #0085ba
199
+ }
200
+
201
+ .cartflows-setup-wizard-steps li.done:before,
202
+ .cartflows-setup-steps li.done:before {
203
+ border-color: #0085ba;
204
+ background: #0085ba
205
+ }
206
+
207
+ .cartflows-setup-wizard-content a,
208
+ .cartflows-setup-content a {
209
+ color: #0085ba
210
+ }
211
+
212
+ .cartflows-setup-wizard-content a:focus,
213
+ .cartflows-setup-content a:focus,
214
+ .cartflows-setup-wizard-content a:hover,
215
+ .cartflows-setup-content a:hover {
216
+ color: #111
217
+ }
218
+
219
+ /* Wizard Content */
220
+ .cartflows-setup-wizard-content,
221
+ .cartflows-setup-content {
222
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .13);
223
+ padding: 24px 24px 0;
224
+ background: #fff;
225
+ overflow: hidden;
226
+ zoom: 1
227
+ }
228
+
229
+ .cartflows-setup-wizard-content h1,
230
+ .cartflows-setup-content h1,
231
+ .cartflows-setup-wizard-content h2,
232
+ .cartflows-setup-content h2,
233
+ .cartflows-setup-wizard-content h3,
234
+ .cartflows-setup-content h3,
235
+ .cartflows-setup-wizard-content table,
236
+ .cartflows-setup-content table {
237
+ margin: 0 0 24px;
238
+ border: 0;
239
+ padding: 0;
240
+ color: #666;
241
+ clear: none
242
+ }
243
+
244
+ .cartflows-setup-wizard-content p,
245
+ .cartflows-setup-content p {
246
+ margin: 0 0 24px
247
+ }
248
+
249
+ .cartflows-setup-wizard-content p,
250
+ .cartflows-setup-content p,
251
+ .cartflows-setup-wizard-content table,
252
+ .cartflows-setup-content table {
253
+ font-size: 1em;
254
+ line-height: 1.75em;
255
+ color: #666
256
+ }
257
+
258
+ .cartflows-setup-wizard-content .cartflows-table,
259
+ .cartflows-setup-content .cartflows-table {
260
+ width: 100%;
261
+ }
262
+
263
+ .cartflows-setup-wizard-content .form-table th,
264
+ .cartflows-setup-content .form-table th {
265
+ width: 40%;
266
+ vertical-align: top;
267
+ font-weight: 400
268
+ }
269
+
270
+ .cartflows-setup-wizard-content .form-table td,
271
+ .cartflows-setup-content .form-table td {
272
+ vertical-align: top
273
+ }
274
+
275
+ .cartflows-setup-wizard-content .form-table td input,
276
+ .cartflows-setup-content .form-table td input,
277
+ .cartflows-setup-wizard-content .form-table td select,
278
+ .cartflows-setup-content .form-table td select {
279
+ box-sizing: border-box;
280
+ color: inherit;
281
+ }
282
+
283
+ .cartflows-setup-wizard-content .form-table td input:not([type='checkbox']),
284
+ .cartflows-setup-wizard-content .form-table td select {
285
+ width: 50%;
286
+ }
287
+
288
+ .cartflows-setup-wizard-content .form-table td .description,
289
+ .cartflows-setup-content .form-table td .description {
290
+ line-height: 1.5em;
291
+ display: block;
292
+ margin-top: .25em;
293
+ color: #999;
294
+ font-style: italic
295
+ }
296
+
297
+ .cartflows-setup-wizard-content .form-table td .input-checkbox,
298
+ .cartflows-setup-content .form-table td .input-checkbox,
299
+ .cartflows-setup-wizard-content .form-table td .input-radio,
300
+ .cartflows-setup-content .form-table td .input-radio {
301
+ width: auto;
302
+ box-sizing: inherit;
303
+ padding: inherit;
304
+ margin: 0 .5em 0 0;
305
+ box-shadow: none
306
+ }
307
+
308
+ /* Update icon. */
309
+ .updating-message:before {
310
+ margin-right: 5px;
311
+ content: "\f463";
312
+ display: inline-block;
313
+ font-size: 20px;
314
+ line-height: 1;
315
+ font-family: dashicons;
316
+ text-decoration: inherit;
317
+ font-weight: normal;
318
+ font-style: normal;
319
+ vertical-align: text-bottom;
320
+ text-align: center;
321
+ transition: color .1s ease-in 0;
322
+ -webkit-font-smoothing: antialiased;
323
+ -moz-osx-font-smoothing: grayscale;
324
+ }
325
+
326
+ /* Spins the update icon. */
327
+ .updating-message:before {
328
+ -webkit-animation: rotation 2s infinite linear;
329
+ animation: rotation 2s infinite linear;
330
+ }
331
+
332
+ @-webkit-keyframes rotation {
333
+ 0% {
334
+ -webkit-transform: rotate(0deg);
335
+ transform: rotate(0deg);
336
+ }
337
+ 100% {
338
+ -webkit-transform: rotate(-359deg);
339
+ transform: rotate(-359deg);
340
+ }
341
+ }
342
+
343
+ @keyframes rotation {
344
+ 0% {
345
+ -webkit-transform: rotate(0deg);
346
+ transform: rotate(0deg);
347
+ }
348
+ 100% {
349
+ -webkit-transform: rotate(-359deg);
350
+ transform: rotate(-359deg);
351
+ }
352
+ }
353
+
354
+ /* Content Bottom Buttons */
355
+ .cartflows-setup-actions {
356
+ display: flex;
357
+ margin-bottom: 1.5em;
358
+ }
359
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions,
360
+ .cartflows-setup .cartflows-setup-actions {
361
+ justify-content: space-between;
362
+ }
363
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .button,
364
+ .cartflows-setup .cartflows-setup-actions .button {
365
+ font-size: 1em;
366
+ padding: .5em 1em;
367
+ line-height: 1em;
368
+ margin-right: .5em;
369
+ margin-bottom: 2px;
370
+ height: auto;
371
+ border-radius: 4px
372
+ }
373
+
374
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .skip-button,
375
+ .cartflows-setup .cartflows-setup-actions .skip-button {
376
+ margin-left: 10px;
377
+ margin-right: 0;
378
+ }
379
+ .cartflows-setup-wizard .cartflows-setup-wizard-actions .button.button-primary,
380
+ .cartflows-setup .cartflows-setup-actions .button.button-primary {
381
+ opacity: 1;
382
+ height: auto;
383
+ line-height: 2;
384
+ padding: 0 1.2em;
385
+ }
386
+
387
+ .aiosrs-pro-return-to-dashboard {
388
+ font-size: .85em;
389
+ color: #b5b5b5;
390
+ margin: 1.18em 0;
391
+ display: block;
392
+ text-align: center
393
+ }
394
+
395
+ /* Theme Config Page */
396
+ .wp-core-ui .aiosrs-pro-basic-config .ast-color-picker {
397
+ vertical-align: top;
398
+ margin-right: 7px;
399
+ }
400
+ .wp-core-ui .aiosrs-pro-basic-config .wp-picker-clear {
401
+ width: 70px;
402
+ }
403
+ /* Ready Page */
404
+ .cartflows-setup-wizard-content .twitter-share-button,
405
+ .cartflows-setup-content .twitter-share-button {
406
+ float: right
407
+ }
408
+
409
+ /**
410
+ * Site Identity
411
+ */
412
+ .cartflows-setup-wizard-content select,
413
+ .cartflows-setup-content select,
414
+ .cartflows-setup-wizard-content input,
415
+ .cartflows-setup-content input {
416
+ border: 1px solid #f1f1f1;
417
+ padding: 0.5em;
418
+ border-radius: 3px;
419
+ font-size: 14px;
420
+ }
421
+
422
+ .wp-picker-active .wp-picker-holder {
423
+ position: absolute;
424
+ z-index: 9;
425
+ }
426
+
427
+ .cartflows-setup-wizard-next-steps .button-hero:last-child,
428
+ .cartflows-setup-next-steps .button-hero:last-child {
429
+ margin-bottom: 0em;
430
+ }
431
+ .cartflows-setup-wizard-next-steps .button-hero,
432
+ .cartflows-setup-next-steps .button-hero {
433
+ margin-bottom: 1em;
434
+ }
435
+
436
+ .wcf-wizard-next-steps {
437
+ border: 1px solid #eee;
438
+ border-radius: 4px;
439
+ list-style: none;
440
+ padding: 0;
441
+ margin-bottom: 2em;
442
+ }
443
+ .wcf-wizard-next-steps .wcf-wizard-next-step-item:first-child {
444
+ border-top: 0;
445
+ }
446
+ .wcf-wizard-next-steps .wcf-wizard-next-step-item {
447
+ display: -webkit-box;
448
+ display: flex;
449
+ border-top: 1px solid #eee;
450
+ }
451
+ .wcf-wizard-next-steps li {
452
+ padding: 0;
453
+ }
454
+ .wcf-wizard-next-steps .wcf-wizard-next-step-description {
455
+ -webkit-box-flex: 1;
456
+ flex-grow: 1;
457
+ margin: 1.5em;
458
+ }.wcf-wizard-next-steps .wcf-wizard-next-step-action {
459
+ -webkit-box-flex: 0;
460
+ flex-grow: 0;
461
+ display: -webkit-box;
462
+ display: flex;
463
+ -webkit-box-align: center;
464
+ align-items: center;
465
+ }
466
+ .wcf-wizard-next-steps p.next-step-heading {
467
+ margin: 0;
468
+ font-size: .95em;
469
+ font-weight: 400;
470
+ font-variant: all-petite-caps;
471
+ }
472
+ .wc-setup-content p {
473
+ margin: 20px 0;
474
+ font-size: 1em;
475
+ line-height: 1.75em;
476
+ color: #666;
477
+ }.wcf-wizard-next-steps h3.next-step-description {
478
+ margin: 0;
479
+ font-size: 16px;
480
+ font-weight: 600;
481
+ }
482
+ .wc-setup-content h1,
483
+ .wc-setup-content h2,
484
+ .wc-setup-content h3,
485
+ .wc-setup-content table {
486
+ margin: 0 0 20px;
487
+ border: 0;
488
+ padding: 0;
489
+ color: #666;
490
+ clear: none;
491
+ font-weight: 500;
492
+ }.wcf-wizard-next-steps p.next-step-extra-info {
493
+ margin: 0;
494
+ }
495
+ .wc-setup-content p:last-child {
496
+ margin-bottom: 0;
497
+ }
498
+ .wc-setup-content p {
499
+ margin: 20px 0;
500
+ font-size: 1em;
501
+ line-height: 1.75em;
502
+ color: #666;
503
+ }.wcf-wizard-next-steps .wcf-wizard-next-step-action .button {
504
+ margin: 1em 1.5em;
505
+ }
506
+ .cartflows-setup-content .wc-setup-actions {
507
+ overflow: hidden;
508
+ margin: 20px 0 0;
509
+ position: relative;
510
+ }
511
+
512
+ /**
513
+ * Step: Last
514
+ */
515
+ .cartflows-setup-wizard-next-steps-last ul,
516
+ .cartflows-setup-next-steps-last ul {
517
+ padding: 0;
518
+ }
519
+ .cartflows-setup-wizard-next-steps-last li i,
520
+ .cartflows-setup-next-steps-last li i {
521
+ padding-right: 10px;
522
+ }
523
+ .cartflows-setup-wizard-next-steps-last li,
524
+ .cartflows-setup-next-steps-last li {
525
+ list-style-type: none;
526
+ padding: 0;
527
+ }
528
+
529
+ /**
530
+ * Schema template
531
+ */
532
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap {
533
+ display: inline-block;
534
+ background: #f1f1f1;
535
+ border: 1px solid #d8d8d8;
536
+ padding: 10px 5px;
537
+ width: calc( 33% - 8px);
538
+ text-align: center;
539
+ margin-right: 10px;
540
+ margin-bottom: 10px;
541
+ cursor: pointer;
542
+ box-sizing: border-box;
543
+ overflow: hidden;
544
+ vertical-align: middle;
545
+ font-size: 16px;
546
+ }
547
+
548
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap:nth-child(3n) {
549
+ margin-right:0;
550
+ }
551
+
552
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap.selected,
553
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap:hover {
554
+ background: #d6d6d6;
555
+ border-color: #b9b9b9;
556
+ }
557
+
558
+ .aiosrs-pro-basic-config .aiosrs-pro-schema-temp-wrap i {
559
+ font-size: 18px;
560
+ height: 18px;
561
+ vertical-align: middle;
562
+ display: block;
563
+ margin: auto;
564
+ }
565
+
566
+ .aiosrs-pro-basic-config td {
567
+ padding: 0;
568
+ }
569
+
570
+ .cartflows-setup-wizard-content .cartflows-table,
571
+ .cartflows-setup-content .cartflows-table {
572
+ border: 1px solid #f1f1f1;
573
+ border-radius: 4px;
574
+ }
575
+
576
+ .cartflows-setup-wizard-content .form-table th,
577
+ .cartflows-setup-content .aiosrs-pro-schema-ready th,
578
+ .cartflows-setup-wizard-content .form-table td,
579
+ .cartflows-setup-content .aiosrs-pro-schema-ready td,
580
+ .cartflows-setup-wizard-content .form-table .button-hero,
581
+ .cartflows-setup-content .aiosrs-pro-schema-ready .button-hero {
582
+ font-size: 16px;
583
+ font-size: 1rem;
584
+ }
585
+
586
+ .cartflows-setup-wizard-content .aiosrs-pro-schema-ready td,
587
+ .cartflows-setup-content .aiosrs-pro-schema-ready td {
588
+ padding-right: 0;
589
+ }
590
+
591
+ .cartflows-setup-wizard .wizard-close-link,
592
+ .cartflows-setup .wizard-close-link {
593
+ color: #ccc;
594
+ box-shadow: none;
595
+ }
596
+
597
+ /**
598
+ * Hide tooltip text
599
+ */
600
+ .cartflows-setup-wizard .ui-helper-hidden-accessible,
601
+ .cartflows-setup .ui-helper-hidden-accessible {
602
+ display: none;
603
+ }
604
+
605
+ .cartflows-setup-wizard .ui-widget-content.bsf-aiosrs-schema-ui-tooltip,
606
+ .cartflows-setup .ui-widget-content.bsf-aiosrs-schema-ui-tooltip {
607
+ font-size: 14px;
608
+ }
609
+
610
+ .aiosrs-pro-schema-ready .button-primary.button-hero {
611
+ text-align: center;
612
+ }
613
+
614
+ /**
615
+ * Schema Pro On-Boarding
616
+ */
617
+ .cartflows-setup-wizard .cartflows-setup-wizard-content .button-next,
618
+ .cartflows-setup-wizard-content.welcome-content-wrap .button-close {
619
+ margin-left: 10px;
620
+ }
621
+
622
+ .cartflows-setup-wizard-content.social-profiles-content-wrap input[type="text"] {
623
+ width: 100%;
624
+ }
625
+
626
+ .cartflows-setup-wizard-content.success-content-wrap .form-table td {
627
+ width: 45%;
628
+ text-align: center;
629
+ padding-right: 0;
630
+ }
631
+
632
+ .cartflows-setup-wizard-content.success-content-wrap .form-table td.space {
633
+ width: 10%;
634
+ }
635
+
636
+ .cartflows-setup-wizard-content.general-setting-content-wrap .form-table select {
637
+ min-width: 50%;
638
+ }
639
+
640
+ .cartflows-setup-wizard-content.general-setting-content-wrap .form-table input[type="text"] {
641
+ width: 100%;
642
+ }
643
+
644
+ .cartflows-setup-wizard-content.general-setting-content-wrap .custom-field-wrapper {
645
+ display: inline-block;
646
+ width: 48%;
647
+ vertical-align: middle;
648
+ }
649
+
650
+ .cartflows-setup-wizard-content.general-setting-content-wrap .site-logo-custom-wrap {
651
+ vertical-align: top;
652
+ }
653
+
654
+ /**
655
+ * Custom Image Select
656
+ */
657
+ .cartflows-setup-wizard-content.general-setting-content-wrap .image-field-wrap {
658
+ position: relative;
659
+ display: inline-block;
660
+ }
661
+
662
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-select .dashicons {
663
+ font-size: 1.2em;
664
+ width: 1em;
665
+ height: 1em;
666
+ line-height: 1em;
667
+ margin-right: 5px;
668
+ vertical-align: middle;
669
+ }
670
+
671
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-remove {
672
+ display:none;
673
+ position: absolute;
674
+ background: rgba(255,255,255,.7);
675
+ right: 0;
676
+ }
677
+
678
+ .cartflows-setup-wizard-content.general-setting-content-wrap .aiosrs-image-remove {
679
+ font-size: 15px;
680
+ width: 1em;
681
+ height: 1em;
682
+ }
683
+
684
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select {
685
+ display: none;
686
+ }
687
+
688
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-remove {
689
+ display: inline-block;
690
+ }
691
+
692
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img {
693
+ max-width: 100%;
694
+ display: inline-block;
695
+ }
696
+
697
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img img {
698
+ max-height: 50px;
699
+ }
700
+
701
+ .cartflows-setup-wizard-content.general-setting-content-wrap .bsf-custom-image-selected .aiosrs-image-select.img img {
702
+ vertical-align: middle;
703
+ max-width: 300px;
704
+ }
705
+
706
+ .close-button-wrapper {
707
+ text-align: center;
708
+ margin: 1em 0;
709
+ }
710
+
711
+ .close-button-wrapper a.button-close .dashicons {
712
+ vertical-align: middle;
713
+ font-size: 1.3em;
714
+ line-height: .9;
715
+ width: 1em;
716
+ height: 1em;
717
+ }
718
+
719
+ .close-button-wrapper .button {
720
+ font-size: 1em;
721
+ padding: 5px 15px;
722
+ height: auto;
723
+ background: #fff;
724
+ }
725
+
726
+ .cartflows-setup-wizard-content.welcome-content-wrap ul {
727
+ margin-top: 0;
728
+ }
729
+ .cartflows-setup-wizard-content.welcome-content-wrap ul li {
730
+ font-size: inherit;
731
+ color: #666;
732
+ }
733
+
734
+ .cartflows-setup-wizard-content .no-margin {
735
+ margin: 0 auto;
736
+ }
737
+
738
+ .cartflows-setup-wizard-content.global-schemas-content-wrap {
739
+ overflow: initial;
740
+ }
741
+
742
+ .cartflows-setup-wizard-content.global-schemas-content-wrap .cartflows-setup-wizard-actions {
743
+ padding-bottom: 24px;
744
+ margin-bottom: 0;
745
+ }
746
+
747
+ /* Meta Box Heading
748
+ ------------------------------------------------------*/
749
+ #aiosrs-schema-settings .inside {
750
+ margin: 0;
751
+ padding: 0;
752
+ }
753
+
754
+ #aiosrs-schema-settings .nav-tab-wrapper {
755
+ border-bottom: 0;
756
+ }
757
+
758
+ #aiosrs-schema-settings .nav-tab-wrapper ul {
759
+ margin: 0;
760
+ }
761
+
762
+ /* Tooltips */
763
+ .cartflows-heading-help {
764
+ color: #b3b3b3;
765
+ float: right;
766
+ font-size: 18px;
767
+ cursor: help;
768
+ }
769
+
770
+ .ui-widget-content.bsf-aiosrs-schema-ui-tooltip {
771
+ background: #333;
772
+ border-width: 1px;
773
+ border-color: #333;
774
+ -webkit-border-radius: 3px;
775
+ border-radius: 3px;
776
+ -webkit-box-shadow: 1px 0px 2px 0px rgba(214, 214, 214, 0.5);
777
+ box-shadow: 1px 0px 2px 0px rgba(214, 214, 214, 0.5);
778
+ color: #dedede;
779
+ max-width: 250px;
780
+ text-align: center;
781
+ padding: 7px;
782
+ text-rendering: optimizeLegibility;
783
+ text-shadow: none;
784
+ z-index: 9999;
785
+ }
786
+
787
+ /* Table */
788
+ .cartflows-table {
789
+ border: none;
790
+ border-bottom: 5px solid #f0f0f0;
791
+ }
792
+
793
+ .cartflows-.widefat {
794
+ border-width: 0;
795
+ border-bottom-width: 2px;
796
+ }
797
+ .cartflows-.widefat:last-child {
798
+ border-bottom-width: 1px;
799
+ }
800
+
801
+ /* Rows */
802
+ .cartflows-row td:before, .cartflows-row td:after {
803
+ display: table;
804
+ content: " ";
805
+ }
806
+
807
+ .cartflows-row td:after {
808
+ clear: both;
809
+ }
810
+
811
+ .cartflows-row td {
812
+ zoom: 1;
813
+ vertical-align: middle;
814
+ }
815
+
816
+ .cartflows-row td * {
817
+ vertical-align: middle;
818
+ }
819
+
820
+ .cartflows-row:last-child td {
821
+ border-bottom: none;
822
+ }
823
+
824
+ /* Row Heading */
825
+ .cartflows-row-heading {
826
+ border-right: 1px solid #f1f1f1;
827
+ padding: 15px;
828
+ width: 25%;
829
+ vertical-align: middle;
830
+ }
831
+
832
+ .cartflows-row-heading label {
833
+ display: inline-block;
834
+ font-size: 13px;
835
+ line-height: 1.4em;
836
+ font-weight: bold;
837
+ padding: 0;
838
+ margin: 0 0 3px;
839
+ color: #333;
840
+ }
841
+
842
+ /* Row Content */
843
+ .cartflows-table .cartflows-row-content {
844
+ padding: 15px 10px;
845
+ position: relative;
846
+ width: 75%;
847
+ }
848
+
849
+ .cartflows-row-content p:last-child {
850
+ margin-bottom: 0;
851
+ }
852
+
853
+ .bsf-aiosrs-schema-padding {
854
+ width: 110px;
855
+ }
856
+
857
+ .bsf-aiosrs-schema-padding-bottom-wrap {
858
+ margin-top: 5px;
859
+ }
860
+
861
+ /* Row Inputs */
862
+ .cartflows-row-content select {
863
+ width: 100%;
864
+ }
865
+
866
+ .cartflows-row-content .bsf-aiosrs-schema-action-desc.ast-no-desc {
867
+ margin-top: 0;
868
+ }
869
+
870
+ .cartflows-row-content .bsf-aiosrs-schema-action-desc {
871
+ margin-top: 10px;
872
+ }
873
+
874
+ /* Settings Meta Box
875
+ ------------------------------------------------------*/
876
+ #bsf-aiosrs-schema-settings .inside {
877
+ margin: 0;
878
+ padding: 0;
879
+ }
880
+
881
+ /* Builder Buttons Meta Box
882
+ ------------------------------------------------------*/
883
+ #bsf-aiosrs-schema-buttons .inside {
884
+ margin: 0;
885
+ padding: 15px;
886
+ }
887
+
888
+ #bsf-aiosrs-schema-buttons .button {
889
+ margin-right: 5px;
890
+ }
891
+
892
+ /* Rule Settings
893
+ ------------------------------------------------------*/
894
+
895
+ /* Rule Forms */
896
+ .bsf-aiosrs-schema-saved-rule {
897
+ -js-display: flex;
898
+ display: -webkit-box;
899
+ display: -webkit-flex;
900
+ display: -moz-box;
901
+ display: -ms-flexbox;
902
+ display: flex;
903
+ padding: 0 0 8px 0;
904
+ }
905
+
906
+ .bsf-aiosrs-schema-saved-rule-select {
907
+ width: 100%;
908
+ }
909
+
910
+ .bsf-aiosrs-schema-rule-objects {
911
+ display: none;
912
+ }
913
+
914
+ .bsf-aiosrs-schema-rule-objects-visible {
915
+ -js-display: flex;
916
+ display: -webkit-box;
917
+ display: -webkit-flex;
918
+ display: -moz-box;
919
+ display: -ms-flexbox;
920
+ display: flex;
921
+ }
922
+
923
+ .cartflows-row-content .bsf-aiosrs-schema-rule-objects-visible select {
924
+ width: 50%;
925
+ }
926
+
927
+ .bsf-aiosrs-schema-rule-objects-visible .bsf-aiosrs-schema-rule-objects {
928
+ display: inline;
929
+ margin-left: 7px;
930
+ }
931
+
932
+ .bsf-aiosrs-schema-remove-rule-button {
933
+ display: none;
934
+ margin-top: 5px;
935
+ text-align: right;
936
+ width: 33px;
937
+ }
938
+
939
+ .bsf-aiosrs-schema-remove-rule {
940
+ color: #000;
941
+ cursor: pointer;
942
+ opacity: 0.2;
943
+ }
944
+
945
+ .bsf-aiosrs-schema-remove-rule:hover {
946
+ color: #d54e21;
947
+ opacity: 1;
948
+ }
949
+
950
+ .bsf-aiosrs-schema-add-rule {
951
+ float: left;
952
+ margin-right: 8px;
953
+ min-width: 150px;
954
+ }
955
+
956
+ .bsf-aiosrs-schema-add-rule .button {
957
+ text-align: center;
958
+ width: 100%;
959
+ }
960
+
961
+ /* Location Rules */
962
+ .bsf-aiosrs-schema-locations-form {
963
+ display: none;
964
+ }
965
+
966
+ /* Exclusion Rules */
967
+ .bsf-aiosrs-schema-exclusion-rules {
968
+ display: none;
969
+ }
970
+
971
+ /* Color Picker */
972
+ .cartflows-row .wp-picker-holder {
973
+ position: absolute;
974
+ z-index: 1;
975
+ }
976
+
977
+ .cartflows-row .iris-border .iris-picker-inner {
978
+ right: 0;
979
+ }
980
+
981
+ .cartflows-row-content .bsf-aiosrs-schema-type {
982
+ width: auto;
983
+ }
984
+
985
+ .cartflows-table .bsf-aiosrs-schema-fixed-text-wrap,
986
+ .cartflows-table .bsf-aiosrs-schema-custom-text-wrap {
987
+ width: calc( 55% - 5px );
988
+ display: inline-block;
989
+ }
990
+ .cartflows-table .bsf-aiosrs-schema-meta-field {
991
+ width: calc( 45% - 5px );
992
+ display: inline-block;
993
+ }
994
+
995
+ .cartflows-table .bsf-aiosrs-schema-custom-text-wrap input {
996
+ width: 100%;
997
+ }
998
+
999
+ .cartflows-table .bsf-custom-remove-image,
1000
+ .cartflows-table .update-custom-image,
1001
+ .cartflows-table .bsf-hidden-field,
1002
+ .bsf-custom-image-selected button.bsf-custom-select-image {
1003
+ display: none;
1004
+ }
1005
+
1006
+ .bsf-custom-image-selected .bsf-custom-remove-image {
1007
+ display: inline-block;
1008
+ }
1009
+
1010
+ .select-custom-image,
1011
+ .bsf-custom-image-selected .update-custom-image {
1012
+ display: block;
1013
+ }
1014
+
1015
+ .bsf-custom-remove-image .dashicons {
1016
+ padding: 0;
1017
+ }
1018
+
1019
+ .bsf-custom-image-label {
1020
+ margin-left: 5px;
1021
+ display: inline-block;
1022
+ }
1023
+
1024
+ .bsf-aiosrs-schema-specific-field-wrap {
1025
+ display: inline-block;
1026
+ width: 50%;
1027
+ }
1028
+
1029
+ .bsf-aiosrs-guideline-link i {
1030
+ font-size: 1rem;
1031
+ width: auto;
1032
+ }
1033
+
1034
+ /**
1035
+ * Repeater Style
1036
+ */
1037
+ .aiosrs-pro-repeater-table {
1038
+ width: 100%;
1039
+ border: 1px solid #f1f1f1;
1040
+ padding: 10px;
1041
+ }
1042
+
1043
+ .aiosrs-pro-repeater-table-wrap {
1044
+ position: relative;
1045
+ margin-bottom: 1em;
1046
+ }
1047
+
1048
+ .cartflows-row:first-child {
1049
+ line-height: 0;
1050
+ height: 0;
1051
+ }
1052
+
1053
+ .bsf-repeater-close {
1054
+ position: absolute;
1055
+ top: 0;
1056
+ right: 0;
1057
+ padding: 2px;
1058
+ border: 1px solid #f1f1f1;
1059
+ }
1060
+
1061
+ .bsf-repeater-add-new-btn {
1062
+ float: right;
1063
+ width: 100px;
1064
+ }
1065
+
1066
+ .aiosrs-pro-repeater-table .cartflows-row-heading,
1067
+ .aiosrs-pro-repeater-table .cartflows-row-content {
1068
+ border: 0;
1069
+ padding: 0;
1070
+ width: 100%;
1071
+ display: inline-block;
1072
+ }
1073
+
1074
+ .aiosrs-pro-repeater-table .cartflows-row-heading label,
1075
+ .aiosrs-pro-repeater-table .cartflows-row-content {
1076
+ line-height: 1;
1077
+ }
1078
+
1079
+ .aiosrs-pro-repeater-table .cartflows-row td:before,
1080
+ .aiosrs-pro-repeater-table .cartflows-row td:after {
1081
+ display: none;
1082
+ }
1083
+
1084
+ .bsf-aiosrs-schema-type-wrap .aiosrs-pro-repeater-table-wrap:first-of-type:last-of-type .bsf-repeater-close {
1085
+ opacity: .3;
1086
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
1087
+ pointer-events: none;
1088
+ }
1089
+
1090
+ .cartflows-row-repeater-type > .cartflows-row-heading {
1091
+ vertical-align: top;
1092
+ padding-top: 25px;
1093
+ }
1094
+
1095
+ .wp-schema-pro-tooltip-wrapper {
1096
+ font-size: 14px;
1097
+ line-height: 18px;
1098
+ }
1099
+
1100
+ .wp-schema-pro-tooltip-wrapper .wp-schema-pro-tooltip-icon {
1101
+ line-height: 1.5;
1102
+ vertical-align: middle;
1103
+ }
1104
+
1105
+ .cartflows-setup-wizard-content.advanced-settings-content-wrap .label-wrapper{
1106
+ display: flex;
1107
+ -webkit-box-pack: justify;
1108
+ -ms-flex-pack: justify;
1109
+ justify-content: space-between;
1110
+ }
1111
+
1112
+ /* Text meant only for screen readers */
1113
+ .screen-reader-text {
1114
+ border: 0;
1115
+ clip: rect(1px, 1px, 1px, 1px);
1116
+ -webkit-clip-path: inset(50%);
1117
+ clip-path: inset(50%);
1118
+ height: 1px;
1119
+ margin: -1px;
1120
+ overflow: hidden;
1121
+ padding: 0;
1122
+ position: absolute;
1123
+ width: 1px;
1124
+ word-wrap: normal !important;
1125
+ }
admin/assets/fonts/cartflows.eot ADDED
Binary file
admin/assets/fonts/cartflows.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="cartflows-icon" d="M635.333 899.541c-37.123-36.153-60.222-86.62-60.222-142.498v-331.108c0-48.732-39.537-88.258-88.258-88.258h-221.971c-48.721 0-88.258 39.537-88.258 88.258s39.537 88.258 88.258 88.258h243.421v176.613h-243.421c-15.080 0-29.782-1.24-44.183-3.665-125.197-20.976-220.699-130.026-220.699-261.206 0-115.335 73.76-213.455 176.624-249.813 14.207-5.023 28.898-8.893 44.086-11.404 14.401-2.425 29.092-3.676 44.183-3.676h221.96c15.080 0 29.782 1.25 44.183 3.676 15.188 2.501 29.868 6.381 44.086 11.404 102.842 36.357 176.602 134.478 176.602 249.813v88.258c97.549 0 176.624 79.085 176.624 176.624h-176.624v66.237c0 12.18 9.863 22.032 22.043 22.032h44.172c53.852 0 102.669 21.364 138.434 56.18 32.197 31.313 53.852 73.372 58.972 120.444h-241.567c-53.755-0.011-102.669-21.375-138.445-56.169zM264.893 116.892c-48.753 0-88.29-39.526-88.29-88.29 0-48.753 39.526-88.29 88.29-88.29s88.29 39.537 88.29 88.29c0 48.764-39.537 88.29-88.29 88.29zM529.774 116.892c-48.764 0-88.301-39.526-88.301-88.29 0-48.753 39.526-88.29 88.301-88.29 48.753 0 88.29 39.537 88.29 88.29 0 48.764-39.537 88.29-88.29 88.29z" />
11
+ </font></defs></svg>
admin/assets/fonts/cartflows.ttf ADDED
Binary file
admin/assets/fonts/cartflows.woff ADDED
Binary file
admin/assets/js/admin-menu-settings.js ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+
3
+ /**
4
+ * AJAX Request Queue
5
+ *
6
+ * - add()
7
+ * - remove()
8
+ * - run()
9
+ * - stop()
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ var UaelAjaxQueue = (function() {
14
+
15
+ var requests = [];
16
+
17
+ return {
18
+
19
+ /**
20
+ * Add AJAX request
21
+ *
22
+ * @since 1.0.0
23
+ */
24
+ add: function(opt) {
25
+ requests.push(opt);
26
+ },
27
+
28
+ /**
29
+ * Remove AJAX request
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ remove: function(opt) {
34
+ if( jQuery.inArray(opt, requests) > -1 )
35
+ requests.splice($.inArray(opt, requests), 1);
36
+ },
37
+
38
+ /**
39
+ * Run / Process AJAX request
40
+ *
41
+ * @since 1.0.0
42
+ */
43
+ run: function() {
44
+ var self = this,
45
+ oriSuc;
46
+
47
+ if( requests.length ) {
48
+ oriSuc = requests[0].complete;
49
+
50
+ requests[0].complete = function() {
51
+ if( typeof(oriSuc) === 'function' ) oriSuc();
52
+ requests.shift();
53
+ self.run.apply(self, []);
54
+ };
55
+
56
+ jQuery.ajax(requests[0]);
57
+
58
+ } else {
59
+
60
+ self.tid = setTimeout(function() {
61
+ self.run.apply(self, []);
62
+ }, 1000);
63
+ }
64
+ },
65
+
66
+ /**
67
+ * Stop AJAX request
68
+ *
69
+ * @since 1.0.0
70
+ */
71
+ stop: function() {
72
+
73
+ requests = [];
74
+ clearTimeout(this.tid);
75
+ }
76
+ };
77
+
78
+ }());
79
+
80
+ UaelAdmin = {
81
+
82
+ init: function() {
83
+ /**
84
+ * Run / Process AJAX request
85
+ */
86
+ UaelAjaxQueue.run();
87
+ this._knowledgebase();
88
+ this._support();
89
+
90
+ $( document ).delegate( ".uael-activate-widget", "click", UaelAdmin._activate_widget );
91
+ $( document ).delegate( ".uael-deactivate-widget", "click", UaelAdmin._deactivate_widget );
92
+
93
+ $( document ).delegate( ".uael-activate-all", "click", UaelAdmin._bulk_activate_widgets );
94
+ $( document ).delegate( ".uael-deactivate-all", "click", UaelAdmin._bulk_deactivate_widgets );
95
+
96
+ $( document ).delegate( "#uael-gen-enable-beta-update", "click", UaelAdmin._allow_beta_updates );
97
+
98
+ /* White Label */
99
+ $( document ).delegate( "#uael-wl-enable-knowledgebase", "change", UaelAdmin._knowledgebase );
100
+ $( document ).delegate( "#uael-wl-enable-support", "change", UaelAdmin._support );
101
+ },
102
+
103
+ /**
104
+ * Activate All Widgets.
105
+ */
106
+ _bulk_activate_widgets: function( e ) {
107
+ var button = $( this );
108
+
109
+ var data = {
110
+ action: 'uael_bulk_activate_widgets',
111
+ nonce: uael.ajax_nonce,
112
+ };
113
+
114
+ if ( button.hasClass( 'updating-message' ) ) {
115
+ return;
116
+ }
117
+
118
+ $( button ).addClass('updating-message');
119
+
120
+ UaelAjaxQueue.add({
121
+ url: ajaxurl,
122
+ type: 'POST',
123
+ data: data,
124
+ success: function(data){
125
+
126
+ console.log( data );
127
+
128
+ // Bulk add or remove classes to all modules.
129
+ $('.uael-widget-list').children( "li" ).addClass( 'activate' ).removeClass( 'deactivate' );
130
+ $('.uael-widget-list').children( "li" ).find('.uael-activate-widget')
131
+ .addClass('uael-deactivate-widget')
132
+ .text(uael.deactivate)
133
+ .removeClass('uael-activate-widget');
134
+ $( button ).removeClass('updating-message');
135
+ }
136
+ });
137
+ e.preventDefault();
138
+ },
139
+
140
+ /**
141
+ * Deactivate All Widgets.
142
+ */
143
+ _bulk_deactivate_widgets: function( e ) {
144
+ var button = $( this );
145
+
146
+ var data = {
147
+ action: 'uael_bulk_deactivate_widgets',
148
+ nonce: uael.ajax_nonce,
149
+ };
150
+
151
+ if ( button.hasClass( 'updating-message' ) ) {
152
+ return;
153
+ }
154
+ $( button ).addClass('updating-message');
155
+
156
+ UaelAjaxQueue.add({
157
+ url: ajaxurl,
158
+ type: 'POST',
159
+ data: data,
160
+ success: function(data){
161
+
162
+ console.log( data );
163
+ // Bulk add or remove classes to all modules.
164
+ $('.uael-widget-list').children( "li" ).addClass( 'deactivate' ).removeClass( 'activate' );
165
+ $('.uael-widget-list').children( "li" ).find('.uael-deactivate-widget')
166
+ .addClass('uael-activate-widget')
167
+ .text(uael.activate)
168
+ .removeClass('uael-deactivate-widget');
169
+ $( button ).removeClass('updating-message');
170
+ }
171
+ });
172
+ e.preventDefault();
173
+ },
174
+
175
+ /**
176
+ * Activate Module.
177
+ */
178
+ _activate_widget: function( e ) {
179
+ var button = $( this ),
180
+ id = button.parents('li').attr('id');
181
+
182
+ var data = {
183
+ module_id : id,
184
+ action: 'uael_activate_widget',
185
+ nonce: uael.ajax_nonce,
186
+ };
187
+
188
+ if ( button.hasClass( 'updating-message' ) ) {
189
+ return;
190
+ }
191
+
192
+ $( button ).addClass('updating-message');
193
+
194
+ UaelAjaxQueue.add({
195
+ url: ajaxurl,
196
+ type: 'POST',
197
+ data: data,
198
+ success: function(data){
199
+
200
+ // Add active class.
201
+ $( '#' + id ).addClass('activate').removeClass( 'deactivate' );
202
+ // Change button classes & text.
203
+ $( '#' + id ).find('.uael-activate-widget')
204
+ .addClass('uael-deactivate-widget')
205
+ .text(uael.deactivate)
206
+ .removeClass('uael-activate-widget')
207
+ .removeClass('updating-message');
208
+ }
209
+ });
210
+
211
+ e.preventDefault();
212
+ },
213
+
214
+ /**
215
+ * Deactivate Module.
216
+ */
217
+ _deactivate_widget: function( e ) {
218
+ var button = $( this ),
219
+ id = button.parents('li').attr('id');
220
+ var data = {
221
+ module_id: id,
222
+ action: 'uael_deactivate_widget',
223
+ nonce: uael.ajax_nonce,
224
+ };
225
+
226
+ if ( button.hasClass( 'updating-message' ) ) {
227
+ return;
228
+ }
229
+
230
+ $( button ).addClass('updating-message');
231
+
232
+ UaelAjaxQueue.add({
233
+ url: ajaxurl,
234
+ type: 'POST',
235
+ data: data,
236
+ success: function(data){
237
+
238
+ // Remove active class.
239
+ $( '#' + id ).addClass( 'deactivate' ).removeClass('activate');
240
+
241
+ // Change button classes & text.
242
+ $( '#' + id ).find('.uael-deactivate-widget')
243
+ .addClass('uael-activate-widget')
244
+ .text(uael.activate)
245
+ .removeClass('uael-deactivate-widget')
246
+ .removeClass('updating-message');
247
+ }
248
+ })
249
+ e.preventDefault();
250
+ },
251
+
252
+ /**
253
+ * Allow Beta Updates.
254
+ */
255
+ _allow_beta_updates: function( e ) {
256
+
257
+ var $this = $(this);
258
+ var allow_beta = $this.attr('data-value');
259
+
260
+ if ( 'disable' === allow_beta ) {
261
+ allow_beta = 'enable';
262
+ }else{
263
+ allow_beta = 'disable';
264
+ }
265
+
266
+ $this.addClass('loading');
267
+
268
+ var data = {
269
+ allow_beta: allow_beta,
270
+ action: 'uael_allow_beta_updates',
271
+ nonce: uael.ajax_nonce,
272
+ };
273
+
274
+ UaelAjaxQueue.add({
275
+ url: ajaxurl,
276
+ type: 'POST',
277
+ data: data,
278
+ success: function(data){
279
+
280
+ window.location.href += '&message=saved';
281
+ }
282
+ })
283
+ },
284
+
285
+ /**
286
+ * Knowledge Base.
287
+ */
288
+ _knowledgebase: function() {
289
+ if ( $('#uael-wl-enable-knowledgebase').is(':checked') ) {
290
+ $('p.uael-knowledgebase-url').show();
291
+ }else{
292
+ $('p.uael-knowledgebase-url').hide();
293
+ }
294
+ },
295
+ /**
296
+ * Support.
297
+ */
298
+ _support: function() {
299
+ if ( $('#uael-wl-enable-support').is(':checked') ) {
300
+ $('p.uael-support-url').show();
301
+ }else{
302
+ $('p.uael-support-url').hide();
303
+ }
304
+ }
305
+ }
306
+
307
+ $( document ).ready(function() {
308
+ UaelAdmin.init();
309
+ });
310
+
311
+
312
+ } )( jQuery );
admin/assets/js/flow-admin-edit.js ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ /* Create default steps */
4
+ var wcf_setup_default_steps = function() {
5
+
6
+ $('.wcf-setup-default-steps').on('click', function(e) {
7
+
8
+ e.preventDefault();
9
+
10
+ if( $( 'body' ).hasClass( 'post-type-cartflows_flow' ) && $( 'body' ).hasClass( 'post-new-php' ) ) {
11
+
12
+ var $wpTitle = $( '#title' );
13
+
14
+ if ( ! $wpTitle.val() ) {
15
+ $wpTitle.val( 'Flow #' + $( '#post_ID' ).val() );
16
+ }
17
+
18
+ if ( wp.autosave ) {
19
+ wp.autosave.server.triggerSave();
20
+ }
21
+
22
+ $(window).off( 'beforeunload.edit-post' );
23
+ }
24
+
25
+ var $this = $(this);
26
+ post_id = $( 'form#post #post_ID').val();
27
+
28
+ $.ajax({
29
+ url: ajaxurl,
30
+ data: {
31
+ action: "cartflows_setup_default_steps",
32
+ post_id : post_id,
33
+ security: cartflows_admin.wcf_setup_default_steps_nonce
34
+ },
35
+ dataType: 'json',
36
+ type: 'POST',
37
+ success: function ( data ) {
38
+
39
+ if ( data.status ) {
40
+
41
+
42
+
43
+ location.href = data.redirect.replace( '&amp;', '&' );
44
+ }
45
+ console.log( data );
46
+ }
47
+ });
48
+ });
49
+ }
50
+
51
+ var wcf_steps_hide_show_delete = function() {
52
+
53
+ $('.wcf-flow-settings .wcf-step-delete').on('click', function(e) {
54
+
55
+ e.preventDefault();
56
+ var current_target = $( e.target );
57
+
58
+ var $this = $(this),
59
+ step_id = $this.data('id'),
60
+ icon_span = $this.find('.dashicons-trash'),
61
+ text_span = $this.find('.wcf-step-act-btn-text'),
62
+ parent = $this.parents('.wcf-step-wrap');
63
+
64
+ var delete_status = confirm( "This action will delete this flow step. Are you sure?" );
65
+ if (true == delete_status) {
66
+
67
+ console.log( 'Step Deleting' );
68
+ icon_span.addClass('wp-ui-text-notification');
69
+ text_span.addClass('wp-ui-text-notification').text('Deleting..');
70
+ //$this.text('Deleting..');
71
+
72
+ var post_id = $( 'form#post #post_ID').val();
73
+
74
+ $.ajax({
75
+ url: ajaxurl,
76
+ data: {
77
+ action: "cartflows_delete_flow_step",
78
+ post_id : post_id,
79
+ step_id : step_id,
80
+ security: cartflows_admin.wcf_delete_flow_step_nonce
81
+ },
82
+ dataType: 'json',
83
+ type: 'POST',
84
+ success: function ( data ) {
85
+ parent.slideUp(400, 'swing', function() {
86
+ parent.remove();
87
+ });
88
+ console.log( data );
89
+ }
90
+ });
91
+ }
92
+ });
93
+ }
94
+
95
+ var wcf_flow_steps_sortbale = function() {
96
+
97
+ $('.wcf-flow-settings .wcf-flow-steps-container').sortable({
98
+
99
+ connectWith: '.wcf-flow-steps-container',
100
+
101
+ update: function(event, ui) {
102
+
103
+ var $this = $(this),
104
+ step_fields = $this.find('.wcf-steps-hidden'),
105
+ step_ids = [],
106
+ post_id = $( 'form#post #post_ID').val();
107
+
108
+ step_fields.each(function(i, obj) {
109
+ step_ids.push( $(this).val() ) //test
110
+ });
111
+
112
+ $this.sortable('disable');
113
+
114
+ $.ajax({
115
+ url: ajaxurl,
116
+ data: {
117
+ action: "cartflows_reorder_flow_steps",
118
+ post_id : post_id,
119
+ step_ids : step_ids,
120
+ security: cartflows_admin.wcf_reorder_flow_steps_nonce
121
+ },
122
+ dataType: 'json',
123
+ type: 'POST',
124
+ success: function ( data ) {
125
+
126
+ $this.sortable('enable');
127
+
128
+ if ( data.status ) {
129
+ console.log( 'Sorted' );
130
+ }
131
+
132
+ console.log( data );
133
+ }
134
+ });
135
+ }
136
+ });
137
+
138
+ }
139
+ $(document).ready(function($) {
140
+
141
+ wcf_setup_default_steps();
142
+
143
+ wcf_steps_hide_show_delete();
144
+
145
+ wcf_flow_steps_sortbale();
146
+ });
147
+ })(jQuery);
admin/assets/js/global-admin.js ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+
3
+ /**
4
+ * Add Shortcode next to metabox heading.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+
9
+
10
+ /* Show Hide Custom Options for input types */
11
+ var wcf_show_field_custom_options = function() {
12
+ var default_value = $('.field-wcf-input-field-size select').val();
13
+
14
+ if( 'custom' == default_value ){
15
+ $('.field-wcf-field-tb-padding').show();
16
+ $('.field-wcf-field-lr-padding').show();
17
+ }else{
18
+ $('.field-wcf-field-tb-padding .wcf-field-row-content input[type="number"]').val('');
19
+ $('.field-wcf-field-lr-padding .wcf-field-row-content input[type="number"]').val('');
20
+
21
+ $('.field-wcf-field-tb-padding').hide();
22
+ $('.field-wcf-field-lr-padding').hide();
23
+ }
24
+
25
+ $('.field-wcf-input-field-size select').on('change', function(e) {
26
+
27
+ e.preventDefault();
28
+
29
+ var $this = $(this),
30
+ selected_value = $this.val();
31
+
32
+ if(selected_value == 'custom' ){
33
+ $('.field-wcf-field-tb-padding').show();
34
+ $('.field-wcf-field-lr-padding').show();
35
+ }else{
36
+ $('.field-wcf-field-tb-padding').hide();
37
+ $('.field-wcf-field-lr-padding').hide();
38
+ }
39
+ });
40
+ }
41
+
42
+ /* Show Hide Custom Options for Buttons */
43
+ var wcf_show_button_custom_options = function() {
44
+ var default_value = $('.field-wcf-input-button-size select').val();
45
+
46
+ if( 'custom' == default_value ){
47
+ $('.field-wcf-submit-tb-padding').show();
48
+ $('.field-wcf-submit-lr-padding').show();
49
+ }else{
50
+ $('.field-wcf-submit-tb-padding .wcf-field-row-content input[type="number"]').val('');
51
+ $('.field-wcf-submit-lr-padding .wcf-field-row-content input[type="number"]').val('');
52
+
53
+ $('.field-wcf-submit-tb-padding').hide();
54
+ $('.field-wcf-submit-lr-padding').hide();
55
+ }
56
+
57
+
58
+
59
+ $('.field-wcf-input-button-size select').on('change', function(e) {
60
+
61
+ e.preventDefault();
62
+
63
+ var $this = $(this),
64
+ selected_value = $this.val();
65
+
66
+ if(selected_value == 'custom' ){
67
+ $('.field-wcf-submit-tb-padding').show();
68
+ $('.field-wcf-submit-lr-padding').show();
69
+ }else{
70
+ $('.field-wcf-submit-tb-padding').hide();
71
+ $('.field-wcf-submit-lr-padding').hide();
72
+ }
73
+ });
74
+ }
75
+
76
+ function wcf_prevent_toggle_for_shortcode() {
77
+ // Prevent inputs in meta box headings opening/closing contents.
78
+ $( '#wcf-checkout-settings' ).find( '.hndle' ).unbind( 'click.postboxes' );
79
+
80
+ $( '#wcf-checkout-settings' ).on( 'click', '.hndle', function( event ) {
81
+
82
+ // If the user clicks on some form input inside the h3 the box should not be toggled.
83
+ if ( $( event.target ).filter( 'input, option, label, select' ).length ) {
84
+ return;
85
+ }
86
+
87
+ $( '#wcf-checkout-settings' ).toggleClass( 'closed' );
88
+ });
89
+ }
90
+
91
+ function add_tool_tip_msg(){
92
+ var tooltip = false;
93
+
94
+ $('.wcf-field-heading-help').click(function(){
95
+ var tip_wrap = $(this).closest('.wcf-field-row');
96
+ closest_tooltip = tip_wrap.find('.wcf-tooltip-text');
97
+
98
+ closest_tooltip.toggleClass('display_tool_tip');
99
+ });
100
+
101
+ }
102
+
103
+ $( document ).ready(function() {
104
+ //alert("Before Stattement");
105
+ $( '#field-wcf-shortcode' ).appendTo( '#wcf-checkout-settings .hndle span' );
106
+ $( '#field-wcf-shortcode' ).css( "display", "inline" );
107
+ //alert("After Stattement");
108
+
109
+ wcf_show_field_custom_options();
110
+
111
+ wcf_show_button_custom_options();
112
+
113
+ wcf_prevent_toggle_for_shortcode();
114
+
115
+ add_tool_tip_msg();
116
+
117
+ });
118
+
119
+ } )( jQuery );
admin/assets/js/setup-wizard.js ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+
3
+ CartFlowsWizard = {
4
+
5
+ init: function() {
6
+ this._bind();
7
+ },
8
+
9
+ /**
10
+ * Bind
11
+ */
12
+ _bind: function() {
13
+ $( document ).on('click', '.wcf-install-plugins', CartFlowsWizard._installNow);
14
+ $( document ).on('wp-plugin-installing' , CartFlowsWizard._pluginInstalling);
15
+ $( document ).on('wp-plugin-install-error' , CartFlowsWizard._installError);
16
+ $( document ).on('wp-plugin-install-success' , CartFlowsWizard._installSuccess);
17
+ },
18
+
19
+ /**
20
+ * Installing Plugin
21
+ */
22
+ _pluginInstalling: function(event, args) {
23
+ event.preventDefault();
24
+ console.log( 'Installing..' );
25
+ },
26
+
27
+ /**
28
+ * Install Error
29
+ */
30
+ _installError: function(event, args) {
31
+ event.preventDefault();
32
+ console.log( 'Install Error!' );
33
+
34
+ var redirect_link = $( '.page-builder-list' ).data('redirect-link') || '';
35
+ console.log( redirect_link );
36
+ if( '' !== redirect_link ) {
37
+ window.location = redirect_link;
38
+ console.log( 'redirecting..' );
39
+ }
40
+ },
41
+
42
+ /**
43
+ * Install Success
44
+ */
45
+ _installSuccess: function(event, args) {
46
+ event.preventDefault();
47
+
48
+ CartFlowsWizard._activatePlugin();
49
+ },
50
+
51
+ _activatePlugin: function() {
52
+ var plugin_slug = $( '.page-builder-list option:selected' ).data( 'slug' ) || '',
53
+ plugin_init = $( '.page-builder-list option:selected' ).data( 'init' ) || '',
54
+ redirect_link = $( '.page-builder-list' ).data('redirect-link') || '';
55
+
56
+ console.log( plugin_slug );
57
+ console.log( plugin_init );
58
+ console.log( redirect_link );
59
+
60
+ $.ajax({
61
+ url : ajaxurl,
62
+ method : 'POST',
63
+ data : {
64
+ action : 'page_builder_step_save',
65
+ page_builder : plugin_slug,
66
+ plugin_init : plugin_init,
67
+ security : cartflows_admin.wcf_page_builder_step_save_nonce
68
+ },
69
+ })
70
+ .done(function( data ) {
71
+ console.log( data );
72
+ console.log( redirect_link );
73
+ if( data.success ) {
74
+ if( '' !== redirect_link ) {
75
+ window.location = redirect_link;
76
+ }
77
+ }
78
+ })
79
+ .fail(function() {
80
+ console.log("error");
81
+ })
82
+ .always(function() {
83
+ console.log("complete");
84
+ });
85
+ },
86
+
87
+ /**
88
+ * Install Now
89
+ */
90
+ _installNow: function(event)
91
+ {
92
+ event.preventDefault();
93
+
94
+ var $button = $( this ),
95
+ $document = $(document),
96
+ plugin_slug = $( '.page-builder-list option:selected' ).data( 'slug' ) || '',
97
+ install = $( '.page-builder-list option:selected' ).data( 'install' ) || 'no',
98
+ plugin_init = $( '.page-builder-list option:selected' ).data( 'init' ) || '';
99
+
100
+ if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
101
+ return;
102
+ }
103
+
104
+ $button.addClass( 'updating-message' );
105
+
106
+ if( 'yes' === install ) {
107
+ CartFlowsWizard._activatePlugin();
108
+ } else {
109
+
110
+ console.log( 'plugin_slug' );
111
+
112
+
113
+ if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
114
+ wp.updates.requestFilesystemCredentials( event );
115
+
116
+ $document.on( 'credential-modal-cancel', function() {
117
+ var $message = $( '.install-now.updating-message' );
118
+
119
+ $message
120
+ .removeClass( 'updating-message' )
121
+ .text( wp.updates.l10n.installNow );
122
+
123
+ wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
124
+ } );
125
+ }
126
+
127
+ wp.updates.installPlugin( {
128
+ slug: plugin_slug
129
+ } );
130
+ }
131
+
132
+
133
+ },
134
+ }
135
+
136
+ $( document ).ready(function() {
137
+ CartFlowsWizard.init();
138
+ });
139
+
140
+
141
+ } )( jQuery );
admin/meta-assets/css/admin-edit-rtl.css ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Settings Tab */
2
+ .wcf-tab {
3
+ display: inline-block;
4
+ padding: 10px;
5
+ background: #eee;
6
+ margin-left: 7px;
7
+ cursor: pointer;
8
+ }
9
+
10
+ .wcf-tab.active {
11
+ background: #5a5a5a;
12
+ /*color: white;*/
13
+ }
14
+
15
+ .wcf-tab-wrapper {
16
+ margin: 15px 0;
17
+ }
18
+
19
+ .wcf-tab-content {
20
+ display: none;
21
+ }
22
+
23
+ .wcf-tab-content.active {
24
+ display: table;
25
+ }
26
+
27
+ /* Tab Footer */
28
+
29
+ .wcf-update-step {
30
+ float: left;
31
+ }
32
+
33
+ .wcf-back-to-flow-edit .dashicons {
34
+ vertical-align: sub;
35
+ font-size: 1rem;
36
+ }
37
+
38
+ .wcf-column-right-footer {
39
+ padding: 10px 20px;
40
+ border-right: 1px #ddd solid;
41
+ border-top: 1px #ddd solid;
42
+ background: #fafafa;
43
+ }
44
+
45
+ /* Settings Tab End */
46
+
47
+ .wcf-variation-mode {
48
+ display: none;
49
+ }
50
+ td.wcf-field-section-heading {
51
+ font-size: 16px;
52
+ font-weight: 700;
53
+ text-decoration: underline;
54
+ }
55
+ .field-wcf-shortcode input {
56
+ width: 50%;
57
+ display: inline-block;
58
+ }
59
+
60
+ .wcf-field-row-heading {
61
+ width: 30%;
62
+ }
63
+
64
+ .wcf-field-row-content {
65
+ width: 70%;
66
+ }
67
+
68
+
69
+ /* Select2 */
70
+ .wcf-field-row .wcf-target-product-select2 {
71
+ width: 50%;
72
+ height: 28px !important;
73
+ }
74
+
75
+ .wcf-field-row .wcf-product-search,
76
+ .wcf-field-row .wcf-coupon-search,
77
+ .wcf-field-row .wcf-search-pages {
78
+ width: 100%;
79
+ height: 28px !important;
80
+ }
81
+
82
+ body span.select2.select2-container.select2-container--default {
83
+ width: 350px;
84
+ max-width: 100% !important;
85
+ margin-top: 0;
86
+ }
87
+
88
+ body li.select2-results__option.select2-results__message {
89
+ background: #ecebeb;
90
+ margin-bottom: 0;
91
+ }
92
+
93
+ /* Repeater Product Field */
94
+ .wcf-repeatable-row {
95
+ background: #f9f9f9;
96
+ border: 1px solid #e5e5e5;
97
+ margin-bottom: 5px;
98
+ }
99
+
100
+ .wcf-repeatable-row-header {
101
+ background: #f1f1f1;
102
+ border-bottom: 1px solid #e5e5e5;
103
+ padding: 8px;
104
+ }
105
+
106
+ .wcf-repeatable-row-standard-fields {
107
+ padding: 8px;
108
+ }
109
+
110
+ .wcf-repeatable-row-actions {
111
+ float: left;
112
+ }
113
+
114
+ .wcf-repeatable-row-setting-label,
115
+ .wcf-repeatable-row-setting-field {
116
+ display: inline-block;
117
+ }
118
+ .wcf-repeatable-row-setting-label {
119
+ width: 25%;
120
+ }
121
+ .wcf-repeatable-row-setting-field {
122
+ width: 75%;
123
+ }
124
+
125
+ .wcf-repeatable-fields {
126
+ margin-bottom: 10px;
127
+ }
128
+
129
+ .wcf-add-repeatable-wrap {
130
+ float: none !important;
131
+ clear: both;
132
+ background: #fff !important;
133
+ padding: 4px 0 0 4px !important;
134
+ }
135
+
136
+ .wcf-repeatable-remove {
137
+ cursor: pointer;
138
+ }
139
+
140
+
141
+ .wcf-quantity-table {
142
+ border: 1px solid #e5e5e5;
143
+ border-spacing: 0;
144
+ width: 100%;
145
+ text-align: center;
146
+ border-collapse: collapse;
147
+ }
148
+ .wcf-quantity-table tr {
149
+ border-bottom: 1px solid #e5e5e5;
150
+
151
+ }
152
+
153
+
154
+ /* Custom FIeld */
155
+ .wcf-cpf-row {
156
+ background: #f9f9f9;
157
+ border: 1px solid #e5e5e5;
158
+ margin-bottom: 5px;
159
+ }
160
+
161
+ .wcf-cpf-row-header {
162
+ background: #f1f1f1;
163
+ border-bottom: 1px solid #e5e5e5;
164
+ padding: 8px;
165
+ }
166
+
167
+ .wcf-cpf-fields {
168
+ padding: 8px;
169
+ margin-bottom: 0px;
170
+ }
171
+
172
+ .wcf-cpf-row-setting-label {
173
+ width: 25%;
174
+ display: inline-block;
175
+ }
176
+
177
+ .wcf-cpf-row-setting-field {
178
+ width: 75%;
179
+ display: inline-block;
180
+ }
181
+
182
+ .wcf-field-row .wcf-cpf-actions a {
183
+ cursor: pointer;
184
+ }
admin/meta-assets/css/admin-edit.css ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Settings Tab */
2
+ .wcf-tab {
3
+ display: inline-block;
4
+ padding: 10px;
5
+ background: #eee;
6
+ margin-right: 7px;
7
+ cursor: pointer;
8
+ }
9
+
10
+ .wcf-tab.active {
11
+ background: #5a5a5a;
12
+ /*color: white;*/
13
+ }
14
+
15
+ .wcf-tab-wrapper {
16
+ margin: 15px 0;
17
+ }
18
+
19
+ .wcf-tab-content {
20
+ display: none;
21
+ }
22
+
23
+ .wcf-tab-content.active {
24
+ display: table;
25
+ }
26
+
27
+ /* Tab Footer */
28
+
29
+ .wcf-update-step {
30
+ float: right;
31
+ }
32
+
33
+ .wcf-back-to-flow-edit .dashicons {
34
+ vertical-align: sub;
35
+ font-size: 1rem;
36
+ }
37
+
38
+ .wcf-column-right-footer {
39
+ padding: 10px 20px;
40
+ border-left: 1px #ddd solid;
41
+ border-top: 1px #ddd solid;
42
+ background: #fafafa;
43
+ }
44
+
45
+ /* Settings Tab End */
46
+
47
+ .wcf-variation-mode {
48
+ display: none;
49
+ }
50
+ td.wcf-field-section-heading {
51
+ font-size: 16px;
52
+ font-weight: 700;
53
+ text-decoration: underline;
54
+ }
55
+ .field-wcf-shortcode input {
56
+ width: 50%;
57
+ display: inline-block;
58
+ }
59
+
60
+ .wcf-field-row-heading {
61
+ width: 30%;
62
+ }
63
+
64
+ .wcf-field-row-content {
65
+ width: 70%;
66
+ }
67
+
68
+
69
+ /* Select2 */
70
+ .wcf-field-row .wcf-target-product-select2 {
71
+ width: 50%;
72
+ height: 28px !important;
73
+ }
74
+
75
+ .wcf-field-row .wcf-product-search,
76
+ .wcf-field-row .wcf-coupon-search,
77
+ .wcf-field-row .wcf-search-pages {
78
+ width: 100%;
79
+ height: 28px !important;
80
+ }
81
+
82
+ body span.select2.select2-container.select2-container--default {
83
+ width: 350px;
84
+ max-width: 100% !important;
85
+ margin-top: 0;
86
+ }
87
+
88
+ body li.select2-results__option.select2-results__message {
89
+ background: #ecebeb;
90
+ margin-bottom: 0;
91
+ }
92
+
93
+ /* Repeater Product Field */
94
+ .wcf-repeatable-row {
95
+ background: #f9f9f9;
96
+ border: 1px solid #e5e5e5;
97
+ margin-bottom: 5px;
98
+ }
99
+
100
+ .wcf-repeatable-row-header {
101
+ background: #f1f1f1;
102
+ border-bottom: 1px solid #e5e5e5;
103
+ padding: 8px;
104
+ }
105
+
106
+ .wcf-repeatable-row-standard-fields {
107
+ padding: 8px;
108
+ }
109
+
110
+ .wcf-repeatable-row-actions {
111
+ float: right;
112
+ }
113
+
114
+ .wcf-repeatable-row-setting-label,
115
+ .wcf-repeatable-row-setting-field {
116
+ display: inline-block;
117
+ }
118
+ .wcf-repeatable-row-setting-label {
119
+ width: 25%;
120
+ }
121
+ .wcf-repeatable-row-setting-field {
122
+ width: 75%;
123
+ }
124
+
125
+ .wcf-repeatable-fields {
126
+ margin-bottom: 10px;
127
+ }
128
+
129
+ .wcf-add-repeatable-wrap {
130
+ float: none !important;
131
+ clear: both;
132
+ background: #fff !important;
133
+ padding: 4px 4px 0 0 !important;
134
+ }
135
+
136
+ .wcf-repeatable-remove {
137
+ cursor: pointer;
138
+ }
139
+
140
+
141
+ .wcf-quantity-table {
142
+ border: 1px solid #e5e5e5;
143
+ border-spacing: 0;
144
+ width: 100%;
145
+ text-align: center;
146
+ border-collapse: collapse;
147
+ }
148
+ .wcf-quantity-table tr {
149
+ border-bottom: 1px solid #e5e5e5;
150
+
151
+ }
152
+
153
+
154
+ /* Custom FIeld */
155
+ .wcf-cpf-row {
156
+ background: #f9f9f9;
157
+ border: 1px solid #e5e5e5;
158
+ margin-bottom: 5px;
159
+ }
160
+
161
+ .wcf-cpf-row-header {
162
+ background: #f1f1f1;
163
+ border-bottom: 1px solid #e5e5e5;
164
+ padding: 8px;
165
+ }
166
+
167
+ .wcf-cpf-fields {
168
+ padding: 8px;
169
+ margin-bottom: 0px;
170
+ }
171
+
172
+ .wcf-cpf-row-setting-label {
173
+ width: 25%;
174
+ display: inline-block;
175
+ }
176
+
177
+ .wcf-cpf-row-setting-field {
178
+ width: 75%;
179
+ display: inline-block;
180
+ }
181
+
182
+ .wcf-field-row .wcf-cpf-actions a {
183
+ cursor: pointer;
184
+ }
admin/meta-assets/js/admin-edit.js ADDED
@@ -0,0 +1,810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ CartFlowsAdminEdit = {
4
+
5
+ /**
6
+ * Init
7
+ */
8
+ init: function()
9
+ {
10
+ this._bind();
11
+ this._set_font_weigths();
12
+ },
13
+
14
+ /**
15
+ * Binds events
16
+ */
17
+ _bind: function()
18
+ {
19
+ $( document ).on('click', '.wcf-cpf-add', CartFlowsAdminEdit._add_custom_field );
20
+ $( document ).on('click', '.wcf-cpf-action-remove', CartFlowsAdminEdit._remove_custom_field );
21
+
22
+ $( document ).on('change', '.wcf-field-font-family', CartFlowsAdminEdit._set_font_weight_select_options );
23
+ $( document ).on('change', '.wcf-field-font-weight', CartFlowsAdminEdit._set_font_weight_val );
24
+ },
25
+
26
+ _set_font_weight_val: function(event) {
27
+ event.preventDefault();
28
+ $(this).attr( 'data-selected', $(this).val() );
29
+
30
+ CartFlowsAdminEdit._set_google_url();
31
+ },
32
+
33
+ _set_font_weigths: function() {
34
+
35
+ $('.wcf-field-font-family').select2();
36
+
37
+ var google_url = '';
38
+ var google_font_families = {};
39
+
40
+ $('.wcf-field-font-family').each(function(index, el) {
41
+ var font_family = $(el).val();
42
+ var id = $(el).data('for');
43
+
44
+ var temp = font_family.match("'(.*)'");
45
+
46
+ if( temp && temp[1] ) {
47
+ font_family = temp[1];
48
+ }
49
+
50
+ var new_font_weights = {};
51
+ if( wcf.google_fonts[ font_family ] ) {
52
+
53
+ var variants = wcf.google_fonts[ font_family ][0];
54
+
55
+ $.each( variants, function(index, weight) {
56
+ if( ! weight.includes( 'italic' ) ) {
57
+ new_font_weights[ weight ] = wcf.font_weights[ weight ];
58
+ }
59
+ });
60
+
61
+ var weight = $( '.wcf-field-font-weight[data-for="'+id+'"]' );
62
+ if( weight.length ) {
63
+
64
+ weight.empty(); // remove old options
65
+ var current_selected = weight.attr('data-selected');
66
+ var selected = "";
67
+
68
+ $.each(new_font_weights, function(key,value) {
69
+
70
+ if( key == current_selected ) {
71
+ var selected = "selected='selected'";
72
+ }
73
+
74
+ weight.append($("<option "+selected+"></option>").attr("value", key).text(value));
75
+ });
76
+ }
77
+
78
+ temp_font_family = font_family.replace(' ', '+');
79
+ google_font_families[ temp_font_family ] = new_font_weights;
80
+
81
+ } else if( wcf.system_fonts[ font_family ] ) {
82
+
83
+ var variants = wcf.system_fonts[ font_family ]['variants'];
84
+
85
+ $.each( variants, function(index, weight) {
86
+ if( ! weight.includes( 'italic' ) ) {
87
+ new_font_weights[ weight ] = wcf.font_weights[ weight ];
88
+ }
89
+ });
90
+
91
+ var weight = $( '.wcf-field-font-weight[data-for="'+id+'"]' );
92
+
93
+ if( weight.length ) {
94
+ var current_selected = weight.attr('data-selected');
95
+
96
+ weight.empty(); // remove old options
97
+ var selected = "";
98
+ $.each(new_font_weights, function(key,value) {
99
+
100
+ if( key == current_selected ) {
101
+ var selected = "selected='selected'";
102
+ } else {
103
+ }
104
+ weight.append($("<option "+selected+"></option>").attr("value", key).text(value));
105
+ });
106
+ }
107
+ }
108
+ });
109
+
110
+ CartFlowsAdminEdit._set_google_url();
111
+ },
112
+
113
+ _set_google_url: function() {
114
+ var google_url = '';
115
+ $('.wcf-field-font-family').each(function(index, el) {
116
+
117
+ var font_family = $(el).val();
118
+ var id = $(el).data('for');
119
+
120
+ var temp = font_family.match("'(.*)'");
121
+
122
+ if( temp && temp[1] ) {
123
+ font_family = temp[1];
124
+ }
125
+
126
+ if( ( 'inherit' != font_family ) && ( 'Helvetica' !== font_family ) && ( 'Verdana' !== font_family ) && ( 'Arial' !== font_family ) && ( 'Times' !== font_family ) && ( 'Georgia' !== font_family ) && ( 'Courier' !== font_family ) ) {
127
+ font_family = font_family.replace(' ', '+');
128
+
129
+ var weight = $( '.wcf-field-font-weight[data-for="'+id+'"]' );
130
+ var font_weight = weight.val();
131
+
132
+ if( typeof font_weight == 'undefined' && id == 'wcf-base' ){
133
+ font_weight = '';
134
+ }
135
+ var bar = '',
136
+ colon = '';
137
+
138
+ if( google_url ) {
139
+ if( font_weight != ''){
140
+ bar = '|';
141
+ colon = ':';
142
+ }
143
+ google_url = google_url + bar + font_family + colon + font_weight;
144
+ } else {
145
+ google_url = font_family;
146
+ }
147
+ }
148
+
149
+ });
150
+
151
+ $('#wcf-field-google-font-url').val( '//fonts.googleapis.com/css?family=' + google_url );
152
+ },
153
+
154
+ _set_font_weight_select_options: function(event) {
155
+ event.preventDefault();
156
+
157
+ CartFlowsAdminEdit._set_font_weigths();
158
+ },
159
+
160
+ _remove_custom_field: function(e) {
161
+
162
+ e.preventDefault();
163
+
164
+ var $this = $(this),
165
+ wrap = $this.closest('.wcf-cpf-actions'),
166
+ post_id = $('#post_ID').val(),
167
+ type = wrap.data('type'),
168
+ key = wrap.data('key'),
169
+ row = $this.parents('.wcf-field-row');
170
+
171
+ var delete_status = confirm( "This action will delete this field. Are you sure?" );
172
+ if (true == delete_status) {
173
+ $this.addClass('wp-ui-text-notification').text('Removing..');
174
+
175
+ $.ajax({
176
+ url: wcf.ajax_url,
177
+ data: {
178
+ action: "wcf_delete_checkout_custom_field",
179
+ post_id: post_id,
180
+ type : type,
181
+ key : key,
182
+ security: cartflows_admin.wcf_delete_checkout_custom_field_nonce
183
+ },
184
+ dataType: 'json',
185
+ type: 'POST',
186
+ success: function ( data ) {
187
+ row.slideUp(400, 'swing', function() {
188
+ row.remove();
189
+ });
190
+ }
191
+ });
192
+ }
193
+ },
194
+
195
+ _add_custom_field: function(e) {
196
+
197
+ e.preventDefault();
198
+
199
+ var $this = $(this),
200
+ wrap = $this.closest('.wcf-cpf-wrap'),
201
+ post_id = $('#post_ID').val(),
202
+ add_to = wrap.find( '.wcf-cpf-fields.wcf-cpf-add_to select' ).val() || '',
203
+ type = wrap.find( '.wcf-cpf-fields.wcf-cpf-type select' ).val() || '',
204
+ label = wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).val() || '',
205
+ name = wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).val() || '';
206
+
207
+ if( '' === label ) {
208
+ wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).focus();
209
+ return;
210
+ }
211
+
212
+ if( '' === name ) {
213
+ wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).focus();
214
+ return;
215
+ }
216
+
217
+ $this.addClass('updating-message').text('Adding Field..');
218
+
219
+ $.ajax({
220
+ url: wcf.ajax_url,
221
+ data: {
222
+ action : "wcf_add_checkout_custom_field",
223
+ post_id : post_id,
224
+ add_to : add_to,
225
+ type : type,
226
+ label : label,
227
+ name : name,
228
+ security: cartflows_admin.wcf_add_checkout_custom_field_nonce
229
+ },
230
+ dataType: 'json',
231
+ type: 'POST',
232
+ success: function ( data ) {
233
+
234
+ if( $('.' + data.add_to_class ).length ) {
235
+ $('.' + data.add_to_class ).append( data.markup );
236
+
237
+ var new_row = $('.wcf-field-row.field-'+data.field_args.name );
238
+
239
+ $this.removeClass('updating-message').text('Added Field!');
240
+ setTimeout(function() {
241
+ $this.text('Add New Field');
242
+ }, 1500);
243
+
244
+
245
+ if( $('.wcf-field-row.field-'+data.field_args.name ).length ) {
246
+ $('html, body').animate({
247
+ scrollTop: $('.wcf-field-row.field-'+data.field_args.name ).offset().top
248
+ }, 800);
249
+ }
250
+ }
251
+ }
252
+ });
253
+
254
+ },
255
+ };
256
+
257
+ /**
258
+ * Initialization
259
+ */
260
+ $(function(){
261
+ CartFlowsAdminEdit.init();
262
+ });
263
+
264
+ })(jQuery);
265
+
266
+ (function($){
267
+
268
+ if ( typeof getEnhancedSelectFormatString == "undefined" ) {
269
+ function getEnhancedSelectFormatString() {
270
+ var formatString = {
271
+ noResults: function() {
272
+ return wc_enhanced_select_params.i18n_no_matches;
273
+ },
274
+ errorLoading: function() {
275
+ return wc_enhanced_select_params.i18n_ajax_error;
276
+ },
277
+ inputTooShort: function( args ) {
278
+ var remainingChars = args.minimum - args.input.length;
279
+
280
+ if ( 1 === remainingChars ) {
281
+ return wc_enhanced_select_params.i18n_input_too_short_1;
282
+ }
283
+
284
+ return wc_enhanced_select_params.i18n_input_too_short_n.replace( '%qty%', remainingChars );
285
+ },
286
+ inputTooLong: function( args ) {
287
+ var overChars = args.input.length - args.maximum;
288
+
289
+ if ( 1 === overChars ) {
290
+ return wc_enhanced_select_params.i18n_input_too_long_1;
291
+ }
292
+
293
+ return wc_enhanced_select_params.i18n_input_too_long_n.replace( '%qty%', overChars );
294
+ },
295
+ maximumSelected: function( args ) {
296
+ if ( args.maximum === 1 ) {
297
+ return wc_enhanced_select_params.i18n_selection_too_long_1;
298
+ }
299
+
300
+ return wc_enhanced_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
301
+ },
302
+ loadingMore: function() {
303
+ return wc_enhanced_select_params.i18n_load_more;
304
+ },
305
+ searching: function() {
306
+ return wc_enhanced_select_params.i18n_searching;
307
+ }
308
+ };
309
+
310
+ var language = { 'language' : formatString };
311
+
312
+ return language;
313
+ }
314
+ }
315
+
316
+ var wcf_init_color_fields = function() {
317
+
318
+ // Call color picker
319
+ $('.wcf-color-picker').wpColorPicker();
320
+ }
321
+ var wcf_woo_product_search_init = function() {
322
+
323
+ var $product_search = $('.wcf-product-search:not(.wc-product-search)');
324
+
325
+ if( $product_search.length > 0 ) {
326
+
327
+ $product_search.addClass('wc-product-search');
328
+
329
+ $(document.body).trigger('wc-enhanced-select-init');
330
+ }
331
+ }
332
+
333
+ var wcf_woo_coupon_search_init = function() {
334
+
335
+ $( ':input.wc-coupon-search' ).filter( ':not(.enhanced)' ).each( function() {
336
+ var select2_args = {
337
+ allowClear: $( this ).data( 'allow_clear' ) ? true : false,
338
+ placeholder: $( this ).data( 'placeholder' ),
339
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
340
+ escapeMarkup: function( m ) {
341
+ return m;
342
+ },
343
+ ajax: {
344
+ url: wc_enhanced_select_params.ajax_url,
345
+ dataType: 'json',
346
+ quietMillis: 250,
347
+ data: function( params, page ) {
348
+ return {
349
+ term: params.term,
350
+ action: $( this ).data( 'action' ) || 'wcf_json_search_coupons',
351
+ security: cartflows_admin.wcf_json_search_coupons_nonce
352
+ };
353
+ },
354
+ processResults: function( data, page ) {
355
+ var terms = [];
356
+ if ( data ) {
357
+ $.each( data, function( id, text ) {
358
+ terms.push( { id: id, text: text } );
359
+ });
360
+ }
361
+ return { results: terms };
362
+ },
363
+ cache: true
364
+ }
365
+ };
366
+
367
+ select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
368
+
369
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
370
+ });
371
+ };
372
+ var wcf_pages_search_init = function() {
373
+
374
+
375
+ $( 'select.wcf-search-pages' ).each( function() {
376
+
377
+ var select2_args = {
378
+ allowClear: $( this ).data( 'allow_clear' ) ? true : false,
379
+ placeholder: $( this ).data( 'placeholder' ) ? $( this ).data( 'placeholder' ): '',
380
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
381
+ escapeMarkup: function( m ) {
382
+ return m;
383
+ },
384
+ ajax: {
385
+ url: wc_enhanced_select_params.ajax_url,
386
+ dataType: 'json',
387
+ quietMillis: 250,
388
+ data: function( params, page ) {
389
+ return {
390
+ term: params.term,
391
+ action: $( this ).data( 'action' ) || 'wcf_json_search_pages',
392
+ security: cartflows_admin.wcf_json_search_pages_nonce
393
+ };
394
+ },
395
+ processResults: function( data, page ) {
396
+
397
+ return { results: data };
398
+ },
399
+ cache: true
400
+ }
401
+ };
402
+
403
+ select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
404
+
405
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
406
+ });
407
+ };
408
+
409
+ var wcf_add_repeatable_product = function() {
410
+
411
+ $('.wcf-add-repeatable').on('click', function(e) {
412
+
413
+ var $this = $(this),
414
+ field_name = $this.data('name'),
415
+ wrap = $this.closest('.wcf-repeatables-wrap'),
416
+ template = $('#tmpl-wcf-product-repeater').html(),
417
+ highest = 0,
418
+ new_key = 0;
419
+
420
+ wrap.find('.wcf-repeatable-row').each(function(er) {
421
+ var r_row = $(this),
422
+ key = r_row.data('key');
423
+
424
+ if ( key > highest ) {
425
+ highest = key;
426
+ }
427
+ });
428
+
429
+ new_key = highest + 1;
430
+
431
+ template = template.replace( /{{id}}/g, new_key );
432
+
433
+
434
+ $( template ).insertBefore( ".wcf-add-repeatable-row" );
435
+
436
+ /* Woo Product Search */
437
+ wcf_woo_product_search_init();
438
+
439
+ e.preventDefault();
440
+ });
441
+
442
+ }
443
+
444
+ var wcf_remove_repeatable_product = function() {
445
+ $(document).on( 'click', '.wcf-repeatable-remove', function(e) {
446
+
447
+ var $this = $(this),
448
+ deletable_row = $this.closest('.wcf-repeatable-row'),
449
+ wrap = $this.closest('.wcf-repeatables-wrap');
450
+
451
+ var all_rows = wrap.find('.wcf-repeatable-row');
452
+
453
+ if ( all_rows.length === 1 ) {
454
+ alert("You cannot remove this product.");
455
+ }else{
456
+ deletable_row.remove();
457
+ }
458
+ } );
459
+ }
460
+
461
+ /* Simple Quantity */
462
+ var wcf_set_variation_mode_option = function() {
463
+
464
+ $('.wcf-variation-mode select').each(function(e) {
465
+ var $this = $(this),
466
+ variation_mode = $this.val(),
467
+ wrap = $this.closest('.wcf-repeatable-row-standard-fields'),
468
+ quantity_data = wrap.find('.wcf-quantity-data');
469
+
470
+ if ( 'simple-quantity' === variation_mode ) {
471
+ quantity_data.show();
472
+ }else{
473
+ quantity_data.hide();
474
+ }
475
+ });
476
+
477
+ $(document).on( 'change', '.wcf-variation-mode select', function(e) {
478
+ var $this = $(this),
479
+ variation_mode = $this.val(),
480
+ wrap = $this.closest('.wcf-repeatable-row-standard-fields'),
481
+ quantity_data = wrap.find('.wcf-quantity-data');
482
+
483
+ if ( 'simple-quantity' === variation_mode ) {
484
+ quantity_data.show();
485
+ }else{
486
+ quantity_data.hide();
487
+ }
488
+ });
489
+ }
490
+
491
+ var wcf_add_quantity_data = function() {
492
+
493
+ $(document).on('click', '.wcf-quantity-add-option', function(e) {
494
+
495
+ e.preventDefault();
496
+
497
+ var $this = $(this),
498
+ wrap = $this.closest('.wcf-quantity-data'),
499
+ template = $('#tmpl-wcf-product-simple-quantity').html(),
500
+ highest = 0,
501
+ new_key = 0,
502
+ main_wrap = $this.closest('.wcf-repeatable-row'),
503
+ main_key = main_wrap.data('key');
504
+
505
+ wrap.find('.wcf-quantity-repeatable-row').each(function(er) {
506
+ var r_row = $(this),
507
+ key = r_row.data('key');
508
+
509
+ if ( key > highest ) {
510
+ highest = key;
511
+ }
512
+ });
513
+
514
+ new_key = highest + 1;
515
+
516
+ template = template.replace( /{{id}}/g, main_key );
517
+ template = template.replace( /{{data_id}}/g, new_key );
518
+
519
+ $( template ).insertAfter( wrap.find('.wcf-quantity-repeatable-row').last() );
520
+ });
521
+ }
522
+
523
+ var wcf_remove_quantity_data = function() {
524
+
525
+ $(document).on( 'click', '.wcf-quanity-remove', function(e) {
526
+
527
+ var $this = $(this),
528
+ deletable_row = $this.closest('.wcf-quantity-repeatable-row'),
529
+ wrap = $this.closest('.wcf-quantity-data');
530
+
531
+ var all_rows = wrap.find('.wcf-quantity-repeatable-row');
532
+
533
+ if ( all_rows.length === 1 ) {
534
+ alert("You cannot remove this product.");
535
+ }else{
536
+ deletable_row.remove();
537
+ }
538
+ } );
539
+ }
540
+
541
+ /* Custom Fields Hide / Show */
542
+ var wcf_custom_fields_events = function() {
543
+
544
+ /* Ready */
545
+ wcf_custom_fields();
546
+
547
+ /* Change Custom Field*/
548
+ $('.wcf-column-right .wcf-checkout-custom-fields .wcf-cc-fields .wcf-cc-checkbox-field input:checkbox').on('change', function(e) {
549
+ wcf_custom_fields();
550
+ });
551
+ }
552
+
553
+ /* Advance Style Fields Hide / Show */
554
+ var wcf_advance_style_fields_events = function() {
555
+
556
+ /* Ready */
557
+ wcf_advance_style_fields();
558
+ wcf_thankyou_advance_style_fields();
559
+
560
+ /* Change Advance Style Field*/
561
+ $('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field input:checkbox').on('change', function(e) {
562
+ wcf_advance_style_fields();
563
+ });
564
+
565
+ /* Change Advance Style Field*/
566
+ $('.wcf-thankyou-table [name="wcf-tq-advance-options-fields"]').on('change', function(e) {
567
+ wcf_thankyou_advance_style_fields();
568
+ });
569
+ }
570
+
571
+ var wcf_thankyou_advance_style_fields = function() {
572
+ var wrap = $('.wcf-thankyou-table'),
573
+ checkbox_field = $('.wcf-thankyou-table [name="wcf-tq-advance-options-fields"]');
574
+
575
+ var field_names = [
576
+ '.field-wcf-tq-container-width',
577
+ '.field-wcf-tq-section-bg-color'
578
+ ];
579
+
580
+ if ( checkbox_field.is(":checked") ) {
581
+ $.each( field_names, function(i, val) {
582
+ wrap.find( val ).show();
583
+ })
584
+ } else {
585
+ $.each( field_names, function(i, val) {
586
+ wrap.find( val ).hide();
587
+ });
588
+ }
589
+ }
590
+
591
+ /* Disable/Enable Advance Style Field section*/
592
+ var wcf_advance_style_fields = function() {
593
+
594
+ var wrap = $('.wcf-checkout-table'),
595
+ custom_fields = wrap.find('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field input:checkbox');
596
+
597
+ var field_names = [
598
+ '.wcf-cs-fields-options',
599
+ '.wcf-cs-button-options',
600
+ '.wcf-cs-section-options',
601
+ ];
602
+
603
+ // console.log(custom_fields);
604
+
605
+ if ( custom_fields.is(":checked") ) {
606
+ $.each( field_names, function(i, val) {
607
+ wrap.find( val ).show();
608
+ })
609
+ } else {
610
+ $.each( field_names, function(i, val) {
611
+ wrap.find( val ).hide();
612
+ });
613
+ }
614
+ }
615
+
616
+ /* Disable/Enable Custom Field section*/
617
+ var wcf_custom_fields = function() {
618
+
619
+ var wrap = $('.wcf-checkout-table'),
620
+ custom_fields = wrap.find('.wcf-column-right .wcf-checkout-custom-fields .wcf-cc-fields .wcf-cc-checkbox-field .field-wcf-custom-checkout-fields input:checkbox');
621
+
622
+ var field_names = [
623
+ '.wcf-custom-field-box',
624
+ '.wcf-cb-fields',
625
+ '.wcf-sb-fields',
626
+ ];
627
+
628
+ if ( custom_fields.is(":checked") ) {
629
+ $.each( field_names, function(i, val) {
630
+ wrap.find( val ).show();
631
+ })
632
+ } else {
633
+ $.each( field_names, function(i, val) {
634
+ wrap.find( val ).hide();
635
+ });
636
+ }
637
+ }
638
+
639
+ var wcf_settings_tab = function() {
640
+
641
+ if( $('.wcf-tab.active').length ) {
642
+ $active_tab = $('.wcf-tab.active');
643
+
644
+ $active_tab_markup = '.' + $active_tab.data('tab');
645
+
646
+ if( $( $active_tab_markup ).length ) {
647
+ $( $active_tab_markup ).siblings().removeClass('active');
648
+ $( $active_tab_markup ).addClass('active');
649
+ }
650
+ }
651
+
652
+ $('.wcf-tab').on('click', function(e) {
653
+ e.preventDefault();
654
+
655
+ $this = $(this),
656
+ tab_class = $this.data('tab');
657
+
658
+ $('#wcf-active-tab').val( tab_class );
659
+
660
+ $this.siblings().removeClass('wp-ui-text-highlight active');
661
+ $this.addClass('wp-ui-text-highlight active');
662
+
663
+ if( $( '.' + tab_class ).length ) {
664
+ $( '.' + tab_class ).siblings().removeClass('active');
665
+ $( '.' + tab_class ).addClass('active');
666
+ }
667
+ });
668
+ }
669
+
670
+ var wcf_offer_fields_events = function() {
671
+
672
+ /* Ready */
673
+ wcf_offer_fields();
674
+
675
+ /* Change Discount Type*/
676
+ $('.wcf-offer-table .field-wcf-offer-discount select').on('change', function(e) {
677
+ wcf_offer_fields();
678
+ });
679
+ }
680
+
681
+ var wcf_offer_fields = function() {
682
+
683
+ var wrap = $('.wcf-offer-table');
684
+
685
+ if ( wrap.length < 1 ) {
686
+ return;
687
+ }
688
+
689
+ var field_names = [
690
+ '.field-wcf-offer-discount-value',
691
+ ];
692
+
693
+ $.each( field_names, function(i, val) {
694
+
695
+ if ( '.field-wcf-offer-discount-value' === val ) {
696
+
697
+ var discount_type = wrap.find('.field-wcf-offer-discount select').val();
698
+
699
+ if ( 'discount_percent' === discount_type || 'discount_price' === discount_type ) {
700
+ wrap.find( val ).show();
701
+ }else{
702
+ wrap.find( val ).hide();
703
+ }
704
+ }
705
+ });
706
+
707
+ }
708
+
709
+ var wcf_input_file_init = function() {
710
+
711
+ var file_frame;
712
+ window.inputWrapper = '';
713
+
714
+ $( document.body ).on('click', '.wcf-select-image', function(e) {
715
+
716
+ e.preventDefault();
717
+
718
+ var button = $(this);
719
+ window.inputWrapper = $(this).closest('.wcf-field-row');
720
+ if ( file_frame ) {
721
+ file_frame.open();
722
+ return;
723
+ }
724
+
725
+ // Create the media frame.
726
+ file_frame = wp.media( {
727
+ multiple: false
728
+ } );
729
+
730
+ // When an image is selected, run a callback.
731
+ file_frame.on( 'select', function() {
732
+
733
+ var attachment = file_frame.state().get( 'selection' ).first().toJSON();
734
+ // place first attachment in field
735
+ window.inputWrapper.find( '#wcf-image-preview' ).show();
736
+
737
+ window.inputWrapper.find( '#wcf-image-preview' ).children('.saved-image').remove();
738
+
739
+ window.inputWrapper.find( '#wcf-image-preview' ).append('<img src="' + attachment.url + '" width="150" class="saved-image" style="margin-bottom:12px;" />');
740
+
741
+ window.inputWrapper.find( '#wcf-image-value' ).val( attachment.url );
742
+
743
+ // window.inputWrapper.find( '.wcf-image-id' ).val( attachment.id );
744
+
745
+ // window.inputWrapper.find( '.wcf-image-value' ).val( attachment.url );
746
+
747
+ $('.wcf-remove-image').show();
748
+ });
749
+
750
+ // Finally, open the modal
751
+ file_frame.open();
752
+ });
753
+
754
+ $( '.wcf-remove-image' ).on( 'click', function( e ) {
755
+ e.preventDefault();
756
+
757
+ var button = $(this),
758
+ closeRow = $(this).closest('.wcf-field-row');
759
+
760
+ closeRow.find( '#wcf-image-preview img' ).hide();
761
+ closeRow.find( '.wcf-image-id' ).val('');
762
+ closeRow.find( '.wcf-image' ).val('');
763
+ button.hide();
764
+
765
+ });
766
+ }
767
+
768
+ $(document).ready(function($) {
769
+
770
+ wcf_settings_tab();
771
+
772
+ wcf_init_color_fields();
773
+
774
+ /* Woo Product Search */
775
+ wcf_woo_product_search_init();
776
+
777
+ /* Woo Coupon Search */
778
+ wcf_woo_coupon_search_init();
779
+
780
+ /* Pages Search */
781
+ wcf_pages_search_init();
782
+
783
+ /* Select Image Field */
784
+ wcf_input_file_init();
785
+
786
+ /* Set Variation Mode Data */
787
+ wcf_set_variation_mode_option();
788
+
789
+ /* Repeateble Product */
790
+ wcf_add_repeatable_product();
791
+
792
+ /* Remove Repeatable Product */
793
+ wcf_remove_repeatable_product();
794
+
795
+ /* Custom Fields Show Hide */
796
+ wcf_custom_fields_events();
797
+
798
+ /* Advance Style Fields Show Hide */
799
+ wcf_advance_style_fields_events();
800
+
801
+ /* Upsell/Downsell Show Hide Fields */
802
+ wcf_offer_fields_events();
803
+
804
+ /* Quantity Data */
805
+ wcf_add_quantity_data();
806
+ wcf_remove_quantity_data();
807
+ });
808
+
809
+
810
+ })(jQuery);
assets/css/checkout-template-divi-rtl.css ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set{
2
+ display: inline-block;
3
+ width: 55%;
4
+ float: right;
5
+ padding-left: 00px;
6
+ margin: 50px 0 0;
7
+ }
8
+
9
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
10
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea,
11
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,
12
+ .et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,
13
+ .et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single{
14
+ display: block;
15
+ width: 100%;
16
+ min-height: 34px;
17
+ padding: 11px 12px;
18
+ font-family: inherit;
19
+ font-weight:inherit;
20
+ font-size: 14px;
21
+ line-height: 1.42857143 !important;
22
+ color: #555;
23
+ background-color: #fff;
24
+ background-image: none;
25
+ border: 1px solid #d4d4d4;
26
+ border-radius: 3px;
27
+ box-shadow: none;
28
+ }
29
+
30
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{
31
+ margin-bottom: 1.1em;
32
+ padding: 3px 3px 0 3px;
33
+ }
34
+
35
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
36
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{
37
+ font-size: 13px;
38
+ line-height: 1em;
39
+ letter-spacing: 0.3px;
40
+ font-family: inherit;
41
+ font-weight: inherit;
42
+ text-transform: capitalize;
43
+ margin-bottom: 8px;
44
+ }
45
+
46
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked,
47
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked){
48
+ color: #666;
49
+ cursor: pointer;
50
+ display: inline;
51
+ line-height: 20px;
52
+ margin-left: 10px;
53
+ position: relative;
54
+ padding-right: 28px;
55
+ }
56
+
57
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields > h3,
58
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields > h3,
59
+ .et_pb_module #wcf-embed-checkout-form #order_review_heading,
60
+ .et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address{
61
+ font-family: inherit;
62
+ font-weight: 600;
63
+ font-size: 20px;
64
+ text-transform: capitalize;
65
+ margin: 0 0 25px 0;
66
+ }
67
+
68
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
69
+ display: inline-block !important;
70
+ font-family: inherit;
71
+ font-weight: 600;
72
+ width: 45%;
73
+ margin: 50px 0 0;
74
+ padding: 0px 10px 20px;
75
+ border: none;
76
+ border-bottom: none;
77
+ }
78
+
79
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
80
+ padding: 1em 0px;
81
+ margin:0;
82
+ }
83
+
84
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,
85
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{
86
+ line-height: 2;
87
+ text-align: right;
88
+ margin: 0;
89
+ list-style: none;
90
+ font-weight: inherit;
91
+ }
92
+
93
+ .et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
94
+ font-family: inherit;
95
+ font-weight: inherit;
96
+ color: #444;
97
+ margin-top: 0;
98
+ margin-bottom: 1.5em;
99
+ }
100
+
101
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{
102
+ list-style: none;
103
+ }
104
+
105
+ .et_pb_module #wcf-embed-checkout-form .woocommerce a{
106
+ color: #F16334;
107
+ text-decoration: none;
108
+ }
109
+
110
+ .et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{
111
+ display: flex;
112
+ margin-bottom: 25px;
113
+ margin-top: 25px;
114
+ border-top: 1px solid #dcdcdc;
115
+ padding-top: 25px;
116
+ }
117
+
118
+ /*
119
+ One Column
120
+ */
121
+ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set{
122
+ display: block;
123
+ margin-top: 10px;
124
+ width: 100%;
125
+ }
126
+
127
+ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{
128
+ display: block !important;
129
+ margin: 20px 0 0;
130
+ width: 100%;
131
+ }
132
+
133
+ @media only screen and (max-width: 768px) {
134
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set{
135
+ display: block;
136
+ float: none;
137
+ padding-left: 0px;
138
+ width: 100%;
139
+ }
140
+
141
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
142
+ display: block !important;
143
+ float: none;
144
+ width: 100%;
145
+ }
146
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{
147
+ display: block;
148
+ float: none;
149
+ width: 100%;
150
+ }
151
+ }
assets/css/checkout-template-divi.css ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set{
2
+ display: inline-block;
3
+ width: 55%;
4
+ float: left;
5
+ padding-right: 00px;
6
+ margin: 50px 0 0;
7
+ }
8
+
9
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
10
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea,
11
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,
12
+ .et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,
13
+ .et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single{
14
+ display: block;
15
+ width: 100%;
16
+ min-height: 34px;
17
+ padding: 11px 12px;
18
+ font-family: inherit;
19
+ font-weight:inherit;
20
+ font-size: 14px;
21
+ line-height: 1.42857143 !important;
22
+ color: #555;
23
+ background-color: #fff;
24
+ background-image: none;
25
+ border: 1px solid #d4d4d4;
26
+ border-radius: 3px;
27
+ box-shadow: none;
28
+ }
29
+
30
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{
31
+ margin-bottom: 1.1em;
32
+ padding: 3px 3px 0 3px;
33
+ }
34
+
35
+ .et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
36
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{
37
+ font-size: 13px;
38
+ line-height: 1em;
39
+ letter-spacing: 0.3px;
40
+ font-family: inherit;
41
+ font-weight: inherit;
42
+ text-transform: capitalize;
43
+ margin-bottom: 8px;
44
+ }
45
+
46
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked,
47
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked){
48
+ color: #666;
49
+ cursor: pointer;
50
+ display: inline;
51
+ line-height: 20px;
52
+ margin-right: 10px;
53
+ position: relative;
54
+ padding-left: 28px;
55
+ }
56
+
57
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields > h3,
58
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields > h3,
59
+ .et_pb_module #wcf-embed-checkout-form #order_review_heading,
60
+ .et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address{
61
+ font-family: inherit;
62
+ font-weight: 600;
63
+ font-size: 20px;
64
+ text-transform: capitalize;
65
+ margin: 0 0 25px 0;
66
+ }
67
+
68
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
69
+ display: inline-block !important;
70
+ font-family: inherit;
71
+ font-weight: 600;
72
+ width: 45%;
73
+ margin: 50px 0 0;
74
+ padding: 0px 10px 20px;
75
+ border: none;
76
+ border-bottom: none;
77
+ }
78
+
79
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
80
+ padding: 1em 0px;
81
+ margin:0;
82
+ }
83
+
84
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,
85
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{
86
+ line-height: 2;
87
+ text-align: left;
88
+ margin: 0;
89
+ list-style: none;
90
+ font-weight: inherit;
91
+ }
92
+
93
+ .et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
94
+ font-family: inherit;
95
+ font-weight: inherit;
96
+ color: #444;
97
+ margin-top: 0;
98
+ margin-bottom: 1.5em;
99
+ }
100
+
101
+ .et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{
102
+ list-style: none;
103
+ }
104
+
105
+ .et_pb_module #wcf-embed-checkout-form .woocommerce a{
106
+ color: #F16334;
107
+ text-decoration: none;
108
+ }
109
+
110
+ .et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{
111
+ display: flex;
112
+ margin-bottom: 25px;
113
+ margin-top: 25px;
114
+ border-top: 1px solid #dcdcdc;
115
+ padding-top: 25px;
116
+ }
117
+
118
+ /*
119
+ One Column
120
+ */
121
+ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set{
122
+ display: block;
123
+ margin-top: 10px;
124
+ width: 100%;
125
+ }
126
+
127
+ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{
128
+ display: block !important;
129
+ margin: 20px 0 0;
130
+ width: 100%;
131
+ }
132
+
133
+ @media only screen and (max-width: 768px) {
134
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set{
135
+ display: block;
136
+ float: none;
137
+ padding-right: 0px;
138
+ width: 100%;
139
+ }
140
+
141
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
142
+ display: block !important;
143
+ float: none;
144
+ width: 100%;
145
+ }
146
+ .et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{
147
+ display: block;
148
+ float: none;
149
+ width: 100%;
150
+ }
151
+ }
assets/css/checkout-template-rtl.css ADDED
@@ -0,0 +1,814 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * **************
3
+ * Login & Coupon Field Layout
4
+ * **************
5
+ */
6
+
7
+ .cartflows-container .wcf-embed-checkout-form,
8
+ .cartflows-container .wcf-embed-checkout-form * {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ .wcf-embed-checkout-form .wc-backward {
13
+ display: none;
14
+ }
15
+
16
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
17
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
18
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
19
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
20
+ width: 48%;
21
+ }
22
+
23
+ .wcf-embed-checkout-form .woocommerce form .form-row-full,
24
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-full{
25
+ width: 100%;
26
+ }
27
+
28
+ /* To test divi and all */
29
+ .wcf-embed-checkout-form .woocommerce form .form-row-first, .woocommerce-page form .form-row-first{
30
+ float: right;
31
+ }
32
+
33
+ .wcf-embed-checkout-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
34
+ float: left;
35
+ }
36
+
37
+ .wcf-embed-checkout-form .woocommerce form .form-row .required{
38
+ color: red;
39
+ font-weight: 700;
40
+ border: 0!important;
41
+ text-decoration: none;
42
+ }
43
+
44
+ /* To test divi and all */
45
+
46
+ .wcf-embed-checkout-form form .form-row-first.form-row-one{
47
+ clear: both;
48
+ }
49
+
50
+ .wcf-embed-checkout-form form .wcf-form-col-3{
51
+ width: 33.33%;
52
+ float: right;
53
+ clear: unset;
54
+ }
55
+
56
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{
57
+ display: none;
58
+ }
59
+
60
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{
61
+ margin-bottom: 15px;
62
+ }
63
+
64
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{
65
+ clear: none;
66
+ }
67
+
68
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{
69
+ margin: 0;
70
+ line-height: 1em;
71
+ padding-top: 0;
72
+ position: relative;
73
+ top: 0;
74
+ }
75
+
76
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
77
+ font-family: inherit;
78
+ font-weight: 400;
79
+ font-size: 13px;
80
+ float: left;
81
+ margin-top: -39px;
82
+ }
83
+
84
+ /**
85
+ * **************
86
+ * Common Classes
87
+ * **************
88
+ */
89
+ .mt20{
90
+ margin-top: 20px !important;
91
+ }
92
+
93
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
94
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
95
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{
96
+ border-width: 1px;
97
+ border-color: #e2401c;
98
+ }
99
+
100
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,
101
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,
102
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{
103
+ border-width: 1px;
104
+ border-color: #69bf29;
105
+ }
106
+
107
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required{
108
+ border-color: #e2401c;
109
+ }
110
+
111
+ .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{
112
+ border-right-width: 2px;
113
+ border-right-color: #69bf29;
114
+ }
115
+
116
+ /**
117
+ * ************
118
+ * Main Layout
119
+ * ************
120
+ */
121
+
122
+ .wcf-embed-checkout-form .wcf-checkout-header-image{
123
+ text-align: center;
124
+ }
125
+
126
+ /**
127
+ * ************
128
+ * Radio Button
129
+ * ************
130
+ */
131
+
132
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked,
133
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) {
134
+ right: -9999px;
135
+ position: absolute;
136
+ }
137
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label,
138
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label
139
+ {
140
+ color: #666;
141
+ cursor: pointer;
142
+ display: inline;
143
+ font-family: inherit;
144
+ font-weight:inherit;
145
+ line-height: 20px;
146
+ position: relative;
147
+ padding-right: 28px;
148
+ }
149
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:before,
150
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:before {
151
+ border: 1px solid #ddd;
152
+ border-radius: 100%;
153
+ background: #fff;
154
+ content: '';
155
+ height: 18px;
156
+ right: 0;
157
+ position: absolute;
158
+ top: 0px;
159
+ width: 18px;
160
+ }
161
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:after,
162
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:after {
163
+ background: #F16334;
164
+ border-radius: 100%;
165
+ content: '';
166
+ height: 8px;
167
+ right: 5px;
168
+ position: absolute;
169
+ top: 5px;
170
+ width: 8px;
171
+ -webkit-transition: all 0.2s ease;
172
+ transition: all 0.2s ease;
173
+ }
174
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:after {
175
+ opacity: 0;
176
+ -webkit-transform: scale(0);
177
+ transform: scale(0);
178
+ }
179
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:after {
180
+ opacity: 1;
181
+ -webkit-transform: scale(1);
182
+ transform: scale(1);
183
+ }
184
+
185
+ /**
186
+ * **********
187
+ * Checkbox
188
+ * **********
189
+ */
190
+
191
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked,
192
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked)
193
+ {
194
+ color: #666;
195
+ cursor: pointer;
196
+ display: inline;
197
+ line-height: 20px;
198
+ margin-left: 10px;
199
+ position: relative;
200
+ padding-right: 28px;
201
+ }
202
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
203
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):before {
204
+ background: #fff;
205
+ border: 1px solid #ddd;
206
+ content: '';
207
+ height: 18px;
208
+ right: 0;
209
+ position: absolute;
210
+ top: -3px;
211
+ width: 18px;
212
+ }
213
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:after,
214
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):after {
215
+ background: #F16334;
216
+ content: '';
217
+ height: 8px;
218
+ right: 5px;
219
+ position: absolute;
220
+ top: 2px;
221
+ width: 8px;
222
+ -webkit-transition: all 0.2s ease;
223
+ transition: all 0.2s ease;
224
+ }
225
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):after {
226
+ opacity: 0;
227
+ -webkit-transform: scale(0);
228
+ transform: scale(0);
229
+ }
230
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:after {
231
+ opacity: 1;
232
+ -webkit-transform: scale(1);
233
+ transform: scale(1);
234
+ }
235
+
236
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
237
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
238
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
239
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2 {
240
+ float: none;
241
+ width: 100%;
242
+ padding: 0px;
243
+ border-radius: 0px;
244
+ border: none;
245
+ border-color: none;
246
+ margin-bottom: 0px;
247
+ }
248
+
249
+ .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
250
+ .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
251
+ .wcf-embed-checkout-form #order_review_heading,
252
+ .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
253
+ font-family: inherit;
254
+ font-weight: 600;
255
+ font-size: 20px;
256
+ text-transform: capitalize;
257
+ margin:0 0 25px 0;
258
+ }
259
+
260
+ .wcf-embed-checkout-form .woocommerce-checkout #payment {
261
+ background: unset;
262
+ border-radius: 0;
263
+ }
264
+
265
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
266
+ margin: 0;
267
+ padding: 0;
268
+ }
269
+
270
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{
271
+ display: block;
272
+ margin-bottom: 1.1em;
273
+ }
274
+
275
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
276
+ float: none;
277
+ margin-right: 10px;
278
+ }
279
+
280
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{
281
+ margin: 0 0 0.5em;
282
+ }
283
+
284
+ .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row
285
+ .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{
286
+ margin-bottom: 10px;
287
+ }
288
+
289
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
290
+ background-color: #eaeaea;
291
+ font-family: inherit;
292
+ font-weight:inherit;
293
+ margin-bottom: 0.5em;
294
+ }
295
+
296
+ .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
297
+ .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
298
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{
299
+ content: '';
300
+ display: block;
301
+ border: 1em solid;
302
+ border-left-color: transparent;
303
+ border-right-color: transparent;
304
+ border-top-color: transparent;
305
+ border-color: #eaeaea;
306
+ position: absolute;
307
+ top: -.75em;
308
+ right: 0;
309
+ margin: -1em 2em 0 0;
310
+ }
311
+
312
+ /* Fields */
313
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
314
+ display: block;
315
+ width: 100%;
316
+ min-height: 34px;
317
+ height: auto;
318
+ padding: 11px 12px;
319
+ font-size: 14px;
320
+ line-height: 1.42857143 !important;
321
+ color: #555;
322
+ background-color: #fff;
323
+ background-image: none;
324
+ border: 1px solid;
325
+ border-color: #d4d4d4;
326
+ border-radius: 3px;
327
+ box-shadow: none;
328
+ outline: none;
329
+ }
330
+
331
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
332
+ color: #666;
333
+ line-height: 19px;
334
+ min-height: 19px;
335
+ overflow: visible;
336
+ padding-right: 0;
337
+ }
338
+
339
+ .wcf-embed-checkout-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
340
+ font-size: 14px;
341
+ }
342
+
343
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow {
344
+ height: 100%;
345
+ }
346
+
347
+ .select2-dropdown{
348
+ border: 1px solid #d4d4d4;
349
+ }
350
+
351
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
352
+ .wcf-embed-checkout-form .woocommerce form .form-row textarea,
353
+ .wcf-embed-checkout-form .woocommerce form .form-row select,
354
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text{
355
+ display: block;
356
+ width: 100%;
357
+ min-height: 34px;
358
+ padding: 11px 12px;
359
+ font-family: inherit;
360
+ font-weight:inherit;
361
+ font-size: 14px;
362
+ line-height: 1.42857143 !important;
363
+ color: #555;
364
+ background-color: #fff;
365
+ background-image: none;
366
+ border: 1px solid #d4d4d4;
367
+ border-radius: 3px;
368
+ box-shadow: none;
369
+ }
370
+
371
+ .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"]{
372
+ font-weight: normal;
373
+ }
374
+
375
+ .wcf-embed-checkout-form .wcf-custom-coupon-field {
376
+ display: flex;
377
+ margin-bottom: 25px;
378
+ margin-top: 25px;
379
+ border-top: 1px solid #dcdcdc;
380
+ padding-top: 25px;
381
+ }
382
+
383
+ .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
384
+ width: 70%;
385
+ display: inline-block;
386
+ padding-left: 20px;
387
+ }
388
+
389
+ .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
390
+ width: 30%;
391
+ }
392
+
393
+ .wcf-embed-checkout-form input[type="text"]:focus,
394
+ .wcf-embed-checkout-form input[type="email"]:focus,
395
+ .wcf-embed-checkout-form input[type="password"]:focus,
396
+ .wcf-embed-checkout-form input[type="tel"]:focus,
397
+ .wcf-embed-checkout-form textarea:focus,
398
+ .wcf-embed-checkout-form .select2-container--open {
399
+ border-color: #b3b3b3;
400
+ box-shadow: none;
401
+ outline: none;
402
+ }
403
+
404
+ .wcf-embed-checkout-form button:focus {
405
+ outline: none;
406
+ outline-color: none;
407
+ outline-style: none;
408
+ outline-width: none;
409
+ }
410
+
411
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
412
+ .wcf-embed-checkout-form form.checkout_coupon .button {
413
+ display: block;
414
+ clear: both;
415
+ border: none;
416
+ font-size: 15px;
417
+ font-family: inherit;
418
+ font-weight: inherit;
419
+ background-color: #F16334;
420
+ line-height: 9px;
421
+ padding: 18px;
422
+ margin-bottom: 10px;
423
+ width: 100%;
424
+ text-transform: uppercase;
425
+ }
426
+
427
+ .wcf-embed-checkout-form .woocommerce #order_review button {
428
+ border: 1px solid;
429
+ border-color: #F16334;
430
+ background-color: #F16334;
431
+ font-family: inherit;
432
+ font-weight:inherit;
433
+ font-size: 18px;
434
+ letter-spacing: 0.5px;
435
+ width: 100%;
436
+ padding: 16px 24px;
437
+ font-size: 16px;
438
+ line-height: 1.5;
439
+ border-radius: 3px;
440
+ color: #fff;
441
+ text-transform: uppercase;
442
+ }
443
+
444
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
445
+ padding: 8px 6px;
446
+ background-color: #c8c8c8;
447
+ border: 1px #c8c8c8 solid;
448
+ }
449
+
450
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
451
+ border-color: #F16334;
452
+ background-color: #F16334;
453
+ }
454
+ .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
455
+ background-color: #F16334;
456
+ border-color: #F16334;
457
+ color: #fff;
458
+ }
459
+
460
+ /**
461
+ * ***********************
462
+ * New checkout style
463
+ * ***********************
464
+ */
465
+
466
+ .wcf-embed-checkout-form .woocommerce-checkout{
467
+ display: inline-block;
468
+ width: 100%;
469
+ }
470
+
471
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set{
472
+ display: inline-block;
473
+ width: 55%;
474
+ float: right;
475
+ padding-left: 40px;
476
+ margin:20px 0 0;
477
+ }
478
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review{
479
+ display: inline-block;
480
+ float: right;
481
+ width: 45%;
482
+ border: none;
483
+ background-color: inherit/*#F6F6F6*/;
484
+ padding: 0 10px;
485
+ border-radius: 3px;
486
+ }
487
+
488
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
489
+ display: inline-block;
490
+ font-family: inherit;
491
+ font-weight: 600;
492
+ width: 45%;
493
+ margin:20px 0 0;
494
+ padding: 0px 10px 20px;
495
+ border: none;
496
+ border-bottom: none;
497
+ }
498
+
499
+ .wcf-embed-checkout-form .woocommerce-checkout #payment{
500
+ background-color: inherit;
501
+ border:none;
502
+ border-top: 1px solid;
503
+ border-radius: 0px;
504
+ border-color: #dcdcdc;
505
+ padding-top: 20px;
506
+ }
507
+
508
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
509
+ padding: 1em 0px;
510
+ }
511
+
512
+ .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
513
+ .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
514
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
515
+ border: none;
516
+ }
517
+
518
+ .wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
519
+ clear: both;
520
+ }
521
+
522
+ .wcf-embed-checkout-form .woocommerce form .form-row{
523
+ margin-bottom: 1.1em;
524
+ }
525
+
526
+ .wcf-embed-checkout-form table.shop_table {
527
+ border:none;
528
+ border-bottom: 0;
529
+ background-color: inherit;
530
+ border-radius: 0;
531
+ font-family: inherit;
532
+ font-weight:inherit;
533
+ font-size: 0.95em;
534
+ margin: 0 0 0px 0 !important;
535
+ border-collapse: collapse;
536
+ text-align: right;
537
+ }
538
+ .wcf-embed-checkout-form table.shop_table #shipping_method{
539
+ margin: 0;
540
+ padding: 0;
541
+ list-style: none;
542
+ }
543
+ .wcf-embed-checkout-form table.shop_table th{
544
+ border: none;
545
+ font-weight: 400;
546
+ padding: 9px 0px;
547
+ line-height: 1.2em;
548
+ }
549
+ .wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
550
+ font-size: 1em;
551
+ }
552
+ .wcf-embed-checkout-form table.shop_table td,
553
+ .wcf-embed-checkout-form table.shop_table th {
554
+ padding: 0.6em 0;
555
+ line-height: 1.4em;
556
+ border: none;
557
+ }
558
+ .wcf-embed-checkout-form table.shop_table tbody th,
559
+ .wcf-embed-checkout-form table.shop_table tfoot td,
560
+ .wcf-embed-checkout-form table.shop_table tfoot th {
561
+ font-weight: normal;
562
+ border: none;
563
+ }
564
+ .wcf-embed-checkout-form table.shop_table tbody {
565
+ border-top: 1px dashed #cccccc;
566
+ border-bottom: 1px dashed #cccccc;
567
+ }
568
+ .wcf-embed-checkout-form table.shop_table th.product-name,
569
+ .wcf-embed-checkout-form table.shop_table th.product-total{
570
+ font-weight: 600;
571
+ }
572
+ .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th,
573
+ .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td {
574
+ font-weight: 600;
575
+ border-top: 1px dashed #cccccc;
576
+ }
577
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
578
+ padding-top: 1.8em;
579
+ font-weight: 600;
580
+ }
581
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
582
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
583
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
584
+ vertical-align: top;
585
+ }
586
+
587
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
588
+ .wcf-embed-checkout-form .woocommerce-checkout .form-row label{
589
+ font-size: 13px;
590
+ line-height: 1em;
591
+ letter-spacing: 0.3px;
592
+ font-family: inherit;
593
+ font-weight:inherit;
594
+ text-transform: capitalize;
595
+ margin-bottom: 8px;
596
+ }
597
+
598
+ .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
599
+ font-family: inherit;
600
+ font-weight:inherit;
601
+ color: #444;
602
+ margin-top: 0;
603
+ }
604
+
605
+ .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{
606
+ margin: 0;
607
+ }
608
+
609
+ .wcf-embed-checkout-form .woocommerce a{
610
+ color: #F16334;
611
+ text-decoration: none;
612
+ }
613
+
614
+ .wcf-embed-checkout-form .woocommerce .woocommerce-info,
615
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
616
+ padding: 1em 2.0em 0.4em 2em;
617
+ border-top:none;
618
+ background-color: inherit;
619
+ font-size: 14px;
620
+ font-weight: 500;
621
+ margin:0px;
622
+ }
623
+
624
+ .wcf-embed-checkout-form .woocommerce-info::before,
625
+ .wcf-embed-checkout-form .woocommerce-message::before{
626
+ right: 0.1em;
627
+ color: #F16334;
628
+ }
629
+
630
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error,
631
+ .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
632
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
633
+ background-color: #fff6f6;
634
+ border: dashed 1px #a00;
635
+ padding: 25px 25px 20px;
636
+ color: #a00;
637
+ margin: 1rem 0 1rem;
638
+ font-size: 14px;
639
+ }
640
+
641
+
642
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
643
+ display: inline;
644
+ }
645
+
646
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
647
+ margin:1em 0 1em;
648
+ }
649
+
650
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error::before{
651
+ content: '';
652
+ }
653
+
654
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li{
655
+ list-style: disc inside !important;
656
+ margin: 0 0 8px;
657
+ }
658
+
659
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{
660
+ font-weight: 400;
661
+ }
662
+
663
+ .wcf-embed-checkout-form .woocommerce form.checkout_coupon{
664
+ border: 1px solid #d3ced2;
665
+ padding: 30px 20px 20px;
666
+ margin: 2em 0;
667
+ text-align: right;
668
+ border-radius: 5px;
669
+ }
670
+
671
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
672
+ font-size: 14px;
673
+ }
674
+
675
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
676
+ font-family: inherit;
677
+ font-weight: 500;
678
+ margin-top: 0;
679
+ margin-bottom: 10px;
680
+ }
681
+
682
+ @media only screen and (max-width: 768px) {
683
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
684
+ width: 100%;
685
+ }
686
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review{
687
+ width: 100%;
688
+ }
689
+ .wcf-embed-checkout-form .woocommerce-checkout{
690
+ display: block;
691
+ }
692
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set{
693
+ display: block;
694
+ width: 100%;
695
+ padding-left: 0;
696
+ margin: 20px 0 0;
697
+ }
698
+
699
+ .wcf-embed-checkout-form form.checkout_coupon .button{
700
+ font-size: 12px;
701
+ }
702
+
703
+ .wcf-bump-order-field-wrap .wcf-bump-order-label{
704
+ font-size: 16px;
705
+ text-transform: capitalize;
706
+ }
707
+
708
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
709
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
710
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
711
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2{
712
+ padding: 18px;
713
+ }
714
+
715
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
716
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
717
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
718
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
719
+ width: 100%;
720
+ }
721
+
722
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
723
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
724
+ margin-left: 4%;
725
+ }
726
+ }
727
+
728
+
729
+ /**
730
+ * **********************
731
+ * Divi Css Overrite
732
+ * **********************
733
+ */
734
+
735
+ #et-info-email:before,
736
+ #et-info-phone:before,
737
+ #et_search_icon:before,
738
+ .comment-reply-link:after,
739
+ .et-cart-info span:before,
740
+ .et-pb-arrow-next:before,
741
+ .et-pb-arrow-prev:before,
742
+ .et-social-icon a:before,
743
+ .et_audio_container .mejs-playpause-button button:before,
744
+ .et_audio_container .mejs-volume-button button:before,
745
+ .et_overlay:before,
746
+ .et_password_protected_form .et_submit_button:after,
747
+ .et_pb_button:after,
748
+ .et_pb_contact_reset:after,
749
+ .et_pb_contact_submit:after,
750
+ .et_pb_font_icon:before,
751
+ .et_pb_newsletter_button:after,
752
+ .et_pb_pricing_table_button:after,
753
+ .et_pb_promo_button:after,
754
+ .et_pb_social_icon a.icon:before,
755
+ .et_pb_testimonial:before,
756
+ .et_pb_toggle_title:before,
757
+ .form-submit .et_pb_button:after,
758
+ .mobile_menu_bar:before,
759
+ .woocommerce #content input.button.alt:after,
760
+ .woocommerce #content input.button:after,
761
+ .woocommerce #respond input#submit.alt:after,
762
+ .woocommerce #respond input#submit:after,
763
+ .woocommerce a.button.alt:after,
764
+ .woocommerce button.button.alt:after,
765
+ .woocommerce button.button:after,
766
+ .woocommerce button.single_add_to_cart_button.button:after,
767
+ .woocommerce input.button.alt:after,
768
+ .woocommerce input.button:after,
769
+ .woocommerce-page #content input.button.alt:after,
770
+ .woocommerce-page #content input.button:after,
771
+ .woocommerce-page #respond input#submit.alt:after,
772
+ .woocommerce-page #respond input#submit:after,
773
+ .woocommerce-page a.button.alt:after,
774
+ .woocommerce-page a.button:after,
775
+ .woocommerce-page button.button.alt:after,
776
+ .woocommerce-page button.button:after,
777
+ .woocommerce-page input.button.alt:after,
778
+ .woocommerce-page input.button:after,
779
+ a.et_pb_more_button:after{
780
+ text-shadow: 0 0;
781
+ font-family: none;
782
+ font-weight: 400;
783
+ font-style: normal;
784
+ font-variant: normal;
785
+ -webkit-font-smoothing: antialiased;
786
+ -moz-osx-font-smoothing: grayscale;
787
+ line-height: 1;
788
+ text-transform: none;
789
+ speak: none;
790
+ }
791
+
792
+ .comment-reply-link:hover:after,
793
+ .woocommerce #content input.button.alt:hover:after,
794
+ .woocommerce #content input.button:hover:after,
795
+ .woocommerce #respond input#submit.alt:hover:after,
796
+ .woocommerce #respond input#submit:hover:after,
797
+ .woocommerce a.button.alt:hover:after,
798
+ .woocommerce a.button:hover:after,
799
+ .woocommerce button.button.alt:hover:after,
800
+ .woocommerce button.button:hover:after,
801
+ .woocommerce input.button.alt:hover:after,
802
+ .woocommerce input.button:hover:after,
803
+ .woocommerce-page #content input.button.alt:hover:after,
804
+ .woocommerce-page #content input.button:hover:after,
805
+ .woocommerce-page #respond input#submit.alt:hover:after,
806
+ .woocommerce-page #respond input#submit:hover:after,
807
+ .woocommerce-page a.button.alt:hover:after,
808
+ .woocommerce-page a.button:hover:after,
809
+ .woocommerce-page button.button.alt:hover:after,
810
+ .woocommerce-page button.button:hover:after,
811
+ .woocommerce-page input.button.alt:hover:after,
812
+ .woocommerce-page input.button:hover:after{
813
+ opacity: 0;
814
+ }
assets/css/checkout-template.css ADDED
@@ -0,0 +1,824 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * **************
3
+ * Login & Coupon Field Layout
4
+ * **************
5
+ */
6
+
7
+ .cartflows-container .wcf-embed-checkout-form,
8
+ .cartflows-container .wcf-embed-checkout-form * {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ .wcf-embed-checkout-form .wc-backward {
13
+ display: none;
14
+ }
15
+
16
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
17
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
18
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
19
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
20
+ width: 48%;
21
+ }
22
+
23
+ .wcf-embed-checkout-form .woocommerce form .form-row-full,
24
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-full{
25
+ width: 100%;
26
+ }
27
+
28
+ /* To test divi and all */
29
+ .wcf-embed-checkout-form .woocommerce form .form-row-first, .woocommerce-page form .form-row-first{
30
+ float: left;
31
+ }
32
+
33
+ .wcf-embed-checkout-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
34
+ float: right;
35
+ }
36
+
37
+ .wcf-embed-checkout-form .woocommerce form .form-row .required{
38
+ color: red;
39
+ font-weight: 700;
40
+ border: 0!important;
41
+ text-decoration: none;
42
+ }
43
+
44
+ /* To test divi and all */
45
+
46
+ .wcf-embed-checkout-form form .form-row-first.form-row-one{
47
+ clear: both;
48
+ }
49
+
50
+ .wcf-embed-checkout-form form .wcf-form-col-3{
51
+ width: 33.33%;
52
+ float: left;
53
+ clear: unset;
54
+ }
55
+
56
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{
57
+ display: none;
58
+ }
59
+
60
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{
61
+ margin-bottom: 15px;
62
+ }
63
+
64
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{
65
+ clear: none;
66
+ }
67
+
68
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{
69
+ margin: 0;
70
+ line-height: 1em;
71
+ padding-top: 0;
72
+ position: relative;
73
+ top: 0;
74
+ }
75
+
76
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
77
+ font-family: inherit;
78
+ font-weight: 400;
79
+ font-size: 13px;
80
+ float: right;
81
+ margin-top: -39px;
82
+ }
83
+
84
+ /**
85
+ * **************
86
+ * Common Classes
87
+ * **************
88
+ */
89
+ .mt20{
90
+ margin-top: 20px !important;
91
+ }
92
+
93
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
94
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
95
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{
96
+ border-width: 1px;
97
+ border-color: #e2401c;
98
+ }
99
+
100
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,
101
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,
102
+ .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{
103
+ border-width: 1px;
104
+ border-color: #69bf29;
105
+ }
106
+
107
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required{
108
+ border-color: #e2401c;
109
+ }
110
+
111
+ .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{
112
+ border-left-width: 2px;
113
+ border-left-color: #69bf29;
114
+ }
115
+
116
+ /**
117
+ * ************
118
+ * Main Layout
119
+ * ************
120
+ */
121
+
122
+ .wcf-embed-checkout-form .wcf-checkout-header-image{
123
+ text-align: center;
124
+ }
125
+
126
+ /**
127
+ * ************
128
+ * Radio Button
129
+ * ************
130
+ */
131
+
132
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked,
133
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) {
134
+ left: -9999px;
135
+ position: absolute;
136
+ }
137
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label,
138
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label
139
+ {
140
+ color: #666;
141
+ cursor: pointer;
142
+ display: inline;
143
+ font-family: inherit;
144
+ font-weight:inherit;
145
+ line-height: 20px;
146
+ position: relative;
147
+ padding-left: 28px;
148
+ }
149
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:before,
150
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:before {
151
+ border: 1px solid #ddd;
152
+ border-radius: 100%;
153
+ background: #fff;
154
+ content: '';
155
+ height: 18px;
156
+ left: 0;
157
+ position: absolute;
158
+ top: 0px;
159
+ width: 18px;
160
+ }
161
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:after,
162
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:after {
163
+ background: #F16334;
164
+ border-radius: 100%;
165
+ content: '';
166
+ height: 8px;
167
+ left: 5px;
168
+ position: absolute;
169
+ top: 5px;
170
+ width: 8px;
171
+ -webkit-transition: all 0.2s ease;
172
+ transition: all 0.2s ease;
173
+ }
174
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label:after {
175
+ opacity: 0;
176
+ -webkit-transform: scale(0);
177
+ transform: scale(0);
178
+ }
179
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label:after {
180
+ opacity: 1;
181
+ -webkit-transform: scale(1);
182
+ transform: scale(1);
183
+ }
184
+
185
+ /**
186
+ * **********
187
+ * Checkbox
188
+ * **********
189
+ */
190
+
191
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked,
192
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked)
193
+ {
194
+ color: #666;
195
+ cursor: pointer;
196
+ display: inline;
197
+ line-height: 20px;
198
+ margin-right: 10px;
199
+ position: relative;
200
+ padding-left: 28px;
201
+ }
202
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
203
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):before {
204
+ background: #fff;
205
+ border: 1px solid #ddd;
206
+ content: '';
207
+ height: 18px;
208
+ left: 0;
209
+ position: absolute;
210
+ top: -3px;
211
+ width: 18px;
212
+ }
213
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:after,
214
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):after {
215
+ background: #F16334;
216
+ content: '';
217
+ height: 8px;
218
+ left: 5px;
219
+ position: absolute;
220
+ top: 2px;
221
+ width: 8px;
222
+ -webkit-transition: all 0.2s ease;
223
+ transition: all 0.2s ease;
224
+ }
225
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:not(:checked):after {
226
+ opacity: 0;
227
+ -webkit-transform: scale(0);
228
+ transform: scale(0);
229
+ }
230
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:after {
231
+ opacity: 1;
232
+ -webkit-transform: scale(1);
233
+ transform: scale(1);
234
+ }
235
+
236
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
237
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
238
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
239
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2 {
240
+ float: none;
241
+ width: 100%;
242
+ padding: 0px;
243
+ border-radius: 0px;
244
+ border: none;
245
+ border-color: none;
246
+ margin-bottom: 0px;
247
+ }
248
+
249
+ .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
250
+ .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
251
+ .wcf-embed-checkout-form #order_review_heading,
252
+ .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
253
+ font-family: inherit;
254
+ font-weight: 600;
255
+ font-size: 20px;
256
+ text-transform: capitalize;
257
+ margin:0 0 25px 0;
258
+ }
259
+
260
+ .wcf-embed-checkout-form .woocommerce-checkout #payment {
261
+ background: unset;
262
+ border-radius: 0;
263
+ }
264
+
265
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
266
+ margin: 0;
267
+ padding: 0;
268
+ }
269
+
270
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{
271
+ display: block;
272
+ margin-bottom: 1.1em;
273
+ }
274
+
275
+ .wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
276
+ float: none;
277
+ margin-left: 10px;
278
+ }
279
+
280
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{
281
+ margin: 0 0 0.5em;
282
+ }
283
+
284
+ .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row
285
+ .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{
286
+ margin-bottom: 10px;
287
+ }
288
+
289
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
290
+ background-color: #eaeaea;
291
+ font-family: inherit;
292
+ font-weight:inherit;
293
+ margin-bottom: 0.5em;
294
+ }
295
+
296
+ .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
297
+ .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
298
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{
299
+ content: '';
300
+ display: block;
301
+ border: 1em solid;
302
+ border-right-color: transparent;
303
+ border-left-color: transparent;
304
+ border-top-color: transparent;
305
+ border-color: #eaeaea;
306
+ position: absolute;
307
+ top: -.75em;
308
+ left: 0;
309
+ margin: -1em 0 0 2em;
310
+ }
311
+
312
+ /* Fields */
313
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
314
+ display: block;
315
+ width: 100%;
316
+ min-height: 34px;
317
+ height: auto;
318
+ padding: 11px 12px;
319
+ font-size: 14px;
320
+ line-height: 1.42857143 !important;
321
+ color: #555;
322
+ background-color: #fff;
323
+ background-image: none;
324
+ border: 1px solid;
325
+ border-color: #d4d4d4;
326
+ border-radius: 3px;
327
+ box-shadow: none;
328
+ outline: none;
329
+ }
330
+
331
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
332
+ color: #666;
333
+ line-height: 19px;
334
+ min-height: 19px;
335
+ overflow: visible;
336
+ padding-left: 0;
337
+ }
338
+
339
+ .wcf-embed-checkout-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
340
+ font-size: 14px;
341
+ }
342
+
343
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow {
344
+ height: 100%;
345
+ }
346
+
347
+ .select2-dropdown{
348
+ border: 1px solid #d4d4d4;
349
+ }
350
+
351
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
352
+ .wcf-embed-checkout-form .woocommerce form .form-row textarea,
353
+ .wcf-embed-checkout-form .woocommerce form .form-row select,
354
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text{
355
+ display: block;
356
+ width: 100%;
357
+ min-height: 34px;
358
+ padding: 11px 12px;
359
+ font-family: inherit;
360
+ font-weight:inherit;
361
+ font-size: 14px;
362
+ line-height: 1.42857143 !important;
363
+ color: #555;
364
+ background-color: #fff;
365
+ background-image: none;
366
+ border: 1px solid #d4d4d4;
367
+ border-radius: 3px;
368
+ box-shadow: none;
369
+ }
370
+
371
+ .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"]{
372
+ font-weight: normal;
373
+ }
374
+
375
+ .wcf-embed-checkout-form .wcf-custom-coupon-field {
376
+ display: flex;
377
+ margin-bottom: 25px;
378
+ margin-top: 25px;
379
+ border-top: 1px solid #dcdcdc;
380
+ padding-top: 25px;
381
+ }
382
+
383
+ .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
384
+ width: 70%;
385
+ display: inline-block;
386
+ padding-right: 20px;
387
+ }
388
+
389
+ .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
390
+ width: 30%;
391
+ }
392
+
393
+ .wcf-embed-checkout-form input[type="text"]:focus,
394
+ .wcf-embed-checkout-form input[type="email"]:focus,
395
+ .wcf-embed-checkout-form input[type="password"]:focus,
396
+ .wcf-embed-checkout-form input[type="tel"]:focus,
397
+ .wcf-embed-checkout-form textarea:focus,
398
+ .wcf-embed-checkout-form .select2-container--open {
399
+ border-color: #b3b3b3;
400
+ box-shadow: none;
401
+ outline: none;
402
+ }
403
+
404
+ .wcf-embed-checkout-form button:focus {
405
+ outline: none;
406
+ outline-color: none;
407
+ outline-style: none;
408
+ outline-width: none;
409
+ }
410
+
411
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
412
+ .wcf-embed-checkout-form form.checkout_coupon .button {
413
+ display: block;
414
+ clear: both;
415
+ border: none;
416
+ font-size: 15px;
417
+ font-family: inherit;
418
+ font-weight: inherit;
419
+ background-color: #F16334;
420
+ line-height: 9px;
421
+ padding: 18px;
422
+ margin-bottom: 10px;
423
+ width: 100%;
424
+ text-transform: uppercase;
425
+ }
426
+
427
+ .wcf-embed-checkout-form .woocommerce #order_review button {
428
+ border: 1px solid;
429
+ border-color: #F16334;
430
+ background-color: #F16334;
431
+ font-family: inherit;
432
+ font-weight:inherit;
433
+ font-size: 18px;
434
+ letter-spacing: 0.5px;
435
+ width: 100%;
436
+ padding: 16px 24px;
437
+ font-size: 16px;
438
+ line-height: 1.5;
439
+ border-radius: 3px;
440
+ color: #fff;
441
+ text-transform: uppercase;
442
+ }
443
+
444
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
445
+ padding: 8px 6px;
446
+ background-color: #c8c8c8;
447
+ border: 1px #c8c8c8 solid;
448
+ }
449
+
450
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
451
+ border-color: #F16334;
452
+ background-color: #F16334;
453
+ }
454
+ .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
455
+ background-color: #F16334;
456
+ border-color: #F16334;
457
+ color: #fff;
458
+ }
459
+
460
+ /**
461
+ * ***********************
462
+ * New checkout style
463
+ * ***********************
464
+ */
465
+
466
+ .wcf-embed-checkout-form .woocommerce-checkout{
467
+ display: inline-block;
468
+ width: 100%;
469
+ }
470
+
471
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set{
472
+ display: inline-block;
473
+ width: 55%;
474
+ float: left;
475
+ padding-right: 40px;
476
+ margin:20px 0 0;
477
+ }
478
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review{
479
+ display: inline-block;
480
+ float: left;
481
+ width: 45%;
482
+ border: none;
483
+ background-color: inherit/*#F6F6F6*/;
484
+ padding: 0 10px;
485
+ border-radius: 3px;
486
+ }
487
+
488
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
489
+ display: inline-block;
490
+ font-family: inherit;
491
+ font-weight: 600;
492
+ width: 45%;
493
+ margin:20px 0 0;
494
+ padding: 0px 10px 20px;
495
+ border: none;
496
+ border-bottom: none;
497
+ }
498
+
499
+ .wcf-embed-checkout-form .woocommerce-checkout #payment{
500
+ background-color: inherit;
501
+ border:none;
502
+ border-top: 1px solid;
503
+ border-radius: 0px;
504
+ border-color: #dcdcdc;
505
+ padding-top: 20px;
506
+ }
507
+
508
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
509
+ padding: 1em 0px;
510
+ }
511
+
512
+ .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
513
+ .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
514
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
515
+ border: none;
516
+ }
517
+
518
+ .wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
519
+ clear: both;
520
+ }
521
+
522
+ .wcf-embed-checkout-form .woocommerce form .form-row{
523
+ margin-bottom: 1.1em;
524
+ }
525
+
526
+ .wcf-embed-checkout-form table.shop_table {
527
+ border:none;
528
+ border-bottom: 0;
529
+ background-color: inherit;
530
+ border-radius: 0;
531
+ font-family: inherit;
532
+ font-weight:inherit;
533
+ font-size: 0.95em;
534
+ margin: 0 0 0px 0 !important;
535
+ border-collapse: collapse;
536
+ text-align: left;
537
+ }
538
+ .wcf-embed-checkout-form table.shop_table #shipping_method{
539
+ margin: 0;
540
+ padding: 0;
541
+ list-style: none;
542
+ }
543
+ .wcf-embed-checkout-form table.shop_table th{
544
+ border: none;
545
+ font-weight: 400;
546
+ padding: 9px 0px;
547
+ line-height: 1.2em;
548
+ }
549
+ .wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
550
+ font-size: 1em;
551
+ }
552
+ .wcf-embed-checkout-form table.shop_table td,
553
+ .wcf-embed-checkout-form table.shop_table th {
554
+ padding: 0.6em 0;
555
+ line-height: 1.4em;
556
+ border: none;
557
+ }
558
+ .wcf-embed-checkout-form table.shop_table tbody th,
559
+ .wcf-embed-checkout-form table.shop_table tfoot td,
560
+ .wcf-embed-checkout-form table.shop_table tfoot th {
561
+ font-weight: normal;
562
+ border: none;
563
+ }
564
+ .wcf-embed-checkout-form table.shop_table tbody {
565
+ border-top: 1px dashed #cccccc;
566
+ border-bottom: 1px dashed #cccccc;
567
+ }
568
+ .wcf-embed-checkout-form table.shop_table th.product-name,
569
+ .wcf-embed-checkout-form table.shop_table th.product-total{
570
+ font-weight: 600;
571
+ }
572
+ .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th,
573
+ .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td {
574
+ font-weight: 600;
575
+ border-top: 1px dashed #cccccc;
576
+ }
577
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
578
+ padding-top: 1.8em;
579
+ font-weight: 600;
580
+ }
581
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
582
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
583
+ .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
584
+ vertical-align: top;
585
+ }
586
+
587
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
588
+ .wcf-embed-checkout-form .woocommerce-checkout .form-row label{
589
+ font-size: 13px;
590
+ line-height: 1em;
591
+ letter-spacing: 0.3px;
592
+ font-family: inherit;
593
+ font-weight:inherit;
594
+ text-transform: capitalize;
595
+ margin-bottom: 8px;
596
+ }
597
+
598
+ .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
599
+ font-family: inherit;
600
+ font-weight:inherit;
601
+ color: #444;
602
+ margin-top: 0;
603
+ }
604
+
605
+ .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{
606
+ margin: 0;
607
+ }
608
+
609
+ .wcf-embed-checkout-form .woocommerce a{
610
+ color: #F16334;
611
+ text-decoration: none;
612
+ }
613
+
614
+ .wcf-embed-checkout-form .woocommerce .woocommerce-info,
615
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
616
+ padding: 1em 2em 0.4em 2.0em;
617
+ border-top:none;
618
+ background-color: inherit;
619
+ font-size: 14px;
620
+ font-weight: 500;
621
+ margin:0px;
622
+ }
623
+
624
+ .wcf-embed-checkout-form .woocommerce-info::before,
625
+ .wcf-embed-checkout-form .woocommerce-message::before{
626
+ left: 0.1em;
627
+ color: #F16334;
628
+ }
629
+
630
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error,
631
+ .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
632
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
633
+ background-color: #fff6f6;
634
+ border: dashed 1px #a00;
635
+ padding: 25px 25px 20px;
636
+ color: #a00;
637
+ margin: 1rem 0 1rem;
638
+ font-size: 14px;
639
+ }
640
+
641
+
642
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
643
+ display: inline;
644
+ }
645
+
646
+ .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
647
+ margin:1em 0 1em;
648
+ }
649
+
650
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error::before{
651
+ content: '';
652
+ }
653
+
654
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li{
655
+ list-style: disc inside !important;
656
+ margin: 0 0 8px;
657
+ }
658
+
659
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{
660
+ font-weight: 400;
661
+ }
662
+
663
+ .wcf-embed-checkout-form .woocommerce form.checkout_coupon{
664
+ border: 1px solid #d3ced2;
665
+ padding: 30px 20px 20px;
666
+ margin: 2em 0;
667
+ text-align: left;
668
+ border-radius: 5px;
669
+ }
670
+
671
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
672
+ font-size: 14px;
673
+ }
674
+
675
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
676
+ font-family: inherit;
677
+ font-weight: 500;
678
+ margin-top: 0;
679
+ margin-bottom: 10px;
680
+ }
681
+
682
+ @media only screen and (max-width: 768px) {
683
+ .wcf-embed-checkout-form form .wcf-form-col-3{
684
+ width: 100%;
685
+ }
686
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
687
+ width: 100%;
688
+ }
689
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review{
690
+ width: 100%;
691
+ }
692
+ .wcf-embed-checkout-form .woocommerce-checkout{
693
+ display: block;
694
+ }
695
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set{
696
+ display: block;
697
+ width: 100%;
698
+ padding-right: 0;
699
+ margin: 20px 0 0;
700
+ }
701
+
702
+ .wcf-embed-checkout-form form.checkout_coupon .button{
703
+ font-size: 12px;
704
+ }
705
+
706
+ .wcf-bump-order-field-wrap .wcf-bump-order-label{
707
+ font-size: 16px;
708
+ text-transform: capitalize;
709
+ }
710
+
711
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
712
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
713
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
714
+ .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2{
715
+ padding: 15px;
716
+ }
717
+
718
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
719
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
720
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
721
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
722
+ width: 100%;
723
+ }
724
+
725
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
726
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
727
+ margin-right: 4%;
728
+ }
729
+
730
+ .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
731
+ .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
732
+ .wcf-embed-checkout-form #order_review_heading,
733
+ .wcf-embed-checkout-form .woocommerce #ship-to-different-address{
734
+ font-size: 1.0em;
735
+ }
736
+ }
737
+
738
+
739
+ /**
740
+ * **********************
741
+ * Divi Css Overrite
742
+ * **********************
743
+ */
744
+
745
+ #et-info-email:before,
746
+ #et-info-phone:before,
747
+ #et_search_icon:before,
748
+ .comment-reply-link:after,
749
+ .et-cart-info span:before,
750
+ .et-pb-arrow-next:before,
751
+ .et-pb-arrow-prev:before,
752
+ .et-social-icon a:before,
753
+ .et_audio_container .mejs-playpause-button button:before,
754
+ .et_audio_container .mejs-volume-button button:before,
755
+ .et_overlay:before,
756
+ .et_password_protected_form .et_submit_button:after,
757
+ .et_pb_button:after,
758
+ .et_pb_contact_reset:after,
759
+ .et_pb_contact_submit:after,
760
+ .et_pb_font_icon:before,
761
+ .et_pb_newsletter_button:after,
762
+ .et_pb_pricing_table_button:after,
763
+ .et_pb_promo_button:after,
764
+ .et_pb_social_icon a.icon:before,
765
+ .et_pb_testimonial:before,
766
+ .et_pb_toggle_title:before,
767
+ .form-submit .et_pb_button:after,
768
+ .mobile_menu_bar:before,
769
+ .woocommerce #content input.button.alt:after,
770
+ .woocommerce #content input.button:after,
771
+ .woocommerce #respond input#submit.alt:after,
772
+ .woocommerce #respond input#submit:after,
773
+ .woocommerce a.button.alt:after,
774
+ .woocommerce button.button.alt:after,
775
+ .woocommerce button.button:after,
776
+ .woocommerce button.single_add_to_cart_button.button:after,
777
+ .woocommerce input.button.alt:after,
778
+ .woocommerce input.button:after,
779
+ .woocommerce-page #content input.button.alt:after,
780
+ .woocommerce-page #content input.button:after,
781
+ .woocommerce-page #respond input#submit.alt:after,
782
+ .woocommerce-page #respond input#submit:after,
783
+ .woocommerce-page a.button.alt:after,
784
+ .woocommerce-page a.button:after,
785
+ .woocommerce-page button.button.alt:after,
786
+ .woocommerce-page button.button:after,
787
+ .woocommerce-page input.button.alt:after,
788
+ .woocommerce-page input.button:after,
789
+ a.et_pb_more_button:after{
790
+ text-shadow: 0 0;
791
+ font-family: none;
792
+ font-weight: 400;
793
+ font-style: normal;
794
+ font-variant: normal;
795
+ -webkit-font-smoothing: antialiased;
796
+ -moz-osx-font-smoothing: grayscale;
797
+ line-height: 1;
798
+ text-transform: none;
799
+ speak: none;
800
+ }
801
+
802
+ .comment-reply-link:hover:after,
803
+ .woocommerce #content input.button.alt:hover:after,
804
+ .woocommerce #content input.button:hover:after,
805
+ .woocommerce #respond input#submit.alt:hover:after,
806
+ .woocommerce #respond input#submit:hover:after,
807
+ .woocommerce a.button.alt:hover:after,
808
+ .woocommerce a.button:hover:after,
809
+ .woocommerce button.button.alt:hover:after,
810
+ .woocommerce button.button:hover:after,
811
+ .woocommerce input.button.alt:hover:after,
812
+ .woocommerce input.button:hover:after,
813
+ .woocommerce-page #content input.button.alt:hover:after,
814
+ .woocommerce-page #content input.button:hover:after,
815
+ .woocommerce-page #respond input#submit.alt:hover:after,
816
+ .woocommerce-page #respond input#submit:hover:after,
817
+ .woocommerce-page a.button.alt:hover:after,
818
+ .woocommerce-page a.button:hover:after,
819
+ .woocommerce-page button.button.alt:hover:after,
820
+ .woocommerce-page button.button:hover:after,
821
+ .woocommerce-page input.button.alt:hover:after,
822
+ .woocommerce-page input.button:hover:after{
823
+ opacity: 0;
824
+ }
assets/css/frontend-rtl.css ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * 1. Correct the line height in all browsers.
3
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
4
+ */
5
+
6
+ html {
7
+ line-height: 1.15; /* 1 */
8
+ -webkit-text-size-adjust: 100%; /* 2 */
9
+ }
10
+
11
+ /* Sections
12
+ ========================================================================== */
13
+
14
+ /**
15
+ * Remove the margin in all browsers.
16
+ */
17
+
18
+ body {
19
+ margin: 0;
20
+ }
21
+
22
+ /**
23
+ * Correct the font size and margin on `h1` elements within `section` and
24
+ * `article` contexts in Chrome, Firefox, and Safari.
25
+ */
26
+
27
+ h1 {
28
+ font-size: 2em;
29
+ margin: 0.67em 0;
30
+ }
31
+
32
+ /* Grouping content
33
+ ========================================================================== */
34
+
35
+ /**
36
+ * 1. Add the correct box sizing in Firefox.
37
+ * 2. Show the overflow in Edge and IE.
38
+ */
39
+
40
+ hr {
41
+ box-sizing: content-box; /* 1 */
42
+ height: 0; /* 1 */
43
+ overflow: visible; /* 2 */
44
+ }
45
+
46
+ /**
47
+ * 1. Correct the inheritance and scaling of font size in all browsers.
48
+ * 2. Correct the odd `em` font sizing in all browsers.
49
+ */
50
+
51
+ pre {
52
+ font-family: monospace, monospace; /* 1 */
53
+ font-size: 1em; /* 2 */
54
+ }
55
+
56
+ /* Text-level semantics
57
+ ========================================================================== */
58
+
59
+ /**
60
+ * Remove the gray background on active links in IE 10.
61
+ */
62
+
63
+ a {
64
+ background-color: transparent;
65
+ }
66
+
67
+ /**
68
+ * 1. Remove the bottom border in Chrome 57-
69
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
70
+ */
71
+
72
+ abbr[title] {
73
+ border-bottom: none; /* 1 */
74
+ text-decoration: underline; /* 2 */
75
+ text-decoration: underline dotted; /* 2 */
76
+ }
77
+
78
+ /**
79
+ * Add the correct font weight in Chrome, Edge, and Safari.
80
+ */
81
+
82
+ b,
83
+ strong {
84
+ font-weight: bold;
85
+ }
86
+
87
+ /**
88
+ * 1. Correct the inheritance and scaling of font size in all browsers.
89
+ * 2. Correct the odd `em` font sizing in all browsers.
90
+ */
91
+
92
+ code,
93
+ kbd,
94
+ samp {
95
+ font-family: monospace, monospace; /* 1 */
96
+ font-size: 1em; /* 2 */
97
+ }
98
+
99
+ /**
100
+ * Add the correct font size in all browsers.
101
+ */
102
+
103
+ small {
104
+ font-size: 80%;
105
+ }
106
+
107
+ /**
108
+ * Prevent `sub` and `sup` elements from affecting the line height in
109
+ * all browsers.
110
+ */
111
+
112
+ sub,
113
+ sup {
114
+ font-size: 75%;
115
+ line-height: 0;
116
+ position: relative;
117
+ vertical-align: baseline;
118
+ }
119
+
120
+ sub {
121
+ bottom: -0.25em;
122
+ }
123
+
124
+ sup {
125
+ top: -0.5em;
126
+ }
127
+
128
+ /* Embedded content
129
+ ========================================================================== */
130
+
131
+ /**
132
+ * Remove the border on images inside links in IE 10.
133
+ */
134
+
135
+ img {
136
+ border-style: none;
137
+ }
138
+
139
+ /* Forms
140
+ ========================================================================== */
141
+
142
+ /**
143
+ * 1. Change the font styles in all browsers.
144
+ * 2. Remove the margin in Firefox and Safari.
145
+ */
146
+
147
+ button,
148
+ input,
149
+ optgroup,
150
+ select,
151
+ textarea {
152
+ font-family: inherit; /* 1 */
153
+ font-size: 100%; /* 1 */
154
+ line-height: 1.15; /* 1 */
155
+ margin: 0; /* 2 */
156
+ }
157
+
158
+ /**
159
+ * Show the overflow in IE.
160
+ * 1. Show the overflow in Edge.
161
+ */
162
+
163
+ button,
164
+ input { /* 1 */
165
+ overflow: visible;
166
+ }
167
+
168
+ /**
169
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
170
+ * 1. Remove the inheritance of text transform in Firefox.
171
+ */
172
+
173
+ button,
174
+ select { /* 1 */
175
+ text-transform: none;
176
+ }
177
+
178
+ /**
179
+ * Correct the inability to style clickable types in iOS and Safari.
180
+ */
181
+
182
+ button,
183
+ [type="button"],
184
+ [type="reset"],
185
+ [type="submit"] {
186
+ -webkit-appearance: button;
187
+ }
188
+
189
+ /**
190
+ * Remove the inner border and padding in Firefox.
191
+ */
192
+
193
+ button::-moz-focus-inner,
194
+ [type="button"]::-moz-focus-inner,
195
+ [type="reset"]::-moz-focus-inner,
196
+ [type="submit"]::-moz-focus-inner {
197
+ border-style: none;
198
+ padding: 0;
199
+ }
200
+
201
+ /**
202
+ * Restore the focus styles unset by the previous rule.
203
+ */
204
+
205
+ button:-moz-focusring,
206
+ [type="button"]:-moz-focusring,
207
+ [type="reset"]:-moz-focusring,
208
+ [type="submit"]:-moz-focusring {
209
+ outline: 1px dotted ButtonText;
210
+ }
211
+
212
+ /**
213
+ * Correct the padding in Firefox.
214
+ */
215
+
216
+ fieldset {
217
+ padding: 0.35em 0.75em 0.625em;
218
+ }
219
+
220
+ /**
221
+ * 1. Correct the text wrapping in Edge and IE.
222
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
223
+ * 3. Remove the padding so developers are not caught out when they zero out
224
+ * `fieldset` elements in all browsers.
225
+ */
226
+
227
+ legend {
228
+ box-sizing: border-box; /* 1 */
229
+ color: inherit; /* 2 */
230
+ display: table; /* 1 */
231
+ max-width: 100%; /* 1 */
232
+ padding: 0; /* 3 */
233
+ white-space: normal; /* 1 */
234
+ }
235
+
236
+ /**
237
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
238
+ */
239
+
240
+ progress {
241
+ vertical-align: baseline;
242
+ }
243
+
244
+ /**
245
+ * Remove the default vertical scrollbar in IE 10+.
246
+ */
247
+
248
+ textarea {
249
+ overflow: auto;
250
+ }
251
+
252
+ /**
253
+ * 1. Add the correct box sizing in IE 10.
254
+ * 2. Remove the padding in IE 10.
255
+ */
256
+
257
+ [type="checkbox"],
258
+ [type="radio"] {
259
+ box-sizing: border-box; /* 1 */
260
+ padding: 0; /* 2 */
261
+ }
262
+
263
+ /**
264
+ * Correct the cursor style of increment and decrement buttons in Chrome.
265
+ */
266
+
267
+ [type="number"]::-webkit-inner-spin-button,
268
+ [type="number"]::-webkit-outer-spin-button {
269
+ height: auto;
270
+ }
271
+
272
+ /**
273
+ * 1. Correct the odd appearance in Chrome and Safari.
274
+ * 2. Correct the outline style in Safari.
275
+ */
276
+
277
+ [type="search"] {
278
+ -webkit-appearance: textfield; /* 1 */
279
+ outline-offset: -2px; /* 2 */
280
+ }
281
+
282
+ /**
283
+ * Remove the inner padding in Chrome and Safari on macOS.
284
+ */
285
+
286
+ [type="search"]::-webkit-search-decoration {
287
+ -webkit-appearance: none;
288
+ }
289
+
290
+ /**
291
+ * 1. Correct the inability to style clickable types in iOS and Safari.
292
+ * 2. Change font properties to `inherit` in Safari.
293
+ */
294
+
295
+ ::-webkit-file-upload-button {
296
+ -webkit-appearance: button; /* 1 */
297
+ font: inherit; /* 2 */
298
+ }
299
+
300
+ /* Interactive
301
+ ========================================================================== */
302
+
303
+ /*
304
+ * Add the correct display in Edge, IE 10+, and Firefox.
305
+ */
306
+
307
+ details {
308
+ display: block;
309
+ }
310
+
311
+ /*
312
+ * Add the correct display in all browsers.
313
+ */
314
+
315
+ summary {
316
+ display: list-item;
317
+ }
318
+
319
+ /* Misc
320
+ ========================================================================== */
321
+
322
+ /**
323
+ * Add the correct display in IE 10+.
324
+ */
325
+
326
+ template {
327
+ display: none;
328
+ }
329
+
330
+ /**
331
+ * Add the correct display in IE 10.
332
+ */
333
+
334
+ [hidden] {
335
+ display: none;
336
+ }
337
+
338
+ /*--------------------------------------------------------------
339
+ # Typography
340
+ --------------------------------------------------------------*/
341
+ body,
342
+ button,
343
+ input,
344
+ select,
345
+ optgroup,
346
+ textarea {
347
+ color: #404040;
348
+ font-family: sans-serif;
349
+ font-size: 16px;
350
+ font-size: 1rem;
351
+ line-height: 1.5;
352
+ }
353
+
354
+ h1, h2, h3, h4, h5, h6 {
355
+ clear: both;
356
+ }
357
+
358
+ p {
359
+ margin-bottom: 1.5em;
360
+ }
361
+
362
+ dfn, cite, em, i {
363
+ font-style: italic;
364
+ }
365
+
366
+ blockquote {
367
+ margin: 0 1.5em;
368
+ }
369
+
370
+ address {
371
+ margin: 0 0 1.5em;
372
+ }
373
+
374
+ pre {
375
+ background: #eee;
376
+ font-family: "Courier 10 Pitch", Courier, monospace;
377
+ font-size: 15px;
378
+ font-size: 0.9375rem;
379
+ line-height: 1.6;
380
+ margin-bottom: 1.6em;
381
+ max-width: 100%;
382
+ overflow: auto;
383
+ padding: 1.6em;
384
+ }
385
+
386
+ code, kbd, tt, var {
387
+ font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
388
+ font-size: 15px;
389
+ font-size: 0.9375rem;
390
+ }
391
+
392
+ abbr, acronym {
393
+ border-bottom: 1px dotted #666;
394
+ cursor: help;
395
+ }
396
+
397
+ mark, ins {
398
+ background: #fff9c0;
399
+ text-decoration: none;
400
+ }
401
+
402
+ big {
403
+ font-size: 125%;
404
+ }
405
+
406
+ /*--------------------------------------------------------------
407
+ # Elements
408
+ --------------------------------------------------------------*/
409
+ html {
410
+ box-sizing: border-box;
411
+ }
412
+
413
+ *,
414
+ *:before,
415
+ *:after {
416
+ /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
417
+ box-sizing: inherit;
418
+ }
419
+
420
+ body {
421
+ background: #fff;
422
+ /* Fallback for when there is no custom background color defined. */
423
+ }
424
+
425
+ hr {
426
+ background-color: #ccc;
427
+ border: 0;
428
+ height: 1px;
429
+ margin-bottom: 1.5em;
430
+ }
431
+
432
+ ul, ol {
433
+ margin: 0 3em 1.5em 0;
434
+ }
435
+
436
+ ul {
437
+ list-style: disc;
438
+ }
439
+
440
+ ol {
441
+ list-style: decimal;
442
+ }
443
+
444
+ li > ul,
445
+ li > ol {
446
+ margin-bottom: 0;
447
+ margin-right: 1.5em;
448
+ }
449
+
450
+ dt {
451
+ font-weight: bold;
452
+ }
453
+
454
+ dd {
455
+ margin: 0 1.5em 1.5em;
456
+ }
457
+
458
+ img {
459
+ height: auto;
460
+ /* Make sure images are scaled correctly. */
461
+ max-width: 100%;
462
+ /* Adhere to container width. */
463
+ }
464
+
465
+ figure {
466
+ margin: 1em 0;
467
+ /* Extra wide images within figure tags don't overflow the content area. */
468
+ }
469
+
470
+ table {
471
+ margin: 0 0 1.5em;
472
+ width: 100%;
473
+ }
474
+
475
+ /*--------------------------------------------------------------
476
+ # Forms
477
+ --------------------------------------------------------------*/
478
+ button,
479
+ input[type="button"],
480
+ input[type="reset"],
481
+ input[type="submit"] {
482
+ border: 1px solid;
483
+ border-color: #ccc #ccc #bbb;
484
+ border-radius: 3px;
485
+ background: #e6e6e6;
486
+ color: rgba(0, 0, 0, 0.8);
487
+ font-size: 12px;
488
+ font-size: 0.75rem;
489
+ line-height: 1;
490
+ padding: .6em 1em .4em;
491
+ }
492
+
493
+ button:hover,
494
+ input[type="button"]:hover,
495
+ input[type="reset"]:hover,
496
+ input[type="submit"]:hover {
497
+ border-color: #ccc #bbb #aaa;
498
+ }
499
+
500
+ button:active, button:focus,
501
+ input[type="button"]:active,
502
+ input[type="button"]:focus,
503
+ input[type="reset"]:active,
504
+ input[type="reset"]:focus,
505
+ input[type="submit"]:active,
506
+ input[type="submit"]:focus {
507
+ border-color: #aaa #bbb #bbb;
508
+ }
509
+
510
+ input[type="text"],
511
+ input[type="email"],
512
+ input[type="url"],
513
+ input[type="password"],
514
+ input[type="search"],
515
+ input[type="number"],
516
+ input[type="tel"],
517
+ input[type="range"],
518
+ input[type="date"],
519
+ input[type="month"],
520
+ input[type="week"],
521
+ input[type="time"],
522
+ input[type="datetime"],
523
+ input[type="datetime-local"],
524
+ input[type="color"],
525
+ textarea {
526
+ color: #666;
527
+ border: 1px solid #ccc;
528
+ border-radius: 3px;
529
+ padding: 3px;
530
+ }
531
+
532
+ input[type="text"]:focus,
533
+ input[type="email"]:focus,
534
+ input[type="url"]:focus,
535
+ input[type="password"]:focus,
536
+ input[type="search"]:focus,
537
+ input[type="number"]:focus,
538
+ input[type="tel"]:focus,
539
+ input[type="range"]:focus,
540
+ input[type="date"]:focus,
541
+ input[type="month"]:focus,
542
+ input[type="week"]:focus,
543
+ input[type="time"]:focus,
544
+ input[type="datetime"]:focus,
545
+ input[type="datetime-local"]:focus,
546
+ input[type="color"]:focus,
547
+ textarea:focus {
548
+ color: #111;
549
+ }
550
+
551
+ select {
552
+ border: 1px solid #ccc;
553
+ }
554
+
555
+ textarea {
556
+ width: 100%;
557
+ }
558
+
559
+ /*--------------------------------------------------------------
560
+ # Navigation
561
+ --------------------------------------------------------------*/
562
+ /*--------------------------------------------------------------
563
+ ## Links
564
+ --------------------------------------------------------------*/
565
+ a {
566
+ color: royalblue;
567
+ }
568
+
569
+ /*a:visited {
570
+ color: purple;
571
+ }*/
572
+
573
+ /*a:hover, a:focus, a:active {
574
+ color: midnightblue;
575
+ }
576
+
577
+ a:focus {
578
+ outline: thin dotted;
579
+ }*/
580
+
581
+ a:hover, a:active {
582
+ outline: 0;
583
+ }
584
+
585
+ /*--------------------------------------------------------------
586
+ # Accessibility
587
+ --------------------------------------------------------------*/
588
+ /* Text meant only for screen readers. */
589
+ .screen-reader-text {
590
+ border: 0;
591
+ clip: rect(1px, 1px, 1px, 1px);
592
+ clip-path: inset(50%);
593
+ height: 1px;
594
+ margin: -1px;
595
+ overflow: hidden;
596
+ padding: 0;
597
+ position: absolute !important;
598
+ width: 1px;
599
+ word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
600
+ }
601
+
602
+ .screen-reader-text:focus {
603
+ background-color: #f1f1f1;
604
+ border-radius: 3px;
605
+ box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
606
+ clip: auto !important;
607
+ clip-path: none;
608
+ color: #21759b;
609
+ display: block;
610
+ font-size: 14px;
611
+ font-size: 0.875rem;
612
+ font-weight: bold;
613
+ height: auto;
614
+ right: 5px;
615
+ line-height: normal;
616
+ padding: 15px 23px 14px;
617
+ text-decoration: none;
618
+ top: 5px;
619
+ width: auto;
620
+ z-index: 100000;
621
+ /* Above WP toolbar. */
622
+ }
623
+
624
+ /* Do not show the outline on the skip link target. */
625
+ #content[tabindex="-1"]:focus {
626
+ outline: 0;
627
+ }
628
+
629
+ /*--------------------------------------------------------------
630
+ # Alignments
631
+ --------------------------------------------------------------*/
632
+ .alignleft {
633
+ display: inline;
634
+ float: right;
635
+ margin-left: 1.5em;
636
+ }
637
+
638
+ .alignright {
639
+ display: inline;
640
+ float: left;
641
+ margin-right: 1.5em;
642
+ }
643
+
644
+ .aligncenter {
645
+ clear: both;
646
+ display: block;
647
+ margin-right: auto;
648
+ margin-left: auto;
649
+ }
650
+
651
+ /*--------------------------------------------------------------
652
+ # Clearings
653
+ --------------------------------------------------------------*/
654
+ .clear:before,
655
+ .clear:after {
656
+ content: "";
657
+ display: table;
658
+ table-layout: fixed;
659
+ }
660
+
661
+ .clear:after {
662
+ clear: both;
663
+ }
664
+
665
+ /*--------------------------------------------------------------
666
+ # Widgets
667
+ --------------------------------------------------------------*/
668
+ .widget {
669
+ margin: 0 0 1.5em;
670
+ /* Make sure select elements fit in widgets. */
671
+ }
672
+
673
+ .widget select {
674
+ max-width: 100%;
675
+ }
676
+
677
+ /*--------------------------------------------------------------
678
+ # Content
679
+ --------------------------------------------------------------*/
680
+ /*--------------------------------------------------------------
681
+ # Media
682
+ --------------------------------------------------------------*/
683
+ /* Make sure embeds and iframes fit their containers. */
684
+ embed,
685
+ iframe,
686
+ object {
687
+ max-width: 100%;
688
+ }
689
+
690
+ /* Common Button */
691
+ .wcf-button {
692
+ display: inline-block;
693
+ padding: 12px 24px;
694
+ background: #ccc;
695
+ text-decoration: none;
696
+ margin: 5px;
697
+ }
698
+
699
+ /*--------------------------------------------------------------
700
+ # Template CSS
701
+ ---------------------------------------------------------------*/
702
+ body.cartflows-default {
703
+ background-color: #f5f5f5;
704
+ }
705
+
706
+ .cartflows-default .cartflows-container {
707
+ max-width: 1200px;
708
+ width: 100%;
709
+ padding: 0 20px;
710
+ margin: 60px auto;
711
+ }
712
+ .cartflows-default .cartflows-primary {
713
+ background-color: #fff;
714
+ padding: 70px;
715
+ overflow: hidden;
716
+ max-width: 100%;
717
+ }
718
+
719
+ @media (max-width: 768px) {
720
+ .cartflows-default .cartflows-container {
721
+ padding: 0;
722
+ margin: 0;
723
+ }
724
+ .cartflows-default .cartflows-primary {
725
+ padding: 20px 30px;
726
+ }
727
+ }
728
+
729
+ @media (max-width: 544px) {
730
+ .cartflows-default .cartflows-primary {
731
+ padding: 20px 15px;
732
+ }
733
+ }
734
+
735
+ /*--------------------------------------------------------------
736
+ # Preview Mode
737
+ ---------------------------------------------------------------*/
738
+ .wcf-preview-mode {
739
+ background: rgba(60, 60, 60, 0.9);
740
+ position: fixed;
741
+ bottom: 0;
742
+ right: 0;
743
+ width: 100%;
744
+ height: 2.6em;
745
+ color: #fff;
746
+ text-align: center;
747
+ font-size: 14px;
748
+ line-height: 2.6em;
749
+ pointer-events: none;
750
+ z-index: 9999999;
751
+ }
752
+ @media only screen and (max-width: 768px) {
753
+ .wcf-preview-mode {
754
+ font-size: 13px;
755
+ line-height: 18px;
756
+ padding: 4px 10px;
757
+ height: auto;
758
+ }
759
+ }
760
+
761
+ /**
762
+ * *****************
763
+ * Cartflows Footer
764
+ * *****************
765
+ */
766
+
767
+ .wcf-footer-primary .wcf-footer-content p{
768
+ margin: 1.5em 0;
769
+ text-align: center;
770
+ }
771
+
772
+ /**
773
+ * ****************
774
+ * Thank You page
775
+ * ****************
776
+ */
777
+
778
+ .wcf-thankyou-wrap
779
+ {
780
+ padding: 0;
781
+ margin: 0 auto;
782
+ width: 100%;
783
+ max-width: 55em;
784
+ font-size: 13px;
785
+ }
786
+
787
+ .wcf-thankyou-wrap a{
788
+ color: #404040;
789
+ }
790
+ /* Order Details - ThankYou page */
791
+ .woocommerce-order ul.order_details::before,
792
+ .woocommerce-order ul.order_details::after {
793
+ content: ' ';
794
+ display: table;
795
+ }
796
+ .woocommerce-order ul.order_details::after {
797
+ clear: both;
798
+ }
799
+
800
+ .woocommerce-order ul.order_details,
801
+ .woocommerce-order ul.order_details li {
802
+ list-style: none;
803
+ line-height: 1;
804
+ }
805
+
806
+ .woocommerce-order ul.order_details li {
807
+ display: inline-block;
808
+ border-left: 1px dashed #cccccc;
809
+ padding: 0.5em 0 0.5em 1em;
810
+ margin: 0.5em 0 0.5em 0.5em;
811
+ list-style-type: none;
812
+ }
813
+
814
+ .woocommerce-order ul.order_details li:first-child {
815
+ padding-right: 0;
816
+ }
817
+
818
+ .woocommerce-order ul.order_details li:last-child {
819
+ border-left:0px;
820
+ padding-left: 0;
821
+ }
822
+
823
+ .woocommerce-order ul.order_details li strong {
824
+ display: block;
825
+ margin-top: 0.7em;
826
+ }
827
+
828
+ .woocommerce-order ul.order_details,
829
+ .woocommerce-order .woocommerce-customer-details,
830
+ .woocommerce-order .woocommerce-order-details {
831
+ margin: 0 0 2em;
832
+ border-radius: 3px;
833
+ width: 100%;
834
+ display: block;
835
+ }
836
+
837
+ /* Section Background & Padding */
838
+ .woocommerce-order ul.order_details,
839
+ .woocommerce-order .woocommerce-customer-details,
840
+ .woocommerce-order .woocommerce-order-details {
841
+ background: #f1f1f1;
842
+ padding: 1.5em 2.5em;
843
+ }
844
+
845
+ .woocommerce-order h2.woocommerce-column__title,
846
+ .woocommerce-order h2.woocommerce-order-details__title,
847
+ .woocommerce-order .woocommerce-thankyou-order-received {
848
+ padding: 0.8em 0;
849
+ margin: 0 0 0.5em;
850
+ font-size: 1.5em;
851
+ font-weight: 600;
852
+ color: #404040;
853
+ }
854
+
855
+ .woocommerce-order .woocommerce-thankyou-order-received {
856
+ margin: 0 0 1.5em;
857
+ padding: 0 0.5em;
858
+ text-align: center;
859
+ }
860
+
861
+ /* Order Details Form */
862
+ .woocommerce-order-details table.shop_table {
863
+ border:none;
864
+ border-bottom: 0;
865
+ background-color: inherit;
866
+ border-radius: 0;
867
+ font-family: inherit;
868
+ font-weight:inherit;
869
+ font-size: 0.95em;
870
+ margin: 0 0 0px 0 !important;
871
+ border-collapse: collapse;
872
+ text-align: right;
873
+ }
874
+ .woocommerce-order-details table.shop_table #shipping_method{
875
+ margin: 0;
876
+ padding: 0;
877
+ list-style: none;
878
+ }
879
+ .woocommerce-order-details table.shop_table th{
880
+ border: none;
881
+ font-weight: 400;
882
+ padding: 9px 0px;
883
+ line-height: 1.2em;
884
+ }
885
+ .woocommerce-order-details table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
886
+ font-size: 1em;
887
+ }
888
+ .woocommerce-order-details table.shop_table td,
889
+ .woocommerce-order-details table.shop_table th {
890
+ padding: 0.6em 0;
891
+ line-height: 1.4em;
892
+ border: none;
893
+ }
894
+ .woocommerce-order-details table.shop_table tbody th,
895
+ .woocommerce-order-details table.shop_table tfoot td,
896
+ .woocommerce-order-details table.shop_table tfoot th {
897
+ font-weight: normal;
898
+ border: none;
899
+ }
900
+ .woocommerce-order-details table.shop_table tbody {
901
+ border-top: 1px dashed #cccccc;
902
+ border-bottom: 1px dashed #cccccc;
903
+ }
904
+ .woocommerce-order-details table.shop_table th.product-name,
905
+ .woocommerce-order-details table.shop_table th.product-total{
906
+ font-weight: 600;
907
+ }
908
+ .woocommerce-order-details table.shop_table tfoot tr.order-total:not(.recurring-total) th,
909
+ .woocommerce-order-details table.shop_table tfoot tr.order-total:not(.recurring-total) td {
910
+ font-weight: 600;
911
+ border-top: 1px dashed #cccccc;
912
+ }
913
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-totals th {
914
+ padding-top: 1.8em;
915
+ font-weight: 600;
916
+ }
917
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-totals th,
918
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-total th,
919
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-total td {
920
+ vertical-align: top;
921
+ }
922
+
923
+ /**/
924
+
925
+ .woocommerce-order .col2-set{
926
+ display: flex;
927
+ }
928
+
929
+ .woocommerce-order .col2-set .col-1{
930
+ margin-left: 2%;
931
+ }
932
+
933
+ .woocommerce-order .col2-set .col-1,
934
+ .woocommerce-order .col2-set .col-2 {
935
+ width: 49%;
936
+ display: inline-block;
937
+ }
938
+
939
+
940
+ .woocommerce-order .woocommerce-customer-details address {
941
+ border-left-width: 1px;
942
+ border-bottom-width: 1px;
943
+ border-radius: 0;
944
+ font-style: normal;
945
+ }
946
+
947
+ .woocommerce-order .woocommerce-customer-details address p{
948
+ margin: 0;
949
+ }
950
+
951
+ @media only screen and (max-width: 768px){
952
+
953
+ .woocommerce-order .woocommerce-thankyou-order-received {
954
+ margin: 0 0 1em;
955
+ }
956
+
957
+ .woocommerce-order h2.woocommerce-column__title,
958
+ .woocommerce-order h2.woocommerce-order-details__title,
959
+ .woocommerce-order .woocommerce-thankyou-order-received {
960
+ padding: 0.5em 0;
961
+ font-size: 1.5em;
962
+ }
963
+
964
+ .woocommerce-order ul.order_details,
965
+ .woocommerce-order .woocommerce-customer-details,
966
+ .woocommerce-order .woocommerce-order-details {
967
+ padding: 1.5em 2em;
968
+ }
969
+
970
+ .woocommerce-order ul.order_details li{
971
+ display: block;
972
+ width: 100%;
973
+ border-left: none;
974
+ padding: 0.5em 0 1em 1em;
975
+ border-bottom: 1px dashed #cccccc;
976
+ }
977
+
978
+ .woocommerce-order ul.order_details li:last-child {
979
+ border: none;
980
+ }
981
+
982
+ .woocommerce-order .col2-set{
983
+ display: block;
984
+ }
985
+
986
+ .woocommerce-order .col2-set .col-1,
987
+ .woocommerce-order .col2-set .col-2{
988
+ width: 100%;
989
+ display: block;
990
+ }
991
+ }
assets/css/frontend.css ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * 1. Correct the line height in all browsers.
3
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
4
+ */
5
+
6
+ html {
7
+ line-height: 1.15; /* 1 */
8
+ -webkit-text-size-adjust: 100%; /* 2 */
9
+ }
10
+
11
+ /* Sections
12
+ ========================================================================== */
13
+
14
+ /**
15
+ * Remove the margin in all browsers.
16
+ */
17
+
18
+ body {
19
+ margin: 0;
20
+ }
21
+
22
+ /**
23
+ * Correct the font size and margin on `h1` elements within `section` and
24
+ * `article` contexts in Chrome, Firefox, and Safari.
25
+ */
26
+
27
+ h1 {
28
+ font-size: 2em;
29
+ margin: 0.67em 0;
30
+ }
31
+
32
+ /* Grouping content
33
+ ========================================================================== */
34
+
35
+ /**
36
+ * 1. Add the correct box sizing in Firefox.
37
+ * 2. Show the overflow in Edge and IE.
38
+ */
39
+
40
+ hr {
41
+ box-sizing: content-box; /* 1 */
42
+ height: 0; /* 1 */
43
+ overflow: visible; /* 2 */
44
+ }
45
+
46
+ /**
47
+ * 1. Correct the inheritance and scaling of font size in all browsers.
48
+ * 2. Correct the odd `em` font sizing in all browsers.
49
+ */
50
+
51
+ pre {
52
+ font-family: monospace, monospace; /* 1 */
53
+ font-size: 1em; /* 2 */
54
+ }
55
+
56
+ /* Text-level semantics
57
+ ========================================================================== */
58
+
59
+ /**
60
+ * Remove the gray background on active links in IE 10.
61
+ */
62
+
63
+ a {
64
+ background-color: transparent;
65
+ }
66
+
67
+ /**
68
+ * 1. Remove the bottom border in Chrome 57-
69
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
70
+ */
71
+
72
+ abbr[title] {
73
+ border-bottom: none; /* 1 */
74
+ text-decoration: underline; /* 2 */
75
+ text-decoration: underline dotted; /* 2 */
76
+ }
77
+
78
+ /**
79
+ * Add the correct font weight in Chrome, Edge, and Safari.
80
+ */
81
+
82
+ b,
83
+ strong {
84
+ font-weight: bold;
85
+ }
86
+
87
+ /**
88
+ * 1. Correct the inheritance and scaling of font size in all browsers.
89
+ * 2. Correct the odd `em` font sizing in all browsers.
90
+ */
91
+
92
+ code,
93
+ kbd,
94
+ samp {
95
+ font-family: monospace, monospace; /* 1 */
96
+ font-size: 1em; /* 2 */
97
+ }
98
+
99
+ /**
100
+ * Add the correct font size in all browsers.
101
+ */
102
+
103
+ small {
104
+ font-size: 80%;
105
+ }
106
+
107
+ /**
108
+ * Prevent `sub` and `sup` elements from affecting the line height in
109
+ * all browsers.
110
+ */
111
+
112
+ sub,
113
+ sup {
114
+ font-size: 75%;
115
+ line-height: 0;
116
+ position: relative;
117
+ vertical-align: baseline;
118
+ }
119
+
120
+ sub {
121
+ bottom: -0.25em;
122
+ }
123
+
124
+ sup {
125
+ top: -0.5em;
126
+ }
127
+
128
+ /* Embedded content
129
+ ========================================================================== */
130
+
131
+ /**
132
+ * Remove the border on images inside links in IE 10.
133
+ */
134
+
135
+ img {
136
+ border-style: none;
137
+ }
138
+
139
+ /* Forms
140
+ ========================================================================== */
141
+
142
+ /**
143
+ * 1. Change the font styles in all browsers.
144
+ * 2. Remove the margin in Firefox and Safari.
145
+ */
146
+
147
+ button,
148
+ input,
149
+ optgroup,
150
+ select,
151
+ textarea {
152
+ font-family: inherit; /* 1 */
153
+ font-size: 100%; /* 1 */
154
+ line-height: 1.15; /* 1 */
155
+ margin: 0; /* 2 */
156
+ }
157
+
158
+ /**
159
+ * Show the overflow in IE.
160
+ * 1. Show the overflow in Edge.
161
+ */
162
+
163
+ button,
164
+ input { /* 1 */
165
+ overflow: visible;
166
+ }
167
+
168
+ /**
169
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
170
+ * 1. Remove the inheritance of text transform in Firefox.
171
+ */
172
+
173
+ button,
174
+ select { /* 1 */
175
+ text-transform: none;
176
+ }
177
+
178
+ /**
179
+ * Correct the inability to style clickable types in iOS and Safari.
180
+ */
181
+
182
+ button,
183
+ [type="button"],
184
+ [type="reset"],
185
+ [type="submit"] {
186
+ -webkit-appearance: button;
187
+ }
188
+
189
+ /**
190
+ * Remove the inner border and padding in Firefox.
191
+ */
192
+
193
+ button::-moz-focus-inner,
194
+ [type="button"]::-moz-focus-inner,
195
+ [type="reset"]::-moz-focus-inner,
196
+ [type="submit"]::-moz-focus-inner {
197
+ border-style: none;
198
+ padding: 0;
199
+ }
200
+
201
+ /**
202
+ * Restore the focus styles unset by the previous rule.
203
+ */
204
+
205
+ button:-moz-focusring,
206
+ [type="button"]:-moz-focusring,
207
+ [type="reset"]:-moz-focusring,
208
+ [type="submit"]:-moz-focusring {
209
+ outline: 1px dotted ButtonText;
210
+ }
211
+
212
+ /**
213
+ * Correct the padding in Firefox.
214
+ */
215
+
216
+ fieldset {
217
+ padding: 0.35em 0.75em 0.625em;
218
+ }
219
+
220
+ /**
221
+ * 1. Correct the text wrapping in Edge and IE.
222
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
223
+ * 3. Remove the padding so developers are not caught out when they zero out
224
+ * `fieldset` elements in all browsers.
225
+ */
226
+
227
+ legend {
228
+ box-sizing: border-box; /* 1 */
229
+ color: inherit; /* 2 */
230
+ display: table; /* 1 */
231
+ max-width: 100%; /* 1 */
232
+ padding: 0; /* 3 */
233
+ white-space: normal; /* 1 */
234
+ }
235
+
236
+ /**
237
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
238
+ */
239
+
240
+ progress {
241
+ vertical-align: baseline;
242
+ }
243
+
244
+ /**
245
+ * Remove the default vertical scrollbar in IE 10+.
246
+ */
247
+
248
+ textarea {
249
+ overflow: auto;
250
+ }
251
+
252
+ /**
253
+ * 1. Add the correct box sizing in IE 10.
254
+ * 2. Remove the padding in IE 10.
255
+ */
256
+
257
+ [type="checkbox"],
258
+ [type="radio"] {
259
+ box-sizing: border-box; /* 1 */
260
+ padding: 0; /* 2 */
261
+ }
262
+
263
+ /**
264
+ * Correct the cursor style of increment and decrement buttons in Chrome.
265
+ */
266
+
267
+ [type="number"]::-webkit-inner-spin-button,
268
+ [type="number"]::-webkit-outer-spin-button {
269
+ height: auto;
270
+ }
271
+
272
+ /**
273
+ * 1. Correct the odd appearance in Chrome and Safari.
274
+ * 2. Correct the outline style in Safari.
275
+ */
276
+
277
+ [type="search"] {
278
+ -webkit-appearance: textfield; /* 1 */
279
+ outline-offset: -2px; /* 2 */
280
+ }
281
+
282
+ /**
283
+ * Remove the inner padding in Chrome and Safari on macOS.
284
+ */
285
+
286
+ [type="search"]::-webkit-search-decoration {
287
+ -webkit-appearance: none;
288
+ }
289
+
290
+ /**
291
+ * 1. Correct the inability to style clickable types in iOS and Safari.
292
+ * 2. Change font properties to `inherit` in Safari.
293
+ */
294
+
295
+ ::-webkit-file-upload-button {
296
+ -webkit-appearance: button; /* 1 */
297
+ font: inherit; /* 2 */
298
+ }
299
+
300
+ /* Interactive
301
+ ========================================================================== */
302
+
303
+ /*
304
+ * Add the correct display in Edge, IE 10+, and Firefox.
305
+ */
306
+
307
+ details {
308
+ display: block;
309
+ }
310
+
311
+ /*
312
+ * Add the correct display in all browsers.
313
+ */
314
+
315
+ summary {
316
+ display: list-item;
317
+ }
318
+
319
+ /* Misc
320
+ ========================================================================== */
321
+
322
+ /**
323
+ * Add the correct display in IE 10+.
324
+ */
325
+
326
+ template {
327
+ display: none;
328
+ }
329
+
330
+ /**
331
+ * Add the correct display in IE 10.
332
+ */
333
+
334
+ [hidden] {
335
+ display: none;
336
+ }
337
+
338
+ /*--------------------------------------------------------------
339
+ # Typography
340
+ --------------------------------------------------------------*/
341
+ body,
342
+ button,
343
+ input,
344
+ select,
345
+ optgroup,
346
+ textarea {
347
+ color: #404040;
348
+ font-family: sans-serif;
349
+ font-size: 16px;
350
+ font-size: 1rem;
351
+ line-height: 1.5;
352
+ }
353
+
354
+ h1, h2, h3, h4, h5, h6 {
355
+ clear: both;
356
+ }
357
+
358
+ p {
359
+ margin-bottom: 1.5em;
360
+ }
361
+
362
+ dfn, cite, em, i {
363
+ font-style: italic;
364
+ }
365
+
366
+ blockquote {
367
+ margin: 0 1.5em;
368
+ }
369
+
370
+ address {
371
+ margin: 0 0 1.5em;
372
+ }
373
+
374
+ pre {
375
+ background: #eee;
376
+ font-family: "Courier 10 Pitch", Courier, monospace;
377
+ font-size: 15px;
378
+ font-size: 0.9375rem;
379
+ line-height: 1.6;
380
+ margin-bottom: 1.6em;
381
+ max-width: 100%;
382
+ overflow: auto;
383
+ padding: 1.6em;
384
+ }
385
+
386
+ code, kbd, tt, var {
387
+ font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
388
+ font-size: 15px;
389
+ font-size: 0.9375rem;
390
+ }
391
+
392
+ abbr, acronym {
393
+ border-bottom: 1px dotted #666;
394
+ cursor: help;
395
+ }
396
+
397
+ mark, ins {
398
+ background: #fff9c0;
399
+ text-decoration: none;
400
+ }
401
+
402
+ big {
403
+ font-size: 125%;
404
+ }
405
+
406
+ /*--------------------------------------------------------------
407
+ # Elements
408
+ --------------------------------------------------------------*/
409
+ html {
410
+ box-sizing: border-box;
411
+ }
412
+
413
+ *,
414
+ *:before,
415
+ *:after {
416
+ /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
417
+ box-sizing: inherit;
418
+ }
419
+
420
+ body {
421
+ background: #fff;
422
+ /* Fallback for when there is no custom background color defined. */
423
+ }
424
+
425
+ hr {
426
+ background-color: #ccc;
427
+ border: 0;
428
+ height: 1px;
429
+ margin-bottom: 1.5em;
430
+ }
431
+
432
+ ul, ol {
433
+ margin: 0 0 1.5em 3em;
434
+ }
435
+
436
+ ul {
437
+ list-style: disc;
438
+ }
439
+
440
+ ol {
441
+ list-style: decimal;
442
+ }
443
+
444
+ li > ul,
445
+ li > ol {
446
+ margin-bottom: 0;
447
+ margin-left: 1.5em;
448
+ }
449
+
450
+ dt {
451
+ font-weight: bold;
452
+ }
453
+
454
+ dd {
455
+ margin: 0 1.5em 1.5em;
456
+ }
457
+
458
+ img {
459
+ height: auto;
460
+ /* Make sure images are scaled correctly. */
461
+ max-width: 100%;
462
+ /* Adhere to container width. */
463
+ }
464
+
465
+ figure {
466
+ margin: 1em 0;
467
+ /* Extra wide images within figure tags don't overflow the content area. */
468
+ }
469
+
470
+ table {
471
+ margin: 0 0 1.5em;
472
+ width: 100%;
473
+ }
474
+
475
+ /*--------------------------------------------------------------
476
+ # Forms
477
+ --------------------------------------------------------------*/
478
+ button,
479
+ input[type="button"],
480
+ input[type="reset"],
481
+ input[type="submit"] {
482
+ border: 1px solid;
483
+ border-color: #ccc #ccc #bbb;
484
+ border-radius: 3px;
485
+ background: #e6e6e6;
486
+ color: rgba(0, 0, 0, 0.8);
487
+ font-size: 12px;
488
+ font-size: 0.75rem;
489
+ line-height: 1;
490
+ padding: .6em 1em .4em;
491
+ }
492
+
493
+ button:hover,
494
+ input[type="button"]:hover,
495
+ input[type="reset"]:hover,
496
+ input[type="submit"]:hover {
497
+ border-color: #ccc #bbb #aaa;
498
+ }
499
+
500
+ button:active, button:focus,
501
+ input[type="button"]:active,
502
+ input[type="button"]:focus,
503
+ input[type="reset"]:active,
504
+ input[type="reset"]:focus,
505
+ input[type="submit"]:active,
506
+ input[type="submit"]:focus {
507
+ border-color: #aaa #bbb #bbb;
508
+ }
509
+
510
+ input[type="text"],
511
+ input[type="email"],
512
+ input[type="url"],
513
+ input[type="password"],
514
+ input[type="search"],
515
+ input[type="number"],
516
+ input[type="tel"],
517
+ input[type="range"],
518
+ input[type="date"],
519
+ input[type="month"],
520
+ input[type="week"],
521
+ input[type="time"],
522
+ input[type="datetime"],
523
+ input[type="datetime-local"],
524
+ input[type="color"],
525
+ textarea {
526
+ color: #666;
527
+ border: 1px solid #ccc;
528
+ border-radius: 3px;
529
+ padding: 3px;
530
+ }
531
+
532
+ input[type="text"]:focus,
533
+ input[type="email"]:focus,
534
+ input[type="url"]:focus,
535
+ input[type="password"]:focus,
536
+ input[type="search"]:focus,
537
+ input[type="number"]:focus,
538
+ input[type="tel"]:focus,
539
+ input[type="range"]:focus,
540
+ input[type="date"]:focus,
541
+ input[type="month"]:focus,
542
+ input[type="week"]:focus,
543
+ input[type="time"]:focus,
544
+ input[type="datetime"]:focus,
545
+ input[type="datetime-local"]:focus,
546
+ input[type="color"]:focus,
547
+ textarea:focus {
548
+ color: #111;
549
+ }
550
+
551
+ select {
552
+ border: 1px solid #ccc;
553
+ }
554
+
555
+ textarea {
556
+ width: 100%;
557
+ }
558
+
559
+ /*--------------------------------------------------------------
560
+ # Navigation
561
+ --------------------------------------------------------------*/
562
+ /*--------------------------------------------------------------
563
+ ## Links
564
+ --------------------------------------------------------------*/
565
+ a {
566
+ color: royalblue;
567
+ }
568
+
569
+ /*a:visited {
570
+ color: purple;
571
+ }*/
572
+
573
+ /*a:hover, a:focus, a:active {
574
+ color: midnightblue;
575
+ }
576
+
577
+ a:focus {
578
+ outline: thin dotted;
579
+ }*/
580
+
581
+ a:hover, a:active {
582
+ outline: 0;
583
+ }
584
+
585
+ /*--------------------------------------------------------------
586
+ # Accessibility
587
+ --------------------------------------------------------------*/
588
+ /* Text meant only for screen readers. */
589
+ .screen-reader-text {
590
+ border: 0;
591
+ clip: rect(1px, 1px, 1px, 1px);
592
+ clip-path: inset(50%);
593
+ height: 1px;
594
+ margin: -1px;
595
+ overflow: hidden;
596
+ padding: 0;
597
+ position: absolute !important;
598
+ width: 1px;
599
+ word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
600
+ }
601
+
602
+ .screen-reader-text:focus {
603
+ background-color: #f1f1f1;
604
+ border-radius: 3px;
605
+ box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
606
+ clip: auto !important;
607
+ clip-path: none;
608
+ color: #21759b;
609
+ display: block;
610
+ font-size: 14px;
611
+ font-size: 0.875rem;
612
+ font-weight: bold;
613
+ height: auto;
614
+ left: 5px;
615
+ line-height: normal;
616
+ padding: 15px 23px 14px;
617
+ text-decoration: none;
618
+ top: 5px;
619
+ width: auto;
620
+ z-index: 100000;
621
+ /* Above WP toolbar. */
622
+ }
623
+
624
+ /* Do not show the outline on the skip link target. */
625
+ #content[tabindex="-1"]:focus {
626
+ outline: 0;
627
+ }
628
+
629
+ /*--------------------------------------------------------------
630
+ # Alignments
631
+ --------------------------------------------------------------*/
632
+ .alignleft {
633
+ display: inline;
634
+ float: left;
635
+ margin-right: 1.5em;
636
+ }
637
+
638
+ .alignright {
639
+ display: inline;
640
+ float: right;
641
+ margin-left: 1.5em;
642
+ }
643
+
644
+ .aligncenter {
645
+ clear: both;
646
+ display: block;
647
+ margin-left: auto;
648
+ margin-right: auto;
649
+ }
650
+
651
+ /*--------------------------------------------------------------
652
+ # Clearings
653
+ --------------------------------------------------------------*/
654
+ .clear:before,
655
+ .clear:after {
656
+ content: "";
657
+ display: table;
658
+ table-layout: fixed;
659
+ }
660
+
661
+ .clear:after {
662
+ clear: both;
663
+ }
664
+
665
+ /*--------------------------------------------------------------
666
+ # Widgets
667
+ --------------------------------------------------------------*/
668
+ .widget {
669
+ margin: 0 0 1.5em;
670
+ /* Make sure select elements fit in widgets. */
671
+ }
672
+
673
+ .widget select {
674
+ max-width: 100%;
675
+ }
676
+
677
+ /*--------------------------------------------------------------
678
+ # Content
679
+ --------------------------------------------------------------*/
680
+ /*--------------------------------------------------------------
681
+ # Media
682
+ --------------------------------------------------------------*/
683
+ /* Make sure embeds and iframes fit their containers. */
684
+ embed,
685
+ iframe,
686
+ object {
687
+ max-width: 100%;
688
+ }
689
+
690
+ /* Common Button */
691
+ .wcf-button {
692
+ display: inline-block;
693
+ padding: 12px 24px;
694
+ background: #ccc;
695
+ text-decoration: none;
696
+ margin: 5px;
697
+ }
698
+
699
+ /*--------------------------------------------------------------
700
+ # Template CSS
701
+ ---------------------------------------------------------------*/
702
+ body.cartflows-default {
703
+ background-color: #f5f5f5;
704
+ }
705
+
706
+ .cartflows-default .cartflows-container {
707
+ max-width: 1200px;
708
+ width: 100%;
709
+ padding: 0 20px;
710
+ margin: 60px auto;
711
+ }
712
+ .cartflows-default .cartflows-primary {
713
+ background-color: #fff;
714
+ padding: 70px;
715
+ overflow: hidden;
716
+ max-width: 100%;
717
+ }
718
+
719
+ @media (max-width: 768px) {
720
+ .cartflows-default .cartflows-container {
721
+ padding: 0;
722
+ margin: 0;
723
+ }
724
+ .cartflows-default .cartflows-primary {
725
+ padding: 20px 30px;
726
+ }
727
+ }
728
+
729
+ @media (max-width: 544px) {
730
+ .cartflows-default .cartflows-primary {
731
+ padding: 20px 15px;
732
+ }
733
+ }
734
+
735
+ /*--------------------------------------------------------------
736
+ # Preview Mode
737
+ ---------------------------------------------------------------*/
738
+ .wcf-preview-mode {
739
+ background: rgba(60, 60, 60, 0.9);
740
+ position: fixed;
741
+ bottom: 0;
742
+ left: 0;
743
+ width: 100%;
744
+ height: 2.6em;
745
+ color: #fff;
746
+ text-align: center;
747
+ font-size: 14px;
748
+ line-height: 2.6em;
749
+ pointer-events: none;
750
+ z-index: 9999999;
751
+ }
752
+ @media only screen and (max-width: 768px) {
753
+ .wcf-preview-mode {
754
+ font-size: 13px;
755
+ line-height: 18px;
756
+ padding: 4px 10px;
757
+ height: auto;
758
+ }
759
+ }
760
+
761
+ /**
762
+ * *****************
763
+ * Cartflows Footer
764
+ * *****************
765
+ */
766
+
767
+ .wcf-footer-primary .wcf-footer-content p{
768
+ margin: 1.5em 0;
769
+ text-align: center;
770
+ }
771
+
772
+ /**
773
+ * ****************
774
+ * Thank You page
775
+ * ****************
776
+ */
777
+
778
+ .wcf-thankyou-wrap
779
+ {
780
+ padding: 0;
781
+ margin: 0 auto;
782
+ width: 100%;
783
+ max-width: 55em;
784
+ font-size: 13px;
785
+ }
786
+
787
+ .wcf-thankyou-wrap a{
788
+ color: #404040;
789
+ }
790
+ /* Order Details - ThankYou page */
791
+ .woocommerce-order ul.order_details::before,
792
+ .woocommerce-order ul.order_details::after {
793
+ content: ' ';
794
+ display: table;
795
+ }
796
+ .woocommerce-order ul.order_details::after {
797
+ clear: both;
798
+ }
799
+
800
+ .woocommerce-order ul.order_details,
801
+ .woocommerce-order ul.order_details li {
802
+ list-style: none;
803
+ line-height: 1;
804
+ }
805
+
806
+ .woocommerce-order ul.order_details li {
807
+ display: inline-block;
808
+ border-right: 1px dashed #cccccc;
809
+ padding: 0.5em 1em 0.5em 0;
810
+ margin: 0.5em 0.5em 0.5em 0;
811
+ list-style-type: none;
812
+ }
813
+
814
+ .woocommerce-order ul.order_details li:first-child {
815
+ padding-left: 0;
816
+ }
817
+
818
+ .woocommerce-order ul.order_details li:last-child {
819
+ border-right:0px;
820
+ padding-right: 0;
821
+ }
822
+
823
+ .woocommerce-order ul.order_details li strong {
824
+ display: block;
825
+ margin-top: 0.7em;
826
+ }
827
+
828
+ .woocommerce-order ul.order_details,
829
+ .woocommerce-order .woocommerce-customer-details,
830
+ .woocommerce-order .woocommerce-order-details {
831
+ margin: 0 0 2em;
832
+ border-radius: 3px;
833
+ width: 100%;
834
+ display: block;
835
+ }
836
+
837
+ /* Section Background & Padding */
838
+ .woocommerce-order ul.order_details,
839
+ .woocommerce-order .woocommerce-customer-details,
840
+ .woocommerce-order .woocommerce-order-details {
841
+ background: #f1f1f1;
842
+ padding: 1.5em 2.5em;
843
+ }
844
+
845
+ .woocommerce-order h2.woocommerce-column__title,
846
+ .woocommerce-order h2.woocommerce-order-details__title,
847
+ .woocommerce-order .woocommerce-thankyou-order-received {
848
+ padding: 0.8em 0;
849
+ margin: 0 0 0.5em;
850
+ font-size: 1.5em;
851
+ font-weight: 600;
852
+ color: #404040;
853
+ }
854
+
855
+ .woocommerce-order .woocommerce-thankyou-order-received {
856
+ margin: 0 0 1.5em;
857
+ padding: 0 0.5em;
858
+ text-align: center;
859
+ }
860
+
861
+ /* Order Details Form */
862
+ .woocommerce-order-details table.shop_table {
863
+ border:none;
864
+ border-bottom: 0;
865
+ background-color: inherit;
866
+ border-radius: 0;
867
+ font-family: inherit;
868
+ font-weight:inherit;
869
+ font-size: 0.95em;
870
+ margin: 0 0 0px 0 !important;
871
+ border-collapse: collapse;
872
+ text-align: left;
873
+ }
874
+ .woocommerce-order-details table.shop_table #shipping_method{
875
+ margin: 0;
876
+ padding: 0;
877
+ list-style: none;
878
+ }
879
+ .woocommerce-order-details table.shop_table th{
880
+ border: none;
881
+ font-weight: 400;
882
+ padding: 9px 0px;
883
+ line-height: 1.2em;
884
+ }
885
+ .woocommerce-order-details table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
886
+ font-size: 1em;
887
+ }
888
+ .woocommerce-order-details table.shop_table td,
889
+ .woocommerce-order-details table.shop_table th {
890
+ padding: 0.6em 0;
891
+ line-height: 1.4em;
892
+ border: none;
893
+ }
894
+ .woocommerce-order-details table.shop_table tbody th,
895
+ .woocommerce-order-details table.shop_table tfoot td,
896
+ .woocommerce-order-details table.shop_table tfoot th {
897
+ font-weight: normal;
898
+ border: none;
899
+ }
900
+ .woocommerce-order-details table.shop_table tbody {
901
+ border-top: 1px dashed #cccccc;
902
+ border-bottom: 1px dashed #cccccc;
903
+ }
904
+ .woocommerce-order-details table.shop_table th.product-name,
905
+ .woocommerce-order-details table.shop_table th.product-total{
906
+ font-weight: 600;
907
+ }
908
+ .woocommerce-order-details table.shop_table tfoot tr.order-total:not(.recurring-total) th,
909
+ .woocommerce-order-details table.shop_table tfoot tr.order-total:not(.recurring-total) td {
910
+ font-weight: 600;
911
+ border-top: 1px dashed #cccccc;
912
+ }
913
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-totals th {
914
+ padding-top: 1.8em;
915
+ font-weight: 600;
916
+ }
917
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-totals th,
918
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-total th,
919
+ .woocommerce-order-details table.shop_table tfoot tr.recurring-total td {
920
+ vertical-align: top;
921
+ }
922
+
923
+ /**/
924
+
925
+ .woocommerce-order .col2-set{
926
+ display: flex;
927
+ }
928
+
929
+ .woocommerce-order .col2-set .col-1{
930
+ margin-right: 2%;
931
+ }
932
+
933
+ .woocommerce-order .col2-set .col-1,
934
+ .woocommerce-order .col2-set .col-2 {
935
+ width: 49%;
936
+ display: inline-block;
937
+ }
938
+
939
+
940
+ .woocommerce-order .woocommerce-customer-details address {
941
+ border-right-width: 1px;
942
+ border-bottom-width: 1px;
943
+ border-radius: 0;
944
+ font-style: normal;
945
+ }
946
+
947
+ .woocommerce-order .woocommerce-customer-details address p{
948
+ margin: 0;
949
+ }
950
+
951
+ @media only screen and (max-width: 768px){
952
+
953
+ .woocommerce-order .woocommerce-thankyou-order-received {
954
+ margin: 0 0 1em;
955
+ }
956
+
957
+ .woocommerce-order h2.woocommerce-column__title,
958
+ .woocommerce-order h2.woocommerce-order-details__title,
959
+ .woocommerce-order .woocommerce-thankyou-order-received {
960
+ padding: 0.5em 0;
961
+ font-size: 1.5em;
962
+ }
963
+
964
+ .woocommerce-order ul.order_details,
965
+ .woocommerce-order .woocommerce-customer-details,
966
+ .woocommerce-order .woocommerce-order-details {
967
+ padding: 1.5em 2em;
968
+ }
969
+
970
+ .woocommerce-order ul.order_details li{
971
+ display: block;
972
+ width: 100%;
973
+ border-right: none;
974
+ padding: 0.5em 1em 1em 0;
975
+ border-bottom: 1px dashed #cccccc;
976
+ }
977
+
978
+ .woocommerce-order ul.order_details li:last-child {
979
+ border: none;
980
+ }
981
+
982
+ .woocommerce-order .col2-set{
983
+ display: block;
984
+ }
985
+
986
+ .woocommerce-order .col2-set .col-1,
987
+ .woocommerce-order .col2-set .col-2{
988
+ width: 100%;
989
+ display: block;
990
+ }
991
+ }
assets/css/import-rtl.css ADDED
@@ -0,0 +1,811 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .site-preview {
3
+ background: #c5c5c5;
4
+ display: block;
5
+ overflow: hidden;
6
+ position: relative;
7
+ -webkit-backface-visibility: hidden;
8
+ }
9
+
10
+ .template.importing .site-preview:after,
11
+ .template:hover .site-preview:after {
12
+ opacity: 0.3;
13
+ }
14
+ .template.importing .site-preview,
15
+ .template:hover .site-preview {
16
+ background: #fff;
17
+ cursor: pointer;
18
+ }
19
+ .template .site-preview:after {
20
+ content: "";
21
+ background: #fff;
22
+ opacity: 0;
23
+ top: 0;
24
+ content: "";
25
+ display: block;
26
+ top: 0;
27
+ position: absolute;
28
+ padding-top: 66.66666%;
29
+ -webkit-transition: opacity 0.2s ease-in-out;
30
+ transition: opacity 0.2s ease-in-out;
31
+ right: 0;
32
+ left: 0;
33
+ bottom: 0;
34
+ }
35
+
36
+ .template .notice {
37
+ padding: .5em;
38
+ background: #fff;
39
+ color: initial;
40
+ font-weight: normal;
41
+ text-decoration: none;
42
+ position: absolute;
43
+ top: 50%;
44
+ transform: translateY(-50%);
45
+ left: 27%;
46
+ right: 27%;
47
+ z-index: 4;
48
+ text-align: center;
49
+ border-radius: 3px;
50
+ transition: opacity .1s ease-in-out;
51
+ }
52
+
53
+ .preview:focus,
54
+ .preview:hover {
55
+ color: #fff;
56
+ box-shadow: none;
57
+ }
58
+ .preview {
59
+ text-decoration: none;
60
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
61
+ opacity: 0;
62
+ position: absolute;
63
+ top: 50%;
64
+ transform: translateY(-50%);
65
+ left: 22%;
66
+ right: 22%;
67
+ z-index: 4;
68
+ background: #23282d;
69
+ background: rgba(0,0,0,.7);
70
+ color: #fff;
71
+ font-size: 13px;
72
+ text-shadow: 0 1px 0 rgba(0,0,0,.6);
73
+ -webkit-font-smoothing: antialiased;
74
+ font-weight: 600;
75
+ padding: 10px 12px;
76
+ text-align: center;
77
+ -webkit-border-radius: 3px;
78
+ border-radius: 3px;
79
+ -webkit-transition: opacity .1s ease-in-out;
80
+ transition: opacity .1s ease-in-out;
81
+ }
82
+
83
+ .template-id-container {
84
+ font-size: 15px;
85
+ font-weight: 600;
86
+ margin: 0;
87
+ padding: 10px;
88
+ -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
89
+ box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
90
+ overflow: hidden;
91
+ white-space: nowrap;
92
+ text-overflow: ellipsis;
93
+ background: #fff;
94
+ background: rgba(255,255,255,0.65);
95
+ position: relative;
96
+ }
97
+
98
+ .template-actions {
99
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
100
+ opacity: 0;
101
+ -webkit-transition: opacity 0.1s ease-in-out;
102
+ transition: opacity 0.1s ease-in-out;
103
+ position: absolute;
104
+ bottom: 0;
105
+ left: 0;
106
+ top: 0;
107
+ padding: 5px 5px 0 5px;
108
+ background: rgba(244, 244, 244, 0.7);
109
+ border-right: 1px solid rgba(0,0,0,0.05);
110
+ }
111
+ .wcf-step-content .template-actions,
112
+ .template.importing .template-actions,
113
+ .template.importing .preview,
114
+ .template:hover .template-actions,
115
+ .template:hover .preview {
116
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
117
+ opacity: 1;
118
+ }
119
+
120
+ .wcf-remote-list .template {
121
+ margin: 15px;
122
+ position: relative;
123
+ overflow: hidden;
124
+ box-shadow: 0 0 5px 1px rgba(204, 204, 204, 0.3);
125
+ }
126
+
127
+ .wcf-remote-list h3 {
128
+ margin-bottom: 1em;
129
+ margin-top: 0;
130
+ font-size: 15px;
131
+ font-weight: 600;
132
+ margin: 0;
133
+ padding: 0;
134
+ text-align: right;
135
+ }
136
+
137
+ .wcf-remote-list img {
138
+ max-width: 100%;
139
+ vertical-align: middle;
140
+ }
141
+
142
+ .wcf-remote-list * {
143
+ box-sizing: border-box;
144
+ }
145
+
146
+
147
+ /*** ------- **/
148
+
149
+ #cartflows-steps-list img {
150
+ width: 100%;
151
+ }
152
+
153
+ #cartflows-steps-list .title {
154
+ font-weight: bold;
155
+ color: #474747;
156
+ line-height: 2;
157
+ background: #f7f7f7;
158
+ padding: 0.5em 1em;
159
+ }
160
+
161
+ #cartflows-steps-list .image-wrap {
162
+ background-size: cover;
163
+ overflow: hidden;
164
+ }
165
+
166
+ #cartflows-steps .close
167
+ {
168
+ display: inline-block;
169
+ padding: 2em;
170
+ cursor: pointer;
171
+ }
172
+ /**
173
+ * Intro
174
+ */
175
+
176
+ .template-message-block {
177
+ text-align: center;
178
+ margin: 0 auto;
179
+ padding: 4em 0;
180
+ }
181
+
182
+ .templator #TB_ajaxContent {
183
+ width: 100% !important;
184
+ }
185
+
186
+ .template-message-block .spinner {
187
+ float: none;
188
+ margin: 0;
189
+ }
190
+
191
+ .cartflows-steps-popup {
192
+ position: fixed;
193
+ right: 0;
194
+ left: 0;
195
+ top: 0;
196
+ bottom: 0;
197
+ z-index: 99999;
198
+ background: #fff;
199
+ overflow-y: scroll;
200
+ }
201
+
202
+ .cartflows-steps-popup .notice {
203
+ max-width: 700px;
204
+ margin: 0 auto;
205
+ }
206
+
207
+ body.cartflows-popup-is-open {
208
+ /*overflow: hidden;*/
209
+ }
210
+
211
+ .cartflows-load-steps-library .dashicons {
212
+ height: auto;
213
+ width: auto;
214
+ line-height: normal;
215
+ margin: 0 0px 0 5px;
216
+ vertical-align: initial;
217
+ font-size: 100%;
218
+ }
219
+
220
+ .cartflows-load-steps .dashicons {
221
+ vertical-align: text-bottom;
222
+ }
223
+
224
+ /**
225
+ * Preview
226
+ */
227
+ /**
228
+ * Full Width
229
+ */
230
+ #TB_window {
231
+ width: 100% !important;
232
+ margin: 0em auto !important;
233
+ text-align: center !important;
234
+ position: fixed !important;
235
+ top: 0 !important;
236
+ right: 0 !important;
237
+ left: 0 !important;
238
+ bottom: 0 !important;
239
+ }
240
+
241
+ #TB_iframeContent {
242
+ width: 100% !important;
243
+ height: 100% !important;
244
+ }
245
+
246
+ /* For general iPad layouts */
247
+ @media only screen and (min-device-width : 320px) and (max-device-width : 1024px) {
248
+ #TB_iframeContent-wrapper {
249
+ position: fixed;
250
+ left: 0;
251
+ bottom: 50px;
252
+ right: 0;
253
+ top: 0;
254
+ overflow-y: scroll;
255
+ -webkit-overflow-scrolling: touch;
256
+ }
257
+ }
258
+
259
+ #TB_window #TB_ajaxWindowTitle {
260
+ font-size: 1.2rem;
261
+ display: inline-block;
262
+ width: auto;
263
+ padding: 0;
264
+ }
265
+
266
+ #TB_window #TB_closeWindowButton {
267
+ position: relative;
268
+ }
269
+
270
+ .tb-close-icon:before {
271
+ vertical-align: middle;
272
+ }
273
+
274
+ /**
275
+ * Popup
276
+ */
277
+ #TB_window {
278
+ text-align: center;
279
+ }
280
+ #TB_iframeContent.tablet {
281
+ width: 768px !important;
282
+ height: 1024px !important;
283
+ background: #111;
284
+ padding: 40px 10px 70px;
285
+ border-radius: 30px;
286
+ }
287
+ #TB_iframeContent.tablet.landscape {
288
+ width: 1024px !important;
289
+ }
290
+ #TB_iframeContent.mobile {
291
+ width: 360px !important;
292
+ height: 640px !important;
293
+ background: #111;
294
+ padding: 40px 10px 70px;
295
+ border-radius: 30px;
296
+ }
297
+ #TB_iframeContent.mobile.landscape {
298
+ width: 360px !important;
299
+ }
300
+ #TB_closeAjaxWindow {
301
+ float: left;
302
+ }
303
+
304
+ /**
305
+ * Dark Theme
306
+ */
307
+ #TB_window.thickbox-loading {
308
+ margin: 0 !important;
309
+ }
310
+ div#TB_window {
311
+ background-color: #fff;
312
+ }
313
+ #TB_window #TB_title {
314
+ color: #0a0c0d;
315
+ text-align: right;
316
+ bottom: 0;
317
+ box-shadow: none;
318
+ justify-content: space-between;
319
+ align-items: center;
320
+ padding: 1em 1.5em 1em 1em;
321
+ }
322
+ @media all and (min-width: 769px) {
323
+ #TB_window #TB_title {
324
+ display: flex;
325
+ }
326
+ }
327
+ #TB_window.tablet,
328
+ #TB_window.mobile {
329
+ overflow-y: scroll;
330
+ }
331
+ .top #TB_iframeContent-wrapper {
332
+ bottom: 0;
333
+ top: 80px;
334
+ }
335
+
336
+ #TB_window.top #TB_title {
337
+ top: 0;
338
+ }
339
+
340
+ #TB_window #TB_closeWindowButton:focus .tb-close-icon {
341
+ box-shadow: none;
342
+ color: #666;
343
+ }
344
+
345
+ @media all and (max-width: 768px) {
346
+ #TB_closeAjaxWindow {
347
+ padding-left: 0;
348
+ }
349
+ #TB_window .tb-close-icon,
350
+ #TB_window #TB_closeWindowButton {
351
+ width: 80px;
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Loading
357
+ */
358
+ .responsive-view .dashicons {
359
+ color: #dddddd;
360
+ }
361
+ .responsive-view .active {
362
+ color: #111111;
363
+ }
364
+ .responsive-view a:focus {
365
+ outline: none;
366
+ box-shadow: none;
367
+ }
368
+ #TB_window.tablet #TB_iframeContent,
369
+ #TB_window.mobile #TB_iframeContent {
370
+ margin-bottom: 50px;
371
+ margin-top: 50px;
372
+ }
373
+ .responsive-view a {
374
+ color: #666;
375
+ cursor: pointer;
376
+ display: inline-block;
377
+ padding: 1em;
378
+ vertical-align: middle;
379
+ text-decoration: none;
380
+ }
381
+ #TB_closeAjaxWindow .tb-close-icon {
382
+ position: relative;
383
+ }
384
+ .site-loading {
385
+ display: none;
386
+ position: absolute;
387
+ right: 50%;
388
+ top: 50%;
389
+ text-align: center;
390
+ color: #555;
391
+ transform: translate(50%, -40%);
392
+ }
393
+ .top .site-loading {
394
+ top: 50%;
395
+ transform: translate(50%, -50%);
396
+ }
397
+
398
+ .site-loading h3 {
399
+ font-size: 33px;
400
+ font-weight: 600;
401
+ margin: 0 0 .8em 0;
402
+ }
403
+
404
+ .site-loading p {
405
+ margin: 0;
406
+ }
407
+
408
+ .cartflows-thickbox-loading .site-loading {
409
+ display: block;
410
+ }
411
+ .cartflows-thickbox-loading #TB_iframeContent,
412
+ .cartflows-thickbox-loading #TB_iframeContent-wrapper {
413
+ display: none;
414
+ }
415
+
416
+ /**
417
+ * Filters
418
+ */
419
+ .wcf-remote-list:after,
420
+ .wcf-remote-list:before {
421
+ content: "";
422
+ display: table;
423
+ }
424
+ .wcf-remote-list::after {
425
+ content: "";
426
+ display: table;
427
+ clear: both;
428
+ }
429
+ .wcf-template-header .filter-count {
430
+ line-height: normal;
431
+ }
432
+ #wcf-page-builders,
433
+ #wcf-remote-flow-filters > div,
434
+ #wcf-remote-step-filters > div ,
435
+ #wcf-remote-step-filters > div {
436
+ display: inline-block;
437
+ }
438
+ .wcf-template-header .filter-links {
439
+ margin: 0;
440
+ padding: 0;
441
+ }
442
+ .wcf-template-header li:focus {
443
+ outline: none;
444
+ }
445
+ .wcf-template-header .filter-links li {
446
+ margin: 0;
447
+ display: inline-block;
448
+ }
449
+ .wcf-template-header .filter-links li a:hove,
450
+ .wcf-template-header .filter-links li a:focus {
451
+ outline: none;
452
+ box-shadow: none;
453
+ }
454
+ .wcf-template-header .filter-links li .current {
455
+ color: #000;
456
+ border-bottom: 3px solid #f16334;
457
+ font-weight: 600;
458
+ }
459
+
460
+ .wcf-flow-search-input {
461
+ border: none;
462
+ box-shadow: none;
463
+ border-bottom: 1px solid #eee;
464
+ line-height: 1.8;
465
+ }
466
+
467
+ .wcf-search-form {
468
+ margin-left: 2em;
469
+ padding-left: 0;
470
+ text-align: left;
471
+ margin-top: 1em;
472
+ margin-bottom: 1em;
473
+ position: relative;
474
+ }
475
+
476
+ .wcf-template-notice {
477
+ display: none;
478
+ padding: 10px 20px 0 0;
479
+ text-align: center;
480
+ }
481
+
482
+ #wcf-remote-step-importer .wcf-search-form {
483
+ display: none;
484
+ }
485
+
486
+ .wcf-search-form .wcf-flow-search-input {
487
+ border: none;
488
+ box-shadow: none;
489
+ border-bottom: 1px solid #eee;
490
+ line-height: 1.8;
491
+
492
+ background: transparent;
493
+ border-bottom: 1px solid #ccc;
494
+ font-size: 1em;
495
+ }
496
+ .wcf-search-form .wcf-flow-search-input:focus {
497
+ box-shadow: none;
498
+ border-color: #ccc;
499
+ }
500
+ .cartflows-preview-flow-steps li {
501
+ display: inline-block;
502
+ margin: 0px 1em;
503
+ position: relative;
504
+ }
505
+ #poststuff .cartflows-step-loading h2,
506
+ #poststuff .template-message-block h2 {
507
+ font-size: 1.5em;
508
+ margin: 0 0 0.5em 0;
509
+ }
510
+ #poststuff .template-message-block p,
511
+ #poststuff .cartflows-step-loading p {
512
+ font-size: 1.2em;
513
+ }
514
+ #poststuff .cartflows-step-loading .spinner {
515
+ vertical-align: initial;
516
+ }
517
+
518
+ .wcf-flow-type {
519
+ position: absolute;
520
+ left: 0;
521
+ top: 0;
522
+ padding: 3px 10px;
523
+ color: #fff;
524
+ }
525
+ .wcf-flow-type.pro {
526
+ background: #f06262;
527
+ }
528
+
529
+ .wcf-templates-popup-overlay {
530
+ position: fixed;
531
+ height: 100%;
532
+ width: 100%;
533
+ top: 0;
534
+ right: 0;
535
+ background: rgba(0, 0, 0, 0.7);
536
+ transition: opacity 500ms;
537
+ visibility: hidden;
538
+ z-index: 9999;
539
+ -webkit-user-select: none;
540
+ -moz-user-select: none;
541
+ -ms-user-select: none;
542
+ user-select: none;
543
+ }
544
+
545
+ .wcf-templates-popup-overlay.open{
546
+ visibility: visible;
547
+ z-index: 9999;
548
+ }
549
+
550
+ .wcf-templates-popup-content {
551
+ max-width: 1200px;
552
+ background-color: #fff;
553
+ position: absolute;
554
+ border-radius: 3px;
555
+ top: 40%;
556
+ right: 50%;
557
+ transform: translate(50%, -35%);
558
+ width: 70%;
559
+ min-height: 450px;
560
+ overflow: hidden;
561
+ }
562
+
563
+ .wcf-templates-popup-content .inner{
564
+ position: relative;
565
+ display: block;
566
+ float: right;
567
+ margin: 0;
568
+ text-align: center;
569
+ }
570
+ @media only screen and (min-width: 768px) {
571
+ .wcf-templates-popup-content .inner{
572
+ width: 25%;
573
+ }
574
+ }
575
+
576
+ html.wcf-popup-open{
577
+ overflow: hidden;
578
+ }
579
+
580
+ .wcf-button-wrap{
581
+ margin-top: 0;
582
+ position: absolute;
583
+ top: 10px;
584
+ right: 110px;
585
+ }
586
+
587
+ #wcf-remote-step-importer #wcf-remote-content {
588
+ padding-top: 10px;
589
+ }
590
+
591
+ .wcf-steps-loading #wcf-remote-step-list {
592
+ display: none;
593
+ }
594
+
595
+ #wcf-remote-content {
596
+ overflow-y: auto;
597
+ min-height: 450px;
598
+ max-height: 450px;
599
+ padding: 20px 20px 20px 20px;
600
+ clear: both;
601
+ }
602
+
603
+ .wcf-template-list-wrap .template-name {
604
+ margin: 0;
605
+ text-align: right;
606
+ font-size: 13px;
607
+ }
608
+
609
+ .wcf-template-list-wrap img{
610
+ width: 100%;
611
+ vertical-align: middle;
612
+ }
613
+
614
+ .wcf-templates-popup-content .template{
615
+ margin: 15px;
616
+ position: relative;
617
+ overflow: hidden;
618
+ box-shadow: 0 0 5px 1px rgba(204, 204, 204, 0.3);
619
+ }
620
+
621
+ .wcf-tab.nav-tabs{
622
+ overflow: hidden;
623
+ margin: 0;
624
+ }
625
+
626
+ .wcf-template-header {
627
+ align-items: center;
628
+ background: #fff;
629
+ box-shadow: 0 0 8px rgba(0,0,0,.1);
630
+ display: flex;
631
+ -webkit-box-align: center;
632
+ -webkit-align-items: center;
633
+ -ms-flex-align: center;
634
+ -webkit-box-pack: justify;
635
+ -webkit-justify-content: space-between;
636
+ -ms-flex-pack: justify;
637
+ justify-content: space-between;
638
+ padding: 0 15px;
639
+ min-height: 50px;
640
+ }
641
+
642
+ .wcf-search-form:after {
643
+ content: "\f179";
644
+ display: inline-block;
645
+ font-family: dashicons;
646
+ text-decoration: inherit;
647
+ font-weight: normal;
648
+ font-style: normal;
649
+ text-align: center;
650
+ transition: color .1s ease-in 0;
651
+ -webkit-font-smoothing: antialiased;
652
+ -moz-osx-font-smoothing: grayscale;
653
+ position: absolute;
654
+ left: 0.5em;
655
+ top: .5em;
656
+ color: #81868a;
657
+ }
658
+
659
+ .wcf-template-logo-wrap{
660
+ font-size: 16px;
661
+ font-weight: 600;
662
+ text-align: center;
663
+ }
664
+ .wcf-template-logo-wrap .wcf-cartflows-logo-img{
665
+ vertical-align: middle;
666
+ }
667
+
668
+ .wcf-tab.nav-tabs:before{
669
+ display: table;
670
+ content: "";
671
+ }
672
+
673
+ .wcf-tab.nav-tabs:after{
674
+ clear: both;
675
+ }
676
+
677
+ .wcf-tab.nav-tabs > li{
678
+ display: inline-block;
679
+ padding: 15px 0px;
680
+ margin: 0;
681
+ font-weight: 400;
682
+ }
683
+
684
+ .wcf-tab.nav-tabs > li.active{
685
+ border-bottom: 3px solid #f16334;
686
+ font-weight: 600;
687
+ }
688
+
689
+ .wcf-template-header .filter-links li > a {
690
+ border-color: transparent;
691
+ margin: 0;
692
+ }
693
+ .wcf-template-header .filter-links > li:focus
694
+ .wcf-template-header .filter-links > li:active,
695
+ .wcf-template-header .filter-links > li:active,
696
+ .wcf-template-header .filter-links > li > a:hover,
697
+ .wcf-template-header .filter-links > li > a:focus,
698
+ .wcf-tab.nav-tabs > li:focus,
699
+ .wcf-tab.nav-tabs > li:active,
700
+ .wcf-tab.nav-tabs > li > a:focus,
701
+ .wcf-tab.nav-tabs > li > a:focus{
702
+ outline: none;
703
+ box-shadow: none;
704
+ }
705
+
706
+ .wcf-template-header .filter-links > li > a:hover,
707
+ .wcf-template-header .filter-links > li > a:focus,
708
+ .wcf-template-header .filter-links > li > a,
709
+ .wcf-tab.nav-tabs > li > a{
710
+ padding: 15px;
711
+ color: #555;
712
+ text-decoration: none;
713
+ }
714
+
715
+ .wcf-nav-section-content{
716
+ display: none;
717
+ }
718
+
719
+ .wcf-nav-section-content.active{
720
+ display: block;
721
+ overflow: hidden;
722
+ }
723
+
724
+ .wcf-popup-close-wrap{
725
+ width: 35px;
726
+ text-align: center;
727
+ border-right: 1px #eee solid;
728
+ }
729
+
730
+ .wcf-popup-close-wrap .close-icon{
731
+ cursor: pointer;
732
+ }
733
+
734
+ .wcf-popup-close-wrap .wcf-cartflow-icons{
735
+ pointer-events: none;
736
+ font-size: 20px;
737
+ height: 20px;
738
+ width: 20px;
739
+ line-height: 20px;
740
+ opacity: 0.7;
741
+ }
742
+ .wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{
743
+ opacity: 1;
744
+ }
745
+
746
+ .wcf-templates-popup-content .spinner{
747
+ position: absolute;
748
+ top: 50%;
749
+ right: 50%;
750
+ bottom: 0;
751
+ left: 0;
752
+ max-width: 100%;
753
+ max-height: 100%;
754
+ transform: translate(50%, -50%);
755
+ z-index: 99999;
756
+ }
757
+
758
+ /**
759
+ * ******************
760
+ Import popup css
761
+ * ******************
762
+ */
763
+
764
+ .wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{
765
+ margin: 0 auto;
766
+ }
767
+ #wcf-upcoming-page-builders {
768
+ overflow-y: auto;
769
+ max-height: 450px;
770
+ padding: 20px 20px 20px 20px;
771
+ clear: both;
772
+ }
773
+ #wcf-upcoming-page-builders h3 {
774
+ font-size: 2em;
775
+
776
+ }
777
+ #wcf-upcoming-page-builders .inner {
778
+ position: absolute;
779
+ top: 40%;
780
+ right: 50%;
781
+ transform: translate(50%,-40%);
782
+ width: auto;
783
+ }
784
+ #wcf-upcoming-page-builders .description {
785
+ font-size: 1rem;
786
+ }
787
+ #wcf-remote-step-filters {
788
+ padding: 0 15px;
789
+ }
790
+ #wcf-remote-step-filters a {
791
+ text-decoration: none;
792
+ }
793
+ #wcf-remote-step-filters a:focus,
794
+ #wcf-remote-step-filters .filter-links li:focus {
795
+ outline: none;
796
+ box-shadow: none;
797
+ }
798
+ #wcf-remote-step-filters .filter-links li a {
799
+ border-bottom: none;
800
+ }
801
+ #wcf-remote-step-filters .filter-links li:first-child a {
802
+ margin-right: 0;
803
+ }
804
+ #wcf-remote-step-filters .filter-links li:last-child a {
805
+ margin-left: 0;
806
+ }
807
+ #wcf-remote-step-filters .filter-links li a:focus,
808
+ #wcf-remote-step-filters .filter-links li a:hover,
809
+ #wcf-remote-step-filters .filter-links li .current {
810
+ color: #f16334;
811
+ }
assets/css/import.css ADDED
@@ -0,0 +1,813 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .site-preview {
3
+ background: #c5c5c5;
4
+ display: block;
5
+ overflow: hidden;
6
+ position: relative;
7
+ -webkit-backface-visibility: hidden;
8
+ }
9
+
10
+ .template.importing .site-preview:after,
11
+ .template:hover .site-preview:after {
12
+ opacity: 0.3;
13
+ }
14
+ .template.importing .site-preview,
15
+ .template:hover .site-preview {
16
+ background: #fff;
17
+ cursor: pointer;
18
+ }
19
+ .template .site-preview:after {
20
+ content: "";
21
+ background: #fff;
22
+ opacity: 0;
23
+ top: 0;
24
+ content: "";
25
+ display: block;
26
+ top: 0;
27
+ position: absolute;
28
+ padding-top: 66.66666%;
29
+ -webkit-transition: opacity 0.2s ease-in-out;
30
+ transition: opacity 0.2s ease-in-out;
31
+ left: 0;
32
+ right: 0;
33
+ bottom: 0;
34
+ }
35
+
36
+ .template .notice {
37
+ padding: .5em;
38
+ background: #fff;
39
+ color: initial;
40
+ font-weight: normal;
41
+ text-decoration: none;
42
+ position: absolute;
43
+ top: 50%;
44
+ transform: translateY(-50%);
45
+ right: 27%;
46
+ left: 27%;
47
+ z-index: 4;
48
+ text-align: center;
49
+ border-radius: 3px;
50
+ transition: opacity .1s ease-in-out;
51
+ }
52
+
53
+ .preview:focus,
54
+ .preview:hover {
55
+ color: #fff;
56
+ box-shadow: none;
57
+ }
58
+ .preview {
59
+ text-decoration: none;
60
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
61
+ opacity: 0;
62
+ position: absolute;
63
+ top: 50%;
64
+ transform: translateY(-50%);
65
+ right: 22%;
66
+ left: 22%;
67
+ z-index: 4;
68
+ background: #23282d;
69
+ background: rgba(0,0,0,.7);
70
+ color: #fff;
71
+ font-size: 13px;
72
+ text-shadow: 0 1px 0 rgba(0,0,0,.6);
73
+ -webkit-font-smoothing: antialiased;
74
+ font-weight: 600;
75
+ padding: 10px 12px;
76
+ text-align: center;
77
+ -webkit-border-radius: 3px;
78
+ border-radius: 3px;
79
+ -webkit-transition: opacity .1s ease-in-out;
80
+ transition: opacity .1s ease-in-out;
81
+ }
82
+
83
+ .template-id-container {
84
+ font-size: 15px;
85
+ font-weight: 600;
86
+ margin: 0;
87
+ padding: 10px;
88
+ -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
89
+ box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
90
+ overflow: hidden;
91
+ white-space: nowrap;
92
+ text-overflow: ellipsis;
93
+ background: #fff;
94
+ background: rgba(255,255,255,0.65);
95
+ position: relative;
96
+ }
97
+
98
+ .template-actions {
99
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
100
+ opacity: 0;
101
+ -webkit-transition: opacity 0.1s ease-in-out;
102
+ transition: opacity 0.1s ease-in-out;
103
+ position: absolute;
104
+ bottom: 0;
105
+ right: 0;
106
+ top: 0;
107
+ padding: 5px 5px 0 5px;
108
+ background: rgba(244, 244, 244, 0.7);
109
+ border-left: 1px solid rgba(0,0,0,0.05);
110
+ }
111
+ .wcf-step-content .template-actions,
112
+ .template.importing .template-actions,
113
+ .template.importing .preview,
114
+ .template:hover .template-actions,
115
+ .template:hover .preview {
116
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
117
+ opacity: 1;
118
+ }
119
+
120
+ .wcf-remote-list .template {
121
+ margin: 15px;
122
+ position: relative;
123
+ overflow: hidden;
124
+ box-shadow: 0 0 5px 1px rgba(204, 204, 204, 0.3);
125
+ }
126
+
127
+ .wcf-remote-list h3 {
128
+ margin-bottom: 1em;
129
+ margin-top: 0;
130
+ font-size: 15px;
131
+ font-weight: 600;
132
+ margin: 0;
133
+ padding: 0;
134
+ text-align: left;
135
+ }
136
+
137
+ .wcf-remote-list img {
138
+ max-width: 100%;
139
+ vertical-align: middle;
140
+ }
141
+
142
+ .wcf-remote-list * {
143
+ box-sizing: border-box;
144
+ }
145
+
146
+
147
+ /*** ------- **/
148
+
149
+ #cartflows-steps-list img {
150
+ width: 100%;
151
+ }
152
+
153
+ #cartflows-steps-list .title {
154
+ font-weight: bold;
155
+ color: #474747;
156
+ line-height: 2;
157
+ background: #f7f7f7;
158
+ padding: 0.5em 1em;
159
+ }
160
+
161
+ #cartflows-steps-list .image-wrap {
162
+ background-size: cover;
163
+ overflow: hidden;
164
+ }
165
+
166
+ #cartflows-steps .close
167
+ {
168
+ display: inline-block;
169
+ padding: 2em;
170
+ cursor: pointer;
171
+ }
172
+ /**
173
+ * Intro
174
+ */
175
+
176
+ .template-message-block {
177
+ text-align: center;
178
+ margin: 0 auto;
179
+ padding: 4em 0;
180
+ }
181
+
182
+ .templator #TB_ajaxContent {
183
+ width: 100% !important;
184
+ }
185
+
186
+ .template-message-block .spinner {
187
+ float: none;
188
+ margin: 0;
189
+ }
190
+
191
+ .cartflows-steps-popup {
192
+ position: fixed;
193
+ left: 0;
194
+ right: 0;
195
+ top: 0;
196
+ bottom: 0;
197
+ z-index: 99999;
198
+ background: #fff;
199
+ overflow-y: scroll;
200
+ }
201
+
202
+ .cartflows-steps-popup .notice {
203
+ max-width: 700px;
204
+ margin: 0 auto;
205
+ }
206
+
207
+ body.cartflows-popup-is-open {
208
+ /*overflow: hidden;*/
209
+ }
210
+
211
+ .cartflows-load-steps-library .dashicons {
212
+ height: auto;
213
+ width: auto;
214
+ line-height: normal;
215
+ margin: 0 5px 0 0px;
216
+ vertical-align: initial;
217
+ font-size: 100%;
218
+ }
219
+
220
+ .cartflows-load-steps .dashicons {
221
+ vertical-align: text-bottom;
222
+ }
223
+
224
+ /**
225
+ * Preview
226
+ */
227
+ /**
228
+ * Full Width
229
+ */
230
+ #TB_window {
231
+ width: 100% !important;
232
+ margin: 0em auto !important;
233
+ text-align: center !important;
234
+ position: fixed !important;
235
+ top: 0 !important;
236
+ left: 0 !important;
237
+ right: 0 !important;
238
+ bottom: 0 !important;
239
+ }
240
+
241
+ #TB_iframeContent {
242
+ width: 100% !important;
243
+ height: 100% !important;
244
+ }
245
+
246
+ /* For general iPad layouts */
247
+ @media only screen and (min-device-width : 320px) and (max-device-width : 1024px) {
248
+ #TB_iframeContent-wrapper {
249
+ position: fixed;
250
+ right: 0;
251
+ bottom: 50px;
252
+ left: 0;
253
+ top: 0;
254
+ overflow-y: scroll;
255
+ -webkit-overflow-scrolling: touch;
256
+ }
257
+ }
258
+
259
+ #TB_window #TB_ajaxWindowTitle {
260
+ font-size: 1.2rem;
261
+ display: inline-block;
262
+ width: auto;
263
+ padding: 0;
264
+ }
265
+
266
+ #TB_window #TB_closeWindowButton {
267
+ position: relative;
268
+ }
269
+
270
+ .tb-close-icon:before {
271
+ vertical-align: middle;
272
+ }
273
+
274
+ /**
275
+ * Popup
276
+ */
277
+ #TB_window {
278
+ text-align: center;
279
+ }
280
+ #TB_iframeContent.tablet {
281
+ width: 768px !important;
282
+ height: 1024px !important;
283
+ background: #111;
284
+ padding: 40px 10px 70px;
285
+ border-radius: 30px;
286
+ }
287
+ #TB_iframeContent.tablet.landscape {
288
+ width: 1024px !important;
289
+ }
290
+ #TB_iframeContent.mobile {
291
+ width: 360px !important;
292
+ height: 640px !important;
293
+ background: #111;
294
+ padding: 40px 10px 70px;
295
+ border-radius: 30px;
296
+ }
297
+ #TB_iframeContent.mobile.landscape {
298
+ width: 360px !important;
299
+ }
300
+ #TB_closeAjaxWindow {
301
+ float: right;
302
+ }
303
+
304
+ /**
305
+ * Dark Theme
306
+ */
307
+ #TB_window.thickbox-loading {
308
+ margin: 0 !important;
309
+ }
310
+ div#TB_window {
311
+ background-color: #fff;
312
+ }
313
+ #TB_window #TB_title {
314
+ color: #0a0c0d;
315
+ text-align: left;
316
+ bottom: 0;
317
+ box-shadow: none;
318
+ justify-content: space-between;
319
+ align-items: center;
320
+ padding: 1em 1em 1em 1.5em;
321
+ }
322
+ @media all and (min-width: 769px) {
323
+ #TB_window #TB_title {
324
+ display: flex;
325
+ }
326
+ }
327
+ #TB_window.tablet,
328
+ #TB_window.mobile {
329
+ overflow-y: scroll;
330
+ }
331
+ .top #TB_iframeContent-wrapper {
332
+ bottom: 0;
333
+ top: 80px;
334
+ }
335
+
336
+ #TB_window.top #TB_title {
337
+ top: 0;
338
+ }
339
+
340
+ #TB_window #TB_closeWindowButton:focus .tb-close-icon {
341
+ box-shadow: none;
342
+ color: #666;
343
+ }
344
+
345
+ @media all and (max-width: 768px) {
346
+ #TB_closeAjaxWindow {
347
+ padding-right: 0;
348
+ }
349
+ #TB_window .tb-close-icon,
350
+ #TB_window #TB_closeWindowButton {
351
+ width: 80px;
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Loading
357
+ */
358
+ .responsive-view .dashicons {
359
+ color: #dddddd;
360
+ }
361
+ .responsive-view .active {
362
+ color: #111111;
363
+ }
364
+ .responsive-view a:focus {
365
+ outline: none;
366
+ box-shadow: none;
367
+ }
368
+ #TB_window.tablet #TB_iframeContent,
369
+ #TB_window.mobile #TB_iframeContent {
370
+ margin-bottom: 50px;
371
+ margin-top: 50px;
372
+ }
373
+ .responsive-view a {
374
+ color: #666;
375
+ cursor: pointer;
376
+ display: inline-block;
377
+ padding: 1em;
378
+ vertical-align: middle;
379
+ text-decoration: none;
380
+ }
381
+ #TB_closeAjaxWindow .tb-close-icon {
382
+ position: relative;
383
+ }
384
+ .site-loading {
385
+ display: none;
386
+ position: absolute;
387
+ left: 50%;
388
+ top: 50%;
389
+ text-align: center;
390
+ color: #555;
391
+ transform: translate(-50%, -40%);
392
+ }
393
+ .top .site-loading {
394
+ top: 50%;
395
+ transform: translate(-50%, -50%);
396
+ }
397
+
398
+ .site-loading h3 {
399
+ font-size: 33px;
400
+ font-weight: 600;
401
+ margin: 0 0 .8em 0;
402
+ }
403
+
404
+ .site-loading p {
405
+ margin: 0;
406
+ }
407
+
408
+ .cartflows-thickbox-loading .site-loading {
409
+ display: block;
410
+ }
411
+ .cartflows-thickbox-loading #TB_iframeContent,
412
+ .cartflows-thickbox-loading #TB_iframeContent-wrapper {
413
+ display: none;
414
+ }
415
+
416
+ /**
417
+ * Filters
418
+ */
419
+ .wcf-remote-list:after,
420
+ .wcf-remote-list:before {
421
+ content: "";
422
+ display: table;
423
+ }
424
+ .wcf-remote-list::after {
425
+ content: "";
426
+ display: table;
427
+ clear: both;
428
+ }
429
+ .wcf-template-header .filter-count {
430
+ line-height: normal;
431
+ }
432
+ #wcf-page-builders,
433
+ #wcf-remote-flow-filters > div,
434
+ #wcf-remote-step-filters > div ,
435
+ #wcf-remote-step-filters > div {
436
+ display: inline-block;
437
+ }
438
+ .wcf-template-header .filter-links {
439
+ margin: 0;
440
+ padding: 0;
441
+ }
442
+ .wcf-template-header li:focus {
443
+ outline: none;
444
+ }
445
+ .wcf-template-header .filter-links li {
446
+ margin: 0;
447
+ display: inline-block;
448
+ }
449
+ .wcf-template-header .filter-links li a:hove,
450
+ .wcf-template-header .filter-links li a:focus {
451
+ outline: none;
452
+ box-shadow: none;
453
+ }
454
+ .wcf-template-header .filter-links li .current {
455
+ color: #000;
456
+ border-bottom: 3px solid #f16334;
457
+ font-weight: 600;
458
+ }
459
+
460
+ .wcf-flow-search-input {
461
+ border: none;
462
+ box-shadow: none;
463
+ border-bottom: 1px solid #eee;
464
+ line-height: 1.8;
465
+ }
466
+
467
+ .wcf-search-form {
468
+ margin-right: 2em;
469
+ padding-right: 0;
470
+ text-align: right;
471
+ margin-top: 1em;
472
+ margin-bottom: 1em;
473
+ position: relative;
474
+ }
475
+
476
+ .wcf-template-notice {
477
+ display: none;
478
+ padding: 10px 0 0 20px;
479
+ text-align: center;
480
+ }
481
+
482
+ #wcf-remote-step-importer .wcf-search-form {
483
+ display: none;
484
+ }
485
+
486
+ .wcf-search-form .wcf-flow-search-input {
487
+ border: none;
488
+ box-shadow: none;
489
+ border-bottom: 1px solid #eee;
490
+ line-height: 1.8;
491
+
492
+ background: transparent;
493
+ border-bottom: 1px solid #ccc;
494
+ font-size: 1em;
495
+ }
496
+ .wcf-search-form .wcf-flow-search-input:focus {
497
+ box-shadow: none;
498
+ border-color: #ccc;
499
+ }
500
+ .cartflows-preview-flow-steps li {
501
+ display: inline-block;
502
+ margin: 0px 1em;
503
+ position: relative;
504
+ }
505
+ #poststuff .cartflows-step-loading h2,
506
+ #poststuff .template-message-block h2 {
507
+ font-size: 1.5em;
508
+ margin: 0 0 0.5em 0;
509
+ }
510
+ #poststuff .template-message-block p,
511
+ #poststuff .cartflows-step-loading p {
512
+ font-size: 1.2em;
513
+ }
514
+ #poststuff .cartflows-step-loading .spinner {
515
+ vertical-align: initial;
516
+ }
517
+
518
+ .wcf-flow-type {
519
+ position: absolute;
520
+ right: 0;
521
+ top: 0;
522
+ padding: 3px 10px;
523
+ color: #fff;
524
+ }
525
+ .wcf-flow-type.pro {
526
+ background: #f06262;
527
+ }
528
+
529
+ .wcf-templates-popup-overlay {
530
+ position: fixed;
531
+ height: 100%;
532
+ width: 100%;
533
+ top: 0;
534
+ left: 0;
535
+ background: rgba(0, 0, 0, 0.7);
536
+ transition: opacity 500ms;
537
+ visibility: hidden;
538
+ z-index: 9999;
539
+ -webkit-user-select: none;
540
+ -moz-user-select: none;
541
+ -ms-user-select: none;
542
+ user-select: none;
543
+ }
544
+
545
+ .wcf-templates-popup-overlay.open{
546
+ visibility: visible;
547
+ z-index: 9999;
548
+ }
549
+
550
+ .wcf-templates-popup-content {
551
+ max-width: 1200px;
552
+ background-color: #fff;
553
+ position: absolute;
554
+ border-radius: 3px;
555
+ top: 40%;
556
+ left: 50%;
557
+ transform: translate(-50%, -35%);
558
+ width: 70%;
559
+ min-height: 450px;
560
+ overflow: hidden;
561
+ }
562
+
563
+ .wcf-templates-popup-content .inner{
564
+ position: relative;
565
+ display: block;
566
+ float: left;
567
+ margin: 0;
568
+ text-align: center;
569
+ }
570
+ @media only screen and (min-width: 768px) {
571
+ .wcf-templates-popup-content .inner{
572
+ width: 25%;
573
+ }
574
+ }
575
+
576
+ html.wcf-popup-open{
577
+ overflow: hidden;
578
+ }
579
+
580
+ .wcf-button-wrap{
581
+ margin-top: 0;
582
+ position: absolute;
583
+ top: 10px;
584
+ left: 110px;
585
+ }
586
+
587
+ #wcf-remote-step-importer #wcf-remote-content {
588
+ padding-top: 10px;
589
+ }
590
+
591
+ .wcf-steps-loading #wcf-remote-step-list {
592
+ display: none;
593
+ }
594
+
595
+ #wcf-remote-content {
596
+ overflow-y: auto;
597
+ min-height: 450px;
598
+ max-height: 450px;
599
+ padding: 20px 20px 20px 20px;
600
+ clear: both;
601
+ }
602
+
603
+ .wcf-template-list-wrap .template-name {
604
+ margin: 0;
605
+ text-align: left;
606
+ font-size: 13px;
607
+ }
608
+
609
+ .wcf-template-list-wrap img{
610
+ width: 100%;
611
+ vertical-align: middle;
612
+ }
613
+
614
+ .wcf-templates-popup-content .template{
615
+ margin: 15px;
616
+ position: relative;
617
+ overflow: hidden;
618
+ box-shadow: 0 0 5px 1px rgba(204, 204, 204, 0.3);
619
+ }
620
+
621
+ .wcf-tab.nav-tabs{
622
+ overflow: hidden;
623
+ margin: 0;
624
+ }
625
+
626
+ .wcf-template-header {
627
+ align-items: center;
628
+ background: #fff;
629
+ box-shadow: 0 0 8px rgba(0,0,0,.1);
630
+ display: flex;
631
+ -webkit-box-align: center;
632
+ -webkit-align-items: center;
633
+ -ms-flex-align: center;
634
+ -webkit-box-pack: justify;
635
+ -webkit-justify-content: space-between;
636
+ -ms-flex-pack: justify;
637
+ justify-content: space-between;
638
+ padding: 0 15px;
639
+ min-height: 50px;
640
+ }
641
+
642
+ .wcf-search-form:after {
643
+ content: "\f179";
644
+ display: inline-block;
645
+ font-family: dashicons;
646
+ text-decoration: inherit;
647
+ font-weight: normal;
648
+ font-style: normal;
649
+ text-align: center;
650
+ transition: color .1s ease-in 0;
651
+ -webkit-font-smoothing: antialiased;
652
+ -moz-osx-font-smoothing: grayscale;
653
+ position: absolute;
654
+ right: 0.5em;
655
+ top: .5em;
656
+ color: #81868a;
657
+ }
658
+
659
+ .wcf-template-logo-wrap{
660
+ font-size: 16px;
661
+ font-weight: 600;
662
+ text-align: center;
663
+ }
664
+ .wcf-template-logo-wrap .wcf-cartflows-logo-img{
665
+ vertical-align: middle;
666
+ }
667
+
668
+ .wcf-tab.nav-tabs:before{
669
+ display: table;
670
+ content: "";
671
+ }
672
+
673
+ .wcf-tab.nav-tabs:after{
674
+ clear: both;
675
+ }
676
+
677
+ .wcf-tab.nav-tabs > li{
678
+ display: inline-block;
679
+ padding: 15px 0px;
680
+ margin: 0;
681
+ font-weight: 400;
682
+ }
683
+
684
+ .wcf-tab.nav-tabs > li.active{
685
+ border-bottom: 3px solid #f16334;
686
+ font-weight: 600;
687
+ }
688
+
689
+ .wcf-template-header .filter-links li > a {
690
+ border-color: transparent;
691
+ margin: 0;
692
+ }
693
+ .wcf-template-header .filter-links > li:focus
694
+ .wcf-template-header .filter-links > li:active,
695
+ .wcf-template-header .filter-links > li:active,
696
+ .wcf-template-header .filter-links > li > a:hover,
697
+ .wcf-template-header .filter-links > li > a:focus,
698
+ .wcf-tab.nav-tabs > li:focus,
699
+ .wcf-tab.nav-tabs > li:active,
700
+ .wcf-tab.nav-tabs > li > a:focus,
701
+ .wcf-tab.nav-tabs > li > a:focus{
702
+ outline: none;
703
+ box-shadow: none;
704
+ }
705
+
706
+ .wcf-template-header .filter-links > li > a:hover,
707
+ .wcf-template-header .filter-links > li > a:focus,
708
+ .wcf-template-header .filter-links > li > a,
709
+ .wcf-tab.nav-tabs > li > a{
710
+ padding: 15px;
711
+ color: #555;
712
+ text-decoration: none;
713
+ }
714
+
715
+ .wcf-nav-section-content{
716
+ display: none;
717
+ }
718
+
719
+ .wcf-nav-section-content.active{
720
+ display: block;
721
+ overflow: hidden;
722
+ }
723
+
724
+ .wcf-popup-close-wrap{
725
+ width: 35px;
726
+ text-align: center;
727
+ border-left: 1px #eee solid;
728
+ }
729
+
730
+ .wcf-popup-close-wrap .close-icon{
731
+ cursor: pointer;
732
+ }
733
+
734
+ .wcf-popup-close-wrap .wcf-cartflow-icons{
735
+ pointer-events: none;
736
+ font-size: 20px;
737
+ height: 20px;
738
+ width: 20px;
739
+ line-height: 20px;
740
+ opacity: 0.7;
741
+ }
742
+ .wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{
743
+ opacity: 1;
744
+ }
745
+
746
+ .wcf-templates-popup-content .spinner{
747
+ position: absolute;
748
+ top: 50%;
749
+ left: 50%;
750
+ bottom: 0;
751
+ right: 0;
752
+ max-width: 100%;
753
+ max-height: 100%;
754
+ transform: translate(-50%, -50%);
755
+ z-index: 99999;
756
+ }
757
+
758
+ /**
759
+ * ******************
760
+ Import popup css
761
+ * ******************
762
+ */
763
+
764
+ .wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{
765
+ margin: 0 auto;
766
+ }
767
+ /*#wcf-upcoming-page-builders {
768
+ overflow-y: auto;
769
+ max-height: 450px;
770
+ padding: 20px 20px 20px 20px;
771
+ clear: both;
772
+ }*/
773
+ /*#wcf-upcoming-page-builders h3 {
774
+ font-size: 2em;
775
+
776
+ }*/
777
+ /*#wcf-upcoming-page-builders .inner {
778
+ position: absolute;
779
+ top: 40%;
780
+ left: 50%;
781
+ transform: translate(-50%,-40%);
782
+ width: auto;
783
+ }*/
784
+ #wcf-upcoming-page-builders .description {
785
+ font-size: 1rem;
786
+ margin: 4em 0 0 0;
787
+ text-align: center;
788
+ }
789
+ #wcf-remote-step-filters {
790
+ padding: 0 15px;
791
+ }
792
+ #wcf-remote-step-filters a {
793
+ text-decoration: none;
794
+ }
795
+ #wcf-remote-step-filters a:focus,
796
+ #wcf-remote-step-filters .filter-links li:focus {
797
+ outline: none;
798
+ box-shadow: none;
799
+ }
800
+ #wcf-remote-step-filters .filter-links li a {
801
+ border-bottom: none;
802
+ }
803
+ #wcf-remote-step-filters .filter-links li:first-child a {
804
+ margin-left: 0;
805
+ }
806
+ #wcf-remote-step-filters .filter-links li:last-child a {
807
+ margin-right: 0;
808
+ }
809
+ #wcf-remote-step-filters .filter-links li a:focus,
810
+ #wcf-remote-step-filters .filter-links li a:hover,
811
+ #wcf-remote-step-filters .filter-links li .current {
812
+ color: #f16334;
813
+ }
assets/images/400x400.jpg ADDED
Binary file
assets/images/cartflows-icon.svg ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="95px" height="95px" viewBox="0 0 95 95" enable-background="new 0 0 95 95" xml:space="preserve">
6
+ <g>
7
+ <path fill="#81878c" d="M58.942,5.609c-3.444,3.354-5.587,8.036-5.587,13.22v30.718c0,4.521-3.668,8.188-8.188,8.188H24.574
8
+ c-4.52,0-8.188-3.668-8.188-8.188c0-4.52,3.668-8.188,8.188-8.188h22.583V24.974H24.574c-1.399,0-2.763,0.115-4.099,0.34
9
+ C8.86,27.26,0,37.377,0,49.547c0,10.7,6.843,19.803,16.386,23.176c1.318,0.466,2.681,0.825,4.09,1.058
10
+ c1.336,0.225,2.699,0.341,4.099,0.341h20.592c1.399,0,2.763-0.116,4.099-0.341c1.409-0.232,2.771-0.592,4.09-1.058
11
+ C62.897,69.35,69.74,60.247,69.74,49.547v-8.188c9.05,0,16.386-7.337,16.386-16.386H69.74v-6.145c0-1.13,0.915-2.044,2.045-2.044
12
+ h4.098c4.996,0,9.525-1.982,12.843-5.212c2.987-2.905,4.996-6.807,5.471-11.174H71.786C66.799,0.399,62.261,2.381,58.942,5.609"/>
13
+ <path fill="#81878c" d="M24.575,78.218c-4.523,0-8.191,3.667-8.191,8.191c0,4.523,3.667,8.191,8.191,8.191s8.191-3.668,8.191-8.191
14
+ C32.766,81.885,29.098,78.218,24.575,78.218"/>
15
+ <path fill="#81878c" d="M49.149,78.218c-4.524,0-8.192,3.667-8.192,8.191c0,4.523,3.667,8.191,8.192,8.191
16
+ c4.523,0,8.191-3.668,8.191-8.191C57.34,81.885,53.672,78.218,49.149,78.218"/>
17
+ </g>
18
+ </svg>
assets/images/cartflows-logo.svg ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="500px" height="95px" viewBox="0 0 500 95" enable-background="new 0 0 500 95" xml:space="preserve">
6
+ <g>
7
+ <path fill="#F06335" d="M135.779,68.374c-5.939,0-10.946-1.951-14.934-5.939c-3.989-3.988-5.939-8.995-5.939-15.019
8
+ c0-6.025,1.951-11.031,5.939-15.02c3.988-3.988,8.995-6.024,14.934-6.024c6.535,0,11.964,2.376,16.208,7.212l7.211-6.194
9
+ c-6.194-7.043-14-10.606-23.42-10.606c-8.74,0-16.207,2.885-22.317,8.74c-6.023,5.854-9.079,13.152-9.079,21.893
10
+ c0,8.739,3.056,16.037,9.079,21.892c6.11,5.77,13.577,8.655,22.317,8.655c9.25,0,17.735-3.988,23.505-10.776l-7.127-6.194
11
+ C148,65.914,142.483,68.374,135.779,68.374"/>
12
+ <path fill="#F06335" d="M199.086,40.372c-1.443-4.157-6.619-7.127-13.661-7.127c-6.025,0-11.117,2.121-15.274,6.448
13
+ c-4.073,4.243-6.11,9.504-6.11,15.868s2.037,11.625,6.11,15.952c4.157,4.243,9.249,6.364,15.274,6.364
14
+ c7.042,0,12.218-2.97,13.661-7.128v6.194h10.182V34.178h-10.182V40.372z M196.03,64.896c-2.46,2.461-5.6,3.733-9.249,3.733
15
+ c-3.648,0-6.619-1.272-9.08-3.733c-2.375-2.461-3.563-5.601-3.563-9.334c0-3.734,1.188-6.873,3.563-9.334
16
+ c2.461-2.461,5.432-3.734,9.08-3.734c3.649,0,6.788,1.273,9.249,3.734c2.547,2.461,3.819,5.6,3.819,9.334
17
+ C199.85,59.295,198.577,62.435,196.03,64.896"/>
18
+ <path fill="#F06335" d="M229.891,40.542v-6.363h-10.098v42.767h10.098V54.458c0-7.043,4.498-11.455,11.541-11.455
19
+ c1.527,0,2.971,0.17,4.243,0.424v-9.843c-0.848-0.169-1.867-0.254-3.055-0.254C236.595,33.33,231.928,36.045,229.891,40.542"/>
20
+ <polygon fill="#F06335" points="267.654,17.802 257.472,17.802 257.472,34.178 251.955,34.178 251.955,43.427 257.472,43.427
21
+ 257.472,76.944 267.654,76.944 267.654,43.427 276.902,43.427 276.902,34.178 267.654,34.178 "/>
22
+ <polygon fill="#F06335" points="286.834,76.944 297.439,76.944 297.439,51.827 320.436,51.827 320.436,42.239 297.439,42.239
23
+ 297.439,27.39 322.641,27.39 322.641,17.802 286.834,17.802 "/>
24
+ <rect x="332.487" y="17.802" fill="#F06335" width="10.183" height="59.143"/>
25
+ <path fill="#F06335" d="M374.832,32.905c-6.534,0-12.049,2.206-16.547,6.533c-4.498,4.328-6.789,9.759-6.789,16.123
26
+ s2.291,11.795,6.789,16.122s10.013,6.534,16.547,6.534c6.533,0,12.049-2.207,16.547-6.534c4.496-4.327,6.787-9.758,6.787-16.122
27
+ s-2.291-11.795-6.787-16.123C386.881,35.111,381.365,32.905,374.832,32.905 M384.25,65.149c-2.545,2.546-5.685,3.819-9.418,3.819
28
+ c-3.819,0-6.959-1.273-9.505-3.819c-2.46-2.63-3.733-5.77-3.733-9.588s1.273-6.958,3.733-9.504
29
+ c2.546-2.631,5.686-3.903,9.505-3.903c3.733,0,6.873,1.272,9.418,3.903c2.547,2.546,3.818,5.686,3.818,9.504
30
+ S386.797,62.52,384.25,65.149"/>
31
+ <polygon fill="#F06335" points="443.992,60.822 435.337,34.178 427.615,34.178 418.959,60.822 410.051,34.178 400.461,34.178
32
+ 414.717,76.944 422.693,76.944 431.518,49.876 440.344,76.944 448.234,76.944 462.575,34.178 452.902,34.178 "/>
33
+ <path fill="#F06335" d="M488.545,51.743c-1.697-0.595-4.074-1.442-5.346-1.782c-1.104-0.424-2.801-1.104-3.479-1.527
34
+ c-1.188-0.764-1.952-1.527-1.952-2.97c0-2.291,2.037-3.818,5.176-3.818c3.649,0,6.449,1.188,8.316,3.563l5.686-6.024
35
+ c-3.225-4.158-7.807-6.279-13.832-6.279c-4.242,0-7.807,1.188-10.776,3.479c-2.886,2.291-4.327,5.346-4.327,9.333
36
+ c0,6.109,3.648,9.589,10.521,12.05c1.443,0.594,3.988,1.357,5.262,1.782c1.271,0.424,3.055,1.018,3.988,1.611
37
+ c1.442,0.765,2.459,1.952,2.459,3.395c0,2.631-2.291,4.667-7.636,4.667c-5.176,0-9.333-2.291-11.286-5.346l-6.533,5.516
38
+ c2.715,5.346,9.08,8.655,17.65,8.655c11.624,0,17.564-5.685,17.564-13.577C500,58.361,496.436,54.543,488.545,51.743"/>
39
+ <path fill="#F06335" d="M58.942,5.609c-3.444,3.354-5.587,8.036-5.587,13.22v30.718c0,4.521-3.668,8.188-8.188,8.188H24.574
40
+ c-4.52,0-8.188-3.668-8.188-8.188c0-4.52,3.668-8.188,8.188-8.188h22.583V24.974H24.574c-1.399,0-2.763,0.115-4.099,0.34
41
+ C8.86,27.26,0,37.377,0,49.547c0,10.7,6.843,19.803,16.386,23.176c1.318,0.466,2.681,0.825,4.09,1.058
42
+ c1.336,0.225,2.699,0.341,4.099,0.341h20.592c1.399,0,2.763-0.116,4.099-0.341c1.409-0.232,2.771-0.592,4.09-1.058
43
+ C62.897,69.35,69.74,60.247,69.74,49.547v-8.188c9.05,0,16.386-7.337,16.386-16.386H69.74v-6.145c0-1.13,0.915-2.044,2.045-2.044
44
+ h4.098c4.996,0,9.525-1.982,12.843-5.212c2.987-2.905,4.996-6.807,5.471-11.174H71.786C66.799,0.399,62.261,2.381,58.942,5.609"/>
45
+ <path fill="#F06335" d="M24.575,78.218c-4.523,0-8.191,3.667-8.191,8.191c0,4.523,3.667,8.191,8.191,8.191s8.191-3.668,8.191-8.191
46
+ C32.766,81.885,29.098,78.218,24.575,78.218"/>
47
+ <path fill="#F06335" d="M49.149,78.218c-4.524,0-8.192,3.667-8.192,8.191c0,4.523,3.667,8.191,8.192,8.191
48
+ c4.523,0,8.191-3.668,8.191-8.191C57.34,81.885,53.672,78.218,49.149,78.218"/>
49
+ </g>
50
+ </svg>
assets/images/cartflows-small.svg ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">
6
+ <path fill="#3D4078" d="M200,189.404c0,5.852-4.743,10.596-10.596,10.596H10.596C4.743,200,0,195.256,0,189.404V10.596
7
+ C0,4.745,4.743,0,10.596,0h178.809C195.257,0,200,4.745,200,10.596V189.404z"/>
8
+ <g>
9
+ <path fill="#FFFFFF" d="M115.686,44.516c-4.561,4.443-7.4,10.644-7.4,17.51v40.686c0,5.987-4.857,10.846-10.845,10.846H70.167
10
+ c-5.987,0-10.846-4.858-10.846-10.846c0-5.986,4.858-10.844,10.846-10.844h29.911V70.164H70.167c-1.854,0-3.659,0.153-5.429,0.45
11
+ c-15.385,2.578-27.12,15.978-27.12,32.097c0,14.173,9.063,26.229,21.703,30.696c1.745,0.617,3.551,1.093,5.417,1.401
12
+ c1.77,0.297,3.575,0.451,5.429,0.451H97.44c1.853,0,3.66-0.154,5.427-0.451c1.867-0.309,3.672-0.784,5.418-1.401
13
+ c12.641-4.468,21.705-16.523,21.705-30.696V91.867c11.984,0,21.701-9.718,21.701-21.703H129.99v-8.138
14
+ c0-1.497,1.209-2.708,2.707-2.708h5.428c6.617,0,12.617-2.625,17.012-6.903c3.955-3.848,6.617-9.016,7.246-14.8h-29.686
15
+ C126.094,37.615,120.082,40.24,115.686,44.516"/>
16
+ <path fill="#FFFFFF" d="M70.167,140.686c-5.992,0-10.85,4.857-10.85,10.85c0,5.991,4.857,10.85,10.85,10.85
17
+ c5.991,0,10.849-4.858,10.849-10.85C81.016,145.543,76.159,140.686,70.167,140.686"/>
18
+ <path fill="#FFFFFF" d="M102.715,140.686c-5.992,0-10.849,4.857-10.849,10.85c0,5.991,4.857,10.85,10.849,10.85
19
+ c5.992,0,10.85-4.858,10.85-10.85C113.564,145.543,108.707,140.686,102.715,140.686"/>
20
+ </g>
21
+ </svg>
assets/images/start-scratch.jpg ADDED
Binary file
assets/js/checkout-template.js ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ var wcf_reload_checkout_on_return = function() {
4
+
5
+ var vis = (function(){
6
+ var stateKey, eventKey, keys = {
7
+ hidden: "visibilitychange",
8
+ webkitHidden: "webkitvisibilitychange",
9
+ mozHidden: "mozvisibilitychange",
10
+ msHidden: "msvisibilitychange"
11
+ };
12
+ for (stateKey in keys) {
13
+ if (stateKey in document) {
14
+ eventKey = keys[stateKey];
15
+ break;
16
+ }
17
+ }
18
+ return function(c) {
19
+ if (c) document.addEventListener(eventKey, c);
20
+ return !document[stateKey];
21
+ }
22
+ })();
23
+
24
+ var visible = vis(); // gives current state
25
+
26
+ vis(function(){
27
+
28
+ if ( vis() ) {
29
+ location.reload();
30
+ }
31
+ });
32
+ }
33
+
34
+
35
+ var wcf_show_loader = function() {
36
+ $('.wcf-loader-bg').addClass('show');
37
+
38
+ }
39
+
40
+ var wcf_hide_loader = function() {
41
+ $('.wcf-loader-bg').removeClass('show');
42
+
43
+ }
44
+
45
+ /**
46
+ * Checkout Custom Field Validations
47
+ * This will collect all the present fields in the woocommerce form and adds an class if the field
48
+ * is blank
49
+ */
50
+ var wcf_custom_field_validation = function(){
51
+
52
+ var $inputs = $('form.woocommerce-checkout').find('input');
53
+
54
+ $inputs.blur(function(){
55
+ var $this = $(this),
56
+ field_id = $this.attr('id'),
57
+ field_value = $this.val();
58
+
59
+ if ( field_value == '')
60
+ {
61
+ if( field_id != 'billing_company' && field_id != 'billing_address_2' && field_id != 'shipping_company' && field_id != 'shipping_address_2'){
62
+ $this.addClass('field-required');
63
+ }
64
+ }
65
+ });
66
+ }
67
+
68
+ /**
69
+ * Billing and shipping field add class form-row-first and form-row-last
70
+ * To add those classes to change the layout of the field
71
+ */
72
+ var add_custom_class_address_field = function(){
73
+ // For Billing address fields.
74
+ var $get_checkout_style_layout = $('.cartflows-container').find('.wcf-embed-checkout-form-two-column'),
75
+ $get_bill_addr_field_one = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#billing_address_1_field'),
76
+ $get_bill_addr_field_two = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#billing_address_2_field');
77
+
78
+ if( $get_bill_addr_field_one.hasClass('form-row-wide') ){
79
+ $get_bill_addr_field_one.removeClass('form-row-wide');
80
+ $get_bill_addr_field_one.addClass('form-row-first');
81
+ }
82
+
83
+ if( $get_bill_addr_field_two.hasClass('form-row-wide') ){
84
+ $get_bill_addr_field_two.removeClass('form-row-wide');
85
+ $get_bill_addr_field_two.addClass('form-row-last');
86
+ $get_bill_addr_field_two.addClass('mt20');
87
+ }
88
+
89
+ // For Shipping address fields.
90
+ var $get_ship_addr_field_one = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#shipping_address_1_field');
91
+ var $get_ship_addr_field_two = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#shipping_address_2_field');
92
+ if( $get_ship_addr_field_one.hasClass('form-row-wide') ){
93
+ $get_ship_addr_field_one.removeClass('form-row-wide');
94
+ $get_ship_addr_field_one.addClass('form-row-first');
95
+ }
96
+
97
+ if( $get_ship_addr_field_two.hasClass('form-row-wide') ){
98
+ $get_ship_addr_field_two.removeClass('form-row-wide');
99
+ $get_ship_addr_field_two.addClass('form-row-last');
100
+ $get_ship_addr_field_two.addClass('mt20');
101
+ }
102
+
103
+ function address_fields_management( type ) {
104
+
105
+ var wrapper = $('.woocommerce-' + type + '-fields' );
106
+
107
+ setTimeout(function() {
108
+ var column_three = wrapper.find('.wcf-form-col-3');
109
+ column_three.css( 'clear', '' );
110
+ column_three.first().css( 'clear', 'left' );
111
+ }, 100);
112
+ }
113
+
114
+ address_fields_management( 'billing' );
115
+ address_fields_management( 'shipping' );
116
+
117
+ var billing_country = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#billing_country');
118
+
119
+ billing_country.on( 'change', function(e) {
120
+
121
+ address_fields_management( 'billing' );
122
+ } );
123
+
124
+ var shipping_country = $('.wcf-embed-checkout-form .woocommerce-checkout').find('#shipping_country');
125
+
126
+ shipping_country.on( 'change', function(e) {
127
+
128
+ address_fields_management( 'shipping' );
129
+
130
+ } );
131
+ }
132
+
133
+ var wcf_check_is_local_storage = function(){
134
+ var test = 'test';
135
+ try {
136
+ localStorage.setItem(test, test);
137
+ localStorage.removeItem(test);
138
+ return true;
139
+ } catch(e) {
140
+ return false;
141
+ }
142
+ }
143
+
144
+ var wcf_persistent_data = function(){
145
+
146
+ if ( false === wcf_check_is_local_storage() ) {
147
+ return;
148
+ }
149
+
150
+ var wcf_form_data = {
151
+ set : function (){
152
+
153
+ var checkout_data = [];
154
+ var checkout_form = $('form.woocommerce-checkout');
155
+
156
+ localStorage.removeItem('cartflows_checkout_form');
157
+
158
+ checkout_form.find('input[type=text], select').each(function(){
159
+ checkout_data.push({ name: this.name, value: this.value});
160
+ });
161
+
162
+ cartflows_checkout_form = JSON.stringify(checkout_data);
163
+ localStorage.setItem('cartflows_checkout_form', cartflows_checkout_form);
164
+ },
165
+ get : function (){
166
+
167
+
168
+ if( localStorage.getItem('cartflows_checkout_form') != null ){
169
+
170
+ checkout_data = JSON.parse( localStorage.getItem('cartflows_checkout_form') );
171
+
172
+ for (var i = 0; i < checkout_data.length; i++) {
173
+ $('form.woocommerce-checkout [name='+checkout_data[i].name+']').val(checkout_data[i].value);
174
+ }
175
+ }
176
+ }
177
+ }
178
+
179
+ wcf_form_data.get();
180
+
181
+ $("form.woocommerce-checkout input, form.woocommerce-checkout select").change( function() {
182
+ wcf_form_data.set();
183
+ });
184
+ }
185
+
186
+
187
+ $(document).ready(function($) {
188
+
189
+ wcf_persistent_data();
190
+
191
+ //wcf_reload_checkout_on_return();
192
+
193
+ wcf_custom_field_validation();
194
+
195
+ add_custom_class_address_field();
196
+
197
+ });
198
+
199
+
200
+ var cf_checkout_coupons = {
201
+
202
+ init: function() {
203
+ $( document.body ).on( 'click', '.cf-submit-coupon', this.submit_coupon );
204
+ },
205
+
206
+ submit_coupon: function( e ) {
207
+
208
+ e.preventDefault();
209
+
210
+ var data = {
211
+ coupon_code: $(this).closest('.wcf-custom-coupon-field').find('.cf-coupon-code-input').val(),
212
+ action: 'cf_woo_apply_coupon',
213
+ security: cartflows.cf_validate_coupon_nonce
214
+ };
215
+
216
+ $.ajax({
217
+ type: 'POST',
218
+ url: cartflows.ajax_url,
219
+ data: data,
220
+ success: function( code ) {
221
+
222
+ if( code ) {
223
+ $( document.body ).trigger( 'update_checkout', { update_shipping_method: false } );
224
+ }
225
+ }
226
+ });
227
+ }
228
+ }
229
+
230
+ cf_checkout_coupons.init();
231
+
232
+ })(jQuery);
assets/js/frontend.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ $(document).ready(function($) {
4
+
5
+ $(document).on( 'click', 'a[href*="wcf-next-step"]', function(e) {
6
+
7
+ e.preventDefault();
8
+
9
+ if( 'undefined' !== typeof cartflows.is_pb_preview && '1' == cartflows.is_pb_preview ) {
10
+ e.stopPropagation();
11
+ return;
12
+ }
13
+
14
+ window.location.href = cartflows.next_step;
15
+
16
+ return false;
17
+ });
18
+ });
19
+ })(jQuery);
assets/js/import.js ADDED
@@ -0,0 +1,1171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * AJAX Request Queue
3
+ *
4
+ * - add()
5
+ * - remove()
6
+ * - run()
7
+ * - stop()
8
+ *
9
+ * @since 1.0.0
10
+ */
11
+
12
+ var CartFlowsAjaxQueue = (function() {
13
+
14
+ var requests = [];
15
+
16
+ return {
17
+
18
+ /**
19
+ * Add AJAX request
20
+ *
21
+ * @since 1.0.0
22
+ */
23
+ add: function(opt) {
24
+ requests.push(opt);
25
+ },
26
+
27
+ /**
28
+ * Remove AJAX request
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ remove: function(opt) {
33
+ if( jQuery.inArray(opt, requests) > -1 )
34
+ requests.splice($.inArray(opt, requests), 1);
35
+ },
36
+
37
+ /**
38
+ * Run / Process AJAX request
39
+ *
40
+ * @since 1.0.0
41
+ */
42
+ run: function() {
43
+ var self = this,
44
+ oriSuc;
45
+
46
+ if( requests.length ) {
47
+ oriSuc = requests[0].complete;
48
+
49
+ requests[0].complete = function() {
50
+ if( typeof(oriSuc) === 'function' ) oriSuc();
51
+ requests.shift();
52
+ self.run.apply(self, []);
53
+ };
54
+
55
+ jQuery.ajax(requests[0]);
56
+
57
+ } else {
58
+
59
+ self.tid = setTimeout(function() {
60
+ self.run.apply(self, []);
61
+ }, 1000);
62
+ }
63
+ },
64
+
65
+ /**
66
+ * Stop AJAX request
67
+ *
68
+ * @since 1.0.0
69
+ */
70
+ stop: function() {
71
+
72
+ requests = [];
73
+ clearTimeout(this.tid);
74
+ }
75
+ };
76
+
77
+ }());
78
+
79
+
80
+ (function($){
81
+
82
+ CartFlowsImport = {
83
+
84
+ doc : $( document ),
85
+ wrap : $( '.wcf-flow-steps-data-wrap' ),
86
+ inner : $( '.wcf-flow-steps-data-wrap-importer' ),
87
+ post_id : $( '#post_ID' ).val(),
88
+
89
+ _ref : null,
90
+
91
+ _api_step_type : {},
92
+ _api_params : {},
93
+
94
+ all_steps : 0,
95
+ remaining_steps : 0,
96
+
97
+ /**
98
+ * Init
99
+ */
100
+ init: function()
101
+ {
102
+ this._bind();
103
+
104
+ if( $('.wcf-step-wrap').length ) {
105
+ this._set_category_slugs();
106
+ }
107
+
108
+ if( $('.post-type-cartflows_flow').hasClass('edit-php') ) {
109
+ this._cache_remote_flows();
110
+ }
111
+ if( $('.post-type-cartflows_flow').hasClass('post-php') ) {
112
+ this._cache_remote_steps();
113
+ }
114
+
115
+ if( $('.post-type-cartflows_flow').hasClass('edit-php') && null !== this._getParamFromURL('add-new-flow') ) {
116
+ this._render_remote_flows();
117
+ }
118
+
119
+ if( $('.post-type-cartflows_flow').hasClass('post-php') && null !== this._getParamFromURL('add-new-step') ) {
120
+ this._render_remote_steps();
121
+ }
122
+
123
+ if( this._getParamFromURL('highlight-step-id') ) {
124
+ var selector = $('.wcf-step-wrap[data-id="'+this._getParamFromURL('highlight-step-id')+'"]');
125
+ if( selector.length ) {
126
+ $('html, body').animate({
127
+ scrollTop: selector.offset().top
128
+ }, 1500);
129
+ }
130
+ }
131
+ },
132
+
133
+ /**
134
+ * Get URL param.
135
+ */
136
+ _getParamFromURL: function(name, url)
137
+ {
138
+ if (!url) url = window.location.href;
139
+ name = name.replace(/[\[\]]/g, "\\$&");
140
+ var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
141
+ results = regex.exec(url);
142
+ if (!results) return null;
143
+ if (!results[2]) return '';
144
+ return decodeURIComponent(results[2].replace(/\+/g, " "));
145
+ },
146
+
147
+ _set_category_slugs: function() {
148
+
149
+ // API Request.
150
+ var api_params = {
151
+ _fields : CartFlowsImportVars.step_type_fields.toString(),
152
+ };
153
+
154
+ var api_post = {
155
+ slug : CartFlowsImportVars.step_type + '?' + decodeURIComponent( $.param( api_params ) ),
156
+ };
157
+
158
+ CartFlowsAPI._api_request( api_post, function( data ) {
159
+ if( parseInt( data.items_count ) && $.isEmptyObject( CartFlowsImport._api_step_type ) ) {
160
+ CartFlowsImport._api_step_type = data.items;
161
+ }
162
+ } );
163
+ },
164
+
165
+ /**
166
+ * Binds events
167
+ */
168
+ _bind: function()
169
+ {
170
+ var self = CartFlowsImport;
171
+
172
+ self.doc.on('click', '.cartflows-flow-import-blank', self._create_default_flow);
173
+ self.doc.on('click', '#wcf-remote-flow-importer .wcf-page-builder-links a', self._show_page_bulider_for_flow);
174
+ // self.doc.on('click', '#wcf-remote-flow-importer .filter-links a', self._filterFlowClick );
175
+ self.doc.on('click', '#wcf-remote-step-importer .wcf-page-builder-links a', self._show_page_bulider_for_step);
176
+ self.doc.on('click', '#wcf-remote-step-importer .step-type-filter-links a', self._filterStepClick );
177
+
178
+ self.doc.on('click' , '.cartflows-step-import-blank:not(.get-pro)', self._create_blank_step);
179
+ self.doc.on('click' , '#wcf-remote-step-importer .cartflows-step-import', self._import_step);
180
+ self.doc.on('click' , '#wcf-remote-flow-importer .cartflows-step-import', self._import_flow);
181
+
182
+ self.doc.on('click' , '.cartflows-preview-flow-step', self._preview_individual);
183
+
184
+ self.doc.on( 'add_template_to_page-fail', self._add_template_to_page_fail);
185
+
186
+ // self.doc.on( 'trigger-on-templates-load', self._on_templates_load );
187
+
188
+ $( 'body' ).on('thickbox:iframe:loaded', self._previewLoaded );
189
+
190
+ // Event's for API request.
191
+ // $( document ).on('keyup input', '#wcf-remote-flow-importer .wcf-flow-search-input', self._remote_flow_search );
192
+ $( document ).on('keyup input', '#wcf-remote-step-importer .wcf-flow-search-input', self._remote_step_search );
193
+
194
+ $( document ).on('click', '.actions a', self._previewResponsive );
195
+
196
+ $( document ).on( 'click', '.page-title-action', self._render_remote_flows );
197
+ $( document ).on( 'click', '.wcf-trigger-popup', self._render_remote_steps );
198
+
199
+ $( document ).on( 'click', '.wcf-templates-popup-overlay', self._close_template_popup );
200
+ $( document ).on( 'click', '.wcf-popup-close-wrap .close-icon', self._close_template_popup );
201
+
202
+ // $( document ).on( 'click', '.wcf-tab > li > a', self._switch_step_tab );
203
+ },
204
+
205
+ _switch_step_tab: function( event ) {
206
+
207
+ event.preventDefault();//stop browser to take action for clicked anchor
208
+
209
+ //get displaying tab content jQuery selector
210
+ var active_tab_selector = $('.wcf-tab > li.active > a').attr('href');
211
+
212
+ //find actived navigation and remove 'active' css
213
+ var actived_nav = $('.wcf-tab > li.active');
214
+ actived_nav.removeClass('active');
215
+
216
+ //add 'active' css into clicked navigation
217
+ $(this).parents('li').addClass('active');
218
+
219
+ //hide displaying tab content
220
+ $(active_tab_selector).removeClass('active');
221
+ $(active_tab_selector).addClass('hide');
222
+
223
+ //show target tab content
224
+ var target_tab_selector = $(this).attr('href');
225
+ $(target_tab_selector).removeClass('hide');
226
+ $(target_tab_selector).addClass('active');
227
+ },
228
+
229
+ /**
230
+ * Search Site.
231
+ *
232
+ * Prepare Before API Request:
233
+ * - Remove Inline Height
234
+ * - Added 'hide-me' class to hide the 'No more sites!' string.
235
+ * - Added 'loading-content' for body.
236
+ * - Show spinner.
237
+ */
238
+ _remote_step_search: function( event ) {
239
+
240
+ event.preventDefault();//stop browser to take action for clicked anchor
241
+
242
+ // Remove all filter classes.
243
+ $('.step-type-filter-links').find('a').removeClass('current');
244
+ $('.step-type-filter-links').find('li:first-child a').addClass('current');
245
+
246
+ window.clearTimeout(CartFlowsImport._ref);
247
+ CartFlowsImport._ref = window.setTimeout(function () {
248
+ CartFlowsImport._ref = null;
249
+ CartFlowsImport._showSteps();
250
+ }, 500);
251
+
252
+ },
253
+
254
+ /**
255
+ * Responsive On Click.
256
+ */
257
+ _previewResponsive: function( event ) {
258
+
259
+ event.preventDefault();
260
+
261
+ var icon = $(this).find('.dashicons');
262
+
263
+ var viewClass = icon.attr('data-view') || '';
264
+
265
+ $('#TB_window').removeClass( 'desktop tablet mobile' );
266
+ $('#TB_window').addClass( viewClass );
267
+
268
+ $('.actions .dashicons').removeClass('active');
269
+ icon.addClass('active');
270
+
271
+ $('#TB_iframeContent').removeClass();
272
+ $('#TB_iframeContent').addClass( viewClass );
273
+
274
+ },
275
+
276
+ /**
277
+ * On Filter Clicked
278
+ */
279
+ _filterStepClick: function( event ) {
280
+
281
+ event.preventDefault();
282
+
283
+ $(this).parents('.step-type-filter-links').find('a').removeClass('current');
284
+ $(this).addClass('current');
285
+
286
+ $step_type = $(this).data('slug');
287
+
288
+ if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
289
+ $( '.wcf-template-notice' ).show();
290
+
291
+ }else{
292
+ $( '.wcf-template-notice' ).hide();
293
+ }
294
+
295
+ CartFlowsImport._showSteps();
296
+
297
+ if( '' == CartFlowsImportVars._is_pro_active && ( 'upsell' == $step_type || 'downsell' == $step_type ) ) {
298
+ console.log( 'here' );
299
+ $('.cartflows-step-import-blank').text( 'Get Pro' );
300
+ $('.cartflows-step-import-blank').attr( 'href', CartFlowsImportVars.domain_url );
301
+ $('.cartflows-step-import-blank').attr( 'target', '_blank' );
302
+ $('.cartflows-step-import-blank').addClass('get-pro');
303
+ // // $('#wcf-remote-step-list').find('.cartflows-step-import-blank').attr( 'class', 'button button-primary' );
304
+ } else {
305
+ $('.cartflows-step-import-blank').text( 'Create' );
306
+ $('.cartflows-step-import-blank').removeClass( 'get-pro' );
307
+ $('.cartflows-step-import-blank').removeAttr( 'target' );
308
+ }
309
+
310
+ },
311
+
312
+ _showSteps: function() {
313
+
314
+ // Add Params for API request.
315
+ var api_params = {
316
+ licence_args : CartFlowsImportVars.licence_args,
317
+ per_page : 15,
318
+ _fields : CartFlowsImportVars.step_fields.toString(),
319
+ };
320
+
321
+ // Type.
322
+ var type = $('#wcf-remote-step-filters .step-type-filter-links').find('.current').data('group') || '';
323
+ var step_type = $('#wcf-remote-step-filters .step-type-filter-links').find('.current').data('slug') || '';
324
+ if( '' !== type && 'all' !== type ) {
325
+ api_params[ CartFlowsImportVars.step_type ] = type;
326
+ }
327
+
328
+ // API Request.
329
+ var api_post = {
330
+ slug : CartFlowsImportVars.step + '?' + decodeURIComponent( $.param( api_params ) ),
331
+ };
332
+
333
+ CartFlowsAPI._api_request( api_post, function( data ) {
334
+
335
+ data.current_step_type = step_type;
336
+
337
+ var template = wp.template('cartflows-steps-list');
338
+ // if( parseInt( data.items_count ) ) {
339
+ $('#wcf-remote-step-list').html( template( data ) );
340
+ $('#wcf-remote-step-list').prepend( wp.template('cartflows-create-blank-step') );
341
+ // } else {
342
+ // $('#wcf-remote-step-list').html( wp.template('cartflows-no-steps') );
343
+ // }
344
+ } );
345
+ },
346
+
347
+ _apiAddParam_per_page: function() {
348
+ CartFlowsImport._api_params['per_page'] = 15;
349
+ },
350
+
351
+ // Add Params for API request.
352
+ _apiAddParam_licence_args: function() {
353
+ CartFlowsImport._api_params['licence_args'] = CartFlowsImportVars.licence_args;
354
+ },
355
+
356
+ // Add 'search'
357
+ _apiAddParam_search: function() {
358
+ var search_val = $('.wcf-flow-search-input').val() || '';
359
+ if( '' !== search_val ) {
360
+ CartFlowsImport._api_params['search'] = search_val;
361
+ }
362
+ },
363
+
364
+ _close_popup: function() {
365
+ $('#cartflows-steps').fadeOut();
366
+ $('body').removeClass('cartflows-popup-is-open');
367
+ },
368
+
369
+ _post_auto_save: function() {
370
+ var post_title = $( '#title' );
371
+ var post_prompt_text = $( '#title-prompt-text' );
372
+ var self = CartFlowsImport;
373
+
374
+ if ( ! post_title.val() ) {
375
+ post_title.val( 'CartFlows #' + self.post_id );
376
+ if( post_prompt_text.length ) {
377
+ post_prompt_text.remove();
378
+ }
379
+ }
380
+
381
+ if ( wp.autosave ) {
382
+ wp.autosave.server.triggerSave();
383
+ }
384
+ },
385
+
386
+ _cache_remote_flows: function() {
387
+
388
+ // Add Params for API request.
389
+ var api_params = {
390
+ licence_args : CartFlowsImportVars.licence_args,
391
+ hide_empty : true,
392
+ _fields : CartFlowsImportVars.flow_type_fields.toString(),
393
+ };
394
+
395
+ // API Request.
396
+ var api_post = {
397
+ slug : CartFlowsImportVars.flow_type + '?'+decodeURIComponent( $.param( api_params ) ),
398
+ wrapper_class : 'flow-type-filter-links filter-links',
399
+ show_all : false,
400
+ };
401
+
402
+ CartFlowsAPI._api_request( api_post, function( data ) {
403
+ var template = wp.template('cartflows-term-filters');
404
+ $('#cartflows-flow-funnel-type').html(template( data ));
405
+ $('#cartflows-flow-funnel-type').find('li:first a').addClass('current');
406
+ } );
407
+
408
+ // Add Params for API request.
409
+ var api_params = {
410
+ licence_args : CartFlowsImportVars.licence_args,
411
+ _fields : CartFlowsImportVars.flow_fields.toString(),
412
+ };
413
+
414
+ // API Request.
415
+ var api_post = {
416
+ slug : CartFlowsImportVars.flow + '?' + decodeURIComponent( $.param( api_params ) ),
417
+ };
418
+
419
+ CartFlowsAPI._api_request( api_post, function( data ) {
420
+ var template = wp.template('cartflows-flows-list');
421
+ // if( parseInt( data.items_count ) ) {
422
+ $('#wcf-remote-flow-list').html( template( data ) );
423
+
424
+ $('#wcf-remote-flow-list').prepend( wp.template('cartflows-create-blank-flow') );
425
+
426
+
427
+
428
+ // } else {
429
+ // $('#wcf-remote-flow-list').html( wp.template('cartflows-no-flows') );
430
+ // }
431
+ } );
432
+
433
+ },
434
+
435
+ _render_remote_flows: function( event ) {
436
+
437
+ if( event ) {
438
+ event.preventDefault();
439
+ }
440
+
441
+ $("#wcf-remote-flow-importer").addClass('open');
442
+
443
+ $("html").addClass('wcf-popup-open');
444
+
445
+ $("#wcf-remote-flow-importer .spinner").css( 'visibility', 'hidden' );
446
+ },
447
+
448
+ _cache_remote_steps: function() {
449
+
450
+ // Disable the button until caching the data.
451
+ $( 'html' ).addClass('wcf-steps-loading');
452
+
453
+ // Add Params for API request.
454
+ var api_params = {
455
+ licence_args : CartFlowsImportVars.licence_args,
456
+ _fields : CartFlowsImportVars.step_type_fields.toString(),
457
+ };
458
+
459
+ // API Request.
460
+ var api_post = {
461
+ slug : CartFlowsImportVars.step_type + '?'+decodeURIComponent( $.param( api_params ) ),
462
+ wrapper_class : 'step-type-filter-links filter-links',
463
+ show_all : false,
464
+ };
465
+
466
+ CartFlowsAPI._api_request( api_post, function( data ) {
467
+
468
+ var step_type_response_data = data;
469
+ var step_types_count = data.items_count;
470
+
471
+ // Send other request for JS caching.
472
+ if( data.items ) {
473
+ for ( key in data.items ) {
474
+
475
+ // Add Params for API request.
476
+ var api_params = {
477
+ licence_args : CartFlowsImportVars.licence_args,
478
+ per_page : 15,
479
+ _fields : CartFlowsImportVars.step_fields.toString(),
480
+ };
481
+
482
+ api_params[ CartFlowsImportVars.step_type ] = data.items[ key ].id;
483
+
484
+ // API Request.
485
+ var api_post = {
486
+ slug : CartFlowsImportVars.step + '?' + decodeURIComponent( $.param( api_params ) ),
487
+ };
488
+
489
+ CartFlowsAPI._api_request( api_post, function( data ) {
490
+ var template = wp.template('cartflows-steps-list');
491
+ if( parseInt( data.items_count ) ) {
492
+ $('#wcf-remote-step-list').html( template( data ) );
493
+ $('#wcf-remote-step-list').prepend( wp.template('cartflows-create-blank-step') );
494
+ } else {
495
+ $('#wcf-remote-step-list').html( wp.template('cartflows-no-steps') );
496
+ }
497
+
498
+ step_types_count--;
499
+
500
+ if( 0 == step_types_count ) {
501
+
502
+ var template = wp.template('cartflows-term-filters');
503
+ $('#wcf-remote-step-filters').html(template( step_type_response_data ));
504
+ $('#wcf-remote-step-filters').find('li:first a').addClass('current');
505
+
506
+ $('#wcf-remote-content').find( '.spinner' ).remove();
507
+
508
+ CartFlowsImport._showSteps();
509
+
510
+ $( 'html' ).removeClass('wcf-steps-loading');
511
+ }
512
+ });
513
+ }
514
+ }
515
+ } );
516
+ },
517
+
518
+ _render_remote_steps: function( event ) {
519
+
520
+ if( event ) {
521
+ event.preventDefault();
522
+ }
523
+
524
+ $("#wcf-remote-step-importer").addClass('open');
525
+
526
+ $("html").addClass('wcf-popup-open');
527
+
528
+ if( $( 'html' ).hasClass('wcf-steps-loading') ) {
529
+ $('#wcf-remote-content').append( '<span class="spinner is-active"></span>' );
530
+ } else {
531
+ CartFlowsImport._showSteps();
532
+ }
533
+
534
+ },
535
+
536
+ _categorize_data: function( items ) {
537
+
538
+ var categorised_data = [];
539
+
540
+ $.each( items, function( index, value ) {
541
+
542
+ var step_type = value.step_type.slug;
543
+
544
+ if( 'undefined' == typeof categorised_data[step_type] ) {
545
+ categorised_data[step_type] = [];
546
+ }
547
+
548
+ categorised_data[step_type].push( value );
549
+
550
+ });
551
+
552
+ return categorised_data;
553
+
554
+ },
555
+
556
+ _close_template_popup: function( event ) {
557
+ if ( $( event.target ).hasClass('wcf-templates-popup-overlay')
558
+ || $( event.target ).hasClass('close-icon') ) {
559
+
560
+ // New step creation/importing is in process..
561
+ if( ! $( '.wcf-templates-popup-overlay' ).hasClass('request-process') ) {
562
+ $("html").removeClass('wcf-popup-open');
563
+ $(".wcf-templates-popup-overlay").removeClass( 'open' );
564
+ }
565
+ }
566
+ },
567
+
568
+ _ajax: function( data, callback, trigger ) {
569
+
570
+ var self = CartFlowsImport;
571
+
572
+ $.ajax({
573
+ url : ajaxurl,
574
+ type : 'POST',
575
+ data : data,
576
+ })
577
+ .done(function( request, status, XHR )
578
+ {
579
+ var data = {
580
+ request : request,
581
+ status : status,
582
+ XHR : XHR,
583
+ };
584
+
585
+ if( callback && typeof callback == "function"){
586
+ callback( data );
587
+ }
588
+
589
+ self.doc.trigger( trigger + '-done', [request, status, XHR] );
590
+ })
591
+ .fail(function( jqXHR, textStatus )
592
+ {
593
+ self.doc.trigger( trigger + '-fail', [jqXHR, textStatus] );
594
+ })
595
+ .always(function()
596
+ {
597
+ self.doc.trigger( trigger + '-always' );
598
+ });
599
+
600
+ },
601
+
602
+ _load_templates: function( args, trigger_name ) {
603
+ var self = CartFlowsImport;
604
+
605
+ if( $('body').hasClass('processing') ) {
606
+ return;
607
+ }
608
+
609
+ $('body').addClass('processing');
610
+
611
+ $.ajax({
612
+ url : ajaxurl,
613
+ type : 'POST',
614
+ data : {
615
+ action : 'cartflows_load_steps',
616
+ security: cartflows_admin.cf_load_steps_nonce,
617
+ args : args,
618
+ },
619
+ })
620
+ .done(function( items, status, XHR )
621
+ {
622
+ self.doc.trigger( trigger_name, [items] );
623
+ $('body').removeClass('processing');
624
+ })
625
+ .fail(function( jqXHR, textStatus )
626
+ {
627
+ })
628
+ .always(function()
629
+ {
630
+ });
631
+ },
632
+
633
+ _empty: function(data)
634
+ {
635
+ if(typeof(data) == 'number' || typeof(data) == 'boolean')
636
+ {
637
+ return false;
638
+ }
639
+ if(typeof(data) == 'undefined' || data === null)
640
+ {
641
+ return true;
642
+ }
643
+ if(typeof(data.length) != 'undefined')
644
+ {
645
+ return data.length == 0;
646
+ }
647
+ var count = 0;
648
+ for(var i in data)
649
+ {
650
+ if(data.hasOwnProperty(i))
651
+ {
652
+ count ++;
653
+ }
654
+ }
655
+ return count == 0;
656
+ },
657
+
658
+ _preview_individual: function()
659
+ {
660
+ var id = $(this).data('id') || '';
661
+ var href = $(this).data('href') || '';
662
+
663
+ // Active.
664
+ $('.cartflows-preview-flow-step').removeClass('active');
665
+ $('.cartflows-preview-flow-step[data-id="'+id+'"]').addClass('active');
666
+
667
+ $('#TB_window').addClass('cartflows-thickbox-loading');
668
+
669
+ $('#TB_iframeContent').removeAttr('onload');
670
+ $('#TB_iframeContent').removeAttr('src');
671
+ $('#TB_iframeContent').attr('src', href );
672
+ $('#TB_iframeContent').attr('onload', 'CartFlowsImport.showIframe()' )
673
+ },
674
+ showIframe: function() {
675
+ $("#TB_load").remove();
676
+ $("#TB_window").css({'visibility':'visible'});
677
+ // $("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' );
678
+ $('#TB_window').removeClass('cartflows-thickbox-loading');
679
+ },
680
+
681
+ /**
682
+ * Remove thickbox loading class
683
+ *
684
+ * @param object event Event object.
685
+ * @return void.
686
+ */
687
+ _previewLoaded: function( event ) {
688
+ event.preventDefault();
689
+ $('#TB_window').removeClass('cartflows-thickbox-loading');
690
+ },
691
+
692
+ _show_page_bulider_for_step: function( event ) {
693
+ event.preventDefault();
694
+ var id = $(this).data( 'id' ) || '';
695
+ var title = $(this).text() || '';
696
+
697
+ $(this).parents('.wcf-page-builder-links').find('a').removeClass('current');
698
+ $(this).addClass('current');
699
+
700
+ if( 'elementor' == id ) {
701
+ $('#wcf-upcoming-page-builders').hide().html('');
702
+ $('#wcf-remote-step-list').show();
703
+ } else {
704
+ $('#wcf-upcoming-page-builders').show().html('<p class="description">Templates for '+title+' are coming soon.</p>');
705
+ $('#wcf-upcoming-page-builders').show().prepend( wp.template('cartflows-create-blank-step') );
706
+ $('#wcf-remote-step-list').hide();
707
+ }
708
+ },
709
+
710
+ _show_page_bulider_for_flow: function( event ) {
711
+ event.preventDefault();
712
+ var id = $(this).data( 'id' ) || '';
713
+ var title = $(this).text() || '';
714
+
715
+ $(this).parents('.wcf-page-builder-links').find('a').removeClass('current');
716
+ $(this).addClass('current');
717
+
718
+ if( 'elementor' == id ) {
719
+ $('#wcf-upcoming-page-builders').hide().html('');
720
+ $('#wcf-remote-flow-list').show();
721
+ } else {
722
+ $('#wcf-upcoming-page-builders').show().html('<p class="description">Templates for '+title+' are coming soon.</p>');
723
+ $('#wcf-upcoming-page-builders').show().prepend( wp.template('cartflows-create-blank-flow') );
724
+ $('#wcf-remote-flow-list').hide();
725
+ }
726
+ },
727
+
728
+ _create_default_flow: function( event )
729
+ {
730
+ event.preventDefault();
731
+ var self = CartFlowsImport;
732
+ var btn = $( this );
733
+
734
+ if( btn.hasClass('updating-message') ) {
735
+ return;
736
+ }
737
+
738
+ $('#wcf-remote-flow-importer').addClass('request-process');
739
+
740
+ btn.addClass('updating-message').text( 'Creating Flow..' );
741
+ btn.parents('.template').addClass('importing');
742
+
743
+ var data = {
744
+ action : 'cartflows_default_flow',
745
+ security: cartflows_admin.cf_default_flow_nonce
746
+ };
747
+
748
+ // Import Template AJAX.
749
+ self._ajax( data, function( data ) {
750
+
751
+ if( data.request.success ) {
752
+
753
+
754
+ var flow_id = data.request.data; // $( 'form#post #post_ID').val();
755
+ // Created.
756
+ setTimeout(function() {
757
+ btn.removeClass('updating-message').text('Flow Created! Redirecting..');
758
+ window.location = CartFlowsImportVars.admin_url + 'post.php?post='+flow_id+'&action=edit';
759
+ }, 3000);
760
+
761
+ }
762
+ });
763
+
764
+ },
765
+
766
+ _activate_plugin: function( plugin_slug ) {
767
+
768
+ var self = CartFlowsImport;
769
+
770
+ var data = {
771
+ action : 'cartflows_activate_plugin',
772
+ plugin_slug : plugin_slug
773
+ };
774
+
775
+ self._ajax( data, function( data ) {
776
+ });
777
+ },
778
+
779
+ _process_import_flow: function( response )
780
+ {
781
+
782
+ var self = CartFlowsImport;
783
+ var btn = $( '#wcf-remote-flow-importer .cartflows-step-import.updating-message' );
784
+
785
+ var plugin_slug = '';
786
+ plugin = response.slug;
787
+
788
+ switch ( plugin ) {
789
+ case 'elementor':
790
+ plugin_slug = 'elementor/elementor.php';
791
+ break;
792
+ }
793
+
794
+ self._activate_plugin( plugin_slug );
795
+
796
+ btn.text( 'Creating Flow..' );
797
+
798
+ var flow_steps_string = btn.data('flow-steps') || '';
799
+ var flow_steps = ( '' !== flow_steps_string ) ? JSON.parse("[" + flow_steps_string + "]") : [];
800
+
801
+ var data = {
802
+ action : 'cartflows_create_flow',
803
+ security: cartflows_admin.cf_create_flow_nonce
804
+ };
805
+
806
+ // Import Template AJAX.
807
+ self._ajax( data, function( data ) {
808
+
809
+ if( data.request.success ) {
810
+
811
+ var flow_id = data.request.data; // $( 'form#post #post_ID').val();
812
+
813
+ if( flow_steps ) {
814
+
815
+ // Activate ALl Plugins.
816
+ CartFlowsAjaxQueue.stop();
817
+ CartFlowsAjaxQueue.run();
818
+
819
+ CartFlowsImport.all_steps = flow_steps.length;
820
+
821
+ // Importing.
822
+ btn.addClass('updating-message').text('Importing Step 1 of ' + CartFlowsImport.all_steps );
823
+
824
+ $.each(flow_steps, function(index, template_id) {
825
+
826
+ CartFlowsAjaxQueue.add({
827
+ url: CartFlowsImportVars.ajaxurl,
828
+ type: 'POST',
829
+ data: {
830
+ action : 'cartflows_import_flow_step',
831
+ flow_id : flow_id,
832
+ template_id : template_id,
833
+ security : cartflows_admin.cf_import_flow_step_nonce
834
+ },
835
+ success: function( result ) {
836
+ CartFlowsImport.remaining_steps = CartFlowsImport.remaining_steps + 1;
837
+
838
+ if( CartFlowsImport.remaining_steps === CartFlowsImport.all_steps ) {
839
+
840
+ // Imported.
841
+ btn.addClass('updating-message').text('Imported Step ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
842
+
843
+ setTimeout(function() {
844
+ btn.removeClass('updating-message').text('All Imported! Redirecting..');
845
+ window.location = CartFlowsImportVars.admin_url + 'post.php?post='+flow_id+'&action=edit';
846
+ }, 3000);
847
+
848
+ } else {
849
+ // Importing.
850
+ btn.addClass('updating-message').text('Importing Step ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
851
+ }
852
+ },
853
+ error: function( result ) {
854
+ CartFlowsImport.remaining_steps = CartFlowsImport.remaining_steps + 1;
855
+
856
+ template = btn.parents('.template.importing');
857
+ template.find('.preview')
858
+ .addClass('notice notice-warning')
859
+ .removeClass('preview')
860
+ .text( result.statusText );
861
+
862
+ if( CartFlowsImport.remaining_steps === CartFlowsImport.all_steps ) {
863
+
864
+ // Imported.
865
+ btn.addClass('updating-message').text('Failed ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
866
+
867
+ setTimeout(function() {
868
+ btn.removeClass('updating-message button-primary').addClass('disabled');
869
+ // location.reload();
870
+ }, 3000);
871
+
872
+ } else {
873
+ // Importing.
874
+ btn.addClass('updating-message').text('Failed ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
875
+ }
876
+ },
877
+ fail: function( result ) {
878
+
879
+ CartFlowsImport.remaining_steps = CartFlowsImport.remaining_steps + 1;
880
+
881
+ if( CartFlowsImport.remaining_steps === CartFlowsImport.all_steps ) {
882
+
883
+ // Imported.
884
+ btn.addClass('updating-message').text('Imported ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
885
+
886
+ setTimeout(function() {
887
+ btn.removeClass('updating-message').text('All Step Imported! Reloading..');
888
+ location.reload();
889
+ }, 3000);
890
+
891
+ } else {
892
+ // Importing.
893
+ btn.addClass('updating-message').text('Importing ' + CartFlowsImport.remaining_steps + ' of ' + CartFlowsImport.all_steps );
894
+ }
895
+ }
896
+ });
897
+ });
898
+ }
899
+ }
900
+ });
901
+ },
902
+
903
+ _import_flow: function()
904
+ {
905
+ var btn = $( this );
906
+ var plugins = btn.data('required');
907
+
908
+ if( btn.hasClass('updating-message') ) {
909
+ return;
910
+ }
911
+
912
+ $('#wcf-remote-flow-importer').addClass('request-process');
913
+
914
+ if( ! $.isEmptyObject( plugins ) ) {
915
+
916
+ btn.addClass('updating-message');
917
+ btn.parents('.template').addClass('importing');
918
+
919
+ if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
920
+ wp.updates.requestFilesystemCredentials( event );
921
+ }
922
+
923
+ $.each( plugins, function( plugin_slug, plugin ) {
924
+
925
+ var is_installed = plugin.install;
926
+ var is_active = plugin.active;
927
+
928
+ if( 'no' == is_installed ) {
929
+
930
+ btn.text( 'Installing ' + plugin_slug + '...' );
931
+
932
+ wp.updates.installPlugin({
933
+ slug: plugin_slug,
934
+ success: CartFlowsImport._process_import_flow,
935
+ error: CartFlowsImport._handle_error
936
+ });
937
+
938
+ } else {
939
+
940
+ if( 'no' == is_active ) {
941
+ btn.text( 'Activating ' + plugin_slug + '...' );
942
+ }
943
+
944
+ var data = {
945
+ slug: plugin_slug
946
+ };
947
+
948
+ CartFlowsImport._process_import_flow( data );
949
+ }
950
+ });
951
+ }
952
+ },
953
+
954
+ _handle_error: function( response )
955
+ {
956
+ var btn = $( '.cartflows-step-import.updating-message' );
957
+
958
+ btn.addClass('updating-message').text( response.errorMessage );
959
+ },
960
+
961
+ _create_blank_step: function( event )
962
+ {
963
+ event.preventDefault();
964
+
965
+ var btn = $(this),
966
+ self = CartFlowsImport,
967
+ flow_id = $("#post_ID").val(),
968
+ step_slug = $('.step-type-filter-links .current').data('slug') || '',
969
+ step_title = $('.step-type-filter-links .current').data('title') || '',
970
+ step_type = step_slug,
971
+ step_count = $('.wcf-step-wrap[data-term-slug="'+step_slug+'"]').length || 1;
972
+ step_custom_title = `${step_title} ${step_count+1}`;
973
+
974
+
975
+ if ( ! CartFlowsImportVars._is_pro_active && ( 'upsell' === step_type || 'downsell' === step_type )) {
976
+ return;
977
+ }
978
+
979
+ $('#wcf-remote-step-importer').addClass('request-process');
980
+
981
+ $('.cartflows-step-import').addClass('disabled');
982
+ btn.addClass('importing updating-message').text('Creating..');
983
+ btn.parents('.template').addClass('importing');
984
+
985
+ // Process Import Page.
986
+ if( $( 'body' ).hasClass( 'post-type-cartflows_flow' ) ) {
987
+ var data = {
988
+ action : 'cartflows_step_create_blank',
989
+ flow_id : flow_id,
990
+ step_type : step_type,
991
+ step_title : step_custom_title,
992
+ security : cartflows_admin.cf_step_create_blank_nonce
993
+ };
994
+
995
+ // Import Template AJAX.
996
+ self._ajax( data, function( data ) {
997
+
998
+ var self = CartFlowsImport;
999
+ var template = btn.parents('.template.importing');
1000
+
1001
+ if( data.request.success ) {
1002
+ btn.text('Created. Reloading..');
1003
+ setTimeout(function() {
1004
+ window.location.href = window.location.href + '&highlight-step-id=' + data.request.data;
1005
+ }, 3000);
1006
+
1007
+ } else {
1008
+ btn.removeClass('importing updating-message')
1009
+ .text('Creating Failed!');
1010
+
1011
+ template.find('.cartflows-step-preview').append( "<div class='preview'></div>" );
1012
+
1013
+ template.find('.preview')
1014
+ .addClass('notice notice-warning')
1015
+ .removeClass('preview')
1016
+ .text( data.request.data );
1017
+ }
1018
+ } );
1019
+ }
1020
+ },
1021
+
1022
+ _process_import_step: function( response ) {
1023
+
1024
+ var step_slug = $('.step-type-filter-links .current').data('slug') || '',
1025
+ step_title = $('.step-type-filter-links .current').data('title') || '',
1026
+ step_count = $('.wcf-step-wrap[data-term-slug="'+step_slug+'"]').length || 1;
1027
+ step_custom_title = `${step_title} ${step_count+1}`,
1028
+ btn = $('#wcf-remote-step-importer .cartflows-step-import.updating-message'),
1029
+ self = CartFlowsImport;
1030
+
1031
+ var plugin_slug = '';
1032
+ plugin = response.slug;
1033
+
1034
+ switch ( plugin ) {
1035
+ case 'elementor':
1036
+ plugin_slug = 'elementor/elementor.php';
1037
+ break;
1038
+ }
1039
+
1040
+ self._activate_plugin( plugin_slug );
1041
+
1042
+ var template_id = btn.data('template-id') || '';
1043
+ var flow_id = $("#post_ID").val();
1044
+ var step_type = step_slug;
1045
+ var self = CartFlowsImport;
1046
+
1047
+ $('.cartflows-step-import-blank').addClass('disabled');
1048
+ $('.cartflows-step-import').addClass('disabled');
1049
+ btn.addClass('importing updating-message').text('Importing..');
1050
+
1051
+ // Process Import Page.
1052
+ if( $( 'body' ).hasClass( 'post-type-cartflows_flow' ) )
1053
+ {
1054
+ var data = {
1055
+ action : 'cartflows_step_import',
1056
+ flow_id : flow_id,
1057
+ template_id : template_id,
1058
+ step_title : step_custom_title,
1059
+ step_type : step_type,
1060
+ security : cartflows_admin.cf_step_import_nonce
1061
+ };
1062
+
1063
+ // Import Template AJAX.
1064
+ self._ajax( data, function( data ) {
1065
+
1066
+ var self = CartFlowsImport;
1067
+ var template = btn.parents('.template.importing');
1068
+
1069
+ if( data.request.success ) {
1070
+ btn.text('Imported. Reloading..');
1071
+ setTimeout(function() {
1072
+ window.location.href = window.location.href + '&highlight-step-id=' + data.request.data;
1073
+ }, 3000);
1074
+
1075
+ } else {
1076
+
1077
+ $( '.wcf-templates-popup-overlay' ).removeClass('request-process');
1078
+
1079
+ btn.removeClass('importing updating-message')
1080
+ .text('Import Failed!');
1081
+
1082
+ template.find('.preview')
1083
+ .addClass('notice notice-warning')
1084
+ .removeClass('preview')
1085
+ .text( data.request.data );
1086
+ }
1087
+
1088
+ }, 'add_template_to_page' );
1089
+ }
1090
+ },
1091
+
1092
+ _import_step: function( event )
1093
+ {
1094
+ event.preventDefault();
1095
+ var btn = $(this);
1096
+ var plugins = btn.data('required');
1097
+
1098
+ if( btn.hasClass('updating-message') ) {
1099
+ return;
1100
+ }
1101
+
1102
+ btn.addClass('updating-message');
1103
+
1104
+ if( ! $.isEmptyObject( plugins ) ) {
1105
+
1106
+ if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
1107
+ wp.updates.requestFilesystemCredentials( event );
1108
+ }
1109
+
1110
+ $('#wcf-remote-step-importer').addClass('request-process');
1111
+
1112
+ $.each( plugins, function( plugin_slug, plugin ) {
1113
+
1114
+ var is_installed = plugin.install;
1115
+ var is_active = plugin.active;
1116
+
1117
+ btn.parents('.template').addClass('importing');
1118
+
1119
+ if( 'no' == is_installed ) {
1120
+
1121
+ btn.addClass('updating-message').text( 'Installing ' + plugin_slug + '...' );
1122
+
1123
+ wp.updates.installPlugin({
1124
+ slug: plugin_slug,
1125
+ success: CartFlowsImport._process_import_step,
1126
+ error: CartFlowsImport._handle_error
1127
+ });
1128
+
1129
+ } else {
1130
+
1131
+ if( 'no' == is_active ) {
1132
+ btn.addClass('updating-message').text( 'Activating ' + plugin_slug + '...' );
1133
+ }
1134
+
1135
+ var data = {
1136
+ slug: plugin_slug
1137
+ };
1138
+
1139
+ CartFlowsImport._process_import_step( data );
1140
+ }
1141
+ });
1142
+ }
1143
+
1144
+ },
1145
+
1146
+ _add_template_to_page_fail: function( event, jqXHR, textStatus ) {
1147
+ event.preventDefault();
1148
+ var self = CartFlowsImport,
1149
+ template = $('.wcf-flow-steps-data-wrap-importer .template.importing');
1150
+
1151
+ template.find('.cartflows-step-import')
1152
+ .removeClass('importing updating-message')
1153
+ .text('Import Failed!');
1154
+
1155
+
1156
+ template.find('.preview')
1157
+ .addClass('notice notice-warning')
1158
+ .removeClass('preview')
1159
+ .text( jqXHR.responseText );
1160
+ }
1161
+
1162
+ };
1163
+
1164
+ /**
1165
+ * Initialization
1166
+ */
1167
+ $(function(){
1168
+ CartFlowsImport.init();
1169
+ });
1170
+
1171
+ })(jQuery);
assets/js/rest-api.js ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ (function($){
3
+
4
+ var CartFlowsAPILocalCache = {
5
+
6
+ /**
7
+ * timeout for cache in millis
8
+ * @type {number}
9
+ */
10
+ timeout: 300000,
11
+
12
+ /**
13
+ * @type {{_: number, data: {}}}
14
+ **/
15
+ data: {},
16
+
17
+ /**
18
+ * Remove cache
19
+ *
20
+ * @param {[type]} url [description]
21
+ * @return {[type]} [description]
22
+ */
23
+ remove: function (url) {
24
+ delete CartFlowsAPILocalCache.data[url];
25
+ },
26
+
27
+ /**
28
+ * Check cache
29
+ *
30
+ * @param {[type]} url [description]
31
+ * @return {[type]} [description]
32
+ */
33
+ exist: function (url) {
34
+ return !! CartFlowsAPILocalCache.data[url] && ((new Date().getTime() - CartFlowsAPILocalCache.data[url]._) < CartFlowsAPILocalCache.timeout);
35
+ },
36
+
37
+ /**
38
+ * Get cache
39
+ *
40
+ * @param {[type]} url [description]
41
+ * @return {[type]} [description]
42
+ */
43
+ get: function (url) {
44
+ return CartFlowsAPILocalCache.data[url].data;
45
+ },
46
+
47
+ /**
48
+ * Set cache
49
+ *
50
+ * @param {[type]} url [description]
51
+ * @param {[type]} cachedData [description]
52
+ * @param {Function} callback [description]
53
+ */
54
+ set: function (url, cachedData, callback) {
55
+
56
+ CartFlowsAPILocalCache.remove(url);
57
+
58
+ CartFlowsAPILocalCache.data[url] = {
59
+ _ : new Date().getTime(),
60
+ data : cachedData
61
+ };
62
+
63
+ if( callback && typeof callback == "function"){
64
+ callback( cachedData );
65
+ }
66
+ }
67
+ };
68
+
69
+ $.ajaxPrefilter(function (options, originalOptions, jqXHR) {
70
+
71
+ if( 'brainstormforce' !== options.author ) {
72
+ return;
73
+ }
74
+
75
+ var complete = originalOptions.complete || $.noop,
76
+ url = originalOptions.url;
77
+
78
+ options.beforeSend = function () {
79
+
80
+ if (CartFlowsAPILocalCache.exist(url)) {
81
+
82
+ var data = CartFlowsAPILocalCache.get(url);
83
+
84
+ // Load from cache.
85
+ CartFlowsAPI._api_cached_request( data );
86
+ return false;
87
+ }
88
+ return true;
89
+ };
90
+ options.complete = function (XHR, status) {
91
+
92
+ var data = {
93
+ args : options.args,
94
+ // items : {},
95
+ items : JSON.parse( XHR.responseText ),
96
+ items_count : XHR.getResponseHeader('x-wp-total') || 0,
97
+ callback : options.callback,
98
+
99
+ // AJAX response.
100
+ status : status,
101
+ XHR : XHR,
102
+ };
103
+
104
+ CartFlowsAPILocalCache.set(url, data, complete);
105
+ };
106
+ });
107
+
108
+ CartFlowsAPI = {
109
+
110
+ /**
111
+ * Debugging.
112
+ *
113
+ * @param {mixed} data Mixed data.
114
+ */
115
+ _log: function( data, format ) {
116
+
117
+ if( CartFlowsImportVars.debug ) {
118
+
119
+ if( 'table' === format ) {
120
+ console.table( data );
121
+ } else {
122
+ var date = new Date();
123
+ var time = date.toLocaleTimeString();
124
+
125
+ if (typeof data == 'object') {
126
+ console.log('%c ' + JSON.stringify( data ) + ' ' + time, 'background: #ededed; color: #444');
127
+ } else {
128
+ console.log('%c ' + data + ' ' + time, 'background: #ededed; color: #444');
129
+ }
130
+ }
131
+ }
132
+ },
133
+
134
+ _api_url : CartFlowsImportVars.server_rest_url,
135
+
136
+ _api_cached_request: function( data ) {
137
+
138
+ CartFlowsAPI._log( CartFlowsAPILocalCache.data, 'table' );
139
+ CartFlowsAPI._log( 'Current time ' + new Date().getTime() );
140
+ CartFlowsAPI._log( 'Cache expired in ' + parseInt( CartFlowsAPILocalCache.timeout ) / 1000 + ' seconds.' );
141
+
142
+ if( undefined !== data.args.trigger && '' !== data.args.trigger ) {
143
+ $(document).trigger( data.args.trigger, [data] );
144
+ }
145
+
146
+ if( data.callback && typeof data.callback == "function"){
147
+ data.callback( data );
148
+ }
149
+ },
150
+
151
+ _api_request: function( args, callback ) {
152
+
153
+ // Set API Request Data.
154
+ var data = {
155
+ url : CartFlowsAPI._api_url + args.slug,
156
+ cache : false,
157
+ args : args,
158
+ callback : callback,
159
+
160
+ author : 'brainstormforce',
161
+ };
162
+
163
+ // Set headers.
164
+ data.headers = CartFlowsImportVars.headers;
165
+
166
+ $.ajax( data )
167
+ .done(function( items, status, XHR ) {
168
+
169
+ if( 'success' === status && XHR.getResponseHeader('x-wp-total') ) {
170
+
171
+ var data = {
172
+ args : args,
173
+ items : items,
174
+ items_count : XHR.getResponseHeader('x-wp-total') || 0,
175
+ callback : callback,
176
+
177
+ // AJAX response.
178
+ status : status,
179
+ XHR : XHR,
180
+ };
181
+
182
+ if( undefined !== args.trigger && '' !== args.trigger ) {
183
+ $(document).trigger( args.trigger, [data] );
184
+ }
185
+
186
+ } else {
187
+ $(document).trigger( 'cartflows-api-request-error' );
188
+ }
189
+
190
+ if( callback && typeof callback == "function"){
191
+ callback( data );
192
+ }
193
+ })
194
+ .fail(function( jqXHR, textStatus ) {
195
+
196
+ $(document).trigger( 'cartflows-api-request-fail' );
197
+
198
+ })
199
+ .always(function() {
200
+
201
+ $(document).trigger( 'cartflows-api-request-always' );
202
+
203
+ });
204
+
205
+ },
206
+
207
+ };
208
+
209
+ })(jQuery);
cartflows.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: CartFlows
4
+ * Plugin URI: https://cartflows.com/
5
+ * Description: Create beautiful checkout pages & sales flows for WooCommerce.
6
+ * Version: 1.0.4
7
+ * Author: CartFlows Inc
8
+ * Author URI: https://cartflows.com/
9
+ * Text Domain: cartflows
10
+ * WC requires at least: 3.0
11
+ * WC tested up to: 3.5.1
12
+ *
13
+ * @package CartFlows
14
+ */
15
+
16
+ /**
17
+ * Set constants.
18
+ */
19
+ define( 'CARTFLOWS_FILE', __FILE__ );
20
+
21
+ /**
22
+ * Extensions
23
+ */
24
+ require_once 'classes/class-cartflows-loader.php';
changelog.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Version 1.0.4 - Friday, 23rd November 2018
2
+ - Fix: Thank you page style meta option issue.
3
+
4
+ Version 1.0.3 - Friday, 23rd November 2018
5
+ - Improvement: Optimized flow and step import.
6
+ - Fix: Elementor page preview not working if landing page is set as homepage.
7
+ - Fix: Landing page issue when set as home-page. Used Home url instead of Site url.
8
+
9
+ Version 1.0.2 - Wednesday, 21st November 2018
10
+ - Fix: Address fields misalignment on checkout page.
11
+
12
+ Version 1.0.1 - Wednesday, 21st November 2018
13
+ - New: Checkout persistence remember data
14
+ - Fix: Link issue in Beaver Builder
15
+ - Fix: Unwanted fields on checkout page.
16
+
17
+ Version 1.0.0 - Monday, 19th November 2018
18
+ - Initial Release
classes/batch-process/class-cartflows-batch-process-elementor.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Image Background Process
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( class_exists( 'WP_Background_Process' ) ) :
10
+
11
+ /**
12
+ * Image Background Process
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class CartFlows_Batch_Process_Elementor extends WP_Background_Process {
17
+
18
+ /**
19
+ * Image Process
20
+ *
21
+ * @var string
22
+ */
23
+ protected $action = 'cartflows_elementor_image_process';
24
+
25
+ /**
26
+ * Task
27
+ *
28
+ * Override this method to perform any actions required on each
29
+ * queue item. Return the modified item for further processing
30
+ * in the next pass through. Or, return false to remove the
31
+ * item from the queue.
32
+ *
33
+ * @since 1.0.0
34
+ *
35
+ * @param integer $post_id Post Id.
36
+ * @return mixed
37
+ */
38
+ protected function task( $post_id ) {
39
+
40
+ $obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
41
+ $obj->import_single_template( $post_id );
42
+
43
+ return false;
44
+ }
45
+
46
+ /**
47
+ * Complete
48
+ *
49
+ * Override if applicable, but ensure that the below actions are
50
+ * performed, or, call parent::complete().
51
+ *
52
+ * @since 1.0.0
53
+ */
54
+ protected function complete() {
55
+
56
+ parent::complete();
57
+
58
+ do_action( 'cartflows_import_complete' );
59
+
60
+ }
61
+
62
+ }
63
+
64
+ endif;
classes/batch-process/class-cartflows-batch-process.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Batch Processing
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! class_exists( 'CartFlows_Batch_Process' ) ) :
10
+
11
+ /**
12
+ * CartFlows_Batch_Process
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class CartFlows_Batch_Process {
17
+
18
+ /**
19
+ * Instance
20
+ *
21
+ * @since 1.0.0
22
+ * @var object Class object.
23
+ * @access private
24
+ */
25
+ private static $instance;
26
+
27
+ /**
28
+ * Process All
29
+ *
30
+ * @since 1.0.0
31
+ * @var object Class object.
32
+ * @access public
33
+ */
34
+ public static $process_all;
35
+
36
+ /**
37
+ * Initiator
38
+ *
39
+ * @since 1.0.0
40
+ * @return object initialized object of class.
41
+ */
42
+ public static function get_instance() {
43
+ if ( ! isset( self::$instance ) ) {
44
+ self::$instance = new self;
45
+ }
46
+ return self::$instance;
47
+ }
48
+
49
+ /**
50
+ * Constructor
51
+ *
52
+ * @since 1.0.0
53
+ */
54
+ public function __construct() {
55
+
56
+ // If plugin - 'Elementor' not exist then return.
57
+ if ( class_exists( '\Elementor\Plugin' ) ) {
58
+
59
+ // Core Helpers - Image.
60
+ // @todo This file is required for Elementor.
61
+ // Once we implement our logic for updating elementor data then we'll delete this file.
62
+ require_once ABSPATH . 'wp-admin/includes/image.php';
63
+
64
+ // Core Helpers - Batch Processing.
65
+ require_once CARTFLOWS_DIR . 'classes/batch-process/helpers/class-wp-async-request.php';
66
+ require_once CARTFLOWS_DIR . 'classes/batch-process/helpers/class-wp-background-process.php';
67
+
68
+ // Page Builder.
69
+ require_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process-elementor.php';
70
+ require_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-importer-elementor.php';
71
+
72
+ self::$process_all = new CartFlows_Batch_Process_Elementor();
73
+
74
+ // Start image importing after site import complete.
75
+ add_action( 'cartflows_after_template_import', array( $this, 'start_batch_process' ) );
76
+ add_action( 'cartflows_import_complete', array( $this, 'complete_batch_import' ) );
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Batch Process Complete.
82
+ *
83
+ * @return void
84
+ */
85
+ public function complete_batch_import() {
86
+ wcf()->logger->import_log( '(✓) BATCH Process Complete!' );
87
+ }
88
+
89
+ /**
90
+ * Start Image Import
91
+ *
92
+ * @param integer $post_id Post Id.
93
+ *
94
+ * @return void
95
+ */
96
+ public function start_batch_process( $post_id = '' ) {
97
+
98
+ wcf()->logger->import_log( '(✓) BATCH Started!' );
99
+ wcf()->logger->import_log( '(✓) Step ID ' . $post_id );
100
+
101
+ // Add "elementor" in import [queue].
102
+ // @todo Remove required `allow_url_fopen` support.
103
+ if ( ini_get( 'allow_url_fopen' ) ) {
104
+ if ( is_plugin_active( 'elementor/elementor.php' ) ) {
105
+
106
+ self::$process_all->push_to_queue( $post_id );
107
+
108
+ // Dispatch Queue.
109
+ self::$process_all->save()->dispatch();
110
+
111
+ wcf()->logger->import_log( '(✓) Dispatch Request..' );
112
+ }
113
+ } else {
114
+ wcf()->logger->import_log( '(✕) Couldn\'t not import image due to allow_url_fopen() is disabled!' );
115
+ }
116
+ }
117
+
118
+ }
119
+
120
+ /**
121
+ * Kicking this off by calling 'get_instance()' method
122
+ */
123
+ CartFlows_Batch_Process::get_instance();
124
+
125
+ endif;
classes/batch-process/class-cartflows-importer-elementor.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor importer
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ namespace Elementor\TemplateLibrary;
9
+
10
+ use Elementor\Core\Base\Document;
11
+ use Elementor\DB;
12
+ use Elementor\Core\Settings\Page\Manager as PageSettingsManager;
13
+ use Elementor\Core\Settings\Manager as SettingsManager;
14
+ use Elementor\Core\Settings\Page\Model;
15
+ use Elementor\Editor;
16
+ use Elementor\Plugin;
17
+ use Elementor\Settings;
18
+ use Elementor\Utils;
19
+
20
+ if ( ! defined( 'ABSPATH' ) ) {
21
+ exit; // Exit if accessed directly.
22
+ }
23
+
24
+ /**
25
+ * Elementor template library local source.
26
+ *
27
+ * Elementor template library local source handler class is responsible for
28
+ * handling local Elementor templates saved by the user locally on his site.
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ class CartFlows_Importer_Elementor extends Source_Local {
33
+
34
+ /**
35
+ * Import single template
36
+ *
37
+ * @param int $post_id post ID.
38
+ */
39
+ public function import_single_template( $post_id ) {
40
+
41
+ $rest_content = get_post_meta( $post_id, '_elementor_data', true );
42
+
43
+ if ( empty( $rest_content ) ) {
44
+ $data = __( 'Invalid content.', 'cartflows' );
45
+ wcf()->logger->import_log( '(✕) ' . $data );
46
+ }
47
+
48
+ $rest_content = add_magic_quotes( $rest_content );
49
+ $content = json_decode( $rest_content, true );
50
+
51
+ if ( ! is_array( $content ) ) {
52
+ $data = __( 'Invalid content. Expected an array.', 'cartflows' );
53
+ wcf()->logger->import_log( '(✕) ' . $data );
54
+ wcf()->logger->import_log( $content );
55
+ } else {
56
+
57
+ wcf()->logger->import_log( '(✓) Processing Request..' );
58
+ wcf()->logger->import_log( '(✓) Data ' . json_encode( $content ) );
59
+
60
+ // Import the data.
61
+ $content = $this->process_export_import_content( $content, 'on_import' );
62
+
63
+ // Update content.
64
+ update_metadata( 'post', $post_id, '_elementor_data', $content );
65
+
66
+ wcf()->logger->import_log( '(✓) Process Complete' );
67
+ }
68
+
69
+ }
70
+ }
classes/batch-process/helpers/class-wp-async-request.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WP Async Request
4
+ *
5
+ * @see https://github.com/A5hleyRich/wp-background-processing/
6
+ * @package WP-Background-Processing
7
+ */
8
+
9
+ if ( ! class_exists( 'WP_Async_Request' ) ) {
10
+
11
+ /**
12
+ * Abstract WP_Async_Request class.
13
+ *
14
+ * @abstract
15
+ */
16
+ abstract class WP_Async_Request {
17
+
18
+ /**
19
+ * Prefix
20
+ *
21
+ * (default value: 'wp')
22
+ *
23
+ * @var string
24
+ * @access protected
25
+ */
26
+ protected $prefix = 'wp';
27
+
28
+ /**
29
+ * Action
30
+ *
31
+ * (default value: 'async_request')
32
+ *
33
+ * @var string
34
+ * @access protected
35
+ */
36
+ protected $action = 'async_request';
37
+
38
+ /**
39
+ * Identifier
40
+ *
41
+ * @var mixed
42
+ * @access protected
43
+ */
44
+ protected $identifier;
45
+
46
+ /**
47
+ * Data
48
+ *
49
+ * (default value: array())
50
+ *
51
+ * @var array
52
+ * @access protected
53
+ */
54
+ protected $data = array();
55
+
56
+ /**
57
+ * Initiate new async request
58
+ */
59
+ public function __construct() {
60
+ $this->identifier = $this->prefix . '_' . $this->action;
61
+
62
+ add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
63
+ add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
64
+ }
65
+
66
+ /**
67
+ * Set data used during the request
68
+ *
69
+ * @param array $data Data.
70
+ *
71
+ * @return $this
72
+ */
73
+ public function data( $data ) {
74
+ $this->data = $data;
75
+
76
+ return $this;
77
+ }
78
+
79
+ /**
80
+ * Dispatch the async request
81
+ *
82
+ * @return array|WP_Error
83
+ */
84
+ public function dispatch() {
85
+ $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
86
+ $args = $this->get_post_args();
87
+
88
+ return wp_remote_post( esc_url_raw( $url ), $args );
89
+ }
90
+
91
+ /**
92
+ * Get query args
93
+ *
94
+ * @return array
95
+ */
96
+ protected function get_query_args() {
97
+ if ( property_exists( $this, 'query_args' ) ) {
98
+ return $this->query_args;
99
+ }
100
+
101
+ return array(
102
+ 'action' => $this->identifier,
103
+ 'nonce' => wp_create_nonce( $this->identifier ),
104
+ );
105
+ }
106
+
107
+ /**
108
+ * Get query URL
109
+ *
110
+ * @return string
111
+ */
112
+ protected function get_query_url() {
113
+ if ( property_exists( $this, 'query_url' ) ) {
114
+ return $this->query_url;
115
+ }
116
+
117
+ return admin_url( 'admin-ajax.php' );
118
+ }
119
+
120
+ /**
121
+ * Get post args
122
+ *
123
+ * @return array
124
+ */
125
+ protected function get_post_args() {
126
+ if ( property_exists( $this, 'post_args' ) ) {
127
+ return $this->post_args;
128
+ }
129
+
130
+ return array(
131
+ 'timeout' => 0.01,
132
+ 'blocking' => false,
133
+ 'body' => $this->data,
134
+ 'cookies' => $_COOKIE,
135
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
136
+ );
137
+ }
138
+
139
+ /**
140
+ * Maybe handle
141
+ *
142
+ * Check for correct nonce and pass to handler.
143
+ */
144
+ public function maybe_handle() {
145
+ // Don't lock up other requests while processing.
146
+ session_write_close();
147
+
148
+ check_ajax_referer( $this->identifier, 'nonce' );
149
+
150
+ $this->handle();
151
+
152
+ wp_die();
153
+ }
154
+
155
+ /**
156
+ * Handle
157
+ *
158
+ * Override this method to perform any actions required
159
+ * during the async request.
160
+ */
161
+ abstract protected function handle();
162
+
163
+ }
164
+ }
classes/batch-process/helpers/class-wp-background-process.php ADDED
@@ -0,0 +1,515 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WP Background Process
4
+ *
5
+ * @see https://github.com/A5hleyRich/wp-background-processing/
6
+ * @package WP-Background-Processing
7
+ */
8
+
9
+ if ( ! class_exists( 'WP_Background_Process' ) ) {
10
+
11
+ /**
12
+ * Abstract WP_Background_Process class.
13
+ *
14
+ * @abstract
15
+ * @extends WP_Async_Request
16
+ */
17
+ abstract class WP_Background_Process extends WP_Async_Request {
18
+
19
+ /**
20
+ * Action
21
+ *
22
+ * (default value: 'background_process')
23
+ *
24
+ * @var string
25
+ * @access protected
26
+ */
27
+ protected $action = 'background_process';
28
+
29
+ /**
30
+ * Start time of current process.
31
+ *
32
+ * (default value: 0)
33
+ *
34
+ * @var int
35
+ * @access protected
36
+ */
37
+ protected $start_time = 0;
38
+
39
+ /**
40
+ * Cron_hook_identifier
41
+ *
42
+ * @var mixed
43
+ * @access protected
44
+ */
45
+ protected $cron_hook_identifier;
46
+
47
+ /**
48
+ * Cron_interval_identifier
49
+ *
50
+ * @var mixed
51
+ * @access protected
52
+ */
53
+ protected $cron_interval_identifier;
54
+
55
+ /**
56
+ * Initiate new background process
57
+ */
58
+ public function __construct() {
59
+ parent::__construct();
60
+
61
+ $this->cron_hook_identifier = $this->identifier . '_cron';
62
+ $this->cron_interval_identifier = $this->identifier . '_cron_interval';
63
+
64
+ add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) );
65
+ add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) );
66
+ }
67
+
68
+ /**
69
+ * Dispatch
70
+ *
71
+ * @return mixed dispatch event.
72
+ */
73
+ public function dispatch() {
74
+ // Schedule the cron healthcheck.
75
+ $this->schedule_event();
76
+
77
+ // Perform remote post.
78
+ return parent::dispatch();
79
+ }
80
+
81
+ /**
82
+ * Push to queue
83
+ *
84
+ * @param mixed $data Data.
85
+ *
86
+ * @return $this
87
+ */
88
+ public function push_to_queue( $data ) {
89
+ $this->data[] = $data;
90
+
91
+ return $this;
92
+ }
93
+
94
+ /**
95
+ * Save queue
96
+ *
97
+ * @return $this
98
+ */
99
+ public function save() {
100
+ $key = $this->generate_key();
101
+
102
+ if ( ! empty( $this->data ) ) {
103
+ update_site_option( $key, $this->data );
104
+ }
105
+
106
+ return $this;
107
+ }
108
+
109
+ /**
110
+ * Update queue
111
+ *
112
+ * @param string $key Key.
113
+ * @param array $data Data.
114
+ *
115
+ * @return $this
116
+ */
117
+ public function update( $key, $data ) {
118
+ if ( ! empty( $data ) ) {
119
+ update_site_option( $key, $data );
120
+ }
121
+
122
+ return $this;
123
+ }
124
+
125
+ /**
126
+ * Delete queue
127
+ *
128
+ * @param string $key Key.
129
+ *
130
+ * @return $this
131
+ */
132
+ public function delete( $key ) {
133
+ delete_site_option( $key );
134
+
135
+ return $this;
136
+ }
137
+
138
+ /**
139
+ * Generate key
140
+ *
141
+ * Generates a unique key based on microtime. Queue items are
142
+ * given a unique key so that they can be merged upon save.
143
+ *
144
+ * @param int $length Length.
145
+ *
146
+ * @return string
147
+ */
148
+ protected function generate_key( $length = 64 ) {
149
+ $unique = md5( microtime() . rand() );
150
+ $prepend = $this->identifier . '_batch_';
151
+
152
+ return substr( $prepend . $unique, 0, $length );
153
+ }
154
+
155
+ /**
156
+ * Maybe process queue
157
+ *
158
+ * Checks whether data exists within the queue and that
159
+ * the process is not already running.
160
+ */
161
+ public function maybe_handle() {
162
+ // Don't lock up other requests while processing.
163
+ session_write_close();
164
+
165
+ if ( $this->is_process_running() ) {
166
+ // Background process already running.
167
+ wp_die();
168
+ }
169
+
170
+ if ( $this->is_queue_empty() ) {
171
+ // No data to process.
172
+ wp_die();
173
+ }
174
+
175
+ check_ajax_referer( $this->identifier, 'nonce' );
176
+
177
+ $this->handle();
178
+
179
+ wp_die();
180
+ }
181
+
182
+ /**
183
+ * Is queue empty
184
+ *
185
+ * @return bool
186
+ */
187
+ protected function is_queue_empty() {
188
+ global $wpdb;
189
+
190
+ $table = $wpdb->options;
191
+ $column = 'option_name';
192
+
193
+ if ( is_multisite() ) {
194
+ $table = $wpdb->sitemeta;
195
+ $column = 'meta_key';
196
+ }
197
+
198
+ $key = $this->identifier . '_batch_%';
199
+
200
+ $count = $wpdb->get_var(
201
+ $wpdb->prepare(
202
+ "
203
+ SELECT COUNT(*)
204
+ FROM {$table}
205
+ WHERE {$column} LIKE %s
206
+ ",
207
+ $key
208
+ )
209
+ );
210
+
211
+ return ( $count > 0 ) ? false : true;
212
+ }
213
+
214
+ /**
215
+ * Is process running
216
+ *
217
+ * Check whether the current process is already running
218
+ * in a background process.
219
+ */
220
+ protected function is_process_running() {
221
+ if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
222
+ // Process already running.
223
+ return true;
224
+ }
225
+
226
+ return false;
227
+ }
228
+
229
+ /**
230
+ * Lock process
231
+ *
232
+ * Lock the process so that multiple instances can't run simultaneously.
233
+ * Override if applicable, but the duration should be greater than that
234
+ * defined in the time_exceeded() method.
235
+ */
236
+ protected function lock_process() {
237
+ $this->start_time = time(); // Set start time of current process.
238
+
239
+ $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute
240
+ $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
241
+
242
+ set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration );
243
+ }
244
+
245
+ /**
246
+ * Unlock process
247
+ *
248
+ * Unlock the process so that other instances can spawn.
249
+ *
250
+ * @return $this
251
+ */
252
+ protected function unlock_process() {
253
+ delete_site_transient( $this->identifier . '_process_lock' );
254
+
255
+ return $this;
256
+ }
257
+
258
+ /**
259
+ * Get batch
260
+ *
261
+ * @return stdClass Return the first batch from the queue
262
+ */
263
+ protected function get_batch() {
264
+ global $wpdb;
265
+
266
+ $table = $wpdb->options;
267
+ $column = 'option_name';
268
+ $key_column = 'option_id';
269
+ $value_column = 'option_value';
270
+
271
+ if ( is_multisite() ) {
272
+ $table = $wpdb->sitemeta;
273
+ $column = 'meta_key';
274
+ $key_column = 'meta_id';
275
+ $value_column = 'meta_value';
276
+ }
277
+
278
+ $key = $this->identifier . '_batch_%';
279
+
280
+ $query = $wpdb->get_row(
281
+ $wpdb->prepare(
282
+ "
283
+ SELECT *
284
+ FROM {$table}
285
+ WHERE {$column} LIKE %s
286
+ ORDER BY {$key_column} ASC
287
+ LIMIT 1
288
+ ",
289
+ $key
290
+ )
291
+ );
292
+
293
+ $batch = new stdClass();
294
+ $batch->key = $query->$column;
295
+ $batch->data = maybe_unserialize( $query->$value_column );
296
+
297
+ return $batch;
298
+ }
299
+
300
+ /**
301
+ * Handle
302
+ *
303
+ * Pass each queue item to the task handler, while remaining
304
+ * within server memory and time limit constraints.
305
+ */
306
+ protected function handle() {
307
+ $this->lock_process();
308
+
309
+ do {
310
+ $batch = $this->get_batch();
311
+
312
+ foreach ( $batch->data as $key => $value ) {
313
+ $task = $this->task( $value );
314
+
315
+ if ( false !== $task ) {
316
+ $batch->data[ $key ] = $task;
317
+ } else {
318
+ unset( $batch->data[ $key ] );
319
+ }
320
+
321
+ if ( $this->time_exceeded() || $this->memory_exceeded() ) {
322
+ // Batch limits reached.
323
+ break;
324
+ }
325
+ }
326
+
327
+ // Update or delete current batch.
328
+ if ( ! empty( $batch->data ) ) {
329
+ $this->update( $batch->key, $batch->data );
330
+ } else {
331
+ $this->delete( $batch->key );
332
+ }
333
+ } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() );
334
+
335
+ $this->unlock_process();
336
+
337
+ // Start next batch or complete process.
338
+ if ( ! $this->is_queue_empty() ) {
339
+ $this->dispatch();
340
+ } else {
341
+ $this->complete();
342
+ }
343
+
344
+ wp_die();
345
+ }
346
+
347
+ /**
348
+ * Memory exceeded
349
+ *
350
+ * Ensures the batch process never exceeds 90%
351
+ * of the maximum WordPress memory.
352
+ *
353
+ * @return bool
354
+ */
355
+ protected function memory_exceeded() {
356
+ $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
357
+ $current_memory = memory_get_usage( true );
358
+ $return = false;
359
+
360
+ if ( $current_memory >= $memory_limit ) {
361
+ $return = true;
362
+ }
363
+
364
+ return apply_filters( $this->identifier . '_memory_exceeded', $return );
365
+ }
366
+
367
+ /**
368
+ * Get memory limit
369
+ *
370
+ * @return int
371
+ */
372
+ protected function get_memory_limit() {
373
+ if ( function_exists( 'ini_get' ) ) {
374
+ $memory_limit = ini_get( 'memory_limit' );
375
+ } else {
376
+ // Sensible default.
377
+ $memory_limit = '128M';
378
+ }
379
+
380
+ if ( ! $memory_limit || -1 === $memory_limit ) {
381
+ // Unlimited, set to 32GB.
382
+ $memory_limit = '32000M';
383
+ }
384
+
385
+ return intval( $memory_limit ) * 1024 * 1024;
386
+ }
387
+
388
+ /**
389
+ * Time exceeded.
390
+ *
391
+ * Ensures the batch never exceeds a sensible time limit.
392
+ * A timeout limit of 30s is common on shared hosting.
393
+ *
394
+ * @return bool
395
+ */
396
+ protected function time_exceeded() {
397
+ $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds
398
+ $return = false;
399
+
400
+ if ( time() >= $finish ) {
401
+ $return = true;
402
+ }
403
+
404
+ return apply_filters( $this->identifier . '_time_exceeded', $return );
405
+ }
406
+
407
+ /**
408
+ * Complete.
409
+ *
410
+ * Override if applicable, but ensure that the below actions are
411
+ * performed, or, call parent::complete().
412
+ */
413
+ protected function complete() {
414
+ // Unschedule the cron healthcheck.
415
+ $this->clear_scheduled_event();
416
+ }
417
+
418
+ /**
419
+ * Schedule cron healthcheck
420
+ *
421
+ * @access public
422
+ * @param mixed $schedules Schedules.
423
+ * @return mixed
424
+ */
425
+ public function schedule_cron_healthcheck( $schedules ) {
426
+ $interval = apply_filters( $this->identifier . '_cron_interval', 5 );
427
+
428
+ if ( property_exists( $this, 'cron_interval' ) ) {
429
+ $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval_identifier );
430
+ }
431
+
432
+ // Adds every 5 minutes to the existing schedules.
433
+ $schedules[ $this->identifier . '_cron_interval' ] = array(
434
+ 'interval' => MINUTE_IN_SECONDS * $interval,
435
+ 'display' => sprintf( __( 'Every %d Minutes', 'cartflows' ), $interval ),
436
+ );
437
+
438
+ return $schedules;
439
+ }
440
+
441
+ /**
442
+ * Handle cron healthcheck
443
+ *
444
+ * Restart the background process if not already running
445
+ * and data exists in the queue.
446
+ */
447
+ public function handle_cron_healthcheck() {
448
+ if ( $this->is_process_running() ) {
449
+ // Background process already running.
450
+ exit;
451
+ }
452
+
453
+ if ( $this->is_queue_empty() ) {
454
+ // No data to process.
455
+ $this->clear_scheduled_event();
456
+ exit;
457
+ }
458
+
459
+ $this->handle();
460
+
461
+ exit;
462
+ }
463
+
464
+ /**
465
+ * Schedule event
466
+ */
467
+ protected function schedule_event() {
468
+ if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
469
+ wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier );
470
+ }
471
+ }
472
+
473
+ /**
474
+ * Clear scheduled event
475
+ */
476
+ protected function clear_scheduled_event() {
477
+ $timestamp = wp_next_scheduled( $this->cron_hook_identifier );
478
+
479
+ if ( $timestamp ) {
480
+ wp_unschedule_event( $timestamp, $this->cron_hook_identifier );
481
+ }
482
+ }
483
+
484
+ /**
485
+ * Cancel Process
486
+ *
487
+ * Stop processing queue items, clear cronjob and delete batch.
488
+ */
489
+ public function cancel_process() {
490
+ if ( ! $this->is_queue_empty() ) {
491
+ $batch = $this->get_batch();
492
+
493
+ $this->delete( $batch->key );
494
+
495
+ wp_clear_scheduled_hook( $this->cron_hook_identifier );
496
+ }
497
+
498
+ }
499
+
500
+ /**
501
+ * Task
502
+ *
503
+ * Override this method to perform any actions required on each
504
+ * queue item. Return the modified item for further processing
505
+ * in the next pass through. Or, return false to remove the
506
+ * item from the queue.
507
+ *
508
+ * @param mixed $item Queue item to iterate over.
509
+ *
510
+ * @return mixed
511
+ */
512
+ abstract protected function task( $item );
513
+
514
+ }
515
+ }
classes/class-cartflows-admin-fields.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CARTFLOWS Admin Fields.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ /**
9
+ * Class Cartflows_Admin_Fields.
10
+ */
11
+ class Cartflows_Admin_Fields {
12
+
13
+ /**
14
+ * Text Field
15
+ *
16
+ * @param array $args Args.
17
+ * @return string
18
+ */
19
+ static public function text_field( $args ) {
20
+
21
+ $id = $args['id'];
22
+ $name = $args['name'];
23
+ $title = $args['title'];
24
+ $value = $args['value'];
25
+
26
+ $output = '<div class="form-field">';
27
+ $output .= '<label for="' . $id . '">' . $title . '</label>';
28
+ $output .= '<input type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_attr( $value ) . '">';
29
+ $output .= '</div>';
30
+
31
+ return $output;
32
+ }
33
+
34
+ /**
35
+ * URL Field
36
+ *
37
+ * @param array $args Args.
38
+ * @return string
39
+ */
40
+ static public function url_field( $args ) {
41
+
42
+ $id = $args['id'];
43
+ $name = $args['name'];
44
+ $title = $args['title'];
45
+ $value = $args['value'];
46
+
47
+ $output = '<div class="form-field">';
48
+ $output .= '<label for="' . $id . '">' . $title . '</label>';
49
+ $output .= '<input type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_url( $value ) . '">';
50
+ $output .= '</div>';
51
+
52
+ return $output;
53
+ }
54
+
55
+ /**
56
+ * Checkbox Field
57
+ *
58
+ * @param array $args Args.
59
+ * @return string
60
+ */
61
+ static public function checkobox_field( $args ) {
62
+
63
+ $id = $args['id'];
64
+ $name = $args['name'];
65
+ $title = $args['title'];
66
+ $value = $args['value'];
67
+
68
+ $output = '<div class="form-field">';
69
+ $output .= '<label for="' . $id . '">';
70
+ $output .= '<input type="hidden" id="wcf_hid_' . $id . '" name="' . $name . '" value="disable">';
71
+ $output .= '<input type="checkbox" id="wcf_' . $id . '" name="' . $name . '" value="enable" ' . checked( $value, 'enable', false ) . '>';
72
+ $output .= $title;
73
+ $output .= '</label>';
74
+ $output .= '</div>';
75
+
76
+ return $output;
77
+ }
78
+
79
+ /**
80
+ * Checkout Selection Field
81
+ *
82
+ * @param array $args Args.
83
+ * @return string
84
+ */
85
+ static public function flow_checkout_selection_field( $args ) {
86
+
87
+ $id = $args['id'];
88
+ $name = $args['name'];
89
+ $title = $args['title'];
90
+ $value = $args['value'];
91
+
92
+ $checkout_steps = get_posts(
93
+ array(
94
+ 'posts_per_page' => -1,
95
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
96
+ 'post_status' => 'publish',
97
+ 'orderby' => 'ID',
98
+ 'order' => 'ASC',
99
+ 'tax_query' => array(
100
+ array(
101
+ 'taxonomy' => CARTFLOWS_TAXONOMY_STEP_TYPE,
102
+ 'field' => 'slug',
103
+ 'terms' => 'checkout',
104
+ ),
105
+ ),
106
+ )
107
+ );
108
+
109
+ $output = '<div class="form-field">';
110
+
111
+ $output .= '<div class="form-field-label">';
112
+ $output .= '<label for="' . $id . '">';
113
+ $output .= $title;
114
+ $output .= '</label>';
115
+ $output .= '</div>';
116
+
117
+ $output .= '<div class="form-field-data">';
118
+ $output .= '<select id="wcf_' . $id . '" name="' . $name . '">';
119
+
120
+ if ( ! empty( $checkout_steps ) ) {
121
+ $output .= '<option value="">' . __( 'Select', 'cartflows' ) . '</option>';
122
+ } else {
123
+
124
+ $output .= '<option value="">' . __( 'No Checkout Steps', 'cartflows' ) . '</option>';
125
+ }
126
+
127
+ foreach ( $checkout_steps as $index => $step_data ) {
128
+
129
+ $output .= '<option value="' . $step_data->ID . '" ' . selected( $value, $step_data->ID, false ) . '>' . $step_data->post_title . ' (#' . $step_data->ID . ') </option>';
130
+ }
131
+
132
+ $output .= '</select>';
133
+ $output .= '</div>';
134
+
135
+ if ( '' !== $value ) {
136
+ $output .= '<div class="form-field-actions">';
137
+ $output .= '<a href="' . get_edit_post_link( $value ) . '" target="_blank" class="" title="Edit">';
138
+ $output .= '<span class="dashicons dashicons-edit"></span>';
139
+ $output .= '<span class="">Edit</span>';
140
+ $output .= '</a>';
141
+ $output .= '<a href="' . get_permalink( $value ) . '" target="_blank" class="" title="View">';
142
+ $output .= '<span class="dashicons dashicons-visibility"></span>';
143
+ $output .= '<span class="">View</span>';
144
+ $output .= '</a>';
145
+ $output .= '</div>';
146
+ }
147
+
148
+ $output .= '<div class="form-field-desc">';
149
+ $output .= '<p>' . __( 'Be sure not to add any products in the Global checkout page you select above.', 'cartflows' ) . '</p>';
150
+ $output .= '</div>';
151
+
152
+ $output .= '</div>';
153
+
154
+ return $output;
155
+ }
156
+ }
classes/class-cartflows-admin.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Admin.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Class Cartflows_Admin.
10
+ */
11
+ class Cartflows_Admin {
12
+
13
+ /**
14
+ * Calls on initialization
15
+ *
16
+ * @since 1.0.0
17
+ */
18
+ public static function init() {
19
+
20
+ self::initialise_plugin();
21
+ self::init_hooks();
22
+ }
23
+
24
+ /**
25
+ * Init Hooks.
26
+ *
27
+ * @since 1.0.0
28
+ * @return void
29
+ */
30
+ static public function init_hooks() {
31
+
32
+ if ( ! is_admin() ) {
33
+ return;
34
+ }
35
+
36
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin-fields.php';
37
+
38
+ // Add CARTFLOWS menu option to admin.
39
+ add_action( 'network_admin_menu', __CLASS__ . '::menu' );
40
+ add_action( 'admin_menu', __CLASS__ . '::menu' );
41
+ add_action( 'admin_menu', __CLASS__ . '::submenu', 999 );
42
+
43
+ add_action( 'cartflows_render_admin_content', __CLASS__ . '::render_content' );
44
+
45
+ // Enqueue admin scripts.
46
+ if ( isset( $_REQUEST['page'] ) && CARTFLOWS_SETTINGS == $_REQUEST['page'] ) {
47
+
48
+ add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
49
+
50
+ self::save_settings();
51
+ }
52
+
53
+ /* Global Addmin Script */
54
+ add_action( 'admin_enqueue_scripts', __CLASS__ . '::global_admin_scripts', 20 );
55
+
56
+ add_action( 'admin_footer', __CLASS__ . '::global_admin_data', 9555 );
57
+ }
58
+
59
+ /**
60
+ * Initialises the Plugin Name.
61
+ *
62
+ * @since 1.0.0
63
+ * @return void
64
+ */
65
+ static public function initialise_plugin() {
66
+
67
+ $name = 'Cartflows';
68
+ $short_name = 'Cflows';
69
+
70
+ define( 'CARTFLOWS_PLUGIN_NAME', $name );
71
+ define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
72
+ }
73
+
74
+ /**
75
+ * Renders the admin settings menu.
76
+ *
77
+ * @since 1.0.0
78
+ * @return void
79
+ */
80
+ static public function menu() {
81
+
82
+ if ( ! current_user_can( 'manage_options' ) ) {
83
+ return;
84
+ }
85
+
86
+ add_menu_page(
87
+ 'CartFlows',
88
+ 'CartFlows',
89
+ 'manage_options',
90
+ CARTFLOWS_SLUG,
91
+ __CLASS__ . '::render',
92
+ 'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),
93
+ 39.7
94
+ );
95
+
96
+ }
97
+
98
+ /**
99
+ * Add submenu to admin menu.
100
+ *
101
+ * @since 1.0.0
102
+ */
103
+ static function submenu() {
104
+
105
+ $parent_slug = CARTFLOWS_SLUG;
106
+ $page_title = __( 'Settings', 'cartflows' );
107
+ $menu_title = __( 'Settings', 'cartflows' );
108
+ $capability = 'manage_options';
109
+ $menu_slug = 'cartflows_settings';
110
+ $callback = __CLASS__ . '::render';
111
+
112
+ add_submenu_page(
113
+ $parent_slug,
114
+ $page_title,
115
+ $menu_title,
116
+ $capability,
117
+ $menu_slug,
118
+ $callback
119
+ );
120
+ }
121
+
122
+ /**
123
+ * Renders the admin settings.
124
+ *
125
+ * @since 1.0.0
126
+ * @return void
127
+ */
128
+ static public function render() {
129
+ $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( $_GET['action'] ) : '';
130
+ $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
131
+ $action = str_replace( '_', '-', $action );
132
+
133
+ // Enable header icon filter below.
134
+ $header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
135
+
136
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
137
+ }
138
+
139
+ /**
140
+ * Renders the admin settings content.
141
+ *
142
+ * @since 1.0.0
143
+ * @return void
144
+ */
145
+ static public function render_content() {
146
+
147
+ $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( $_GET['action'] ) : '';
148
+ $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
149
+ $action = str_replace( '_', '-', $action );
150
+ $action = 'general';
151
+
152
+ $header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
153
+
154
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
155
+ }
156
+
157
+ /**
158
+ * Save Global Setting options.
159
+ *
160
+ * @since 1.0.0
161
+ */
162
+ static public function save_common_settings() {
163
+
164
+ if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( $_POST['cartflows-common-settings-nonce'], 'cartflows-common-settings' ) ) {
165
+
166
+ $url = $_SERVER['REQUEST_URI'];
167
+ $input_settings = array();
168
+ $new_settings = array();
169
+
170
+ if ( isset( $_POST['_cartflows_common'] ) ) {
171
+
172
+ $input_settings = $_POST['_cartflows_common'];
173
+
174
+ // Loop through the input and sanitize each of the values.
175
+ foreach ( $input_settings as $key => $val ) {
176
+
177
+ if ( is_array( $val ) ) {
178
+ foreach ( $val as $k => $v ) {
179
+ $new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
180
+ }
181
+ } else {
182
+ $new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
183
+ }
184
+ }
185
+ }
186
+
187
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, true );
188
+
189
+ $query = array(
190
+ 'message' => 'saved',
191
+ );
192
+
193
+ $redirect_to = add_query_arg( $query, $url );
194
+
195
+ wp_redirect( $redirect_to );
196
+ exit;
197
+ } // End if statement.
198
+ }
199
+
200
+ /**
201
+ * Check is cartflows admin.
202
+ *
203
+ * @since 1.0.0
204
+ * @return boolean
205
+ */
206
+ static public function is_global_admin() {
207
+
208
+ $current_screen = get_current_screen();
209
+
210
+ if (
211
+ is_object( $current_screen ) &&
212
+ isset( $current_screen->post_type ) &&
213
+ ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
214
+ CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
215
+ )
216
+ ) {
217
+ return true;
218
+ }
219
+ return false;
220
+ }
221
+
222
+ /**
223
+ * Check is flow admin.
224
+ *
225
+ * @since 1.0.0
226
+ * @return boolean
227
+ */
228
+ static public function is_flow_edit_admin() {
229
+
230
+ $current_screen = get_current_screen();
231
+
232
+ if (
233
+ is_object( $current_screen ) &&
234
+ isset( $current_screen->post_type ) &&
235
+ ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
236
+ isset( $current_screen->base ) &&
237
+ ( 'post' === $current_screen->base )
238
+ ) {
239
+ return true;
240
+ }
241
+ return false;
242
+ }
243
+
244
+ /**
245
+ * Global Admin Scripts.
246
+ *
247
+ * @since 1.0.0
248
+ */
249
+ static public function global_admin_scripts() {
250
+
251
+ $localize = array(
252
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
253
+ 'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
254
+ );
255
+
256
+ wp_localize_script( 'jquery', 'cartflows_admin', apply_filters( 'cartflows_admin_js_localize', $localize ) );
257
+
258
+ if ( self::is_global_admin() ) {
259
+
260
+ // Styles.
261
+ wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
262
+ wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
263
+
264
+ wp_enqueue_script(
265
+ 'wcf-global-admin',
266
+ CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
267
+ array( 'jquery' ),
268
+ CARTFLOWS_VER,
269
+ true
270
+ );
271
+
272
+ do_action( 'cartflows_global_admin_scripts' );
273
+ }
274
+ }
275
+
276
+ /**
277
+ * Global Admin Data.
278
+ *
279
+ * @since 1.0.0
280
+ */
281
+ static public function global_admin_data() {
282
+
283
+ $current_screen = get_current_screen();
284
+
285
+ if ( CARTFLOWS_FLOW_POST_TYPE !== $current_screen->post_type ) {
286
+ return;
287
+ }
288
+
289
+ ?>
290
+
291
+ <div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
292
+ <div class="wcf-templates-popup-content">
293
+ <div class="spinner"></div>
294
+ <div class="wcf-templates-wrap wcf-templates-wrap-flows">
295
+
296
+ <div id="wcf-remote-flow-actions" class="wcf-template-header">
297
+ <div class="wcf-template-logo-wrap">
298
+ <span class="wcf-cartflows-logo-img">
299
+ <span class="cartflows-icon"></span>
300
+ </span>
301
+ <span class="wcf-cartflows-title"><?php _e( 'Flows Library', 'cartflows' ); ?></span>
302
+ </div>
303
+ <div class="wcf-tab-wrapper">
304
+ <div id="wcf-page-builders">
305
+ <ul class="wcf-page-builder-links filter-links">
306
+ <li><a href="#" class="current" data-id="elementor"><?php _e( 'Elementor', 'cartflows' ); ?></a></li>
307
+ <li><a href="#" data-id="divi"><?php _e( 'Divi', 'cartflows' ); ?></a></li>
308
+ <li><a href="#" data-id="bb"><?php _e( 'Beaver Builder', 'cartflows' ); ?></a></li>
309
+ </ul>
310
+ </div>
311
+ <!-- <div id="wcf-remote-flow-filters">
312
+ <div id="cartflows-flow-funnel-type"></div>
313
+ </div> -->
314
+ </div>
315
+ <div class="wcf-popup-close-wrap">
316
+ <span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
317
+ </div>
318
+ </div>
319
+ <!-- <div class="wcf-search-form">
320
+ <label class="screen-reader-text" for="wp-filter-search-input"><?php _e( 'Search Sites', 'cartflows' ); ?> </label>
321
+ <input placeholder="<?php _e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
322
+ </div> -->
323
+
324
+ <div id="wcf-remote-content">
325
+ <div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"></div>
326
+ <div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
327
+ </div>
328
+ </div>
329
+ </div>
330
+ </div>
331
+
332
+ <?php
333
+ }
334
+
335
+ /**
336
+ * Enqueues the needed CSS/JS for the builder's admin settings page.
337
+ *
338
+ * @since 1.0.0
339
+ */
340
+ static public function styles_scripts() {
341
+
342
+ // Styles.
343
+ wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
344
+ wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
345
+
346
+ // Script.
347
+ wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER );
348
+
349
+ $localize = array(
350
+ 'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
351
+ );
352
+
353
+ wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
354
+ }
355
+
356
+ /**
357
+ * Save All admin settings here
358
+ */
359
+ static public function save_settings() {
360
+
361
+ // Only admins can save settings.
362
+ if ( ! current_user_can( 'manage_options' ) ) {
363
+ return;
364
+ }
365
+
366
+ self::save_common_settings();
367
+
368
+ // Let extensions hook into saving.
369
+ do_action( 'cartflows_admin_settings_save' );
370
+ }
371
+
372
+ /**
373
+ * Get and return page URL
374
+ *
375
+ * @param string $menu_slug Menu name.
376
+ * @since 1.0.0
377
+ * @return string page url
378
+ */
379
+ static public function get_page_url( $menu_slug ) {
380
+
381
+ $parent_page = self::$default_menu_position;
382
+
383
+ if ( strpos( $parent_page, '?' ) !== false ) {
384
+ $query_var = '&page=' . self::$plugin_slug;
385
+ } else {
386
+ $query_var = '?page=' . self::$plugin_slug;
387
+ }
388
+
389
+ $parent_page_url = admin_url( $parent_page . $query_var );
390
+
391
+ $url = $parent_page_url . '&action=' . $menu_slug;
392
+
393
+ return esc_url( $url );
394
+ }
395
+
396
+ }
397
+
398
+ Cartflows_Admin::init();
classes/class-cartflows-api.php ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows API
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! class_exists( 'CartFlows_API' ) ) :
10
+
11
+ /**
12
+ * CartFlows API
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class CartFlows_API {
17
+
18
+ /**
19
+ * Instance
20
+ *
21
+ * @access private
22
+ * @var object Class object.
23
+ * @since 1.0.0
24
+ */
25
+ private static $instance;
26
+
27
+ /**
28
+ * Initiator
29
+ *
30
+ * @since 1.0.0
31
+ * @return object initialized object of class.
32
+ */
33
+ public static function get_instance() {
34
+ if ( ! isset( self::$instance ) ) {
35
+ self::$instance = new self;
36
+ }
37
+ return self::$instance;
38
+ }
39
+
40
+ /**
41
+ * Constructor
42
+ *
43
+ * @since 1.0.0
44
+ */
45
+ public function __construct() {
46
+ }
47
+
48
+ /**
49
+ * Get site URL.
50
+ *
51
+ * @since 1.0.0
52
+ *
53
+ * @return string Site URL.
54
+ */
55
+ public static function get_site_url() {
56
+ return apply_filters( 'cartflows_templates_url', CARTFLOWS_TEMPLATES_URL );
57
+ }
58
+
59
+ /**
60
+ * Get Client Site Templates Rest API URL.
61
+ *
62
+ * @since 1.0.0
63
+ *
64
+ * @return string API site URL.
65
+ */
66
+ public static function get_step_endpoint_url() {
67
+ return self::get_site_url() . 'wp-json/wp/v2/' . CARTFLOWS_STEP_POST_TYPE . '/';
68
+ }
69
+
70
+ /**
71
+ * Get Client Site Category Rest API URL.
72
+ *
73
+ * @since 1.0.0
74
+ *
75
+ * @return string API site URL.
76
+ */
77
+ public static function get_category_endpoint_url() {
78
+ return self::get_site_url() . 'wp-json/wp/v2/' . CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER . '/';
79
+ }
80
+
81
+ /**
82
+ * Get API request URL.
83
+ *
84
+ * @since 1.0.0
85
+ *
86
+ * @param string $api_base base of api request.
87
+ * @return string API site URL.
88
+ */
89
+ public static function get_request_api_url( $api_base = '' ) {
90
+ return self::get_site_url() . 'wp-json/' . CARTFLOWS_STEP_POST_TYPE . '/v1/' . $api_base;
91
+ }
92
+
93
+ /**
94
+ * License Args.
95
+ *
96
+ * @return array License arguments.
97
+ */
98
+ public static function get_licence_args() {
99
+ return apply_filters( 'cartflows_licence_args', array() );
100
+ }
101
+
102
+ /**
103
+ * Get single demo.
104
+ *
105
+ * @since 1.0.0
106
+ *
107
+ * @param string $site_id Template ID of the site.
108
+ * @return array Template data.
109
+ */
110
+ public static function get_template( $site_id ) {
111
+ // @codingStandardsIgnoreStart
112
+ $request_params = array(
113
+ 'licence_args' => self::get_licence_args(),
114
+ );
115
+ // @codingStandardsIgnoreEnd
116
+
117
+ $url = add_query_arg( $request_params, self::get_step_endpoint_url() . $site_id );
118
+
119
+ $api_args = array(
120
+ 'timeout' => 15,
121
+ );
122
+
123
+ $response = self::remote_get( $url, $api_args );
124
+ if ( $response['success'] ) {
125
+ $template = $response['data'];
126
+ return array(
127
+ 'title' => ( isset( $template['title']->rendered ) ) ? $template['title']->rendered : '',
128
+ 'post_meta' => ( isset( $template['post_meta'] ) ) ? $template['post_meta'] : '',
129
+ 'data' => $template,
130
+ 'message' => $response['message'], // __( 'Your API Key is not valid. Please add valid API Key.', 'cartflows' ),
131
+ 'success' => $response['success'],
132
+ );
133
+ }
134
+
135
+ return array(
136
+ 'title' => '',
137
+ 'post_meta' => array(),
138
+ 'message' => $response['message'],
139
+ 'data' => $response['data'],
140
+ 'success' => $response['success'],
141
+ );
142
+ }
143
+
144
+ /**
145
+ * Get Cloud Templates
146
+ *
147
+ * @since 1.0.0
148
+ *
149
+ * @param array $args For selecting the demos (Search terms, pagination etc).
150
+ * @return array CartFlows list.
151
+ */
152
+ public static function get_templates( $args = array() ) {
153
+
154
+ $request_params = wp_parse_args(
155
+ $args,
156
+ array(
157
+ 'page' => '1',
158
+ 'per_page' => '15',
159
+ )
160
+ );
161
+
162
+ $url = add_query_arg( $request_params, self::get_step_endpoint_url() );
163
+
164
+ $api_args = array(
165
+ 'timeout' => 15,
166
+ );
167
+
168
+ $response = self::remote_get( $url, $api_args );
169
+
170
+ if ( $response['success'] ) {
171
+ $templates_data = $response['data'];
172
+ $templates = array();
173
+ foreach ( $templates_data as $key => $template ) {
174
+
175
+ if ( ! isset( $template->id ) ) {
176
+ continue;
177
+ }
178
+
179
+ $templates[ $key ]['id'] = isset( $template->id ) ? esc_attr( $template->id ) : '';
180
+ $templates[ $key ]['slug'] = isset( $template->slug ) ? esc_attr( $template->slug ) : '';
181
+ $templates[ $key ]['link'] = isset( $template->link ) ? esc_url( $template->link ) : '';
182
+ $templates[ $key ]['date'] = isset( $template->date ) ? esc_attr( $template->date ) : '';
183
+ $templates[ $key ]['title'] = isset( $template->title->rendered ) ? esc_attr( $template->title->rendered ) : '';
184
+ $templates[ $key ]['featured_image_url'] = isset( $template->featured_image_url ) ? esc_url( $template->featured_image_url ) : '';
185
+ $templates[ $key ]['content'] = isset( $template->content->rendered ) ? strip_tags( $template->content->rendered ) : '';
186
+ $templates[ $key ]['post_meta'] = isset( $template->post_meta ) ? $template->post_meta : '';
187
+ }
188
+
189
+ return array(
190
+ 'templates' => $templates,
191
+ 'templates_count' => $response['count'],
192
+ 'data' => $response,
193
+ );
194
+ }
195
+
196
+ return array(
197
+ 'templates' => array(),
198
+ 'templates_count' => 0,
199
+ 'data' => $response,
200
+ );
201
+
202
+ }
203
+
204
+ /**
205
+ * Get categories.
206
+ *
207
+ * @since 1.0.0
208
+ * @param array $args Arguments.
209
+ * @return array Category data.
210
+ */
211
+ public static function get_categories( $args = array() ) {
212
+
213
+ $request_params = apply_filters(
214
+ 'cartflows_categories_api_params',
215
+ wp_parse_args(
216
+ $args,
217
+ array(
218
+ 'page' => '1',
219
+ 'per_page' => '15',
220
+ )
221
+ )
222
+ );
223
+
224
+ $url = add_query_arg( $request_params, self::get_category_endpoint_url() );
225
+
226
+ $api_args = apply_filters(
227
+ 'cartflows_api_args',
228
+ array(
229
+ 'timeout' => 15,
230
+ )
231
+ );
232
+
233
+ $response = self::remote_get( $url, $api_args );
234
+
235
+ if ( $response['success'] ) {
236
+ $categories_data = $response['data'];
237
+ $categories = array();
238
+
239
+ foreach ( $categories_data as $key => $category ) {
240
+ if ( isset( $category->count ) && ! empty( $category->count ) ) {
241
+ $categories[] = array(
242
+ 'id' => isset( $category->id ) ? absint( $category->id ) : 0,
243
+ 'count' => isset( $category->count ) ? absint( $category->count ) : 0,
244
+ 'description' => isset( $category->description ) ? $category->description : '',
245
+ 'link' => isset( $category->link ) ? esc_url( $category->link ) : '',
246
+ 'name' => isset( $category->name ) ? $category->name : '',
247
+ 'slug' => isset( $category->slug ) ? sanitize_text_field( $category->slug ) : '',
248
+ 'taxonomy' => isset( $category->taxonomy ) ? $category->taxonomy : '',
249
+ 'parent' => isset( $category->parent ) ? $category->parent : '',
250
+ );
251
+ }
252
+ }
253
+
254
+ return array(
255
+ 'categories' => $categories,
256
+ 'categories_count' => $response['count'],
257
+ 'data' => $response,
258
+ );
259
+ }
260
+
261
+ return array(
262
+ 'categories' => array(),
263
+ 'categories_count' => 0,
264
+ 'data' => $response,
265
+ );
266
+ }
267
+
268
+ /**
269
+ * Remote GET API Request
270
+ *
271
+ * @since 1.0.0
272
+ *
273
+ * @param string $url Target server API URL.
274
+ * @param array $args Array of arguments for the API request.
275
+ * @return mixed Return the API request result.
276
+ */
277
+ public static function remote_get( $url = '', $args = array() ) {
278
+ $request = wp_remote_get( $url, $args );
279
+ return self::request( $request );
280
+ }
281
+
282
+ /**
283
+ * Remote POST API Request
284
+ *
285
+ * @since 1.0.0
286
+ *
287
+ * @param string $url Target server API URL.
288
+ * @param array $args Array of arguments for the API request.
289
+ * @return mixed Return the API request result.
290
+ */
291
+ public static function remote_post( $url = '', $args = array() ) {
292
+ $request = wp_remote_post( $url, $args );
293
+
294
+ return self::request( $request );
295
+ }
296
+
297
+ /**
298
+ * Site API Request
299
+ *
300
+ * @since 1.0.0
301
+ *
302
+ * @param boolean $api_base Target server API URL.
303
+ * @param array $args Array of arguments for the API request.
304
+ * @return mixed Return the API request result.
305
+ */
306
+ public static function site_request( $api_base = '', $args = array() ) {
307
+
308
+ $api_url = self::get_request_api_url( $api_base );
309
+
310
+ return self::remote_post( $api_url, $args );
311
+ }
312
+
313
+ /**
314
+ * API Request
315
+ *
316
+ * Handle the API request and return the result.
317
+ *
318
+ * @since 1.0.0
319
+ *
320
+ * @param array $request Array of arguments for the API request.
321
+ * @return mixed Return the API request result.
322
+ */
323
+ public static function request( $request ) {
324
+
325
+ // Is WP Error?
326
+ if ( is_wp_error( $request ) ) {
327
+ return array(
328
+ 'success' => false,
329
+ 'message' => $request->get_error_message(),
330
+ 'data' => $request,
331
+ 'count' => 0,
332
+ );
333
+ }
334
+
335
+ // Invalid response code.
336
+ if ( wp_remote_retrieve_response_code( $request ) != 200 ) {
337
+ return array(
338
+ 'success' => false,
339
+ 'message' => $request['response'],
340
+ 'data' => $request,
341
+ 'count' => 0,
342
+ );
343
+ }
344
+
345
+ // Get body data.
346
+ $body = wp_remote_retrieve_body( $request );
347
+
348
+ // Is WP Error?
349
+ if ( is_wp_error( $body ) ) {
350
+ return array(
351
+ 'success' => false,
352
+ 'message' => $body->get_error_message(),
353
+ 'data' => $request,
354
+ 'count' => 0,
355
+ );
356
+ }
357
+
358
+ // Decode body content.
359
+ $body_decoded = json_decode( $body );
360
+
361
+ return array(
362
+ 'success' => true,
363
+ 'message' => __( 'Request successfully processed!', 'cartflows' ),
364
+ 'data' => (array) $body_decoded,
365
+ 'count' => wp_remote_retrieve_header( $request, 'x-wp-total' ),
366
+ );
367
+ }
368
+
369
+ }
370
+
371
+ /**
372
+ * Initialize class object with 'get_instance()' method
373
+ */
374
+ CartFlows_API::get_instance();
375
+
376
+ endif;
classes/class-cartflows-bsf-updater.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Main builder BSF Updater class.
4
+ *
5
+ * @package cartflows
6
+ */
7
+
8
+ // Prohibit direct script loading.
9
+ defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
10
+ if ( ! class_exists( 'Cartflows_Bsf_Updater' ) ) {
11
+ /**
12
+ * Class Cartflows_Bsf_Updater.
13
+ */
14
+ class Cartflows_Bsf_Updater {
15
+
16
+ /**
17
+ * Constructor.
18
+ */
19
+ function __construct() {
20
+
21
+ $this->set_bsf_path();
22
+
23
+ add_filter( 'bsf_authors_list', array( $this, 'add_cartflows_author' ) );
24
+
25
+ add_action( 'init', array( $this, 'bsf_core_load' ), 999 );
26
+ add_filter( 'bsf_skip_braisntorm_menu', array( $this, 'skip_brainstorm_menu' ) );
27
+ add_filter( 'bsf_skip_author_registration', array( $this, 'skip_brainstorm_menu' ) );
28
+
29
+ // Disable license activation notice for cartflows.
30
+ add_filter( 'bsf_display_product_activation_notice_cartflows', '__return_false' );
31
+ }
32
+
33
+ /**
34
+ * Function Name: add_cartflows_author.
35
+ * Function Description: Adds cartflows author to get updates.
36
+ *
37
+ * @param array $authors authors array.
38
+ */
39
+ public function add_cartflows_author( $authors ) {
40
+
41
+ $authors[] = 'CartFlows Inc';
42
+ return $authors;
43
+ }
44
+
45
+ /**
46
+ * Function Name: set_bsf_path.
47
+ * Function Description: Set path.
48
+ */
49
+ public function set_bsf_path() {
50
+
51
+ $bsf_core_version_file = CARTFLOWS_DIR . 'admin/bsf-core/version.yml';
52
+
53
+ if ( is_file( $bsf_core_version_file ) ) {
54
+ global $bsf_core_version, $bsf_core_path;
55
+ $bsf_core_dir = CARTFLOWS_DIR . 'admin/bsf-core/';
56
+ $version = file_get_contents( $bsf_core_version_file );
57
+ if ( version_compare( $version, $bsf_core_version, '>' ) ) {
58
+ $bsf_core_version = $version;
59
+ $bsf_core_path = $bsf_core_dir;
60
+ }
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Function Name: bsf_core_load.
66
+ * Function Description: Load Core.
67
+ */
68
+ public function bsf_core_load() {
69
+ global $bsf_core_version, $bsf_core_path;
70
+
71
+ if ( is_file( realpath( $bsf_core_path . '/index.php' ) ) ) {
72
+ include_once realpath( $bsf_core_path . '/index.php' );
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Function Name: bsf_get_option.
78
+ * Function Description: Get options.
79
+ *
80
+ * @param Boolean $request true or false.
81
+ */
82
+ public function bsf_get_option( $request = false ) {
83
+ $bsf_options = get_option( 'bsf_options' );
84
+ if ( ! $request ) {
85
+ return $bsf_options;
86
+ } else {
87
+ return ( isset( $bsf_options[ $request ] ) ) ? $bsf_options[ $request ] : false;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Function Name: skip_brainstorm_menu.
93
+ * Function Description: skip_brainstorm_menu.
94
+ *
95
+ * @param string $products products.
96
+ */
97
+ public function skip_brainstorm_menu( $products ) {
98
+
99
+ $product_id = 'cartflows';
100
+ $products[] = $product_id;
101
+
102
+ return $products;
103
+ }
104
+
105
+ }
106
+ }
107
+
108
+ if ( class_exists( 'Cartflows_Bsf_Updater' ) ) {
109
+ new Cartflows_Bsf_Updater();
110
+ }
classes/class-cartflows-cloning.php ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cloning.
4
+ *
5
+ * @package cartflows-pro
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Cloning {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ add_filter( 'post_row_actions', array( $this, 'clone_link' ), 10, 2 );
39
+ add_action( 'admin_action_cartflows_clone_flow', array( $this, 'clone_flow' ) );
40
+ add_action( 'admin_action_cartflows_clone_step', array( $this, 'clone_step' ) );
41
+
42
+ }
43
+
44
+ /**
45
+ * Clone flow with steps and its meta.
46
+ */
47
+ function clone_flow() {
48
+
49
+ global $wpdb;
50
+
51
+ if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'cartflows_clone_flow' == $_REQUEST['action'] ) ) ) {
52
+ wp_die( 'No post to duplicate has been supplied!' );
53
+ }
54
+
55
+ /*
56
+ * Nonce verification
57
+ */
58
+ if ( ! isset( $_GET['flow_clone_nonce'] ) || ! wp_verify_nonce( $_GET['flow_clone_nonce'], basename( __FILE__ ) ) ) {
59
+ return;
60
+ }
61
+
62
+ /**
63
+ * Get the original post id
64
+ */
65
+ $post_id = ( isset( $_GET['post'] ) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
66
+
67
+ /**
68
+ * And all the original post data then
69
+ */
70
+ $post = get_post( $post_id );
71
+
72
+ /**
73
+ * Assign current user to be the new post author
74
+ */
75
+ $current_user = wp_get_current_user();
76
+ $new_post_author = $current_user->ID;
77
+
78
+ /**
79
+ * If post data exists, create the post duplicate
80
+ */
81
+ if ( isset( $post ) && null !== $post ) {
82
+
83
+ /**
84
+ * New post data array
85
+ */
86
+ $args = array(
87
+ 'comment_status' => $post->comment_status,
88
+ 'ping_status' => $post->ping_status,
89
+ 'post_author' => $new_post_author,
90
+ 'post_content' => $post->post_content,
91
+ 'post_excerpt' => $post->post_excerpt,
92
+ 'post_name' => $post->post_name,
93
+ 'post_parent' => $post->post_parent,
94
+ 'post_password' => $post->post_password,
95
+ 'post_status' => $post->post_status,
96
+ 'post_title' => $post->post_title . ' Clone',
97
+ 'post_type' => $post->post_type,
98
+ 'to_ping' => $post->to_ping,
99
+ 'menu_order' => $post->menu_order,
100
+ );
101
+
102
+ /**
103
+ * Insert the post
104
+ */
105
+ $new_flow_id = wp_insert_post( $args );
106
+
107
+ /**
108
+ * Get all current post terms ad set them to the new post
109
+ */
110
+ // returns array of taxonomy names for post type, ex array("category", "post_tag");.
111
+ $taxonomies = get_object_taxonomies( $post->post_type );
112
+
113
+ foreach ( $taxonomies as $taxonomy ) {
114
+
115
+ $post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) );
116
+
117
+ wp_set_object_terms( $new_flow_id, $post_terms, $taxonomy, false );
118
+ }
119
+
120
+ /**
121
+ * Duplicate all post meta just in two SQL queries
122
+ */
123
+ // @codingStandardsIgnoreStart
124
+ $post_meta_infos = $wpdb->get_results(
125
+ "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id"
126
+ );
127
+ // @codingStandardsIgnoreEnd
128
+
129
+ if ( ! empty( $post_meta_infos ) ) {
130
+
131
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
132
+
133
+ foreach ( $post_meta_infos as $meta_info ) {
134
+
135
+ $meta_key = $meta_info->meta_key;
136
+
137
+ if ( '_wp_old_slug' === $meta_key ) {
138
+ continue;
139
+ }
140
+
141
+ $meta_value = addslashes( $meta_info->meta_value );
142
+
143
+ $sql_query_sel[] = "SELECT $new_flow_id, '$meta_key', '$meta_value'";
144
+ }
145
+
146
+ $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
147
+
148
+ // @codingStandardsIgnoreStart
149
+ $wpdb->query( $sql_query );
150
+ // @codingStandardsIgnoreEnd
151
+ }
152
+
153
+ /* Steps Cloning */
154
+ $flow_steps = get_post_meta( $post_id, 'wcf-steps', true );
155
+ $new_flow_steps = array();
156
+
157
+ if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) {
158
+
159
+ foreach ( $flow_steps as $index => $step_data ) {
160
+
161
+ $step_id = $step_data['id'];
162
+ $step_type = get_post_meta( $step_id, 'wcf-step-type', true );
163
+
164
+ $step_object = get_post( $step_id );
165
+
166
+ /**
167
+ * New step post data array
168
+ */
169
+ $step_args = array(
170
+ 'comment_status' => $step_object->comment_status,
171
+ 'ping_status' => $step_object->ping_status,
172
+ 'post_author' => $new_post_author,
173
+ 'post_content' => $step_object->post_content,
174
+ 'post_excerpt' => $step_object->post_excerpt,
175
+ 'post_name' => $step_object->post_name,
176
+ 'post_parent' => $step_object->post_parent,
177
+ 'post_password' => $step_object->post_password,
178
+ 'post_status' => $step_object->post_status,
179
+ 'post_title' => $step_object->post_title,
180
+ 'post_type' => $step_object->post_type,
181
+ 'to_ping' => $step_object->to_ping,
182
+ 'menu_order' => $step_object->menu_order,
183
+ );
184
+
185
+ /**
186
+ * Insert the post
187
+ */
188
+ $new_step_id = wp_insert_post( $step_args );
189
+
190
+ /**
191
+ * Duplicate all step meta
192
+ */
193
+ // @codingStandardsIgnoreStart
194
+ $post_meta_infos = $wpdb->get_results(
195
+ "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$step_id"
196
+ );
197
+ // @codingStandardsIgnoreEnd
198
+
199
+ if ( ! empty( $post_meta_infos ) ) {
200
+
201
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
202
+
203
+ foreach ( $post_meta_infos as $meta_info ) {
204
+
205
+ $meta_key = $meta_info->meta_key;
206
+
207
+ if ( '_wp_old_slug' === $meta_key ) {
208
+ continue;
209
+ }
210
+
211
+ $meta_value = addslashes( $meta_info->meta_value );
212
+
213
+ $sql_query_sel[] = "SELECT $new_step_id, '$meta_key', '$meta_value'";
214
+ }
215
+
216
+ $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
217
+
218
+ // @codingStandardsIgnoreStart
219
+ $wpdb->query( $sql_query );
220
+ // @codingStandardsIgnoreEnd
221
+ }
222
+
223
+ // insert post meta.
224
+ update_post_meta( $new_step_id, 'wcf-flow-id', $new_flow_id );
225
+ update_post_meta( $new_step_id, 'wcf-step-type', $step_type );
226
+
227
+ wp_set_object_terms( $new_step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
228
+ wp_set_object_terms( $new_step_id, 'flow-' . $new_flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
229
+
230
+ /* Add New Flow Steps */
231
+ $new_flow_steps[] = array(
232
+ 'id' => $new_step_id,
233
+ 'title' => $step_object->post_title,
234
+ 'type' => $step_type,
235
+ );
236
+ }
237
+ }
238
+
239
+ /* Update New Flow Step Post Meta */
240
+ update_post_meta( $new_flow_id, 'wcf-steps', $new_flow_steps );
241
+
242
+ /* Clear Page Builder Cache */
243
+ $this->clear_cache();
244
+
245
+ /**
246
+ * Redirect to the new flow edit screen
247
+ */
248
+ wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_flow_id ) );
249
+ exit;
250
+ } else {
251
+ wp_die( 'Post creation failed, could not find original post: ' . $post_id );
252
+ }
253
+ }
254
+
255
+ /**
256
+ * Clone step with its meta.
257
+ */
258
+ function clone_step() {
259
+
260
+ global $wpdb;
261
+
262
+ if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'cartflows_clone_step' === $_REQUEST['action'] ) ) ) {
263
+ wp_die( 'No post to duplicate has been supplied!' );
264
+ }
265
+
266
+ /*
267
+ * Nonce verification
268
+ */
269
+ if ( ! isset( $_GET['step_clone_nonce'] ) || ! wp_verify_nonce( $_GET['step_clone_nonce'], 'step_clone' ) ) {
270
+ return;
271
+ }
272
+
273
+ /**
274
+ * Get the original post id
275
+ */
276
+ $post_id = ( isset( $_GET['post'] ) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
277
+
278
+ /**
279
+ * And all the original post data then
280
+ */
281
+ $post = get_post( $post_id );
282
+
283
+ /**
284
+ * Assign current user to be the new post author
285
+ */
286
+ $current_user = wp_get_current_user();
287
+ $new_post_author = $current_user->ID;
288
+
289
+ /**
290
+ * If post data exists, create the post duplicate
291
+ */
292
+ if ( isset( $post ) && null !== $post ) {
293
+
294
+ /**
295
+ * New post data array
296
+ */
297
+ $args = array(
298
+ 'comment_status' => $post->comment_status,
299
+ 'ping_status' => $post->ping_status,
300
+ 'post_author' => $new_post_author,
301
+ 'post_content' => $post->post_content,
302
+ 'post_excerpt' => $post->post_excerpt,
303
+ 'post_name' => $post->post_name,
304
+ 'post_parent' => $post->post_parent,
305
+ 'post_password' => $post->post_password,
306
+ 'post_status' => $post->post_status,
307
+ 'post_title' => $post->post_title . ' Clone',
308
+ 'post_type' => $post->post_type,
309
+ 'to_ping' => $post->to_ping,
310
+ 'menu_order' => $post->menu_order,
311
+ );
312
+
313
+ /**
314
+ * Insert the post
315
+ */
316
+ $new_step_id = wp_insert_post( $args );
317
+
318
+ /**
319
+ * Get all current post terms ad set them to the new post
320
+ */
321
+ // returns array of taxonomy names for post type, ex array("category", "post_tag");.
322
+ $taxonomies = get_object_taxonomies( $post->post_type );
323
+
324
+ foreach ( $taxonomies as $taxonomy ) {
325
+
326
+ $post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) );
327
+
328
+ wp_set_object_terms( $new_step_id, $post_terms, $taxonomy, false );
329
+ }
330
+
331
+ /**
332
+ * Duplicate all post meta just in two SQL queries
333
+ */
334
+ // @codingStandardsIgnoreStart
335
+ $post_meta_infos = $wpdb->get_results(
336
+ "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id"
337
+ );
338
+ // @codingStandardsIgnoreEnd
339
+
340
+ if ( ! empty( $post_meta_infos ) ) {
341
+
342
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
343
+
344
+ foreach ( $post_meta_infos as $meta_info ) {
345
+
346
+ $meta_key = $meta_info->meta_key;
347
+
348
+ if ( '_wp_old_slug' === $meta_key ) {
349
+ continue;
350
+ }
351
+
352
+ $meta_value = addslashes( $meta_info->meta_value );
353
+
354
+ $sql_query_sel[] = "SELECT $new_step_id, '$meta_key', '$meta_value'";
355
+ }
356
+
357
+ $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
358
+
359
+ // @codingStandardsIgnoreStart
360
+ $wpdb->query( $sql_query );
361
+ // @codingStandardsIgnoreEnd
362
+ }
363
+
364
+ $flow_id = get_post_meta( $post_id, 'wcf-flow-id', true );
365
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
366
+ $step_type = get_post_meta( $post_id, 'wcf-step-type', true );
367
+
368
+ if ( ! is_array( $flow_steps ) ) {
369
+ $flow_steps = array();
370
+ }
371
+
372
+ $flow_steps[] = array(
373
+ 'id' => $new_step_id,
374
+ 'title' => $post->post_title,
375
+ 'type' => $step_type,
376
+ );
377
+
378
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
379
+
380
+ /* Clear Page Builder Cache */
381
+ $this->clear_cache();
382
+
383
+ /**
384
+ * Redirect to the new flow edit screen
385
+ */
386
+ $redirect_url = add_query_arg( 'highlight-step-id', $new_step_id, get_edit_post_link( $flow_id, 'default' ) );
387
+
388
+ wp_redirect( $redirect_url );
389
+ exit;
390
+ } else {
391
+ wp_die( 'Post creation failed, could not find original post: ' . $post_id );
392
+ }
393
+ }
394
+
395
+ /**
396
+ * Add the clone link to action list for flows row actions
397
+ *
398
+ * @param array $actions Actions array.
399
+ * @param object $post Post object.
400
+ *
401
+ * @return array
402
+ */
403
+ function clone_link( $actions, $post ) {
404
+
405
+ if ( current_user_can( 'edit_posts' ) && isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
406
+
407
+ $actions['clone'] = '<a href="' . wp_nonce_url( 'admin.php?action=cartflows_clone_flow&post=' . $post->ID, basename( __FILE__ ), 'flow_clone_nonce' ) . '" title="' . __( 'Clone this flow', 'cartflows' ) . '" rel="permalink">' . __( 'Clone', 'cartflows' ) . '</a>';
408
+ }
409
+
410
+ return $actions;
411
+ }
412
+
413
+ /**
414
+ * Clear Page Builder Cache
415
+ */
416
+ function clear_cache() {
417
+
418
+ // Clear 'Elementor' file cache.
419
+ if ( class_exists( '\Elementor\Plugin' ) ) {
420
+ Elementor\Plugin::$instance->files_manager->clear_cache();
421
+ }
422
+ }
423
+
424
+ }
425
+
426
+ /**
427
+ * Kicking this off by calling 'get_instance()' method
428
+ */
429
+ Cartflows_Cloning::get_instance();
classes/class-cartflows-compatibility.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Page builder compatibility
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ if ( ! class_exists( 'Cartflows_Compatibility' ) ) {
9
+
10
+ /**
11
+ * Class for page builder compatibility
12
+ */
13
+ class Cartflows_Compatibility {
14
+
15
+ /**
16
+ * Member Variable
17
+ *
18
+ * @var object instance
19
+ */
20
+ private static $instance;
21
+
22
+ /**
23
+ * Initiator
24
+ */
25
+ public static function get_instance() {
26
+ if ( ! isset( self::$instance ) ) {
27
+ self::$instance = new self;
28
+ }
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Constructor
34
+ */
35
+ public function __construct() {
36
+
37
+ $this->load_files();
38
+
39
+ // Override post meta.
40
+ add_action( 'wp', array( $this, 'override_meta' ), 0 );
41
+ }
42
+
43
+ /**
44
+ * Load page builder compatibility files
45
+ */
46
+ public function load_files() {
47
+ if ( class_exists( '\Elementor\Plugin' ) ) {
48
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-elementor-compatibility.php';
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Check if elementor preview mode is on.
54
+ */
55
+ public function is_elementor_preview_mode() {
56
+
57
+ if ( class_exists( '\Elementor\Plugin' ) ) {
58
+
59
+ if ( \Elementor\Plugin::$instance->preview->is_preview_mode() ) {
60
+ return true;
61
+ }
62
+ }
63
+
64
+ return false;
65
+ }
66
+
67
+ /**
68
+ * Check if it is beaver builder preview mode
69
+ */
70
+ public function is_bb_preview_mode() {
71
+
72
+ if ( class_exists( 'FLBuilderModel' ) ) {
73
+ if ( FLBuilderModel::is_builder_active() ) {
74
+ return true;
75
+ } else {
76
+ return false;
77
+ }
78
+ }
79
+
80
+ return false;
81
+ }
82
+
83
+ /**
84
+ * Check for page builder preview mode.
85
+ */
86
+ public function is_page_builder_preview() {
87
+
88
+ if ( $this->is_elementor_preview_mode() || $this->is_bb_preview_mode() ) {
89
+ return true;
90
+ }
91
+
92
+ return false;
93
+ }
94
+
95
+ /**
96
+ * Check if divi builder enabled for post id.
97
+ *
98
+ * @param int $post_id post id.
99
+ */
100
+ public function is_divi_builder_enabled( $post_id ) {
101
+
102
+ if ( function_exists( 'et_pb_is_pagebuilder_used' ) && et_pb_is_pagebuilder_used( $post_id ) ) {
103
+ return true;
104
+ }
105
+
106
+ return false;
107
+ }
108
+
109
+ /**
110
+ * Check if divi builder enabled for post id.
111
+ */
112
+ function is_divi_enabled() {
113
+ $theme = wp_get_theme();
114
+
115
+ if ( 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) {
116
+ return true;
117
+ }
118
+
119
+ return false;
120
+ }
121
+
122
+ /**
123
+ * Check for thrive architect edit page.
124
+ *
125
+ * @param int $post_id post id.
126
+ */
127
+ public function is_thrive_edit_page( $post_id ) {
128
+
129
+ if ( true === $this->is_thrive_builder_page( $post_id ) ) {
130
+ return true;
131
+ } else {
132
+ return false;
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Check if the page being rendered is the main ID on the editor page.
138
+ *
139
+ * @since 1.0.0
140
+ * @param String $post_id Post ID which is to be rendered.
141
+ * @return boolean True if current if is being rendered is not being edited.
142
+ */
143
+ private function is_thrive_builder_page( $post_id ) {
144
+ $tve = ( isset( $_GET['tve'] ) && 'true' == $_GET['tve'] ) ? true : false;
145
+ $post = isset( $_GET['post'] ) ? sanitize_text_field( $_GET['post'] ) : false;
146
+
147
+ return ( true == $tve && $post_id !== $post );
148
+ }
149
+
150
+ /**
151
+ * Overwrite meta for page
152
+ */
153
+ public function override_meta() {
154
+
155
+ // don't override meta for `elementor_library` post type.
156
+ if ( 'elementor_library' == get_post_type() ) {
157
+ return;
158
+ }
159
+
160
+ if ( ! is_singular() ) {
161
+ return;
162
+ }
163
+
164
+ global $post;
165
+ $post_id = $post->ID;
166
+ $post_type = get_post_type();
167
+
168
+ if ( 'cartflows_step' == $post_type && ( $this->is_elementor_preview_mode()
169
+ || $this->is_bb_preview_mode() || $this->is_thrive_edit_page( $post_id )
170
+ || $this->is_divi_builder_enabled( $post_id ) ) ) {
171
+
172
+ if ( '' == $post->post_content ) {
173
+
174
+ $this->overwrite_template( $post_id );
175
+ }
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Assign cartflow canvas template to page.
181
+ *
182
+ * @param int $post_id post ID.
183
+ */
184
+ public function overwrite_template( $post_id ) {
185
+
186
+ $template = 'cartflows-canvas';
187
+ $key = '_wp_page_template';
188
+
189
+ $record_exists = get_post_meta( $post_id, $key, true );
190
+
191
+ if ( 'cartflows-canvas' == $record_exists ) {
192
+ return;
193
+ }
194
+
195
+ // As elementor doesn't allow update post meta using update_post_meta, run wpdb query to update post meta.
196
+ if ( class_exists( '\Elementor\Plugin' ) ) {
197
+
198
+ global $wpdb;
199
+
200
+ if ( '' == $record_exists || ! $record_exists ) {
201
+
202
+ $wpdb->insert(
203
+ $wpdb->prefix . 'postmeta',
204
+ array(
205
+ 'post_id' => $post_id,
206
+ 'meta_key' => $key,
207
+ 'meta_value' => $template, // ... and so on
208
+ )
209
+ );
210
+ } else {
211
+
212
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = %s WHERE meta_key = %s AND post_id = %s;", $template, $key, $post_id ) );
213
+ }
214
+ } else {
215
+
216
+ update_post_meta( $post_id, $key, $template );
217
+ }
218
+ }
219
+
220
+ }
221
+ }
222
+
223
+ Cartflows_Compatibility::get_instance();
224
+
classes/class-cartflows-default-meta.php ADDED
@@ -0,0 +1,552 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cartflow default options.
4
+ *
5
+ * @package Cartflows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Default_Meta {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Member Variable
25
+ *
26
+ * @var checkout_fields
27
+ */
28
+ private static $checkout_fields = null;
29
+
30
+ /**
31
+ * Member Variable
32
+ *
33
+ * @var checkout_fields
34
+ */
35
+ private static $thankyou_fields = null;
36
+
37
+
38
+ /**
39
+ * Member Variable
40
+ *
41
+ * @var flow_fields
42
+ */
43
+ private static $flow_fields = null;
44
+
45
+ /**
46
+ * Initiator
47
+ */
48
+ public static function get_instance() {
49
+ if ( ! isset( self::$instance ) ) {
50
+ self::$instance = new self;
51
+ }
52
+ return self::$instance;
53
+ }
54
+
55
+ /**
56
+ * Constructor
57
+ */
58
+ public function __construct() {
59
+
60
+ }
61
+
62
+ /**
63
+ * Checkout Default fields.
64
+ *
65
+ * @param int $post_id post id.
66
+ * @return array
67
+ */
68
+ function get_checkout_fields( $post_id ) {
69
+
70
+ if ( null === self::$checkout_fields ) {
71
+
72
+ self::$checkout_fields = array(
73
+ 'wcf-field-google-font-url' => array(
74
+ 'default' => '',
75
+ 'sanitize' => 'FILTER_DEFAULT',
76
+ ),
77
+ 'wcf-checkout-products' => array(
78
+ 'default' => array(),
79
+ 'sanitize' => 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS',
80
+ ),
81
+ 'wcf-checkout-layout' => array(
82
+ 'default' => 'two-column',
83
+ 'sanitize' => 'FILTER_DEFAULT',
84
+ ),
85
+ 'wcf-input-font-family' => array(
86
+ 'default' => '',
87
+ 'sanitize' => 'FILTER_DEFAULT',
88
+ ),
89
+ 'wcf-input-font-weight' => array(
90
+ 'default' => '',
91
+ 'sanitize' => 'FILTER_DEFAULT',
92
+ ),
93
+ 'wcf-heading-font-family' => array(
94
+ 'default' => '',
95
+ 'sanitize' => 'FILTER_DEFAULT',
96
+ ),
97
+ 'wcf-heading-font-weight' => array(
98
+ 'default' => '',
99
+ 'sanitize' => 'FILTER_DEFAULT',
100
+ ),
101
+ 'wcf-base-font-family' => array(
102
+ 'default' => '',
103
+ 'sanitize' => 'FILTER_DEFAULT',
104
+ ),
105
+ 'wcf-advance-options-fields' => array(
106
+ 'default' => '',
107
+ 'sanitize' => 'FILTER_DEFAULT',
108
+ ),
109
+ 'wcf-base-font-weight' => array(
110
+ 'default' => '',
111
+ 'sanitize' => 'FILTER_DEFAULT',
112
+ ),
113
+ 'wcf-button-font-family' => array(
114
+ 'default' => '',
115
+ 'sanitize' => 'FILTER_DEFAULT',
116
+ ),
117
+ 'wcf-button-font-weight' => array(
118
+ 'default' => '',
119
+ 'sanitize' => 'FILTER_DEFAULT',
120
+ ),
121
+ 'wcf-primary-color' => array(
122
+ 'default' => '',
123
+ 'sanitize' => 'FILTER_DEFAULT',
124
+ ),
125
+ 'wcf-heading-color' => array(
126
+ 'default' => '',
127
+ 'sanitize' => 'FILTER_DEFAULT',
128
+ ),
129
+ 'wcf-section-bg-color' => array(
130
+ 'default' => '',
131
+ 'sanitize' => 'FILTER_DEFAULT',
132
+ ),
133
+ 'wcf-hl-bg-color' => array(
134
+ 'default' => '',
135
+ 'sanitize' => 'FILTER_DEFAULT',
136
+ ),
137
+ 'wcf-field-tb-padding' => array(
138
+ 'default' => '',
139
+ 'sanitize' => 'FILTER_DEFAULT',
140
+ ),
141
+ 'wcf-field-lr-padding' => array(
142
+ 'default' => '',
143
+ 'sanitize' => 'FILTER_DEFAULT',
144
+ ),
145
+ 'wcf-fields-skins' => array(
146
+ 'default' => '',
147
+ 'sanitize' => 'FILTER_DEFAULT',
148
+ ),
149
+ 'wcf-input-field-size' => array(
150
+ 'default' => '33px',
151
+ 'sanitize' => 'FILTER_DEFAULT',
152
+ ),
153
+ 'wcf-field-color' => array(
154
+ 'default' => '',
155
+ 'sanitize' => 'FILTER_DEFAULT',
156
+ ),
157
+ 'wcf-field-bg-color' => array(
158
+ 'default' => '',
159
+ 'sanitize' => 'FILTER_DEFAULT',
160
+ ),
161
+ 'wcf-field-border-color' => array(
162
+ 'default' => '',
163
+ 'sanitize' => 'FILTER_DEFAULT',
164
+ ),
165
+ 'wcf-box-border-color' => array(
166
+ 'default' => '',
167
+ 'sanitize' => 'FILTER_DEFAULT',
168
+ ),
169
+ 'wcf-field-label-color' => array(
170
+ 'default' => '',
171
+ 'sanitize' => 'FILTER_DEFAULT',
172
+ ),
173
+ 'wcf-submit-tb-padding' => array(
174
+ 'default' => '',
175
+ 'sanitize' => 'FILTER_DEFAULT',
176
+ ),
177
+ 'wcf-submit-lr-padding' => array(
178
+ 'default' => '',
179
+ 'sanitize' => 'FILTER_DEFAULT',
180
+ ),
181
+ 'wcf-input-button-size' => array(
182
+ 'default' => '33px',
183
+ 'sanitize' => 'FILTER_DEFAULT',
184
+ ),
185
+ 'wcf-submit-color' => array(
186
+ 'default' => '',
187
+ 'sanitize' => 'FILTER_DEFAULT',
188
+ ),
189
+ 'wcf-submit-hover-color' => array(
190
+ 'default' => '',
191
+ 'sanitize' => 'FILTER_DEFAULT',
192
+ ),
193
+ 'wcf-submit-bg-color' => array(
194
+ 'default' => '',
195
+ 'sanitize' => 'FILTER_DEFAULT',
196
+ ),
197
+ 'wcf-submit-bg-hover-color' => array(
198
+ 'default' => '',
199
+ 'sanitize' => 'FILTER_DEFAULT',
200
+ ),
201
+ 'wcf-submit-border-color' => array(
202
+ 'default' => '',
203
+ 'sanitize' => 'FILTER_DEFAULT',
204
+ ),
205
+ 'wcf-submit-border-hover-color' => array(
206
+ 'default' => '',
207
+ 'sanitize' => 'FILTER_DEFAULT',
208
+ ),
209
+ 'wcf-active-tab' => array(
210
+ 'default' => '',
211
+ 'sanitize' => 'FILTER_DEFAULT',
212
+ ),
213
+ 'wcf-header-logo-image' => array(
214
+ 'default' => '',
215
+ 'sanitize' => 'FILTER_DEFAULT',
216
+ ),
217
+ 'wcf-header-logo-width' => array(
218
+ 'default' => '',
219
+ 'sanitize' => 'FILTER_DEFAULT',
220
+ ),
221
+ );
222
+
223
+ self::$checkout_fields = apply_filters( 'cartflows_checkout_meta_options', self::$checkout_fields, $post_id );
224
+ }
225
+
226
+ return self::$checkout_fields;
227
+ }
228
+
229
+ /**
230
+ * Save Checkout Meta fields.
231
+ *
232
+ * @param int $post_id post id.
233
+ * @return void
234
+ */
235
+ function save_checkout_fields( $post_id ) {
236
+
237
+ $post_meta = $this->get_checkout_fields( $post_id );
238
+
239
+ $this->save_meta_fields( $post_id, $post_meta );
240
+ }
241
+
242
+ /**
243
+ * Flow Default fields.
244
+ *
245
+ * @param int $post_id post id.
246
+ * @return array
247
+ */
248
+ function get_flow_fields( $post_id ) {
249
+
250
+ if ( null === self::$flow_fields ) {
251
+
252
+ self::$flow_fields = array(
253
+ 'wcf-steps' => array(
254
+ 'default' => array(),
255
+ 'sanitize' => 'FILTER_DEFAULT',
256
+ ),
257
+
258
+ 'wcf-testing' => array(
259
+ 'default' => 'yes',
260
+ 'sanitize' => 'FILTER_DEFAULT',
261
+ ),
262
+ );
263
+ }
264
+
265
+ return apply_filters( 'cartflows_flow_meta_options', self::$flow_fields );
266
+ }
267
+
268
+ /**
269
+ * Save Flow Meta fields.
270
+ *
271
+ * @param int $post_id post id.
272
+ * @return void
273
+ */
274
+ function save_flow_fields( $post_id ) {
275
+
276
+ $post_meta = $this->get_flow_fields( $post_id );
277
+
278
+ if ( isset( $post_meta['wcf-steps'] ) ) {
279
+ unset( $post_meta['wcf-steps'] );
280
+ }
281
+
282
+ $this->save_meta_fields( $post_id, $post_meta );
283
+ }
284
+
285
+ /**
286
+ * Save Meta fields - Common Function.
287
+ *
288
+ * @param int $post_id post id.
289
+ * @param array $post_meta options to store.
290
+ * @return void
291
+ */
292
+ function save_meta_fields( $post_id, $post_meta ) {
293
+
294
+ if ( ! ( $post_id && is_array( $post_meta ) ) ) {
295
+
296
+ return;
297
+ }
298
+
299
+ foreach ( $post_meta as $key => $data ) {
300
+
301
+ $meta_value = false;
302
+
303
+ // Sanitize values.
304
+ $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT';
305
+
306
+ switch ( $sanitize_filter ) {
307
+
308
+ case 'FILTER_SANITIZE_STRING':
309
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
310
+ break;
311
+
312
+ case 'FILTER_SANITIZE_URL':
313
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL );
314
+ break;
315
+
316
+ case 'FILTER_SANITIZE_NUMBER_INT':
317
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT );
318
+ break;
319
+
320
+ case 'FILTER_CARTFLOWS_ARRAY':
321
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) {
322
+ $meta_value = array_map( 'sanitize_text_field', $_POST[ $key ] );
323
+ }
324
+ break;
325
+
326
+ case 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS':
327
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) {
328
+
329
+ $i = 0;
330
+ $q = 0;
331
+
332
+ foreach ( $_POST[ $key ] as $p_index => $p_data ) {
333
+
334
+ foreach ( $p_data as $i_key => $i_value ) {
335
+
336
+ if ( is_array( $i_value ) ) {
337
+
338
+ foreach ( $i_value as $q_key => $q_value ) {
339
+
340
+ $meta_value[ $i ][ $i_key ][ $q ] = array_map( 'sanitize_text_field', $q_value );
341
+
342
+ $q++;
343
+ }
344
+ } else {
345
+ $meta_value[ $i ][ $i_key ] = sanitize_text_field( $i_value );
346
+ }
347
+ }
348
+
349
+ $i++;
350
+ }
351
+ }
352
+ break;
353
+
354
+ default:
355
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
356
+ break;
357
+ }
358
+
359
+ if ( false !== $meta_value ) {
360
+ update_post_meta( $post_id, $key, $meta_value );
361
+ } else {
362
+ delete_post_meta( $post_id, $key );
363
+ }
364
+ }
365
+ }
366
+
367
+ /**
368
+ * Get checkout meta.
369
+ *
370
+ * @param int $post_id post id.
371
+ * @param string $key options key.
372
+ * @param mix $default options default value.
373
+ * @return string
374
+ */
375
+ function get_flow_meta_value( $post_id, $key, $default = false ) {
376
+
377
+ $value = $this->get_save_meta( $post_id, $key );
378
+
379
+ if ( ! $value ) {
380
+
381
+ if ( $default ) {
382
+
383
+ $value = $default;
384
+ } else {
385
+
386
+ $fields = $this->get_flow_fields( $post_id );
387
+
388
+ if ( isset( $fields[ $key ]['default'] ) ) {
389
+
390
+ $value = $fields[ $key ]['default'];
391
+ }
392
+ }
393
+ }
394
+
395
+ return $value;
396
+ }
397
+
398
+ /**
399
+ * Get checkout meta.
400
+ *
401
+ * @param int $post_id post id.
402
+ * @param string $key options key.
403
+ * @param mix $default options default value.
404
+ * @return string
405
+ */
406
+ function get_checkout_meta_value( $post_id = 0, $key = '', $default = false ) {
407
+
408
+ $value = $this->get_save_meta( $post_id, $key );
409
+
410
+ if ( ! $value ) {
411
+
412
+ if ( $default ) {
413
+
414
+ $value = $default;
415
+ } else {
416
+
417
+ $fields = $this->get_checkout_fields( $post_id );
418
+
419
+ if ( isset( $fields[ $key ]['default'] ) ) {
420
+
421
+ $value = $fields[ $key ]['default'];
422
+ }
423
+ }
424
+ }
425
+
426
+ return $value;
427
+ }
428
+
429
+ /**
430
+ * Get post meta.
431
+ *
432
+ * @param int $post_id post id.
433
+ * @param string $key options key.
434
+ * @return string
435
+ */
436
+ function get_save_meta( $post_id, $key ) {
437
+
438
+ $value = get_post_meta( $post_id, $key, true );
439
+
440
+ return $value;
441
+ }
442
+
443
+ /**
444
+ * Thank You Default fields.
445
+ *
446
+ * @param int $post_id post id.
447
+ * @return array
448
+ */
449
+ function get_thankyou_fields( $post_id ) {
450
+
451
+ if ( null === self::$thankyou_fields ) {
452
+
453
+ self::$thankyou_fields = array(
454
+ 'wcf-field-google-font-url' => array(
455
+ 'default' => '',
456
+ 'sanitize' => 'FILTER_DEFAULT',
457
+ ),
458
+ 'wcf-active-tab' => array(
459
+ 'default' => '',
460
+ 'sanitize' => 'FILTER_DEFAULT',
461
+ ),
462
+ 'wcf-tq-text-color' => array(
463
+ 'default' => '',
464
+ 'sanitize' => 'FILTER_DEFAULT',
465
+ ),
466
+ 'wcf-tq-font-family' => array(
467
+ 'default' => '',
468
+ 'sanitize' => 'FILTER_DEFAULT',
469
+ ),
470
+ 'wcf-tq-heading-color' => array(
471
+ 'default' => '',
472
+ 'sanitize' => 'FILTER_DEFAULT',
473
+ ),
474
+ 'wcf-tq-heading-font-family' => array(
475
+ 'default' => '',
476
+ 'sanitize' => 'FILTER_DEFAULT',
477
+ ),
478
+ 'wcf-tq-heading-font-wt' => array(
479
+ 'default' => '',
480
+ 'sanitize' => 'FILTER_DEFAULT',
481
+ ),
482
+ 'wcf-tq-container-width' => array(
483
+ 'default' => '',
484
+ 'sanitize' => 'FILTER_DEFAULT',
485
+ ),
486
+ 'wcf-tq-section-bg-color' => array(
487
+ 'default' => '',
488
+ 'sanitize' => 'FILTER_DEFAULT',
489
+ ),
490
+ 'wcf-tq-advance-options-fields' => array(
491
+ 'default' => '',
492
+ 'sanitize' => 'FILTER_DEFAULT',
493
+ ),
494
+ 'wcf-show-overview-section' => array(
495
+ 'default' => 'yes',
496
+ 'sanitize' => 'FILTER_DEFAULT',
497
+ ),
498
+ 'wcf-show-details-section' => array(
499
+ 'default' => 'yes',
500
+ 'sanitize' => 'FILTER_DEFAULT',
501
+ ),
502
+ 'wcf-show-billing-section' => array(
503
+ 'default' => 'yes',
504
+ 'sanitize' => 'FILTER_DEFAULT',
505
+ ),
506
+ 'wcf-show-shipping-section' => array(
507
+ 'default' => 'yes',
508
+ 'sanitize' => 'FILTER_DEFAULT',
509
+ ),
510
+ );
511
+
512
+ }
513
+
514
+ return apply_filters( 'cartflows_thankyou_meta_options', self::$thankyou_fields, $post_id );
515
+ }
516
+
517
+ /**
518
+ * Get Thank you section meta.
519
+ *
520
+ * @param int $post_id post id.
521
+ * @param string $key options key.
522
+ * @param mix $default options default value.
523
+ * @return string
524
+ */
525
+ function get_thankyou_meta_value( $post_id, $key, $default = false ) {
526
+
527
+ $value = $this->get_save_meta( $post_id, $key );
528
+
529
+ if ( ! $value ) {
530
+
531
+ if ( $default ) {
532
+
533
+ $value = $default;
534
+ } else {
535
+
536
+ $fields = $this->get_thankyou_fields( $post_id );
537
+
538
+ if ( isset( $fields[ $key ]['default'] ) ) {
539
+
540
+ $value = $fields[ $key ]['default'];
541
+ }
542
+ }
543
+ }
544
+
545
+ return $value;
546
+ }
547
+ }
548
+
549
+ /**
550
+ * Kicking this off by calling 'get_instance()' method
551
+ */
552
+ Cartflows_Default_Meta::get_instance();
classes/class-cartflows-elementor-compatibility.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor page builder compatibility
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ namespace Elementor\Modules\PageTemplates;
9
+
10
+ use Elementor\Core\Base\Document;
11
+ use Elementor\Plugin;
12
+
13
+ /**
14
+ * Class for elementor page builder compatibility
15
+ */
16
+ class Cartflows_Elementor_Compatibility {
17
+
18
+ /**
19
+ * Member Variable
20
+ *
21
+ * @var instance
22
+ */
23
+ private static $instance;
24
+
25
+ /**
26
+ * Initiator
27
+ */
28
+ public static function get_instance() {
29
+ if ( ! isset( self::$instance ) ) {
30
+ self::$instance = new self;
31
+ }
32
+ return self::$instance;
33
+ }
34
+
35
+ /**
36
+ * Constructor
37
+ */
38
+ public function __construct() {
39
+
40
+ add_filter( 'cartflows_page_template', array( $this, 'get_page_template' ) );
41
+ }
42
+
43
+ /**
44
+ * Get page template fiter callback for elementor preview mode
45
+ *
46
+ * @param string $template page template.
47
+ * @return string
48
+ */
49
+ public function get_page_template( $template ) {
50
+
51
+ if ( is_singular() ) {
52
+ $document = Plugin::$instance->documents->get_doc_for_frontend( get_the_ID() );
53
+
54
+ if ( $document ) {
55
+ $template = $document->get_meta( '_wp_page_template' );
56
+ }
57
+ }
58
+
59
+ return $template;
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Kicking this off by calling 'get_instance()' method
65
+ */
66
+ Cartflows_Elementor_Compatibility::get_instance();
classes/class-cartflows-flow-frontend.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Frontend & Markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Flow Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Flow_Frontend {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var object instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ /* Analytics */
39
+ add_action( 'wp_footer', array( $this, 'footer_markup' ) );
40
+ }
41
+
42
+ /**
43
+ * Footer markup
44
+ */
45
+ function footer_markup() {
46
+
47
+ if ( wcf()->utils->is_step_post_type() ) {
48
+ // @codingStandardsIgnoreStart
49
+ ?>
50
+ <?php if( $this->is_flow_testmode() ) { ?>
51
+ <div class="wcf-preview-mode">
52
+ <span><?php _e( 'NOTE: Test mode is active — which may display any random products for the sake of preview.', 'cartflows' ); ?></span>
53
+ </div>
54
+ <?php } ?>
55
+ <?php
56
+ // @codingStandardsIgnoreEnd
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Check if flow test mode is enable.
62
+ *
63
+ * @since 1.0.0
64
+ * @param int $flow_id flow ID.
65
+ *
66
+ * @return boolean
67
+ */
68
+ function is_flow_testmode( $flow_id = '' ) {
69
+
70
+ if ( ! $flow_id ) {
71
+ $flow_id = wcf()->utils->get_flow_id();
72
+ }
73
+
74
+ $test_mode = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-testing' );
75
+
76
+ if ( 'no' === $test_mode ) {
77
+ return false;
78
+ }
79
+
80
+ return true;
81
+ }
82
+
83
+ /**
84
+ * Get steps data.
85
+ *
86
+ * @since 1.0.0
87
+ * @param int $flow_id flow ID.
88
+ *
89
+ * @return array
90
+ */
91
+ function get_steps( $flow_id ) {
92
+
93
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
94
+
95
+ if ( ! is_array( $steps ) ) {
96
+
97
+ $steps = array();
98
+ }
99
+
100
+ return $steps;
101
+ }
102
+
103
+ /**
104
+ * Check thank you page exists.
105
+ *
106
+ * @since 1.0.0
107
+ * @param array $order order data.
108
+ *
109
+ * @return bool
110
+ */
111
+ function is_thankyou_page_exists( $order ) {
112
+
113
+ $thankyou_step_exist = false;
114
+
115
+ $flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
116
+
117
+ if ( $flow_id ) {
118
+
119
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
120
+ $step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
121
+
122
+ if ( is_array( $flow_steps ) ) {
123
+
124
+ $current_step_found = false;
125
+
126
+ foreach ( $flow_steps as $index => $data ) {
127
+
128
+ if ( $current_step_found ) {
129
+
130
+ if ( 'thankyou' === $data['type'] ) {
131
+
132
+ $thankyou_step_exist = true;
133
+ break;
134
+ }
135
+ } else {
136
+
137
+ if ( intval( $data['id'] ) === $step_id ) {
138
+
139
+ $current_step_found = true;
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ return $thankyou_step_exist;
147
+ }
148
+
149
+ /**
150
+ * Check thank you page exists.
151
+ *
152
+ * @since 1.0.0
153
+ * @param array $order order data.
154
+ *
155
+ * @return bool
156
+ */
157
+ function get_thankyou_page_id( $order ) {
158
+
159
+ $thankyou_step_id = false;
160
+
161
+ $flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
162
+
163
+ if ( $flow_id ) {
164
+
165
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
166
+ $step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
167
+
168
+ if ( is_array( $flow_steps ) ) {
169
+
170
+ $current_step_found = false;
171
+
172
+ foreach ( $flow_steps as $index => $data ) {
173
+
174
+ if ( $current_step_found ) {
175
+
176
+ if ( 'thankyou' === $data['type'] ) {
177
+
178
+ $thankyou_step_id = intval( $data['id'] );
179
+ break;
180
+ }
181
+ } else {
182
+
183
+ if ( intval( $data['id'] ) === $step_id ) {
184
+
185
+ $current_step_found = true;
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+ return $thankyou_step_id;
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Kicking this off by calling 'get_instance()' method
198
+ */
199
+ Cartflows_Flow_Frontend::get_instance();
classes/class-cartflows-frontend.php ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Frontend.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Class Cartflows_Frontend.
10
+ */
11
+ class Cartflows_Frontend {
12
+
13
+ /**
14
+ * Member Variable
15
+ *
16
+ * @var instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Initiator
22
+ */
23
+ public static function get_instance() {
24
+ if ( ! isset( self::$instance ) ) {
25
+ self::$instance = new self;
26
+ }
27
+ return self::$instance;
28
+ }
29
+
30
+ /**
31
+ * Constructor
32
+ */
33
+ public function __construct() {
34
+
35
+ /* Set / Destroy Flow Sessions. Set data */
36
+ add_action( 'wp', array( $this, 'init_actions' ), 1 );
37
+
38
+ /* Enqueue global required scripts */
39
+ add_action( 'wp', array( $this, 'wp_actions' ), 55 );
40
+
41
+ /* Modify the checkout order received url to go thank you page in our flow */
42
+ add_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_to_thankyou_page' ), 10, 2 );
43
+
44
+ add_filter( 'woocommerce_get_cancel_order_url_raw', array( $this, 'redirect_to_checkout_on_cancel' ), 10 );
45
+
46
+ }
47
+
48
+ /**
49
+ * Redirect to thank page if upsell not exists
50
+ *
51
+ * @param string $order_recieve_url url.
52
+ * @param object $order order object.
53
+ * @since 1.0.0
54
+ */
55
+ function redirect_to_thankyou_page( $order_recieve_url, $order ) {
56
+
57
+ /* Only for thank you page */
58
+ wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ );
59
+ wcf()->logger->log( 'Only for thank you page' );
60
+
61
+ if ( wcf()->flow->is_thankyou_page_exists( $order ) ) {
62
+
63
+ if ( _is_wcf_doing_checkout_ajax() ) {
64
+
65
+ $checkout_id = wcf()->utils->get_checkout_id_from_post_data();
66
+
67
+ if ( ! $checkout_id ) {
68
+ $checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
69
+ }
70
+ } else {
71
+ $checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
72
+ }
73
+
74
+ wcf()->logger->log( 'Checkout ID : ' . $checkout_id );
75
+
76
+ if ( $checkout_id ) {
77
+
78
+ $thankyou_step_id = wcf()->flow->get_thankyou_page_id( $order );
79
+
80
+ if ( $thankyou_step_id ) {
81
+
82
+ $order_recieve_url = get_permalink( $thankyou_step_id );
83
+
84
+ $order_recieve_url = add_query_arg(
85
+ array(
86
+ 'wcf-order' => $order->get_id(),
87
+ 'wcf-key' => $order->get_order_key(),
88
+ ),
89
+ $order_recieve_url
90
+ );
91
+ }
92
+ }
93
+ }
94
+
95
+ wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ );
96
+
97
+ return $order_recieve_url;
98
+ }
99
+
100
+ /**
101
+ * Cancel and redirect to checkout
102
+ *
103
+ * @param string $return_url url.
104
+ * @since 1.0.0
105
+ */
106
+ function redirect_to_checkout_on_cancel( $return_url ) {
107
+
108
+ if ( _is_wcf_doing_checkout_ajax() ) {
109
+
110
+ $checkout_id = wcf()->utils->get_checkout_id_from_post_data();
111
+
112
+ if ( ! $checkout_id ) {
113
+ $checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
114
+ }
115
+ } else {
116
+ $checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
117
+ }
118
+
119
+ if ( $checkout_id ) {
120
+
121
+ $return_url = add_query_arg(
122
+ array(
123
+ 'cancel_order' => 'true',
124
+ '_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ),
125
+ ),
126
+ get_permalink( $checkout_id )
127
+ );
128
+ }
129
+
130
+ return $return_url;
131
+ }
132
+
133
+
134
+ /**
135
+ * Remove theme styles.
136
+ *
137
+ * @since 1.0.0
138
+ */
139
+ function remove_theme_styles() {
140
+
141
+ // get all styles data.
142
+ global $wp_styles;
143
+ global $wp_scripts;
144
+
145
+ $get_stylesheet = get_stylesheet();
146
+ $get_template = get_template();
147
+
148
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ) {
149
+ return;
150
+ }
151
+
152
+ $get_stylesheet = 'themes/' . get_stylesheet();
153
+ $get_template = 'themes/' . get_template();
154
+
155
+ // loop over all of the registered scripts..
156
+ foreach ( $wp_styles->registered as $handle => $data ) {
157
+
158
+ if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
159
+
160
+ // remove it.
161
+ wp_deregister_style( $handle );
162
+ wp_dequeue_style( $handle );
163
+ }
164
+ }
165
+
166
+ // loop over all of the registered scripts.
167
+ foreach ( $wp_scripts->registered as $handle => $data ) {
168
+
169
+ if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
170
+
171
+ // remove it.
172
+ wp_deregister_script( $handle );
173
+ wp_dequeue_script( $handle );
174
+ }
175
+ }
176
+ }
177
+
178
+ /**
179
+ * Update main order data in transient.
180
+ *
181
+ * @param array $woo_styles new styles array.
182
+ * @since 1.0.0
183
+ * @return array.
184
+ */
185
+ function woo_default_css( $woo_styles ) {
186
+
187
+ $woo_styles = array(
188
+ 'woocommerce-layout' => array(
189
+ 'src' => plugins_url( 'assets/css/woocommerce-layout.css', WC_PLUGIN_FILE ),
190
+ 'deps' => '',
191
+ 'version' => WC_VERSION,
192
+ 'media' => 'all',
193
+ 'has_rtl' => true,
194
+ ),
195
+ 'woocommerce-smallscreen' => array(
196
+ 'src' => plugins_url( 'assets/css/woocommerce-smallscreen.css', WC_PLUGIN_FILE ),
197
+ 'deps' => 'woocommerce-layout',
198
+ 'version' => WC_VERSION,
199
+ 'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', '768px' ) . ')',
200
+ 'has_rtl' => true,
201
+ ),
202
+ 'woocommerce-general' => array(
203
+ 'src' => plugins_url( 'assets/css/woocommerce.css', WC_PLUGIN_FILE ),
204
+ 'deps' => '',
205
+ 'version' => WC_VERSION,
206
+ 'media' => 'all',
207
+ 'has_rtl' => true,
208
+ ),
209
+ );
210
+
211
+ return $woo_styles;
212
+ }
213
+
214
+ /**
215
+ * Init Actions.
216
+ *
217
+ * @since 1.0.0
218
+ */
219
+ function init_actions() {
220
+
221
+ $this->set_flow_session();
222
+ }
223
+
224
+ /**
225
+ * Set flow session.
226
+ *
227
+ * @since 1.0.0
228
+ */
229
+ function set_flow_session() {
230
+
231
+ if ( wcf()->utils->is_step_post_type() ) {
232
+
233
+ add_action( 'wp_head', array( $this, 'noindex_flow' ) );
234
+
235
+ wcf()->utils->do_not_cache();
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Add noindex, nofollow.
241
+ *
242
+ * @since 1.0.0
243
+ */
244
+ function noindex_flow() {
245
+
246
+ $common = Cartflows_Helper::get_common_settings();
247
+
248
+ if ( 'enable' === $common['disallow_indexing'] ) {
249
+ echo '<meta name="robots" content="noindex,nofollow">';
250
+ }
251
+ }
252
+
253
+ /**
254
+ * WP Actions.
255
+ *
256
+ * @since 1.0.0
257
+ */
258
+ function wp_actions() {
259
+
260
+ if ( wcf()->utils->is_step_post_type() ) {
261
+
262
+ /* CSS Compatibility for All theme */
263
+ add_filter( 'woocommerce_enqueue_styles', array( $this, 'woo_default_css' ), 9999 );
264
+
265
+ add_action( 'wp_enqueue_scripts', array( $this, 'remove_theme_styles' ), 9999 );
266
+
267
+ add_action( 'wp_enqueue_scripts', array( $this, 'global_flow_scripts' ), 20 );
268
+ }
269
+
270
+ }
271
+
272
+ /**
273
+ * Global flow scripts.
274
+ *
275
+ * @since 1.0.0
276
+ */
277
+ function global_flow_scripts() {
278
+
279
+ global $post;
280
+
281
+ $flow = get_post_meta( $post->ID, 'wcf-flow-id', true );
282
+ $current_step = $post->ID;
283
+ $next_step_link = '';
284
+ $compatibility = Cartflows_Compatibility::get_instance();
285
+
286
+ if ( _is_wcf_landing_type() ) {
287
+
288
+ $next_step_id = wcf()->utils->get_next_step_id( $flow, $current_step );
289
+ $next_step_link = get_permalink( $next_step_id );
290
+ }
291
+
292
+ $localize = array(
293
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
294
+ 'is_pb_preview' => $compatibility->is_page_builder_preview(),
295
+ 'current_flow' => $flow,
296
+ 'current_step' => $current_step,
297
+ 'next_step' => $next_step_link,
298
+ );
299
+
300
+ wp_localize_script( 'jquery', 'cartflows', apply_filters( 'global_cartflows_js_localize', $localize ) );
301
+
302
+ wp_enqueue_style( 'wcf-frontend-global', CARTFLOWS_URL . 'assets/css/frontend.css', array(), CARTFLOWS_VER );
303
+ wp_style_add_data( 'wcf-frontend-global', 'rtl', 'replace' );
304
+
305
+ wp_enqueue_script(
306
+ 'wcf-frontend-global',
307
+ CARTFLOWS_URL . 'assets/js/frontend.js',
308
+ array( 'jquery' ),
309
+ CARTFLOWS_VER,
310
+ true
311
+ );
312
+ }
313
+ }
314
+
315
+ /**
316
+ * Prepare if class 'Cartflows_Frontend' exist.
317
+ * Kicking this off by calling 'get_instance()' method
318
+ */
319
+ Cartflows_Frontend::get_instance();
classes/class-cartflows-functions.php ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Functions.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Check if cartflows pro activated.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ function _is_cartflows_pro() {
18
+
19
+ if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
20
+ return true;
21
+ }
22
+
23
+ return false;
24
+
25
+ }
26
+
27
+ /**
28
+ * Returns step id.
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ function _get_wcf_post_id() {
33
+
34
+ global $post;
35
+
36
+ if ( isset( $post->ID ) ) {
37
+ return $post->ID;
38
+ }
39
+
40
+ return 0;
41
+ }
42
+
43
+ /**
44
+ * Returns step id.
45
+ *
46
+ * @since 1.0.0
47
+ */
48
+ function _get_wcf_step_id() {
49
+
50
+ if ( wcf()->utils->is_step_post_type() ) {
51
+
52
+ global $post;
53
+
54
+ return $post->ID;
55
+ }
56
+
57
+ return false;
58
+ }
59
+
60
+ /**
61
+ * Check if it is a landing page?
62
+ *
63
+ * @since 1.0.0
64
+ */
65
+ function _is_wcf_landing_type() {
66
+
67
+ if ( wcf()->utils->is_step_post_type() ) {
68
+
69
+ global $post;
70
+
71
+ if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
72
+
73
+ return true;
74
+ }
75
+ }
76
+
77
+ return false;
78
+ }
79
+
80
+ /**
81
+ * Returns landing id.
82
+ *
83
+ * @since 1.0.0
84
+ */
85
+ function _get_wcf_landing_id() {
86
+
87
+ if ( _is_wcf_landing_type() ) {
88
+
89
+ global $post;
90
+
91
+ return $post->ID;
92
+ }
93
+
94
+ return false;
95
+ }
96
+
97
+ /**
98
+ * Is custom checkout?
99
+ *
100
+ * @param int $checkout_id checkout ID.
101
+ * @since 1.0.0
102
+ */
103
+ function _is_wcf_meta_custom_checkout( $checkout_id ) {
104
+
105
+ $is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
106
+
107
+ if ( 'yes' === $is_custom ) {
108
+
109
+ return true;
110
+ }
111
+
112
+ return false;
113
+ }
114
+
115
+ /**
116
+ * Check if page is cartflow checkout.
117
+ *
118
+ * @since 1.0.0
119
+ * @return bool
120
+ */
121
+ function _is_wcf_checkout_type() {
122
+
123
+ if ( wcf()->utils->is_step_post_type() ) {
124
+
125
+ global $post;
126
+
127
+ if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
128
+
129
+ return true;
130
+ }
131
+ }
132
+
133
+ return false;
134
+ }
135
+
136
+ /**
137
+ * Check if AJAX call is in progress.
138
+ *
139
+ * @since 1.0.0
140
+ * @return bool
141
+ */
142
+ function _is_wcf_doing_checkout_ajax() {
143
+
144
+ if ( wp_doing_ajax() ) {
145
+
146
+ if ( isset( $_GET['wc-ajax'] ) &&
147
+ 'checkout' === $_GET['wc-ajax'] &&
148
+ isset( $_POST['_wcf_checkout_id'] )
149
+ ) {
150
+ return true;
151
+ }
152
+ }
153
+
154
+ return false;
155
+ }
156
+
157
+
158
+ /**
159
+ * Returns checkout ID.
160
+ *
161
+ * @since 1.0.0
162
+ * @return int/bool
163
+ */
164
+ function _get_wcf_checkout_id() {
165
+
166
+ if ( _is_wcf_checkout_type() ) {
167
+
168
+ global $post;
169
+
170
+ return $post->ID;
171
+ }
172
+
173
+ return false;
174
+ }
175
+
176
+ /**
177
+ * Check if it is checkout shortcode.
178
+ *
179
+ * @since 1.0.0
180
+ * @return bool
181
+ */
182
+ function _is_wcf_checkout_shortcode() {
183
+
184
+ global $post;
185
+
186
+ if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
187
+
188
+ return true;
189
+ }
190
+
191
+ return false;
192
+ }
193
+
194
+ /**
195
+ * Check if it is checkout shortcode.
196
+ *
197
+ * @since 1.0.0
198
+ * @param string $content shortcode content.
199
+ * @return bool
200
+ */
201
+ function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
202
+
203
+ $checkout_id = 0;
204
+
205
+ if ( ! empty( $content ) ) {
206
+
207
+ $regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
208
+
209
+ preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
210
+
211
+ if ( ! empty( $regex_matches ) ) {
212
+
213
+ if ( 'cartflows_checkout' == $regex_matches[2] ) {
214
+
215
+ $attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
216
+ $attribure_str = str_replace( '"', '', $attribure_str );
217
+
218
+ $attributes = wp_parse_args( $attribure_str );
219
+
220
+ if ( isset( $attributes['id'] ) ) {
221
+ $checkout_id = $attributes['id'];
222
+ }
223
+ }
224
+ }
225
+ }
226
+
227
+ return $checkout_id;
228
+ }
229
+
230
+ /**
231
+ * Check if post type is upsell.
232
+ *
233
+ * @since 1.0.0
234
+ * @return bool
235
+ */
236
+ function _is_wcf_upsell_type() {
237
+
238
+ if ( wcf()->utils->is_step_post_type() ) {
239
+
240
+ global $post;
241
+
242
+ if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
243
+
244
+ return true;
245
+ }
246
+ }
247
+
248
+ return false;
249
+ }
250
+
251
+ /**
252
+ * Returns upsell ID.
253
+ *
254
+ * @since 1.0.0
255
+ * @return int/bool
256
+ */
257
+ function _get_wcf_upsell_id() {
258
+
259
+ if ( _is_wcf_upsell_type() ) {
260
+
261
+ global $post;
262
+
263
+ return $post->ID;
264
+ }
265
+
266
+ return false;
267
+ }
268
+
269
+ /**
270
+ * Check if post is of type downsell.
271
+ *
272
+ * @since 1.0.0
273
+ * @return int/bool
274
+ */
275
+ function _is_wcf_downsell_type() {
276
+
277
+ if ( wcf()->utils->is_step_post_type() ) {
278
+
279
+ global $post;
280
+
281
+ if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
282
+
283
+ return true;
284
+ }
285
+ }
286
+
287
+ return false;
288
+ }
289
+
290
+ /**
291
+ * Get downsell page ID.
292
+ *
293
+ * @since 1.0.0
294
+ * @return int/bool
295
+ */
296
+ function _get_wcf_downsell_id() {
297
+
298
+ if ( _is_wcf_downsell_type() ) {
299
+
300
+ global $post;
301
+
302
+ return $post->ID;
303
+ }
304
+
305
+ return false;
306
+ }
307
+
308
+ /**
309
+ * Check if page is of thank you type.
310
+ *
311
+ * @since 1.0.0
312
+ * @return int/bool
313
+ */
314
+ function _is_wcf_thankyou_type() {
315
+
316
+ if ( wcf()->utils->is_step_post_type() ) {
317
+
318
+ global $post;
319
+
320
+ if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
321
+
322
+ return true;
323
+ }
324
+ }
325
+
326
+ return false;
327
+ }
328
+
329
+ /**
330
+ * Get thank you page ID.
331
+ *
332
+ * @since 1.0.0
333
+ * @return int/bool
334
+ */
335
+ function _get_wcf_thankyou_id() {
336
+
337
+ if ( _is_wcf_thankyou_type() ) {
338
+
339
+ global $post;
340
+
341
+ return $post->ID;
342
+ }
343
+
344
+ return false;
345
+ }
346
+
347
+
348
+ /**
349
+ * Check if post type is upsell.
350
+ *
351
+ * @since 1.0.0
352
+ * @return bool
353
+ */
354
+ function _is_wcf_base_offer_type() {
355
+
356
+ if ( wcf()->utils->is_step_post_type() ) {
357
+
358
+ global $post;
359
+
360
+ $step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
361
+
362
+ if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
363
+
364
+ return true;
365
+ }
366
+ }
367
+
368
+ return false;
369
+ }
370
+
371
+ /**
372
+ * Returns upsell ID.
373
+ *
374
+ * @since 1.0.0
375
+ * @return int/bool
376
+ */
377
+ function _get_wcf_base_offer_id() {
378
+
379
+ if ( _is_wcf_base_offer_type() ) {
380
+
381
+ global $post;
382
+
383
+ return $post->ID;
384
+ }
385
+
386
+ return false;
387
+ }
classes/class-cartflows-helper.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CARTFLOWS Helper.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Class Cartflows_Helper.
14
+ */
15
+ class Cartflows_Helper {
16
+
17
+ /**
18
+ * Common global data
19
+ *
20
+ * @var zapier
21
+ */
22
+ private static $common = null;
23
+
24
+ /**
25
+ * Checkout Fields
26
+ *
27
+ * @var checkout_fields
28
+ */
29
+ private static $checkout_fields = null;
30
+
31
+ /**
32
+ * Returns an option from the database for
33
+ * the admin settings page.
34
+ *
35
+ * @param string $key The option key.
36
+ * @param mixed $default Option default value if option is not available.
37
+ * @param boolean $network_override Whether to allow the network admin setting to be overridden on subsites.
38
+ * @return string Return the option value
39
+ */
40
+ public static function get_admin_settings_option( $key, $default = false, $network_override = false ) {
41
+
42
+ // Get the site-wide option if we're in the network admin.
43
+ if ( $network_override && is_multisite() ) {
44
+ $value = get_site_option( $key, $default );
45
+ } else {
46
+ $value = get_option( $key, $default );
47
+ }
48
+
49
+ return $value;
50
+ }
51
+
52
+ /**
53
+ * Updates an option from the admin settings page.
54
+ *
55
+ * @param string $key The option key.
56
+ * @param mixed $value The value to update.
57
+ * @param bool $network Whether to allow the network admin setting to be overridden on subsites.
58
+ * @return mixed
59
+ */
60
+ static public function update_admin_settings_option( $key, $value, $network = false ) {
61
+
62
+ // Update the site-wide option since we're in the network admin.
63
+ if ( $network && is_multisite() ) {
64
+ update_site_option( $key, $value );
65
+ } else {
66
+ update_option( $key, $value );
67
+ }
68
+
69
+ }
70
+
71
+ /**
72
+ * Get zapier settings.
73
+ *
74
+ * @return array.
75
+ */
76
+ static public function get_common_settings() {
77
+
78
+ if ( null === self::$common ) {
79
+
80
+ $common_default = apply_filters(
81
+ 'cartflows_common_settings_default',
82
+ array(
83
+ 'disallow_indexing' => 'disable',
84
+ 'global_checkout' => '',
85
+ )
86
+ );
87
+
88
+ $common = Cartflows_Helper::get_admin_settings_option( '_cartflows_common', false, true );
89
+
90
+ self::$common = wp_parse_args( $common, $common_default );
91
+ }
92
+
93
+ return self::$common;
94
+ }
95
+
96
+ /**
97
+ * Get Checkout field.
98
+ *
99
+ * @param string $key Field key.
100
+ * @param int $post_id Post id.
101
+ * @return array.
102
+ */
103
+ static public function get_checkout_fields( $key, $post_id ) {
104
+
105
+ $saved_fields = get_post_meta( $post_id, 'wcf_fields_' . $key, true );
106
+
107
+ if ( ! $saved_fields ) {
108
+ $saved_fields = array();
109
+ }
110
+
111
+ $fields = array_filter( $saved_fields );
112
+
113
+ if ( empty( $fields ) ) {
114
+ if ( 'billing' === $key || 'shipping' === $key ) {
115
+
116
+ $fields = WC()->countries->get_address_fields( WC()->countries->get_base_country(), $key . '_' );
117
+
118
+ update_post_meta( $post_id, 'wcf_fields_' . $key, $fields );
119
+ }
120
+ }
121
+
122
+ return $fields;
123
+ }
124
+
125
+ /**
126
+ * Add Checkout field.
127
+ *
128
+ * @param string $type Field type.
129
+ * @param string $field_key Field key.
130
+ * @param array $field_data Field data.
131
+ * @param int $post_id Post id.
132
+ * @return boolean.
133
+ */
134
+ static public function add_checkout_field( $type, $field_key, $field_data = array(), $post_id ) {
135
+
136
+ $fields = self::get_checkout_fields( $type, $post_id );
137
+
138
+ $fields[ $field_key ] = $field_data;
139
+
140
+ update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
141
+
142
+ return true;
143
+ }
144
+
145
+ /**
146
+ * Get checkout fields settings.
147
+ *
148
+ * @param string $type Field type.
149
+ * @param string $field_key Field key.
150
+ * @param int $post_id Post id.
151
+ * @return array.
152
+ */
153
+ static public function delete_checkout_field( $type, $field_key, $post_id ) {
154
+
155
+ $fields = self::get_checkout_fields( $type, $post_id );
156
+
157
+ if ( isset( $fields[ $field_key ] ) ) {
158
+ unset( $fields[ $field_key ] );
159
+ }
160
+
161
+ update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
162
+
163
+ return true;
164
+ }
165
+
166
+ /**
167
+ * Get checkout fields settings.
168
+ *
169
+ * @return array.
170
+ */
171
+ static public function get_checkout_fields_settings() {
172
+
173
+ if ( null === self::$checkout_fields ) {
174
+ $checkout_fields_default = array(
175
+ 'enable_customization' => 'disable',
176
+ 'enable_billing_fields' => 'disable',
177
+ );
178
+
179
+ $billing_fields = self::get_checkout_fields( 'billing' );
180
+
181
+ if ( is_array( $billing_fields ) && ! empty( $billing_fields ) ) {
182
+
183
+ foreach ( $billing_fields as $key => $value ) {
184
+
185
+ $checkout_fields_default[ $key ] = 'enable';
186
+ }
187
+ }
188
+
189
+ $checkout_fields = Cartflows_Helper::get_admin_settings_option( '_wcf_checkout_fields', false, true );
190
+
191
+ self::$checkout_fields = wp_parse_args( $checkout_fields, $checkout_fields_default );
192
+ }
193
+
194
+ return self::$checkout_fields;
195
+ }
196
+
197
+ /**
198
+ * Get meta options
199
+ *
200
+ * @since 1.0.0
201
+ * @param int $post_id Product ID.
202
+ * @param string $key Meta Key.
203
+ * @param string $default Default value.
204
+ * @return string Meta Value.
205
+ */
206
+ static public function get_meta_option( $post_id, $key, $default = '' ) {
207
+
208
+ $value = get_post_meta( $post_id, $key, true );
209
+
210
+ if ( ! $value ) {
211
+ $value = $default;
212
+ }
213
+
214
+ return $value;
215
+ }
216
+
217
+ /**
218
+ * Save meta option
219
+ *
220
+ * @since 1.0.0
221
+ * @param int $post_id Product ID.
222
+ * @param array $args Arguments array.
223
+ */
224
+ static public function save_meta_option( $post_id, $args = array() ) {
225
+
226
+ if ( is_array( $args ) && ! empty( $args ) ) {
227
+
228
+ foreach ( $args as $key => $value ) {
229
+
230
+ update_post_meta( $post_id, $key, $value );
231
+ }
232
+ }
233
+ }
234
+
235
+ /**
236
+ * Check if Elementor page builder is installed
237
+ *
238
+ * @since 1.0.0
239
+ *
240
+ * @access public
241
+ */
242
+ static public function _is_elementor_installed() {
243
+ $path = 'elementor/elementor.php';
244
+ $plugins = get_plugins();
245
+
246
+ return isset( $plugins[ $path ] );
247
+ }
248
+
249
+ /**
250
+ * Check if Step has product assigned.
251
+ *
252
+ * @since 1.0.0
253
+ * @param int $step_id step ID.
254
+ *
255
+ * @access public
256
+ */
257
+ static public function has_product_assigned( $step_id ) {
258
+
259
+ $step_type = get_post_meta( $step_id, 'wcf-step-type', true );
260
+
261
+ if ( 'checkout' == $step_type ) {
262
+ $product = get_post_meta( $step_id, 'wcf-checkout-products', true );
263
+ } else {
264
+ $product = get_post_meta( $step_id, 'wcf-offer-product', true );
265
+ }
266
+
267
+ if ( ! empty( $product ) ) {
268
+ return true;
269
+ }
270
+ return false;
271
+
272
+ }
273
+ }
classes/class-cartflows-importer-core.php ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Image Importer
4
+ *
5
+ * => How to use?
6
+ *
7
+ * $image = array(
8
+ * 'url' => '<image-url>',
9
+ * 'id' => '<image-id>',
10
+ * );
11
+ *
12
+ * $downloaded_image = CartFlows_Importer_Core::get_instance()->import( $image );
13
+ *
14
+ * @package CartFlows
15
+ * @since 1.0.0
16
+ */
17
+
18
+ if ( ! class_exists( 'CartFlows_Importer_Core' ) ) :
19
+
20
+ /**
21
+ * CartFlows Importer
22
+ *
23
+ * @since 1.0.0
24
+ */
25
+ class CartFlows_Importer_Core {
26
+
27
+ /**
28
+ * Instance
29
+ *
30
+ * @since 1.0.0
31
+ * @var object Class object.
32
+ * @access private
33
+ */
34
+ private static $instance;
35
+
36
+ /**
37
+ * Images IDs
38
+ *
39
+ * @var array The Array of already image IDs.
40
+ * @since 1.0.0
41
+ */
42
+ private $already_imported_ids = array();
43
+
44
+ /**
45
+ * Initiator
46
+ *
47
+ * @since 1.0.0
48
+ * @return object initialized object of class.
49
+ */
50
+ public static function get_instance() {
51
+ if ( ! isset( self::$instance ) ) {
52
+ self::$instance = new self;
53
+ }
54
+ return self::$instance;
55
+ }
56
+
57
+ /**
58
+ * Constructor
59
+ *
60
+ * @since 1.0.0
61
+ */
62
+ public function __construct() {
63
+
64
+ if ( ! function_exists( 'WP_Filesystem' ) ) {
65
+ require_once ABSPATH . 'wp-admin/includes/file.php';
66
+ }
67
+
68
+ WP_Filesystem();
69
+ }
70
+
71
+ /**
72
+ * Process Image Download
73
+ *
74
+ * @since 1.0.0
75
+ * @param array $attachments Attachment array.
76
+ * @return array Attachment array.
77
+ */
78
+ public function process( $attachments ) {
79
+
80
+ $downloaded_images = array();
81
+
82
+ foreach ( $attachments as $key => $attachment ) {
83
+ $downloaded_images[] = $this->import( $attachment );
84
+ }
85
+
86
+ return $downloaded_images;
87
+ }
88
+
89
+ /**
90
+ * Get Hash Image.
91
+ *
92
+ * @since 1.0.0
93
+ * @param string $attachment_url Attachment URL.
94
+ * @return string Hash string.
95
+ */
96
+ private function get_hash_image( $attachment_url ) {
97
+ return sha1( $attachment_url );
98
+ }
99
+
100
+ /**
101
+ * Get Saved Image.
102
+ *
103
+ * @since 1.0.0
104
+ * @param string $attachment Attachment Data.
105
+ * @return string Hash string.
106
+ */
107
+ private function get_saved_image( $attachment ) {
108
+ if ( apply_filters( 'cartflows_image_importer_skip_image', false, $attachment ) ) {
109
+
110
+ self::log( 'Download (✕) Replace (✕) - ' . $attachment['url'] );
111
+
112
+ return $attachment;
113
+ }
114
+
115
+ global $wpdb;
116
+
117
+ // Already imported? Then return!
118
+ if ( isset( $this->already_imported_ids[ $attachment['id'] ] ) ) {
119
+
120
+ self::log( 'Download (✓) Replace (✓) - ' . $attachment['url'] );
121
+
122
+ return $this->already_imported_ids[ $attachment['id'] ];
123
+ }
124
+
125
+ // 1. Is already imported in Batch Import Process?
126
+ $post_id = $wpdb->get_var(
127
+ $wpdb->prepare(
128
+ 'SELECT `post_id` FROM `' . $wpdb->postmeta . '`
129
+ WHERE `meta_key` = \'_cartflows_image_hash\'
130
+ AND `meta_value` = %s
131
+ ;',
132
+ $this->get_hash_image( $attachment['url'] )
133
+ )
134
+ );
135
+
136
+ // 2. Is image already imported though XML?
137
+ if ( empty( $post_id ) ) {
138
+
139
+ // Get file name without extension.
140
+ // To check it exist in attachment.
141
+ $filename = preg_replace( '/\\.[^.\\s]{3,4}$/', '', basename( $attachment['url'] ) );
142
+
143
+ $post_id = $wpdb->get_var(
144
+ $wpdb->prepare(
145
+ 'SELECT `post_id` FROM `' . $wpdb->postmeta . '`
146
+ WHERE `meta_key` = \'_wp_attached_file\'
147
+ AND `meta_value` LIKE %s
148
+ ;',
149
+ '%' . $filename . '%'
150
+ )
151
+ );
152
+
153
+ self::log( 'Download (✕) Replace (✕) - ' . $attachment['url'] );
154
+ }
155
+
156
+ if ( $post_id ) {
157
+
158
+ $new_imgage_url = wp_get_attachment_url( $post_id );
159
+ $new_attachment = array(
160
+ 'id' => $post_id,
161
+ 'url' => $new_imgage_url,
162
+ );
163
+ $this->already_imported_ids[ $attachment['id'] ] = $new_attachment;
164
+
165
+ self::log( 'Download (✓) Replace (✓) - ' . $new_imgage_url );
166
+ return $new_attachment;
167
+ }
168
+
169
+ return false;
170
+ }
171
+
172
+ /**
173
+ * Import Image
174
+ *
175
+ * @since 1.0.0
176
+ * @param array $attachment Attachment array.
177
+ * @return array Attachment array.
178
+ */
179
+ public function import( $attachment ) {
180
+
181
+ $saved_image = $this->get_saved_image( $attachment );
182
+ if ( $saved_image ) {
183
+ return $saved_image;
184
+ }
185
+
186
+ $args = array(
187
+ 'timeout' => 300,
188
+ );
189
+
190
+ $file_content = wp_remote_retrieve_body( wp_safe_remote_get( $attachment['url'], $args ) );
191
+
192
+ // Empty file content?
193
+ if ( empty( $file_content ) ) {
194
+
195
+ self::log( 'Download (✕) Replace (✕) - ' . $attachment['url'] );
196
+ self::log( 'Error: Failed wp_remote_retrieve_body().' );
197
+
198
+ return $attachment;
199
+ }
200
+
201
+ // Extract the file name and extension from the URL.
202
+ $filename = basename( $attachment['url'] );
203
+
204
+ $upload = wp_upload_bits(
205
+ $filename,
206
+ null,
207
+ $file_content
208
+ );
209
+
210
+ $post = array(
211
+ 'post_title' => $filename,
212
+ 'guid' => $upload['url'],
213
+ );
214
+
215
+ $info = wp_check_filetype( $upload['file'] );
216
+ if ( $info ) {
217
+ $post['post_mime_type'] = $info['type'];
218
+ } else {
219
+ // For now just return the origin attachment.
220
+ return $attachment;
221
+ }
222
+
223
+ $post_id = wp_insert_attachment( $post, $upload['file'] );
224
+ wp_update_attachment_metadata(
225
+ $post_id,
226
+ wp_generate_attachment_metadata( $post_id, $upload['file'] )
227
+ );
228
+ update_post_meta( $post_id, '_cartflows_image_hash', $this->get_hash_image( $attachment['url'] ) );
229
+
230
+ $new_attachment = array(
231
+ 'id' => $post_id,
232
+ 'url' => $upload['url'],
233
+ );
234
+
235
+ self::log( 'Download (✓) Replace (✓) - ' . $attachment['url'] );
236
+
237
+ $this->already_imported_ids[ $attachment['id'] ] = $new_attachment;
238
+
239
+ return $new_attachment;
240
+ }
241
+
242
+ /**
243
+ * Debugging Log.
244
+ *
245
+ * @since 1.0.0
246
+ * @param mixed $log Log data.
247
+ * @return void
248
+ */
249
+ public static function log( $log ) {
250
+
251
+ if ( ! WP_DEBUG_LOG ) {
252
+ return;
253
+ }
254
+
255
+ if ( is_array( $log ) || is_object( $log ) ) {
256
+ wcf()->logger->import_log( print_r( $log, true ) );
257
+ } else {
258
+ wcf()->logger->import_log( $log );
259
+ }
260
+ }
261
+
262
+ }
263
+
264
+ /**
265
+ * Initialize class object with 'get_instance()' method
266
+ */
267
+ CartFlows_Importer_Core::get_instance();
268
+
269
+ endif;
classes/class-cartflows-importer.php ADDED
@@ -0,0 +1,1036 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Admin
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! class_exists( 'CartFlows_Importer' ) ) :
10
+
11
+ /**
12
+ * CartFlows Import
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class CartFlows_Importer {
17
+
18
+ /**
19
+ * Instance
20
+ *
21
+ * @since 1.0.0
22
+ * @access private
23
+ * @var object Class object.
24
+ */
25
+ private static $instance;
26
+
27
+ /**
28
+ * Initiator
29
+ *
30
+ * @since 1.0.0
31
+ * @return object initialized object of class.
32
+ */
33
+ public static function get_instance() {
34
+ if ( ! isset( self::$instance ) ) {
35
+ self::$instance = new self;
36
+ }
37
+
38
+ return self::$instance;
39
+ }
40
+
41
+ /**
42
+ * Constructor
43
+ *
44
+ * @since 1.0.0
45
+ */
46
+ public function __construct() {
47
+ add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
48
+ add_action( 'wp_ajax_cartflows_load_steps', array( $this, 'load_templates' ) );
49
+ add_action( 'wp_ajax_cartflows_step_import', array( $this, 'import_step' ) );
50
+ add_action( 'wp_ajax_cartflows_create_flow', array( $this, 'create_flow' ) );
51
+ add_action( 'wp_ajax_cartflows_default_flow', array( $this, 'create_default_flow' ) );
52
+ add_action( 'wp_ajax_cartflows_step_create_blank', array( $this, 'step_create_blank' ) );
53
+ add_action( 'wp_ajax_cartflows_import_flow_step', array( $this, 'import_flow' ) );
54
+ add_action( 'admin_footer', array( $this, 'js_templates' ) );
55
+ add_action( 'cartflows_import_complete', array( $this, 'clear_cache' ) );
56
+
57
+ add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
58
+
59
+ add_action( 'wp_ajax_cartflows_activate_plugin', array( $this, 'activate_plugin' ) );
60
+ }
61
+
62
+ /**
63
+ * Clear Cache.
64
+ *
65
+ * @since 1.0.0
66
+ */
67
+ public function clear_cache() {
68
+ // Clear 'Elementor' file cache.
69
+ if ( class_exists( '\Elementor\Plugin' ) ) {
70
+ Elementor\Plugin::$instance->files_manager->clear_cache();
71
+ }
72
+ }
73
+
74
+ /**
75
+ * JS Templates
76
+ *
77
+ * @since 1.0.0
78
+ *
79
+ * @return void
80
+ */
81
+ function js_templates() {
82
+
83
+ // Loading Templates.
84
+ ?>
85
+ <script type="text/template" id="tmpl-cartflows-step-loading">
86
+ <div class="template-message-block cartflows-step-loading">
87
+ <h2>
88
+ <span class="spinner"></span>
89
+ <?php _e( 'Loading Steps', 'cartflows' ); ?>
90
+ </h2>
91
+ <p class="description"><?php _e( 'Getting steps from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
92
+ </div>
93
+ </script>
94
+
95
+ <?php
96
+ // Search Templates.
97
+ ?>
98
+ <script type="text/template" id="tmpl-cartflows-searching-templates">
99
+ <div class="template-message-block cartflows-searching-templates">
100
+ <h2>
101
+ <span class="spinner"></span>
102
+ <?php _e( 'Searching Template..', 'cartflows' ); ?>
103
+ </h2>
104
+ <p class="description"><?php _e( 'Getting templates from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
105
+ </div>
106
+ </script>
107
+
108
+ <?php
109
+ // CartFlows Importing Template.
110
+ ?>
111
+ <script type="text/template" id="tmpl-cartflows-step-importing">
112
+ <div class="template-message-block cartflows-step-importing">
113
+ <h2><span class="spinner"></span> <?php _e( 'Importing..', 'cartflows' ); ?></h2>
114
+ </div>
115
+ </script>
116
+
117
+ <?php
118
+ // CartFlows Imported.
119
+ ?>
120
+ <script type="text/template" id="tmpl-cartflows-step-imported">
121
+ <div class="template-message-block cartflows-step-imported">
122
+ <h2><span class="dashicons dashicons-yes"></span> <?php _e( 'Imported', 'cartflows' ); ?></h2>
123
+ <p class="description"><?php _e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span></p></div>
124
+ </script>
125
+
126
+ <?php
127
+ // No templates.
128
+ ?>
129
+ <script type="text/template" id="tmpl-cartflows-no-steps">
130
+ <div class="cartflows-no-steps">
131
+ <div class="template-message-block">
132
+ <h2><?php _e( 'Steps not found!', 'cartflows' ); ?></h2>
133
+ <p class="description"><?php _e( 'We\'ll provide the ready made steps to import.', 'cartflows' ); ?></p>
134
+ </div>
135
+ </div>
136
+ </script>
137
+
138
+ <?php
139
+ // No templates.
140
+ ?>
141
+ <script type="text/template" id="tmpl-cartflows-no-flows">
142
+ <div class="cartflows-no-flows">
143
+ <div class="template-message-block">
144
+ <h2><?php _e( 'Flows not found!', 'cartflows' ); ?></h2>
145
+ <p class="description"><?php _e( 'We\'ll provide the ready made flows to import.', 'cartflows' ); ?></p>
146
+ </div>
147
+ </div>
148
+ </script>
149
+
150
+ <?php
151
+ // Error handling.
152
+ ?>
153
+ <script type="text/template" id="tmpl-templator-error">
154
+ <div class="notice notice-error"><p>{{ data }}</p></div>
155
+ </script>
156
+
157
+ <?php
158
+ // Redirect to Elementor.
159
+ ?>
160
+ <script type="text/template" id="tmpl-templator-redirect-to-elementor">
161
+ <div class="template-message-block templator-redirect-to-elementor">
162
+ <h2><span class="dashicons dashicons-yes"></span> <?php _e( 'Imported', 'cartflows' ); ?></h2>
163
+ <p class="description"><?php _e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span><br/><br/><?php _e( 'Redirecting to the Elementor edit window.', 'cartflows' ); ?> </p></div>
164
+ </script>
165
+
166
+ <?php
167
+ /**
168
+ * Responsive Buttons
169
+ */
170
+ ?>
171
+ <script type="text/template" id="tmpl-cartflows-responsive-view">
172
+ <span class="responsive-view">
173
+ <span class="actions">
174
+ <a class="desktop" href="#"><span data-view="desktop " class="active dashicons dashicons-desktop"></span></a>
175
+ <a class="tablet" href="#"><span data-view="tablet" class="dashicons dashicons-tablet"></span></a>
176
+ <a class="mobile" href="#"><span data-view="mobile" class="dashicons dashicons-smartphone"></span></a>
177
+ </span>
178
+ </span>
179
+ </script>
180
+
181
+ <?php
182
+ /** Blank flow */
183
+ ?>
184
+ <script type="text/template" id="tmpl-cartflows-create-blank-flow">
185
+ <div class="inner">
186
+ <div class="template">
187
+ <span class="thumbnail site-preview">
188
+ <div class="template-screenshot">
189
+ <img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/start-scratch.jpg" />
190
+ </div>
191
+ </span>
192
+ <div class="template-id-container">
193
+ <h3 class="template-name"> <?php _e( 'Canvas', 'cartflows' ); ?> </h3>
194
+ <div class="template-actions">
195
+ <a href="#" class="button button-primary cartflows-flow-import-blank"><?php _e( 'Create Flow', 'cartflows' ); ?></a>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </script>
201
+
202
+ <?php
203
+ // Templates data.
204
+ $installed_plugins = get_plugins();
205
+
206
+ $import_btn_title = __( 'Import', 'cartflows' );
207
+
208
+ $required_plugins = array(
209
+ 'elementor' => array(
210
+ 'active' => is_plugin_active( 'elementor/elementor.php' ) ? 'yes' : 'no',
211
+ 'install' => isset( $installed_plugins['elementor/elementor.php'] ) ? 'yes' : 'no',
212
+ ),
213
+ );
214
+
215
+ if ( 'yes' == $required_plugins['elementor']['install'] && 'no' == $required_plugins['elementor']['active'] ) {
216
+ $import_btn_title = __( 'Activate Elementor & Import', 'cartflows' );
217
+ } elseif ( 'no' == $required_plugins['elementor']['install'] ) {
218
+ $import_btn_title = __( 'Install Elementor & Import', 'cartflows' );
219
+ }
220
+
221
+ ?>
222
+ <script type="text/template" id="tmpl-cartflows-flows-list">
223
+
224
+ <# if ( data.items.length ) { #>
225
+ <# for ( key in data.items ) { #>
226
+ <#
227
+ var flow_steps = [];
228
+ if( data.items[ key ].flow_steps ) {
229
+ flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
230
+ return value['id'];
231
+ });
232
+ }
233
+ #>
234
+ <div class="inner">
235
+ <div class="template">
236
+ <span class="thumbnail site-preview cartflows-preview-flow-steps" data-flow-steps="{{ JSON.stringify( data.items[ key ].flow_steps ) }}" data-title="{{ data.items[ key ].title.rendered }}">
237
+ <div class="template-screenshot">
238
+ <# if( data.items[ key ].featured_image_url ) { #>
239
+ <img src="{{ data.items[ key ].featured_image_url }}" />
240
+ <# } else { #>
241
+ <img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
242
+ <# } #>
243
+ </div>
244
+ <a href="<?php echo CARTFLOWS_TEMPLATES_URL . 'preview/?'; ?>flow={{ data.items[ key ].id }}&title={{{ data.items[ key ].title.rendered }}}" class="preview" target="_blank">Preview <i class="dashicons dashicons-external"></i></a>
245
+ <# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
246
+ <span class="wcf-flow-type pro"><?php _e( 'Pro', 'cartflows' ); ?></span>
247
+ <# } #>
248
+ </span>
249
+ <div class="template-id-container">
250
+ <h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
251
+ <div class="template-actions">
252
+
253
+ <# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
254
+ <a data-flow-steps="{{ flow_steps }}" data-required="<?php echo htmlspecialchars( json_encode( $required_plugins ), ENT_QUOTES, 'UTF-8' ); ?>" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}"><?php echo $import_btn_title; ?></a>
255
+ <# } else if( CartFlowsImportVars._is_pro_active ) { #>
256
+ <a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php _e( 'Activate License', 'cartflows' ); ?></a>
257
+ <# } else { #>
258
+ <a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php _e( 'Get Pro', 'cartflows' ); ?></a>
259
+ <# } #>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ </div>
264
+ <# } #>
265
+ <# } #>
266
+ </script>
267
+
268
+ <?php
269
+ // Empty Step.
270
+ ?>
271
+ <script type="text/template" id="tmpl-cartflows-create-blank-step">
272
+ <div class="inner">
273
+ <div class="template">
274
+ <span class="thumbnail site-preview cartflows-flow-preview">
275
+ <div class="template-screenshot">
276
+ <img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/start-scratch.jpg" />
277
+ </div>
278
+ </span>
279
+ <div class="template-id-container">
280
+ <h3 class="template-name"> Blank </h3>
281
+ <div class="template-actions">
282
+ <a href="#" class="button button-primary cartflows-step-import-blank"><?php _e( 'Create', 'cartflows' ); ?></a>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ </div>
287
+ </script>
288
+
289
+ <?php
290
+ // Templates data.
291
+ ?>
292
+ <script type="text/template" id="tmpl-cartflows-steps-list">
293
+ <# if ( data.items.length ) { #>
294
+ <# for ( key in data.items ) { #>
295
+ <#
296
+ var flow_steps = [];
297
+ if( data.items[ key ].flow_steps ) {
298
+ flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
299
+ return value['id'];
300
+ });
301
+ }
302
+ #>
303
+ <div class="inner">
304
+ <div class="template">
305
+ <span class="thumbnail site-preview cartflows-preview-flow-steps" data-flow-steps="{{ JSON.stringify( data.items[ key ].flow_steps ) }}" data-title="{{ data.items[ key ].title.rendered }}">
306
+ <div class="template-screenshot">
307
+ <# if( data.items[ key ].featured_image_url ) { #>
308
+ <img src="{{ data.items[ key ].featured_image_url }}" />
309
+ <# } else { #>
310
+ <img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
311
+ <# } #>
312
+ </div>
313
+ <a href="<?php echo CARTFLOWS_TEMPLATES_URL . 'preview/?'; ?>step={{ data.items[ key ].id }}&title={{{ data.items[ key ].title.rendered }}}" class="preview" target="_blank">Preview <i class="dashicons dashicons-external"></i></a>
314
+ <# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
315
+ <span class="wcf-flow-type pro"><?php _e( 'Pro', 'cartflows' ); ?></span>
316
+ <# } #>
317
+ </span>
318
+ <div class="template-id-container">
319
+ <h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
320
+ <div class="template-actions">
321
+ <# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
322
+ <a data-required="<?php echo htmlspecialchars( json_encode( $required_plugins ), ENT_QUOTES, 'UTF-8' ); ?>" data-flow-steps="{{ flow_steps }}" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}"><?php echo $import_btn_title; ?></a>
323
+ <# } else if( CartFlowsImportVars._is_pro_active ) { #>
324
+ <a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php _e( 'Activate License', 'cartflows' ); ?></a>
325
+ <# } else { #>
326
+ <a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php _e( 'Get Pro', 'cartflows' ); ?></a>
327
+ <# } #>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ </div>
332
+ <# } #>
333
+ <# } #>
334
+ </script>
335
+
336
+ <?php
337
+ /**
338
+ * TMPL - Filters
339
+ */
340
+ ?>
341
+ <script type="text/template" id="tmpl-cartflows-term-filters">
342
+
343
+ <# if ( data ) { #>
344
+
345
+ <ul class="{{ data.args.wrapper_class }} {{ data.args.class }}">
346
+
347
+ <# console.log( data.args.show_all ) #>
348
+ <# if ( data.args.show_all ) { #>
349
+ <li>
350
+ <a href="#" data-group="all"> All </a>
351
+ </li>
352
+ <# } #>
353
+
354
+ <# for ( key in data.items ) { #>
355
+ <li>
356
+ <a href="#" data-group='{{ data.items[ key ].id }}' class="{{ data.items[ key ].name }}" data-slug="{{ data.items[ key ].slug }}" data-title="{{ data.items[ key ].name }}">{{ data.items[ key ].name }}</a>
357
+ </li>
358
+ <# } #>
359
+
360
+ </ul>
361
+ <# } #>
362
+ </script>
363
+
364
+ <?php
365
+ // Step Type.
366
+ ?>
367
+ <script type="text/template" id="tmpl-cartflows-step-types">
368
+ <ul class="wcf-tab nav-tabs">
369
+ <# if( data.items_count ) { #>
370
+ <# for( key in data.items ) { #>
371
+ <# console.log( data.items[ key ].id ) #>
372
+ <li data-slug="{{data.items[ key ].slug}}" data-title="{{ data.items[ key ].name }}">
373
+ <a href="#{{{ data.items[ key ].slug }}}">{{{ data.items[ key ].name }}}</a>
374
+ </li>
375
+ <# } #>
376
+ <# } #>
377
+ </ul>
378
+ </script>
379
+
380
+ <?php
381
+ // Add to library button.
382
+ ?>
383
+ <script type="text/template" id="tmpl-templator-add-to-library">
384
+ <a class="templator-add-to-library page-title-action cartflows-load-steps-library"><i class="dashicons dashicons-cloud"></i><?php esc_attr_e( 'Import from Cloud', 'cartflows' ); ?></a>
385
+ </script>
386
+ <?php
387
+ }
388
+
389
+ /**
390
+ * Enqueue scripts
391
+ *
392
+ * @since 1.0.0
393
+ *
394
+ * @hook admin_enqueue_scripts
395
+ * @param string $hook Current page hook.
396
+ */
397
+ function scripts( $hook = '' ) {
398
+
399
+ if ( ! self::is_supported_post( get_current_screen()->post_type ) ) {
400
+ return;
401
+ }
402
+
403
+ wp_enqueue_script( 'cartflows-rest-api', CARTFLOWS_URL . 'assets/js/rest-api.js', array( 'jquery' ), CARTFLOWS_VER, true );
404
+ wp_enqueue_style( 'cartflows-import', CARTFLOWS_URL . 'assets/css/import.css', null, CARTFLOWS_VER, 'all' );
405
+ wp_style_add_data( 'cartflows-import', 'rtl', 'replace' );
406
+ wp_enqueue_script( 'cartflows-import', CARTFLOWS_URL . 'assets/js/import.js', array( 'jquery', 'wp-util', 'cartflows-rest-api', 'updates' ), CARTFLOWS_VER, true );
407
+
408
+ $localize_vars = array(
409
+ '_is_pro_active' => _is_cartflows_pro(),
410
+
411
+ // Flow and its rest fields.
412
+ 'flow' => CARTFLOWS_FLOW_POST_TYPE,
413
+ 'flow_fields' => array(
414
+ 'id',
415
+ 'title',
416
+ 'flow_type',
417
+ 'flow_steps',
418
+ 'licence_status',
419
+ 'featured_image_url',
420
+ 'featured_media', // @required for field `featured_image_url`.
421
+ ),
422
+
423
+ // Flow type and rest fields.
424
+ 'flow_type' => CARTFLOWS_TAXONOMY_FLOW_CATEGORY,
425
+ 'flow_type_fields' => array(
426
+ 'id',
427
+ 'name',
428
+ 'slug',
429
+ ),
430
+
431
+ // Step and its rest fields.
432
+ 'step' => CARTFLOWS_STEP_POST_TYPE,
433
+ 'step_fields' => array(
434
+ 'title',
435
+ 'featured_image_url',
436
+ 'featured_media', // @required for field `featured_image_url`.
437
+ 'id',
438
+ 'flow_type',
439
+ 'licence_status',
440
+ ),
441
+
442
+ // Step type and its rest fields.
443
+ 'step_type' => CARTFLOWS_TAXONOMY_STEP_TYPE,
444
+ 'step_type_fields' => array(
445
+ 'id',
446
+ 'name',
447
+ 'slug',
448
+ ),
449
+
450
+ 'domain_url' => CARTFLOWS_DOMAIN_URL,
451
+ 'server_url' => CARTFLOWS_TEMPLATES_URL,
452
+ 'server_rest_url' => CARTFLOWS_TEMPLATES_URL . 'wp-json/wp/v2/',
453
+ 'site_url' => site_url(),
454
+ 'admin_url' => admin_url(),
455
+ 'licence_args' => CartFlows_API::get_instance()->get_licence_args(),
456
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
457
+ 'debug' => ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || isset( $_GET['debug'] ) ) ? true : false,
458
+ );
459
+
460
+ // Add thickbox.
461
+ add_thickbox();
462
+
463
+ wp_localize_script( 'cartflows-import', 'CartFlowsImportVars', $localize_vars );
464
+ wp_localize_script( 'cartflows-rest-api', 'CartFlowsImportVars', $localize_vars );
465
+ }
466
+
467
+ /**
468
+ * Load Template
469
+ *
470
+ * @since 1.0.0
471
+ *
472
+ * @hook cartflows_load_steps
473
+ * @return void
474
+ */
475
+ function load_templates() {
476
+
477
+ check_ajax_referer( 'cf-load-steps', 'security' );
478
+
479
+ $args = ( isset( $_POST['args'] ) ) ? array_map( 'sanitize_text_field', $_POST['args'] ) : array();
480
+ $templates = CartFlows_API::get_instance()->get_templates( $args );
481
+
482
+ if ( $templates['templates_count'] ) {
483
+ wp_send_json_success( $templates );
484
+ } else {
485
+ wp_send_json_error( $templates );
486
+ }
487
+ wp_die();
488
+ }
489
+
490
+ /**
491
+ * Import.
492
+ *
493
+ * @since 1.0.0
494
+ *
495
+ * @hook wp_ajax_cartflows_import_flow_step
496
+ * @return void
497
+ */
498
+ function import_flow() {
499
+
500
+ check_ajax_referer( 'cf-import-flow-step', 'security' );
501
+
502
+ $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
503
+ $template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
504
+
505
+ wcf()->logger->import_log( '------------------------------------' );
506
+ wcf()->logger->import_log( 'STARTED! Importing FLOW' );
507
+ wcf()->logger->import_log( '------------------------------------' );
508
+ wcf()->logger->import_log( '(✓) Creating new step from remote step [' . $template_id . '] for FLOW ' . get_the_title( $flow_id ) . ' [' . $flow_id . ']' );
509
+
510
+ $response = CartFlows_API::get_instance()->get_template( $template_id );
511
+
512
+ if ( false === $response['success'] ) {
513
+ wcf()->logger->import_log( '(✕) Failed to fetch remote data.' );
514
+ wp_send_json_error( $response );
515
+ }
516
+
517
+ wcf()->logger->import_log( '(✓) Successfully getting remote step response ' . json_encode( $response ) );
518
+
519
+ $new_step_id = wp_insert_post(
520
+ array(
521
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
522
+ 'post_title' => $response['title'],
523
+ 'post_content' => '',
524
+ 'post_status' => 'publish',
525
+ )
526
+ );
527
+
528
+ if ( is_wp_error( $new_step_id ) ) {
529
+ wcf()->logger->import_log( '(✕) Failed to create new step for flow ' . $flow_id );
530
+ wp_send_json_error( $new_step_id );
531
+ }
532
+
533
+ wcf()->logger->import_log( '(✓) Created new step ' . '"' . $response['title'] . '" id ' . $new_step_id );
534
+ // insert post meta.
535
+ update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
536
+ wcf()->logger->import_log( '(✓) Added flow ID ' . $flow_id . ' in post meta key wcf-flow-id.' );
537
+
538
+ /**
539
+ * Import & Set type.
540
+ */
541
+ $term = isset( $response['data']['step_type'] ) ? $response['data']['step_type'] : '';
542
+ $term_slug = '';
543
+ if ( $term ) {
544
+
545
+ $taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
546
+ $term_exist = term_exists( $term->name, $taxonomy );
547
+
548
+ if ( empty( $term_exist ) ) {
549
+ $terms = array(
550
+ array(
551
+ 'name' => $term->name,
552
+ ),
553
+ );
554
+
555
+ Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
556
+ wcf()->logger->import_log( '(✓) Created new term ' . $term->name );
557
+ }
558
+
559
+ $current_term = term_exists( $term->name, $taxonomy );
560
+
561
+ // Set type object.
562
+ $data = get_term( $current_term['term_id'], $taxonomy );
563
+ $term_slug = $data->slug;
564
+ $term_name = $data->name;
565
+ wp_set_object_terms( $new_step_id, $term_slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
566
+ wcf()->logger->import_log( '(✓) Assigned existing term ' . $term_name . ' to the template ' . $new_step_id );
567
+
568
+ // Set type.
569
+ update_post_meta( $new_step_id, 'wcf-step-type', $term_slug );
570
+ wcf()->logger->import_log( '(✓) Updated term ' . $term_name . ' to the post meta wcf-step-type.' );
571
+ }
572
+
573
+ // Set flow.
574
+ wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
575
+ wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
576
+
577
+ /**
578
+ * Update steps for the current flow.
579
+ */
580
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
581
+
582
+ if ( ! is_array( $flow_steps ) ) {
583
+ $flow_steps = array();
584
+ }
585
+
586
+ $flow_steps[] = array(
587
+ 'id' => $new_step_id,
588
+ 'title' => $response['title'],
589
+ 'type' => $term_slug,
590
+ );
591
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
592
+ wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . json_encode( $flow_steps ) );
593
+
594
+ // Import Post Meta.
595
+ self::import_post_meta( $new_step_id, $response );
596
+
597
+ wcf()->logger->import_log( '(✓) Importing step "' . get_the_title( $new_step_id ) . '" [' . $new_step_id . '] for FLOW "' . get_the_title( $flow_id ) . '" [' . $flow_id . ']' );
598
+ wcf()->logger->import_log( '------------------------------------' );
599
+ wcf()->logger->import_log( 'COMPLETE! Importing FLOW' );
600
+ wcf()->logger->import_log( '------------------------------------' );
601
+
602
+ do_action( 'cartflows_import_complete' );
603
+ wcf()->logger->import_log( '(✓) BATCH STARTED for step ' . $new_step_id . ' for Blog name \'' . get_bloginfo( 'name' ) . '\' (' . get_current_blog_id() . ')' );
604
+
605
+ // Batch Process.
606
+ do_action( 'cartflows_after_template_import', $new_step_id, $response );
607
+
608
+ /**
609
+ * End
610
+ */
611
+ wp_send_json_success( $new_step_id );
612
+ }
613
+
614
+ /**
615
+ * Import Step.
616
+ *
617
+ * @since 1.0.0
618
+ * @hook wp_ajax_cartflows_step_import
619
+ *
620
+ * @return void
621
+ */
622
+ function create_default_flow() {
623
+
624
+ check_ajax_referer( 'cf-default-flow', 'security' );
625
+
626
+ // Create post object.
627
+ $new_flow_post = array(
628
+ 'post_content' => '',
629
+ 'post_status' => 'publish',
630
+ 'post_type' => CARTFLOWS_FLOW_POST_TYPE,
631
+ );
632
+
633
+ // Insert the post into the database.
634
+ $flow_id = wp_insert_post( $new_flow_post );
635
+
636
+ if ( is_wp_error( $flow_id ) ) {
637
+ wp_send_json_error( $flow_id->get_error_message() );
638
+ }
639
+
640
+ $flow_steps = array();
641
+
642
+ $steps_data = array(
643
+ 'landing' => __( 'Landing Page', 'cartflows' ),
644
+ 'checkout' => __( 'Checkout Page', 'cartflows' ),
645
+ 'thankyou' => __( 'Thank You Page', 'cartflows' ),
646
+ );
647
+
648
+ foreach ( $steps_data as $slug => $title ) {
649
+
650
+ $post_content = '';
651
+
652
+ switch ( $slug ) {
653
+ case 'checkout':
654
+ $post_content = '';
655
+ break;
656
+ case 'thankyou':
657
+ $post_content = '';
658
+ break;
659
+ default:
660
+ $post_content = '';
661
+ break;
662
+ }
663
+
664
+ $step_id = wp_insert_post(
665
+ array(
666
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
667
+ 'post_title' => $title,
668
+ 'post_content' => $post_content,
669
+ 'post_status' => 'publish',
670
+ )
671
+ );
672
+
673
+ if ( is_wp_error( $step_id ) ) {
674
+ wp_send_json_error( $step_id->get_error_message() );
675
+ }
676
+
677
+ if ( $step_id ) {
678
+
679
+ $flow_steps[] = array(
680
+ 'id' => $step_id,
681
+ 'title' => $title,
682
+ 'type' => $slug,
683
+ );
684
+
685
+ // insert post meta.
686
+ update_post_meta( $step_id, 'wcf-flow-id', $flow_id );
687
+ update_post_meta( $step_id, 'wcf-step-type', $slug );
688
+
689
+ wp_set_object_terms( $step_id, $slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
690
+ wp_set_object_terms( $step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
691
+ }
692
+ }
693
+
694
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
695
+
696
+ wp_send_json_success( $flow_id );
697
+ }
698
+
699
+ /**
700
+ * Create Flow
701
+ *
702
+ * @return void
703
+ */
704
+ function create_flow() {
705
+
706
+ check_ajax_referer( 'cf-create-flow', 'security' );
707
+
708
+ // Create post object.
709
+ $new_flow_post = array(
710
+ 'post_content' => '',
711
+ 'post_status' => 'publish',
712
+ 'post_type' => CARTFLOWS_FLOW_POST_TYPE,
713
+ );
714
+
715
+ // Insert the post into the database.
716
+ $flow_id = wp_insert_post( $new_flow_post );
717
+
718
+ if ( is_wp_error( $flow_id ) ) {
719
+ wp_send_json_error( $flow_id->get_error_message() );
720
+ }
721
+
722
+ wp_send_json_success( $flow_id );
723
+ }
724
+
725
+ /**
726
+ * Create Step
727
+ *
728
+ * @return void
729
+ */
730
+ function import_step() {
731
+
732
+ check_ajax_referer( 'cf-step-import', 'security' );
733
+
734
+ $template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
735
+ $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
736
+ $step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( $_POST['step_title'] ) : '';
737
+ $step_type = isset( $_POST['step_type'] ) ? sanitize_title( $_POST['step_type'] ) : '';
738
+ $step_custom_title = isset( $_POST['step_custom_title'] ) ? sanitize_title( $_POST['step_custom_title'] ) : $step_title;
739
+
740
+ $cartflow_meta = Cartflows_Flow_Meta::get_instance();
741
+
742
+ $post_id = $cartflow_meta->create_step( $flow_id, $step_type, $step_custom_title );
743
+
744
+ wcf()->logger->import_log( '------------------------------------' );
745
+ wcf()->logger->import_log( 'STARTED! Importing STEP' );
746
+ wcf()->logger->import_log( '------------------------------------' );
747
+
748
+ if ( empty( $template_id ) || empty( $post_id ) ) {
749
+ /* translators: %s: template ID */
750
+ $data = sprintf( __( 'Invalid template id %1$s or post id %2$s.', 'cartflows' ), $template_id, $post_id );
751
+ wcf()->logger->import_log( $data );
752
+ wp_send_json_error( $data );
753
+ }
754
+
755
+ wcf()->logger->import_log( 'Remote Step ' . $template_id . ' for local flow "' . get_the_title( $post_id ) . '" [' . $post_id . ']' );
756
+
757
+ $response = CartFlows_API::get_instance()->get_template( $template_id );
758
+
759
+ wcf()->logger->import_log( json_encode( $response ) );
760
+
761
+ // Import Post Meta.
762
+ self::import_post_meta( $post_id, $response );
763
+
764
+ do_action( 'cartflows_import_complete' );
765
+
766
+ // Batch Process.
767
+ do_action( 'cartflows_after_template_import', $post_id, $response );
768
+
769
+ wcf()->logger->import_log( '------------------------------------' );
770
+ wcf()->logger->import_log( 'COMPLETE! Importing Step' );
771
+ wcf()->logger->import_log( '------------------------------------' );
772
+
773
+ wp_send_json_success( $post_id );
774
+ }
775
+
776
+ /**
777
+ * Import Step.
778
+ *
779
+ * @since 1.0.0
780
+ * @hook wp_ajax_cartflows_step_create_blank
781
+ *
782
+ * @return void
783
+ */
784
+ function step_create_blank() {
785
+
786
+ check_ajax_referer( 'cf-step-create-blank', 'security' );
787
+
788
+ $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
789
+ $step_type = isset( $_POST['step_type'] ) ? sanitize_text_field( $_POST['step_type'] ) : '';
790
+ $step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( $_POST['step_title'] ) : '';
791
+
792
+ if ( empty( $flow_id ) || empty( $step_type ) ) {
793
+ /* translators: %s: flow ID */
794
+ $data = sprintf( __( 'Invalid flow id %1$s or step type %2$s.', 'cartflows' ), $flow_id, $step_type );
795
+ wcf()->logger->import_log( $data );
796
+ wp_send_json_error( $data );
797
+ }
798
+
799
+ wcf()->logger->import_log( '------------------------------------' );
800
+ wcf()->logger->import_log( 'STARTED! Creating Blank STEP for Flow ' . $flow_id );
801
+
802
+ $step_type_title = str_replace( '-', ' ', $step_type );
803
+ $step_type_slug = strtolower( str_replace( '-', ' ', $step_type ) );
804
+
805
+ $new_step_id = wp_insert_post(
806
+ array(
807
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
808
+ 'post_title' => $step_title,
809
+ 'post_content' => '',
810
+ 'post_status' => 'publish',
811
+ )
812
+ );
813
+
814
+ // insert post meta.
815
+ update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
816
+
817
+ $taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
818
+ $term_exist = term_exists( $step_type_title, $taxonomy );
819
+
820
+ if ( empty( $term_exist ) ) {
821
+ $terms = array(
822
+ array(
823
+ 'name' => $step_type_title,
824
+ ),
825
+ );
826
+
827
+ Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
828
+ wcf()->logger->import_log( '(✓) Created new term ' . $step_type_title );
829
+ }
830
+
831
+ $current_term = term_exists( $step_type_title, $taxonomy );
832
+
833
+ // Set type object.
834
+ $data = get_term( $current_term['term_id'], $taxonomy );
835
+ $step_slug = $data->slug;
836
+ wp_set_object_terms( $new_step_id, $data->slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
837
+ wcf()->logger->import_log( '(✓) Assigned existing term ' . $step_type_title . ' to the template ' . $new_step_id );
838
+
839
+ // Set type.
840
+ update_post_meta( $new_step_id, 'wcf-step-type', $data->slug );
841
+ wcf()->logger->import_log( '(✓) Updated term ' . $data->name . ' to the post meta wcf-step-type.' );
842
+
843
+ // Set flow.
844
+ wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
845
+ wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
846
+
847
+ CartFlows_Importer::get_instance()->set_step_to_flow( $flow_id, $new_step_id, $step_type_title, $step_slug );
848
+
849
+ wcf()->logger->import_log( 'COMPLETE! Creating Blank STEP for Flow ' . $flow_id );
850
+ wcf()->logger->import_log( '------------------------------------' );
851
+
852
+ wp_send_json_success( $new_step_id );
853
+ }
854
+
855
+ /**
856
+ * Import Post Meta
857
+ *
858
+ * @since 1.0.0
859
+ *
860
+ * @param integer $post_id Post ID.
861
+ * @param array $response Post meta.
862
+ * @return void
863
+ */
864
+ public static function import_post_meta( $post_id, $response ) {
865
+
866
+ $metadata = (array) $response['post_meta'];
867
+
868
+ foreach ( $metadata as $meta_key => $meta_value ) {
869
+ $meta_value = isset( $meta_value[0] ) ? $meta_value[0] : '';
870
+
871
+ if ( $meta_value ) {
872
+
873
+ if ( is_serialized( $meta_value, true ) ) {
874
+ $raw_data = maybe_unserialize( stripslashes( $meta_value ) );
875
+ } elseif ( is_array( $meta_value ) ) {
876
+ $raw_data = json_decode( stripslashes( $meta_value ), true );
877
+ } else {
878
+ $raw_data = $meta_value;
879
+ }
880
+
881
+ if ( '_elementor_data' === $meta_key ) {
882
+
883
+ if ( is_array( $raw_data ) ) {
884
+ $raw_data = wp_slash( json_encode( $raw_data ) );
885
+ } else {
886
+ $raw_data = wp_slash( $raw_data );
887
+ }
888
+ wcf()->logger->import_log( $raw_data );
889
+ }
890
+
891
+ if ( is_array( $raw_data ) ) {
892
+ wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . json_encode( $raw_data ) );
893
+ } else {
894
+ wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . $raw_data );
895
+ }
896
+
897
+ update_post_meta( $post_id, $meta_key, $raw_data );
898
+ }
899
+ }
900
+ }
901
+
902
+ /**
903
+ * Import Template for Elementor
904
+ *
905
+ * @since 1.0.0
906
+ *
907
+ * @param integer $post_id Post ID.
908
+ * @param array $response Post meta.
909
+ * @param array $page_build_data Page build data.
910
+ * @return void
911
+ */
912
+ public static function import_template_elementor( $post_id, $response, $page_build_data ) {
913
+ if ( ! is_plugin_active( 'elementor/elementor.php' ) ) {
914
+ $data = __( 'Elementor is not activated. Please activate plugin Elementor Page Builder to import the step.', 'cartflows' );
915
+ wcf()->logger->import_log( $data );
916
+ wp_send_json_error( $data );
917
+ }
918
+
919
+ require_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-importer-elementor.php';
920
+
921
+ wcf()->logger->import_log( '# Started "importing page builder data" for step ' . $post_id );
922
+
923
+ $obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
924
+ $obj->import_single_template( $post_id );
925
+
926
+ wcf()->logger->import_log( '# Complete "importing page builder data" for step ' . $post_id );
927
+ }
928
+
929
+ /**
930
+ * Supported post types
931
+ *
932
+ * @since 1.0.0
933
+ *
934
+ * @return array Supported post types.
935
+ */
936
+ public static function supported_post_types() {
937
+ return apply_filters(
938
+ 'cartflows_supported_post_types',
939
+ array(
940
+ CARTFLOWS_FLOW_POST_TYPE,
941
+ )
942
+ );
943
+ }
944
+
945
+ /**
946
+ * Check supported post type
947
+ *
948
+ * @since 1.0.0
949
+ *
950
+ * @param string $post_type Post type.
951
+ * @return boolean Supported post type status.
952
+ */
953
+ public static function is_supported_post( $post_type = '' ) {
954
+ if ( in_array( $post_type, self::supported_post_types() ) ) {
955
+ return true;
956
+ }
957
+
958
+ return false;
959
+ }
960
+
961
+ /**
962
+ * Set steps to the flow
963
+ *
964
+ * @param integer $flow_id Flow ID.
965
+ * @param integer $new_step_id New step ID.
966
+ * @param string $step_title Flow Type.
967
+ * @param string $step_slug Flow Type.
968
+ */
969
+ function set_step_to_flow( $flow_id, $new_step_id, $step_title, $step_slug ) {
970
+ // Update steps for the current flow.
971
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
972
+
973
+ if ( ! is_array( $flow_steps ) ) {
974
+ $flow_steps = array();
975
+ }
976
+
977
+ $flow_steps[] = array(
978
+ 'id' => $new_step_id,
979
+ 'title' => $step_title,
980
+ 'type' => $step_slug,
981
+ );
982
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
983
+ wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . json_encode( $flow_steps ) );
984
+ }
985
+
986
+ /**
987
+ * Localize variables in admin
988
+ *
989
+ * @param array $vars variables.
990
+ */
991
+ function localize_vars( $vars ) {
992
+
993
+ $ajax_actions = array(
994
+ 'cf_step_import',
995
+ 'cf_load_steps',
996
+ 'cf_create_flow',
997
+ 'cf_default_flow',
998
+ 'cf_step_create_blank',
999
+ 'cf_import_flow_step',
1000
+ );
1001
+
1002
+ foreach ( $ajax_actions as $action ) {
1003
+
1004
+ $vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
1005
+ }
1006
+
1007
+ return $vars;
1008
+ }
1009
+
1010
+ /**
1011
+ * Ajax action to activate plugin
1012
+ */
1013
+ public function activate_plugin() {
1014
+
1015
+ $plugin_slug = isset( $_POST['plugin_slug'] ) ? sanitize_text_field( $_POST['plugin_slug'] ) : '';
1016
+
1017
+ if ( ! is_plugin_active( $plugin_slug ) ) {
1018
+
1019
+ $activate = activate_plugin( $plugin_slug, '', false, true );
1020
+
1021
+ if ( is_wp_error( $activate ) ) {
1022
+ wp_send_json_error();
1023
+ }
1024
+ }
1025
+
1026
+ wp_send_json_success();
1027
+ }
1028
+
1029
+ }
1030
+
1031
+ /**
1032
+ * Initialize class object with 'get_instance()' method
1033
+ */
1034
+ CartFlows_Importer::get_instance();
1035
+
1036
+ endif;
classes/class-cartflows-loader.php ADDED
@@ -0,0 +1,416 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Loader.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ if ( ! class_exists( 'Cartflows_Loader' ) ) {
9
+
10
+ /**
11
+ * Class Cartflows_Loader.
12
+ */
13
+ final class Cartflows_Loader {
14
+
15
+ /**
16
+ * Member Variable
17
+ *
18
+ * @var instance
19
+ */
20
+ private static $instance = null;
21
+
22
+ /**
23
+ * Member Variable
24
+ *
25
+ * @var utils
26
+ */
27
+ public $utils = null;
28
+
29
+ /**
30
+ * Member Variable
31
+ *
32
+ * @var logger
33
+ */
34
+ public $logger = null;
35
+
36
+ /**
37
+ * Member Variable
38
+ *
39
+ * @var session
40
+ */
41
+ public $session = null;
42
+
43
+
44
+ /**
45
+ * Member Variable
46
+ *
47
+ * @var options
48
+ */
49
+ public $options = null;
50
+
51
+ /**
52
+ * Member Variable
53
+ *
54
+ * @var meta
55
+ */
56
+ public $meta = null;
57
+
58
+ /**
59
+ * Member Variable
60
+ *
61
+ * @var flow
62
+ */
63
+ public $flow = null;
64
+
65
+ /**
66
+ * Initiator
67
+ */
68
+ public static function get_instance() {
69
+
70
+ if ( is_null( self::$instance ) ) {
71
+
72
+ self::$instance = new self;
73
+
74
+ /**
75
+ * CartFlows loaded.
76
+ *
77
+ * Fires when Cartflows was fully loaded and instantiated.
78
+ *
79
+ * @since 1.0.0
80
+ */
81
+ do_action( 'cartflows_loaded' );
82
+ }
83
+
84
+ return self::$instance;
85
+ }
86
+
87
+ /**
88
+ * Constructor
89
+ */
90
+ public function __construct() {
91
+
92
+ $this->define_constants();
93
+
94
+ // Activation hook.
95
+ register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
96
+
97
+ // deActivation hook.
98
+ register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
99
+
100
+ add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
101
+
102
+ add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
103
+
104
+ // Update compatibility.
105
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
106
+ }
107
+
108
+ /**
109
+ * Defines all constants
110
+ *
111
+ * @since 1.0.0
112
+ */
113
+ public function define_constants() {
114
+
115
+ define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
116
+ define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
117
+ define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
118
+ define( 'CARTFLOWS_VER', '1.0.4' );
119
+ define( 'CARTFLOWS_SLUG', 'cartflows' );
120
+ define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
121
+
122
+ define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
123
+ define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
124
+
125
+ if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
126
+ define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
127
+ }
128
+ define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
129
+ define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
130
+ define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
131
+ define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
132
+
133
+ if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
134
+ define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
135
+ }
136
+ if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
137
+ define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
138
+ }
139
+ }
140
+
141
+ /**
142
+ * Loads plugin files.
143
+ *
144
+ * @since 1.0.0
145
+ *
146
+ * @return void
147
+ */
148
+ function load_plugin() {
149
+
150
+ if ( ! function_exists( 'WC' ) ) {
151
+ add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
152
+ return;
153
+ }
154
+
155
+ $this->load_helper_files_components();
156
+ $this->load_core_files();
157
+ $this->load_core_components();
158
+
159
+ /**
160
+ * CartFlows Init.
161
+ *
162
+ * Fires when Cartflows is instantiated.
163
+ *
164
+ * @since 1.0.0
165
+ */
166
+ do_action( 'cartflows_init' );
167
+ }
168
+
169
+ /**
170
+ * Load Helper Files and Components.
171
+ *
172
+ * @since 1.0.0
173
+ *
174
+ * @return void
175
+ */
176
+ function load_helper_files_components() {
177
+
178
+ /* Public Utils */
179
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
180
+
181
+ /* Public Session */
182
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-session.php';
183
+
184
+ /* Public Global namespace functions */
185
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
186
+
187
+ /* Admin Helper */
188
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
189
+
190
+ /* Meta Default Values */
191
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
192
+
193
+ $this->utils = Cartflows_Utils::get_instance();
194
+ $this->session = Cartflows_Session::get_instance();
195
+ $this->options = Cartflows_Default_Meta::get_instance();
196
+
197
+ }
198
+
199
+ /**
200
+ * Load Core Files.
201
+ *
202
+ * @since 1.0.0
203
+ *
204
+ * @return void
205
+ */
206
+ function load_core_files() {
207
+
208
+ /* Page builder compatibilty class */
209
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
210
+
211
+ /* Admin Meta Fields*/
212
+ include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
213
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
214
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
215
+
216
+ /* Cloning */
217
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
218
+
219
+ /* Admin Settings */
220
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
221
+
222
+ /* Core Modules */
223
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
224
+
225
+ /* Frontend Global */
226
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
227
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
228
+
229
+ /* Modules */
230
+ include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
231
+ include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
232
+ include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
233
+ include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
234
+
235
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
236
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
237
+
238
+ include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
239
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
240
+ }
241
+
242
+ /**
243
+ * Load Core Components.
244
+ *
245
+ * @since 1.0.0
246
+ *
247
+ * @return void
248
+ */
249
+ function load_core_components() {
250
+
251
+ $this->meta = Cartflows_Meta_Fields::get_instance();
252
+ $this->logger = Cartflows_Logger::get_instance();
253
+ $this->flow = Cartflows_Flow_Frontend::get_instance();
254
+ }
255
+
256
+ /**
257
+ * Load CartFlows Pro Text Domain.
258
+ * This will load the translation textdomain depending on the file priorities.
259
+ * 1. Global Languages /wp-content/languages/cartflows/ folder
260
+ * 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
261
+ *
262
+ * @since 1.0.3
263
+ * @return void
264
+ */
265
+ public function load_cf_textdomain() {
266
+
267
+ // Default languages directory for CartFlows Pro.
268
+ $lang_dir = CARTFLOWS_DIR . 'languages/';
269
+
270
+ /**
271
+ * Filters the languages directory path to use for CartFlows Pro.
272
+ *
273
+ * @param string $lang_dir The languages directory path.
274
+ */
275
+ $lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
276
+
277
+ // Traditional WordPress plugin locale filter.
278
+ global $wp_version;
279
+
280
+ $get_locale = get_locale();
281
+
282
+ if ( $wp_version >= 4.7 ) {
283
+ $get_locale = get_user_locale();
284
+ }
285
+
286
+ /**
287
+ * Language Locale for CartFlows Pro
288
+ *
289
+ * @var $get_locale The locale to use.
290
+ * Uses get_user_locale()` in WordPress 4.7 or greater,
291
+ * otherwise uses `get_locale()`.
292
+ */
293
+ $locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
294
+ $mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
295
+
296
+ // Setup paths to current locale file.
297
+ $mofile_local = $lang_dir . $mofile;
298
+ $mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
299
+
300
+ if ( file_exists( $mofile_global ) ) {
301
+ // Look in global /wp-content/languages/cartflows/ folder.
302
+ load_textdomain( 'cartflows', $mofile_global );
303
+ } elseif ( file_exists( $mofile_local ) ) {
304
+ // Look in local /wp-content/plugins/cartflows/languages/ folder.
305
+ load_textdomain( 'cartflows', $mofile_local );
306
+ } else {
307
+ // Load the default language files.
308
+ load_plugin_textdomain( 'cartflows', false, $lang_dir );
309
+ }
310
+ }
311
+
312
+ /**
313
+ * Fires admin notice when Elementor is not installed and activated.
314
+ *
315
+ * @since 1.0.0
316
+ *
317
+ * @return void
318
+ */
319
+ public function fails_to_load() {
320
+
321
+ $screen = get_current_screen();
322
+
323
+ if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
324
+ return;
325
+ }
326
+
327
+ $class = 'notice notice-error';
328
+ /* translators: %s: html tags */
329
+ $message = sprintf( __( 'The %1$sCartFlows%2$s plugin requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
330
+
331
+ $plugin = 'woocommerce/woocommerce.php';
332
+
333
+ if ( _is_woo_installed() ) {
334
+ if ( ! current_user_can( 'activate_plugins' ) ) {
335
+ return;
336
+ }
337
+
338
+ $action_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
339
+ $button_label = __( 'Activate WooCommerce', 'cartflows' );
340
+
341
+ } else {
342
+ if ( ! current_user_can( 'install_plugins' ) ) {
343
+ return;
344
+ }
345
+
346
+ $action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
347
+ $button_label = __( 'Install WooCommerce', 'cartflows' );
348
+ }
349
+
350
+ $button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
351
+
352
+ printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
353
+ }
354
+
355
+ /**
356
+ * Activation Reset
357
+ */
358
+ function activation_reset() {
359
+
360
+ include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
361
+ include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
362
+
363
+ Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
364
+ Cartflows_Step_Post_Type::get_instance()->step_post_type();
365
+ flush_rewrite_rules();
366
+ }
367
+
368
+ /**
369
+ * Deactivation Reset
370
+ */
371
+ function deactivation_reset() {
372
+ }
373
+
374
+ /**
375
+ * Logger Class Instance
376
+ */
377
+ function logger() {
378
+ return Cartflows_Logger::get_instance();
379
+ }
380
+
381
+
382
+ }
383
+
384
+ /**
385
+ * Prepare if class 'Cartflows_Loader' exist.
386
+ * Kicking this off by calling 'get_instance()' method
387
+ */
388
+ Cartflows_Loader::get_instance();
389
+ }
390
+
391
+ /**
392
+ * Get global class.
393
+ *
394
+ * @return object
395
+ */
396
+ function wcf() {
397
+ return Cartflows_Loader::get_instance();
398
+ }
399
+
400
+ if ( ! function_exists( '_is_woo_installed' ) ) {
401
+
402
+ /**
403
+ * Is woocommerce plugin installed.
404
+ *
405
+ * @since 1.0.0
406
+ *
407
+ * @access public
408
+ */
409
+ function _is_woo_installed() {
410
+
411
+ $path = 'woocommerce/woocommerce.php';
412
+ $plugins = get_plugins();
413
+
414
+ return isset( $plugins[ $path ] );
415
+ }
416
+ }
classes/class-cartflows-logger.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Logger.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Logger {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Member Variable
25
+ *
26
+ * @var logger
27
+ */
28
+ public $logger;
29
+
30
+ /**
31
+ * Initiator
32
+ */
33
+ public static function get_instance() {
34
+ if ( ! isset( self::$instance ) ) {
35
+ self::$instance = new self;
36
+ }
37
+ return self::$instance;
38
+ }
39
+
40
+ /**
41
+ * Constructor
42
+ */
43
+ public function __construct() {
44
+
45
+ /* Load WC Logger */
46
+ add_action( 'init', array( $this, 'init_wc_logger' ), 99 );
47
+ }
48
+
49
+ /**
50
+ * Inint Logger.
51
+ *
52
+ * @since 1.0.0
53
+ */
54
+ function init_wc_logger() {
55
+ $this->logger = new WC_Logger();
56
+ }
57
+
58
+ /**
59
+ * Write log
60
+ *
61
+ * @param string $message log message.
62
+ * @param string $level type of log.
63
+ * @since 1.0.0
64
+ */
65
+ function log( $message, $level = 'info' ) {
66
+
67
+ $enable_log = apply_filters( 'cartflows_enable_log', 'enable' );
68
+
69
+ if ( 'enable' === $enable_log &&
70
+ is_a( $this->logger, 'WC_Logger' ) &&
71
+ did_action( 'plugins_loaded' )
72
+ ) {
73
+
74
+ $this->logger->log( $level, $message, array( 'source' => 'cartflows' ) );
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Write log
80
+ *
81
+ * @param string $message log message.
82
+ * @param string $level type of log.
83
+ * @since 1.0.0
84
+ */
85
+ function import_log( $message, $level = 'info' ) {
86
+
87
+ if ( defined( 'WP_DEBUG' ) &&
88
+ WP_DEBUG &&
89
+ is_a( $this->logger, 'WC_Logger' ) &&
90
+ did_action( 'plugins_loaded' )
91
+ ) {
92
+
93
+ $this->logger->log( $level, $message, array( 'source' => 'cartflows-import' ) );
94
+ }
95
+ }
96
+ }
97
+
98
+ /**
99
+ * Kicking this off by calling 'get_instance()' method
100
+ */
101
+ Cartflows_Logger::get_instance();
classes/class-cartflows-meta-fields.php ADDED
@@ -0,0 +1,940 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // @codingStandardsIgnoreStart
3
+ /**
4
+ * Meta Fields.
5
+ *
6
+ * @package CartFlows
7
+ */
8
+
9
+ /**
10
+ * Class Cartflows_Meta_Fields.
11
+ */
12
+ class Cartflows_Meta_Fields {
13
+
14
+ /**
15
+ * Instance
16
+ *
17
+ * @var $instance
18
+ */
19
+ private static $instance;
20
+
21
+ /**
22
+ * Initiator
23
+ */
24
+ public static function get_instance() {
25
+ if ( ! isset( self::$instance ) ) {
26
+ self::$instance = new self;
27
+ }
28
+
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Constructor
34
+ */
35
+ public function __construct() {
36
+
37
+ /* Add Scripts */
38
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_meta_scripts' ), 20 );
39
+
40
+ add_action( 'wp_ajax_wcf_json_search_coupons', array( $this, 'json_search_coupons' ) );
41
+
42
+ add_action( 'wp_ajax_wcf_add_checkout_custom_field', array( $this, 'add_checkout_custom_field' ) );
43
+ add_action( 'wp_ajax_wcf_delete_checkout_custom_field', array( $this, 'delete_checkout_custom_field' ) );
44
+
45
+ add_action( 'wp_ajax_wcf_json_search_pages', array( $this, 'json_search_pages' ) );
46
+
47
+ add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
48
+ }
49
+
50
+ public function admin_meta_scripts() {
51
+
52
+ global $pagenow;
53
+ global $post;
54
+
55
+ $screen = get_current_screen();
56
+
57
+ if (
58
+ ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) &&
59
+ wcf()->utils->is_step_post_type( $screen->post_type )
60
+ ) {
61
+
62
+ wp_enqueue_style( 'woocommerce_admin_styles' );
63
+
64
+ wp_enqueue_script( 'select2' );
65
+ wp_enqueue_script( 'wc-enhanced-select' );
66
+
67
+ wp_enqueue_script(
68
+ 'wcf-admin-meta',
69
+ CARTFLOWS_URL . 'admin/meta-assets/js/admin-edit.js',
70
+ array( 'jquery', 'select2', 'wp-color-picker' ),
71
+ CARTFLOWS_VER,
72
+ true
73
+ );
74
+
75
+ wp_enqueue_style( 'wcf-admin-meta', CARTFLOWS_URL . 'admin/meta-assets/css/admin-edit.css', array( 'wp-color-picker' ), CARTFLOWS_VER );
76
+ wp_style_add_data( 'wcf-admin-meta', 'rtl', 'replace' );
77
+
78
+ $localize = array(
79
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
80
+ 'google_fonts' => CartFlows_Font_Families::get_google_fonts(),
81
+ 'system_fonts' => CartFlows_Font_Families::get_system_fonts(),
82
+ 'font_weights' => array(
83
+ '100' => __( 'Thin 100', 'cartflows' ),
84
+ '200' => __( 'Extra-Light 200', 'cartflows' ),
85
+ '300' => __( 'Light 300', 'cartflows' ),
86
+ '400' => __( 'Normal 400', 'cartflows' ),
87
+ '500' => __( 'Medium 500', 'cartflows' ),
88
+ '600' => __( 'Semi-Bold 600', 'cartflows' ),
89
+ '700' => __( 'Bold 700', 'cartflows' ),
90
+ '800' => __( 'Extra-Bold 800', 'cartflows' ),
91
+ '900' => __( 'Ultra-Bold 900', 'cartflows' ),
92
+ )
93
+ );
94
+
95
+ wp_localize_script( 'jquery', 'wcf', apply_filters( 'wcf_js_localize', $localize ) );
96
+
97
+ do_action( 'cartflows_admin_meta_scripts' );
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Function to search coupons
103
+ */
104
+ public function json_search_coupons() {
105
+
106
+ check_admin_referer( 'wcf-json-search-coupons', 'security' );
107
+
108
+ global $wpdb;
109
+
110
+ $term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
111
+
112
+ if ( empty( $term ) ) {
113
+ die();
114
+ }
115
+
116
+ $posts = wp_cache_get( 'wcf_search_coupons', 'wcf_funnel_Cart' );
117
+
118
+ if ( false === $posts ) {
119
+ $posts = $wpdb->get_results( // phpcs:ignore
120
+ $wpdb->prepare(
121
+ "SELECT *
122
+ FROM {$wpdb->prefix}posts
123
+ WHERE post_type = %s
124
+ AND post_title LIKE %s
125
+ AND post_status = %s",
126
+ 'shop_coupon',
127
+ $wpdb->esc_like( $term ) . '%',
128
+ 'publish'
129
+ )
130
+ );
131
+ wp_cache_set( 'wcf_search_coupons', $posts, 'wcf_funnel_Cart' );
132
+ }
133
+
134
+ $coupons_found = array();
135
+ $all_discount_types = wc_get_coupon_types();
136
+
137
+ if ( $posts ) {
138
+ foreach ( $posts as $post ) {
139
+
140
+ $discount_type = get_post_meta( $post->ID, 'discount_type', true );
141
+
142
+ if ( ! empty( $all_discount_types[ $discount_type ] ) ) {
143
+ $coupons_found[ get_the_title( $post->ID ) ] = get_the_title( $post->ID ) . ' (Type: ' . $all_discount_types[ $discount_type ] . ')';
144
+ }
145
+ }
146
+ }
147
+
148
+ wp_send_json( $coupons_found );
149
+ }
150
+
151
+ /**
152
+ * [add_checkout_custom_field description]
153
+ *
154
+ * @hook wcf_add_checkout_custom_field
155
+ */
156
+ public function add_checkout_custom_field() {
157
+
158
+ check_ajax_referer( 'wcf-add-checkout-custom-field', 'security' );
159
+
160
+ $post_id = intval( $_POST['post_id'] );
161
+ $add_to = sanitize_text_field( wp_unslash( $_POST['add_to'] ) );
162
+ $type = sanitize_text_field( wp_unslash( $_POST['type'] ) );
163
+ $label = sanitize_text_field( wp_unslash( $_POST['label'] ) );
164
+ $name = sanitize_text_field( wp_unslash( $_POST['name'] ) );
165
+
166
+ if ( '' !== $name ) {
167
+
168
+ $fields = Cartflows_Helper::get_checkout_fields( $add_to, $post_id );
169
+ $field_keys = array_keys($fields);
170
+
171
+ $name = $add_to . '_' . sanitize_key( $name );
172
+ if( in_array($name, $field_keys) ) {
173
+ $name = $name . '_' . rand( 0000, 9999 );
174
+ }
175
+
176
+ $field_data = array(
177
+ 'type' => $type,
178
+ 'label' => $label,
179
+ 'placeholder' => '',
180
+ 'options' => array(),
181
+ 'class' => array( 'form-row-wide' ),
182
+ 'label_class' => array(),
183
+ 'required' => true,
184
+ 'custom' => true,
185
+ );
186
+
187
+ Cartflows_Helper::add_checkout_field( $add_to, $name, $field_data, $post_id );
188
+
189
+ $key = sanitize_key( $name );
190
+ $name = 'wcf-' . $key;
191
+
192
+ $field_args = array(
193
+ 'label' => $label,
194
+ 'name' => $name,
195
+ 'value' => 'yes',
196
+ 'after' => 'Enable',
197
+ );
198
+
199
+ $field_args['after_html'] = '<span class="wcf-cpf-actions" data-type="billing" data-key="' . $key . '"> | ';
200
+ $field_args['after_html'] .= '<a class="wcf-cpf-action-remove">' . __( 'Remove', 'cartflows' ) . '</a>';
201
+ $field_args['after_html'] .= '</span>';
202
+
203
+ $field_markup = wcf()->meta->get_checkbox_field( $field_args );
204
+
205
+ if( 'billing' === $add_to ) {
206
+ $add_to_class = 'wcf-cb-fields';
207
+ } else if( 'shipping' === $add_to ) {
208
+ $add_to_class = 'wcf-sb-fields';
209
+ }
210
+
211
+ $data = array(
212
+ 'field_data' => $field_data,
213
+ 'field_args' => $field_args,
214
+ 'add_to_class' => $add_to_class,
215
+ 'markup' => $field_markup,
216
+ );
217
+
218
+ wp_send_json( $data );
219
+ }
220
+
221
+ wp_send_json( false );
222
+
223
+ }
224
+
225
+ /**
226
+ * [delete_checkout_custom_field description]
227
+ *
228
+ * @hook wcf_delete_checkout_custom_field
229
+ * @return [type] [description]
230
+ */
231
+ public function delete_checkout_custom_field() {
232
+
233
+ check_ajax_referer( 'wcf-delete-checkout-custom-field', 'security' );
234
+
235
+ $post_id = intval( $_POST['post_id'] );
236
+ $type = sanitize_text_field( wp_unslash( $_POST['type'] ) );
237
+ $key = sanitize_text_field( wp_unslash( $_POST['key'] ) );
238
+
239
+ if ( '' !== $key ) {
240
+
241
+ Cartflows_Helper::delete_checkout_field( $type, $key, $post_id );
242
+
243
+ wp_send_json( true );
244
+
245
+ }
246
+
247
+ wp_send_json( false );
248
+
249
+ }
250
+
251
+ /**
252
+ * Function to search coupons
253
+ */
254
+ public function json_search_pages() {
255
+
256
+ check_ajax_referer( 'wcf-json-search-pages', 'security' );
257
+
258
+ $term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
259
+
260
+ if ( empty( $term ) ) {
261
+ die( 'not found' );
262
+ }
263
+
264
+ $search_string = $term;
265
+ $data = array();
266
+ $result = array();
267
+
268
+ add_filter( 'posts_search', array( $this, 'search_only_titles' ), 10, 2 );
269
+
270
+ $query = new WP_Query(
271
+ array(
272
+ 's' => $search_string,
273
+ 'post_type' => 'page',
274
+ 'posts_per_page' => - 1,
275
+ )
276
+ );
277
+
278
+ if ( $query->have_posts() ) {
279
+ while ( $query->have_posts() ) {
280
+ $query->the_post();
281
+ $title = get_the_title();
282
+ $title .= ( 0 != $query->post->post_parent ) ? ' (' . get_the_title( $query->post->post_parent ) . ')' : '';
283
+ $id = get_the_id();
284
+ $data[] = array(
285
+ 'id' => $id,
286
+ 'text' => $title,
287
+ );
288
+ }
289
+ }
290
+
291
+ if ( is_array( $data ) && ! empty( $data ) ) {
292
+ $result[] = array(
293
+ 'text' => '',
294
+ 'children' => $data,
295
+ );
296
+ }
297
+
298
+ wp_reset_postdata();
299
+
300
+ // return the result in json.
301
+ wp_send_json( $result );
302
+ }
303
+
304
+ public function search_only_titles( $search, $wp_query ) {
305
+ if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
306
+ global $wpdb;
307
+
308
+ $q = $wp_query->query_vars;
309
+ $n = ! empty( $q['exact'] ) ? '' : '%';
310
+
311
+ $search = array();
312
+
313
+ foreach ( (array) $q['search_terms'] as $term ) {
314
+ $search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
315
+ }
316
+
317
+ if ( ! is_user_logged_in() ) {
318
+ $search[] = "$wpdb->posts.post_password = ''";
319
+ }
320
+
321
+ $search = ' AND ' . implode( ' AND ', $search );
322
+ }
323
+
324
+ return $search;
325
+ }
326
+
327
+ function get_field( $field_data, $field_content ) {
328
+
329
+ $label = isset( $field_data['label'] ) ? $field_data['label'] : '';
330
+ $help = isset( $field_data['help'] ) ? $field_data['help'] : '';
331
+ $after_html = isset( $field_data['after_html'] ) ? $field_data['after_html'] : '';
332
+
333
+ $name_class = 'field-' . $field_data['name'];
334
+
335
+ $field_html = '<div class="wcf-field-row ' . $name_class . '">';
336
+
337
+ if( ! empty( $label ) || ! empty( $help ) ) {
338
+ $field_html .= '<div class="wcf-field-row-heading">';
339
+ if( ! empty( $label ) ) {
340
+ $field_html .= '<label>' . esc_html( $label ) . '</label>';
341
+ }
342
+ if ( ! empty( $help ) ) {
343
+ $field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help">';
344
+ // $field_html .= '<span class="wcf-tooltip" data-tooltip= "'. esc_attr( $help ) .'"></span>';
345
+ $field_html .= '</i>';
346
+ $field_html .= '<span class="wcf-tooltip-text">';
347
+ $field_html .= $help;
348
+ $field_html .= '</span>';
349
+ }
350
+ $field_html .= '</div>';
351
+ }
352
+
353
+ $field_html .= '<div class="wcf-field-row-content">';
354
+ $field_html .= $field_content;
355
+
356
+ if ( ! empty( $after_html ) ) {
357
+ $field_html .= $after_html;
358
+ }
359
+
360
+ $field_html .= '</div>';
361
+ $field_html .= '</div>';
362
+
363
+ return $field_html;
364
+ }
365
+
366
+ function get_text_field( $field_data ) {
367
+
368
+ $value = $field_data['value'];
369
+
370
+ $attr = '';
371
+
372
+ if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
373
+
374
+ foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
375
+ $attr .= ' ' . $attr_key . '="' . $attr_value . '"';
376
+ }
377
+ }
378
+
379
+ $field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
380
+
381
+ return $this->get_field( $field_data, $field_content );
382
+ }
383
+
384
+ function get_shortcode_field( $field_data ) {
385
+
386
+ $attr = '';
387
+
388
+ $attr_fields = array(
389
+ 'readonly' => 'readonly',
390
+ 'onfocus' => 'this.select()',
391
+ 'onmouseup' => 'return false',
392
+ );
393
+
394
+ if ( $attr_fields && is_array( $attr_fields ) ) {
395
+
396
+ foreach ( $attr_fields as $attr_key => $attr_value ) {
397
+ $attr .= ' ' . $attr_key . '="' . $attr_value . '"';
398
+ }
399
+ }
400
+
401
+ $field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . $field_data['content'] . '" ' . $attr . '>';
402
+
403
+ return $this->get_field( $field_data, $field_content );
404
+ }
405
+
406
+ function get_display_field( $field_data ) {
407
+
408
+ $field_content = $field_data['content'];
409
+
410
+ return $this->get_field( $field_data, $field_content );
411
+ }
412
+
413
+ function get_number_field( $field_data ) {
414
+
415
+ $value = $field_data['value'];
416
+
417
+ $attr = '';
418
+
419
+ if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
420
+
421
+ foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
422
+ $attr .= ' ' . $attr_key . '="' . $attr_value . '"';
423
+ }
424
+ }
425
+
426
+ $field_content = '<input type="number" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
427
+
428
+ return $this->get_field( $field_data, $field_content );
429
+ }
430
+
431
+ function get_hidden_field( $field_data ) {
432
+
433
+ $value = $field_data['value'];
434
+
435
+ $attr = '';
436
+
437
+ if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
438
+
439
+ foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
440
+ $attr .= ' ' . $attr_key . '="' . $attr_value . '"';
441
+ }
442
+ }
443
+
444
+ $field_content = '<input type="hidden" id="' . $field_data['name'] . '" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
445
+
446
+ return $this->get_field( $field_data, $field_content );
447
+ }
448
+
449
+ function get_area_field( $field_data ) {
450
+
451
+ $value = $field_data['value'];
452
+
453
+ $field_content = '<textarea name="' . $field_data['name'] . '" rows="10" cols="50">';
454
+ $field_content .= $value;
455
+ $field_content .= '</textarea>';
456
+
457
+ return $this->get_field( $field_data, $field_content );
458
+ }
459
+
460
+ function get_checkbox_field( $field_data ) {
461
+
462
+ $value = $field_data['value'];
463
+
464
+ $field_content = '';
465
+ if ( isset( $field_data['before'] ) ) {
466
+ $field_content .= '<span>' . $field_data['before'] . '</span>';
467
+ }
468
+ $field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
469
+ $field_content .= '<input type="checkbox" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . '>';
470
+
471
+ if ( isset( $field_data['after'] ) ) {
472
+ $field_content .= '<span>' . $field_data['after'] . '</span>';
473
+ }
474
+
475
+ return $this->get_field( $field_data, $field_content );
476
+ }
477
+
478
+ function get_font_family_field( $field_data ) {
479
+
480
+ $value = $field_data['value'];
481
+
482
+ $pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
483
+
484
+ $field_content = '<select class="wcf-field-font-family" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
485
+
486
+ $field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
487
+
488
+ $field_content .= '<optgroup label="Other System Fonts">';
489
+ foreach ( CartFlows_Font_Families::get_system_fonts() as $name => $variants ) {
490
+ $field_content .= '<option value="' . esc_attr( $name ) . '" ' . selected( $name, $value, false ) . '>' . esc_attr( $name ) . '</option>';
491
+ }
492
+ $field_content .= '</optgroup>';
493
+ $field_content .= '<optgroup label="Google">';
494
+ foreach ( CartFlows_Font_Families::get_google_fonts() as $name => $single_font ) {
495
+ $variants = wcf_get_prop( $single_font, '0' );
496
+ $category = wcf_get_prop( $single_font, '1' );
497
+ $font_value = '\'' . esc_attr( $name ) . '\', ' . esc_attr( $category );
498
+ $field_content .= '<option value="' . esc_attr( $font_value ) . '" ' . selected( $font_value, $value, false ) . '>' . esc_attr( $name ) . '</option>';
499
+ }
500
+ $field_content .= '</optgroup>';
501
+
502
+ $field_content .= '</select>';
503
+
504
+ return $this->get_field( $field_data, $field_content );
505
+ }
506
+
507
+ function get_font_weight_field( $field_data ) {
508
+
509
+ $value = $field_data['value'];
510
+
511
+ $pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
512
+
513
+ $field_content = '<select data-selected="'.esc_attr( $value ).'" class="wcf-field-font-weight" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
514
+
515
+ $field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
516
+
517
+ $field_content .= '</select>';
518
+
519
+ return $this->get_field( $field_data, $field_content );
520
+ }
521
+
522
+ function get_select_field( $field_data ) {
523
+
524
+ $value = $field_data['value'];
525
+ $pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
526
+
527
+ $field_content = '<select name="' . $field_data['name'] . '">';
528
+
529
+
530
+ if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
531
+
532
+ foreach ( $field_data['options'] as $data_key => $data_value ) {
533
+
534
+ $disabled = '';
535
+
536
+ if ( array_key_exists( $data_key, $pro_options ) ) {
537
+ $disabled = 'disabled ';
538
+ $data_value = $pro_options[ $data_key ];
539
+ }
540
+
541
+ $field_content .= '<option value="' . $data_key . '" ' . selected( $value, $data_key, false ) . ' ' . $disabled .'>' . $data_value . '</option>';
542
+ }
543
+ }
544
+
545
+ $field_content .= '</select>';
546
+
547
+ if ( isset( $field_data['after'] ) ) {
548
+ $field_content .= '<span>' . $field_data['after'] . '</span>';
549
+ }
550
+
551
+ return $this->get_field( $field_data, $field_content );
552
+ }
553
+
554
+ function get_color_picker_field( $field_data ) {
555
+
556
+ $value = $field_data['value'];
557
+
558
+ $field_content = '<input class="wcf-color-picker" type="text" name="' . $field_data['name'] . '" value="' . $value . '">';
559
+
560
+ return $this->get_field( $field_data, $field_content );
561
+ }
562
+
563
+ function get_product_selection_field( $field_data ) {
564
+
565
+ $value = $field_data['value'];
566
+
567
+ $multiple = '';
568
+
569
+ if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
570
+ $multiple = ' multiple="multiple"';
571
+ }
572
+
573
+ $allow_clear = '';
574
+
575
+ if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
576
+ $allow_clear = ' data-allow_clear="allow_clear"';
577
+ }
578
+
579
+ $field_content = '<select
580
+ name="' . $field_data['name'] . '[]"
581
+ class="wcf-product-search" ' . $multiple . $allow_clear . '
582
+ data-placeholder="' . __( 'Search for a product&hellip;', 'cartflows' ) . '"
583
+ data-action="woocommerce_json_search_products_and_variations">';
584
+
585
+ if ( is_array( $value ) && ! empty( $value ) ) {
586
+
587
+ foreach ( $value as $data_key => $product_id ) {
588
+
589
+ $product = wc_get_product( $product_id );
590
+
591
+ // posts.
592
+ if ( ! empty( $product ) ) {
593
+ $post_title = $product->get_name() . ' (#' . $product_id . ')';
594
+
595
+ $field_content .= '<option value="' . $product_id . '" selected="selected" >' . $post_title . '</option>';
596
+ }
597
+ }
598
+ }
599
+ $field_content .= '</select>';
600
+
601
+ return $this->get_field( $field_data, $field_content );
602
+ }
603
+
604
+ function get_coupon_selection_field( $field_data ) {
605
+
606
+ $value = $field_data['value'];
607
+
608
+ $multiple = '';
609
+
610
+ if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
611
+ $multiple = ' multiple="multiple"';
612
+ }
613
+
614
+ $allow_clear = '';
615
+
616
+ if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
617
+ $allow_clear = ' data-allow_clear="allow_clear"';
618
+ }
619
+
620
+ $field_content = '<select
621
+ name="' . $field_data['name'] . '[]"
622
+ class="wc-coupon-search wcf-coupon-search" ' . $multiple . $allow_clear . '
623
+ data-placeholder="' . __( 'Search for a coupon&hellip;', 'cartflows' ) . '"
624
+ data-action="wcf_json_search_coupons">';
625
+
626
+ if ( is_array( $value ) && ! empty( $value ) ) {
627
+
628
+ $all_discount_types = wc_get_coupon_types();
629
+
630
+ foreach ( $value as $coupon_title ) {
631
+
632
+ $coupon = new WC_Coupon( $coupon_title );
633
+
634
+ $discount_type = $coupon->get_discount_type();
635
+
636
+ if ( isset( $discount_type ) && $discount_type ) {
637
+ $discount_type = ' ( Type: ' . $all_discount_types[ $discount_type ] . ' )';
638
+ }
639
+
640
+ $field_content .= '<option value="' . $coupon_title . '" selected="selected">' . $coupon_title . $discount_type . '</option>';
641
+ }
642
+ }
643
+
644
+ $field_content .= '</select>';
645
+
646
+ return $this->get_field( $field_data, $field_content );
647
+ }
648
+
649
+ function get_page_selection_field( $field_data ) {
650
+
651
+ $value = $field_data['value'];
652
+
653
+ $multiple = '';
654
+
655
+ if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
656
+ $multiple = 'multiple="multiple"';
657
+ }
658
+
659
+ $field_content = '<select
660
+ name="' . $field_data['name'] . '[]"
661
+ class="wcf-search-pages" ' . $multiple . '"
662
+ data-action="wcf_json_search_pages">';
663
+
664
+ if ( is_array( $value ) && ! empty( $value ) ) {
665
+
666
+ foreach ( $value as $data_key => $data_value ) {
667
+
668
+ $field_content .= '<option value="' . $data_value . '">' . get_the_title( $data_value ) . '</option>';
669
+ }
670
+ }
671
+
672
+ $field_content .= '</select>';
673
+
674
+ return $this->get_field( $field_data, $field_content );
675
+ }
676
+
677
+ function get_section( $field_data ) {
678
+ $field_html = '<div class="wcf-field-row wcf-field-section">';
679
+ $field_html .= '<div class="wcf-field-section-heading" colspan="2">';
680
+ $field_html .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
681
+
682
+ if ( isset( $field_data['help'] ) ) {
683
+ $field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help" title="' . esc_attr( $field_data['help'] ) . '"></i>';
684
+ }
685
+ $field_html .= '</div>';
686
+ $field_html .= '</div>';
687
+ return $field_html;
688
+ }
689
+
690
+ function get_description_field( $field_data ) {
691
+
692
+ $field_html = '<div class="wcf-field-row wcf-field-desc ' . $field_data['name'] . '">';
693
+ $field_html .= '<div class="wcf-field-desc-content">';
694
+ $field_html .= $field_data['content'];
695
+ $field_html .= '</div>';
696
+ $field_html .= '</div>';
697
+
698
+ return $field_html;
699
+ }
700
+
701
+ function get_checkout_field_repeater( $field_data ) {
702
+
703
+ $value = array();
704
+
705
+ $value[0] = array(
706
+ 'add_to' => '',
707
+ 'type' => '',
708
+ 'label' => '',
709
+ 'name' => '',
710
+ );
711
+
712
+ $field_content = '';
713
+
714
+ $field_content .= '<div class="wcf-field-row">';
715
+ // $field_content .= '<div class="wcf-field-row-heading">';
716
+ // $field_content .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
717
+ // $field_content .= '</div>';
718
+ $field_content .= '<div class="wcf-field-row-content">';
719
+ $field_content .= '<div class="wcf-cpf-wrap">';
720
+
721
+ foreach ( $value as $p_key => $p_data ) {
722
+ $field_content .= '<div class="wcf-cpf-row" data-key="' . $p_key . '">';
723
+ $field_content .= '<div class="wcf-cpf-row-header">';
724
+ $field_content .= '<span class="wcf-cpf-row-title">Add New Custom Field</span>';
725
+ $field_content .= '</div>';
726
+
727
+ $field_content .= '<div class="wcf-cpf-row-standard-fields">';
728
+
729
+ /* Add To */
730
+ $field_content .= '<div class="wcf-cpf-fields wcf-cpf-add_to">';
731
+ $field_content .= '<span class="wcf-cpf-row-setting-label">Add to</span>';
732
+ $field_content .= '<span class="wcf-cpf-row-setting-field">';
733
+ $field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][add_to]" class="wcf-cpf-add_to">';
734
+ $field_content .= '<option value="billing">Billing</option>';
735
+ $field_content .= '<option value="shipping">Shipping</option>';
736
+ $field_content .= '</select>';
737
+ $field_content .= '</span>';
738
+ $field_content .= '</div>';
739
+
740
+ /* Type */
741
+ $field_content .= '<div class="wcf-cpf-fields wcf-cpf-type">';
742
+ $field_content .= '<span class="wcf-cpf-row-setting-label">Type</span>';
743
+ $field_content .= '<span class="wcf-cpf-row-setting-field">';
744
+ $field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][type]" class="wcf-cpf-type">';
745
+ $field_content .= '<option value="text">Text</option>';
746
+ $field_content .= '<option value="textarea">Textarea</option>';
747
+ $field_content .= '<option value="select">Select</option>';
748
+ $field_content .= '<option value="checkbox">Checkbox</option>';
749
+ $field_content .= '</select>';
750
+ $field_content .= '</span>';
751
+ $field_content .= '</div>';
752
+
753
+ /* Label */
754
+ $field_content .= '<div class="wcf-cpf-fields wcf-cpf-label">';
755
+ $field_content .= '<span class="wcf-cpf-row-setting-label">Label *</span>';
756
+ $field_content .= '<span class="wcf-cpf-row-setting-field">';
757
+ $field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][label]" class="wcf-cpf-label">';
758
+ $field_content .= '</span>';
759
+ $field_content .= '</div>';
760
+
761
+ /* Name */
762
+ $field_content .= '<div class="wcf-cpf-fields wcf-cpf-name">';
763
+ $field_content .= '<span class="wcf-cpf-row-setting-label">Name *</span>';
764
+ $field_content .= '<span class="wcf-cpf-row-setting-field">';
765
+ $field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][name]" class="wcf-cpf-name">';
766
+ $field_content .= '</span>';
767
+ $field_content .= '</div>';
768
+
769
+ $field_content .= '</div>';
770
+ $field_content .= '</div>';
771
+ }
772
+
773
+ /* Add New Custom Field */
774
+ $field_content .= '<div class="wcf-cpf-add-row">';
775
+ $field_content .= '<div class="wcf-cpf-add-wrap">';
776
+ $field_content .= '<button class="button button-secondary wcf-cpf-add" data-name="wcf-checkout-custom-fields">Add New Field</button>';
777
+ $field_content .= '</div>';
778
+ $field_content .= '</div>';
779
+ /* End Add new custom field */
780
+
781
+ $field_content .= '</div>';
782
+ $field_content .= '</div>';
783
+ $field_content .= '</div>';
784
+
785
+ return $field_content;
786
+ }
787
+
788
+ function get_product_selection_repeater( $field_data ) {
789
+
790
+ $value = $field_data['value'];
791
+
792
+ if ( ! is_array( $value ) ) {
793
+
794
+ $value[0] = array(
795
+ 'product' => '',
796
+ );
797
+ } else {
798
+
799
+ if ( ! isset( $value[0] ) ) {
800
+
801
+ $value[0] = array(
802
+ 'product' => '',
803
+ );
804
+ }
805
+ }
806
+
807
+ $field_html = '';
808
+
809
+ $field_html .= '<script type="text/html" id="tmpl-wcf-product-repeater">';
810
+ $field_html .= $this->generate_product_repeater_html( '{{id}}' );
811
+ $field_html .= '</script>';
812
+
813
+ $field_html .= '<div class="wcf-field-row">';
814
+ $field_html .= '<div class="wcf-field-row-content">';
815
+ $field_html .= '<div class="wcf-repeatables-wrap">';
816
+
817
+ if ( is_array( $value ) ) {
818
+
819
+ foreach ( $value as $p_key => $p_data ) {
820
+
821
+ $selected_options = '';
822
+
823
+ if ( isset( $p_data['product'] ) ) {
824
+
825
+ $product = wc_get_product( $p_data['product'] );
826
+
827
+ // posts.
828
+ if ( ! empty( $product ) ) {
829
+ $post_title = $product->get_name() . ' (#' . $p_data['product'] . ')';
830
+
831
+ $selected_options = '<option value="' . $p_data['product'] . '" selected="selected" >' . $post_title . '</option>';
832
+ }
833
+ }
834
+
835
+ $field_html .= $this->generate_product_repeater_html( $p_key, $selected_options );
836
+ }
837
+ }
838
+
839
+ $field_html .= '<div class="wcf-add-repeatable-row">';
840
+ $field_html .= '<div class="submit wcf-add-repeatable-wrap">';
841
+ $field_html .= '<button class="button-primary wcf-add-repeatable" data-name="wcf-checkout-products">Add New Product</button>';
842
+ $field_html .= '</div>';
843
+ $field_html .= '</div>';
844
+ $field_html .= '</div>';
845
+ $field_html .= '</div>';
846
+ $field_html .= '</div>';
847
+
848
+ $field_html .= '<div class="wcf-field-row wcf-repeat-notice">';
849
+ $field_html .= '<p><i>The selected products will be automatically added in the cart for this checkout.</i></p>';
850
+ $field_html .= '</div>';
851
+
852
+ return $field_html;
853
+ }
854
+
855
+ function generate_product_repeater_html( $id, $options = '' ) {
856
+
857
+ $field_html = '<div class="wcf-repeatable-row" data-key="' . $id . '">';
858
+
859
+ $field_html .= '<div class="wcf-repeatable-row-standard-fields">';
860
+
861
+ /* Product Name */
862
+ $field_html .= '<div class="wcf-repeatable-fields wcf-sel-product">';
863
+ $field_html .= '<span class="wcf-repeatable-row-setting-field">';
864
+ $field_html .= '<select
865
+ name="wcf-checkout-products[' . $id . '][product]"
866
+ class="wcf-product-search"
867
+ data-allow_clear="allow_clear"
868
+ data-placeholder="' . __( 'Search for a product&hellip;', 'cartflows' ) . '"
869
+ data-action="woocommerce_json_search_products_and_variations">';
870
+ $field_html .= $options;
871
+ $field_html .= '</select>';
872
+ $field_html .= '</span>';
873
+ $field_html .= '<span class="wcf-repeatable-row-actions">';
874
+ $field_html .= '<a class="wcf-remove-row wcf-repeatable-remove button" data-type="product">';
875
+ $field_html .= '<span class="dashicons dashicons-trash"></span>';
876
+ $field_html .= '<span class="wcf-repeatable-remove-button">'. __( 'Remove', 'cartflows' ).'</span>';
877
+ $field_html .= '</a>';
878
+ $field_html .= '</span>';
879
+ $field_html .= '</div>';
880
+ $field_html .= '</div>';
881
+ $field_html .= '</div>';
882
+
883
+ return $field_html;
884
+ }
885
+
886
+ function get_image_field( $field_data ) {
887
+
888
+ $value = $field_data['value'];
889
+
890
+ $attr = '';
891
+
892
+ if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
893
+
894
+ foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
895
+ $attr .= ' ' . $attr_key . '="' . $attr_value . '"';
896
+ }
897
+ }
898
+
899
+ $display_preview_box = ( isset( $value ) && '' != $value ) ? 'display:block;' : 'display:none';
900
+
901
+ $field_content = '<div id="wcf-image-preview" style="'.$display_preview_box.'">';
902
+ if( isset( $value ) ){
903
+ $field_content .= '<img src="'. $value .'" class="saved-image" name="'. $field_data['name'] .'" width="150">';
904
+ }
905
+ $field_content .= '</div>';
906
+ // $field_content .= '<input type="hidden" id="wcf-image-id" class="wcf-image-id" name="wcf-image-id[image-id]" value="">';
907
+ $field_content .= '<input type="hidden" id="wcf-image-value" class="wcf-image" name="' . $field_data['name'] . '" value="'.$value.'">';
908
+
909
+ $field_content .= '<button type="button" ' . $attr . ' class="wcf-select-image button-secondary">Select Image</button>';
910
+
911
+ $display_remove_button = ( isset( $value ) && '' != $value ) ? 'display:inline-block; margin-left: 5px;' : 'display:none';
912
+
913
+ $field_content .= '<button type="button" class="wcf-remove-image button-secondary" style="'.$display_remove_button.'">Remove Image</button>';
914
+
915
+ return $this->get_field( $field_data, $field_content );
916
+ }
917
+
918
+ /**
919
+ * Localize variables in admin
920
+ *
921
+ * @param array $vars variables.
922
+ */
923
+ function localize_vars( $vars ) {
924
+
925
+ $ajax_actions = array(
926
+ 'wcf_add_checkout_custom_field',
927
+ 'wcf_delete_checkout_custom_field',
928
+ 'wcf_json_search_pages',
929
+ 'wcf_json_search_coupons'
930
+ );
931
+
932
+ foreach ( $ajax_actions as $action ) {
933
+
934
+ $vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
935
+ }
936
+
937
+ return $vars;
938
+ }
939
+ }
940
+ // @codingStandardsIgnoreEnd
classes/class-cartflows-meta.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CartFlows Meta
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! class_exists( 'Cartflows_Meta' ) ) :
10
+
11
+ /**
12
+ * CartFlows_Meta
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Meta {
17
+ /**
18
+ * Constructor
19
+ *
20
+ * @since 1.0.0
21
+ */
22
+ public function __construct() {
23
+ }
24
+
25
+ /**
26
+ * Flow & Step Actions
27
+ *
28
+ * @param array $options options.
29
+ * @param int $post_id post ID.
30
+ */
31
+ function right_column_footer( $options, $post_id ) {
32
+ ?>
33
+ <div class="wcf-column-right-footer">
34
+ <?php submit_button( __( 'Update', 'cartflows' ), 'primary', 'save', false ); ?>
35
+
36
+ <?php
37
+ $flow_id = get_post_meta( $post_id, 'wcf-flow-id', true );
38
+ if ( $flow_id ) {
39
+ ?>
40
+ <a href="<?php echo esc_url( get_edit_post_link( $flow_id ) ); ?>" class="button pull-right wcf-back-to-flow-edit">
41
+ <i class="dashicons dashicons-arrow-left-alt"></i>
42
+ <?php _e( 'Back to edit Flow', 'cartflows' ); ?>
43
+ </a>
44
+ <?php } ?>
45
+
46
+ </div>
47
+ <?php
48
+ }
49
+ }
50
+
51
+ endif;
classes/class-cartflows-session.php ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Session
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Session {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ }
39
+
40
+ /**
41
+ * Set session
42
+ *
43
+ * @param int $flow_id flow ID.
44
+ * @param array $data trasient data.
45
+ */
46
+ function set_session( $flow_id, $data = array() ) {
47
+
48
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
49
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
50
+ } else {
51
+ $key = $flow_id . '_' . md5( time() . rand() );
52
+ }
53
+
54
+ // Set the browser cookie to expire in 30 minutes.
55
+ setcookie( 'cartflows_session_' . $flow_id, $key, time() + 30 * MINUTE_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
56
+
57
+ // Try to grab the transient from the database, if it exists.
58
+ $transient = $data;
59
+
60
+ // Store the transient, but expire in 30 minutes.
61
+ set_transient( 'cartflows_data_' . $key, $transient, 30 * MINUTE_IN_SECONDS );
62
+
63
+ wp_cache_set( 'cartflows_data_' . $key, $transient );
64
+
65
+ wcf()->logger->log( 'Flow-' . $flow_id . ' Session Set : ' . $key . ' ' . json_encode( $transient ) );
66
+ }
67
+
68
+ /**
69
+ * Update session
70
+ *
71
+ * @param int $flow_id flow ID.
72
+ * @param array $data trasient data.
73
+ */
74
+ function update_session( $flow_id, $data = array() ) {
75
+
76
+ if ( ! isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
77
+
78
+ $this->set_session( $flow_id, $data );
79
+ }
80
+
81
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
82
+
83
+ // Try to grab the transient from the database, if it exists.
84
+ $transient = get_transient( 'cartflows_data_' . $key );
85
+
86
+ // Set the browser cookie to expire in 30 minutes.
87
+ setcookie( 'cartflows_session_' . $flow_id, $key, time() + 30 * MINUTE_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
88
+
89
+ // Store the transient, but expire in 30 minutes.
90
+ set_transient( 'cartflows_data_' . $key, $transient, 30 * MINUTE_IN_SECONDS );
91
+
92
+ wp_cache_set( 'cartflows_data_' . $key, $transient );
93
+ }
94
+
95
+ /**
96
+ * Destroy session
97
+ *
98
+ * @param int $flow_id flow ID.
99
+ */
100
+ function destroy_session( $flow_id ) {
101
+
102
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
103
+
104
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
105
+
106
+ // Delete Transient.
107
+ delete_transient( 'cartflows_data_' . $key );
108
+
109
+ wp_cache_delete( 'cartflows_data_' . $key );
110
+
111
+ unset( $_COOKIE[ 'cartflows_session_' . $flow_id ] );
112
+
113
+ // empty value and expiration one hour before.
114
+ setcookie( 'cartflows_session_' . $flow_id, $key, time() - 3600, COOKIEPATH, COOKIE_DOMAIN );
115
+
116
+ wcf()->logger->log( 'Flow-' . $flow_id . ' Session Destroyed : ' . $key );
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Get session
122
+ */
123
+ function get_session() {
124
+
125
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
126
+
127
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
128
+
129
+ $data = get_transient( 'cartflows_data_' . $key );
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Update transient data for cart flows.
135
+ *
136
+ * @param int $flow_id flow ID.
137
+ * @param array $data data.
138
+ */
139
+ function update_data( $flow_id, $data = array() ) {
140
+
141
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
142
+
143
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
144
+
145
+ // Try to grab the transient from the database, if it exists.
146
+ $transient = get_transient( 'cartflows_data_' . $key );
147
+
148
+ if ( ! is_array( $transient ) ) {
149
+ $transient = array();
150
+ }
151
+
152
+ $transient = array_merge( $transient, $data );
153
+
154
+ // Store the transient, but expire in 30 minutes.
155
+ set_transient( 'cartflows_data_' . $key, $transient, 30 * MINUTE_IN_SECONDS );
156
+
157
+ wp_cache_set( 'cartflows_data_' . $key, $transient );
158
+ }
159
+ }
160
+
161
+ /**
162
+ * Update transient data for cart flows.
163
+ *
164
+ * @param int $flow_id flow ID.
165
+ * @return bool
166
+ */
167
+ function get_data( $flow_id ) {
168
+
169
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
170
+
171
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
172
+
173
+ // Try to grab the transient from the database, if it exists.
174
+ $transient = get_transient( 'cartflows_data_' . $key );
175
+
176
+ if ( is_array( $transient ) ) {
177
+ return $transient;
178
+ }
179
+ }
180
+
181
+ return false;
182
+ }
183
+
184
+
185
+ /**
186
+ * Check if session is active.
187
+ *
188
+ * @param int $flow_id flow ID.
189
+ * @return bool
190
+ */
191
+ function is_active_session( $flow_id ) {
192
+
193
+ $is_active = false;
194
+
195
+ if ( isset( $_GET['wcf-sk'] ) && isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
196
+
197
+ $sk = sanitize_text_field( $_GET['wcf-sk'] );
198
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
199
+
200
+ if ( $sk === $key ) {
201
+
202
+ if ( isset( $_GET['wcf-order'] ) && isset( $_GET['wcf-key'] ) ) {
203
+
204
+ // Get the order.
205
+ $order_id = empty( $_GET['wcf-order'] ) ? 0 : intval( $_GET['wcf-order'] );
206
+ $order_key = empty( $_GET['wcf-key'] ) ? '' : wc_clean( wp_unslash( $_GET['wcf-key'] ) );
207
+
208
+ if ( $order_id > 0 ) {
209
+
210
+ $order = wc_get_order( $order_id );
211
+
212
+ if ( $order && $order->get_order_key() === $order_key ) {
213
+ $is_active = true;
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
219
+
220
+ return $is_active;
221
+ }
222
+
223
+ /**
224
+ * Get session key for flow
225
+ *
226
+ * @param int $flow_id flow ID.
227
+ * @return bool
228
+ */
229
+ function get_session_key( $flow_id ) {
230
+
231
+ if ( isset( $_COOKIE[ 'cartflows_session_' . $flow_id ] ) ) {
232
+
233
+ $key = (string) $_COOKIE[ 'cartflows_session_' . $flow_id ];
234
+
235
+ return $key;
236
+ }
237
+
238
+ return false;
239
+ }
240
+ }
241
+
242
+ /**
243
+ * Kicking this off by calling 'get_instance()' method
244
+ */
245
+ Cartflows_Session::get_instance();
classes/class-cartflows-update.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Update Compatibility
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ if ( ! class_exists( 'Cartflows_Update' ) ) :
9
+
10
+ /**
11
+ * CartFlows Update initial setup
12
+ *
13
+ * @since 1.0.0
14
+ */
15
+ class Cartflows_Update {
16
+
17
+ /**
18
+ * Class instance.
19
+ *
20
+ * @access private
21
+ * @var $instance Class instance.
22
+ */
23
+ private static $instance;
24
+
25
+ /**
26
+ * Initiator
27
+ */
28
+ public static function get_instance() {
29
+ if ( ! isset( self::$instance ) ) {
30
+ self::$instance = new self();
31
+ }
32
+ return self::$instance;
33
+ }
34
+
35
+ /**
36
+ * Constructor
37
+ */
38
+ public function __construct() {
39
+ add_action( 'admin_init', __CLASS__ . '::init' );
40
+ }
41
+
42
+ /**
43
+ * Init
44
+ *
45
+ * @since 1.0.0
46
+ * @return void
47
+ */
48
+ static public function init() {
49
+
50
+ do_action( 'cartflows_update_before' );
51
+
52
+ // Get auto saved version number.
53
+ $saved_version = get_option( 'cartflows-version', false );
54
+
55
+ // Update auto saved version number.
56
+ if ( ! $saved_version ) {
57
+ update_option( 'cartflows-version', CARTFLOWS_VER );
58
+ }
59
+
60
+ // If equals then return.
61
+ if ( version_compare( $saved_version, CARTFLOWS_VER, '=' ) ) {
62
+ return;
63
+ }
64
+
65
+ // Update auto saved version number.
66
+ update_option( 'cartflows-version', CARTFLOWS_VER );
67
+
68
+ do_action( 'cartflows_update_after' );
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Kicking this off by calling 'get_instance()' method
74
+ */
75
+ Cartflows_Update::get_instance();
76
+
77
+ endif;
classes/class-cartflows-utils.php ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Utils.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Class Cartflows_Utils.
14
+ */
15
+ class Cartflows_Utils {
16
+
17
+ /**
18
+ * Member Variable
19
+ *
20
+ * @var instance
21
+ */
22
+ private static $instance;
23
+
24
+ /**
25
+ * Initiator
26
+ */
27
+ public static function get_instance() {
28
+ if ( ! isset( self::$instance ) ) {
29
+ self::$instance = new self;
30
+ }
31
+ return self::$instance;
32
+ }
33
+
34
+ /**
35
+ * Constructor
36
+ */
37
+ function __construct() {
38
+ }
39
+
40
+ /**
41
+ * Get current post type
42
+ *
43
+ * @param string $post_type post type.
44
+ * @return string
45
+ */
46
+ function current_post_type( $post_type = '' ) {
47
+
48
+ if ( '' === $post_type ) {
49
+ $post_type = get_post_type();
50
+ }
51
+
52
+ return $post_type;
53
+ }
54
+
55
+ /**
56
+ * Check if post type is of step.
57
+ *
58
+ * @param string $post_type post type.
59
+ * @return bool
60
+ */
61
+ function is_step_post_type( $post_type = '' ) {
62
+
63
+ if ( $this->get_step_post_type() === $this->current_post_type( $post_type ) ) {
64
+
65
+ return true;
66
+ }
67
+
68
+ return false;
69
+ }
70
+
71
+ /**
72
+ * Check if post type is of flow.
73
+ *
74
+ * @param string $post_type post type.
75
+ * @return bool
76
+ */
77
+ function is_flow_post_type( $post_type = '' ) {
78
+
79
+ if ( $this->get_flow_post_type() === $this->current_post_type( $post_type ) ) {
80
+
81
+ return true;
82
+ }
83
+
84
+ return false;
85
+ }
86
+
87
+ /**
88
+ * Get post type of step.
89
+ *
90
+ * @return string
91
+ */
92
+ function get_step_post_type() {
93
+
94
+ return CARTFLOWS_STEP_POST_TYPE;
95
+ }
96
+
97
+ /**
98
+ * Get post type of flow.
99
+ *
100
+ * @return string
101
+ */
102
+ function get_flow_post_type() {
103
+
104
+ return CARTFLOWS_FLOW_POST_TYPE;
105
+ }
106
+
107
+ /**
108
+ * Get flow id
109
+ *
110
+ * @return int
111
+ */
112
+ function get_flow_id() {
113
+
114
+ global $post;
115
+
116
+ return get_post_meta( $post->ID, 'wcf-flow-id', true );
117
+ }
118
+
119
+ /**
120
+ * Get flow id by step
121
+ *
122
+ * @param int $step_id step ID.
123
+ * @return int
124
+ */
125
+ function get_flow_id_from_step_id( $step_id ) {
126
+
127
+ return get_post_meta( $step_id, 'wcf-flow-id', true );
128
+ }
129
+
130
+ /**
131
+ * Get flow steps by id
132
+ *
133
+ * @param int $flow_id flow ID.
134
+ * @return int
135
+ */
136
+ function get_flow_steps( $flow_id ) {
137
+
138
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
139
+
140
+ if ( is_array( $steps ) && ! empty( $steps ) ) {
141
+ return $steps;
142
+ }
143
+
144
+ return false;
145
+ }
146
+
147
+ /**
148
+ * Get template type of step
149
+ *
150
+ * @param int $step_id step ID.
151
+ * @return int
152
+ */
153
+ function get_step_type( $step_id ) {
154
+
155
+ return get_post_meta( $step_id, 'wcf-step-type', true );
156
+ }
157
+
158
+ /**
159
+ * Get next id for step
160
+ *
161
+ * @param int $flow_id flow ID.
162
+ * @param int $step_id step ID.
163
+ * @return bool
164
+ */
165
+ function get_next_step_id( $flow_id, $step_id ) {
166
+
167
+ $steps = $this->get_flow_steps( $flow_id );
168
+ $step_id = intval( $step_id );
169
+
170
+ if ( ! $steps ) {
171
+ return false;
172
+ }
173
+
174
+ foreach ( $steps as $i => $step ) {
175
+
176
+ if ( intval( $step['id'] ) === $step_id ) {
177
+
178
+ $next_i = $i + 1;
179
+
180
+ if ( isset( $steps[ $next_i ] ) ) {
181
+
182
+ $navigation = $steps[ $next_i ];
183
+
184
+ return intval( $navigation['id'] );
185
+ }
186
+
187
+ break;
188
+ }
189
+ }
190
+
191
+ return false;
192
+ }
193
+
194
+ /**
195
+ * Get next id for step
196
+ *
197
+ * @param int $order_id order ID.
198
+ * @return int
199
+ */
200
+ function get_flow_id_from_order( $order_id ) {
201
+
202
+ $flow_id = get_post_meta( $order_id, '_wcf_flow_id', true );
203
+
204
+ return intval( $flow_id );
205
+ }
206
+
207
+ /**
208
+ * Get checkout id for order
209
+ *
210
+ * @param int $order_id order ID.
211
+ * @return int
212
+ */
213
+ function get_checkout_id_from_order( $order_id ) {
214
+
215
+ $checkout_id = get_post_meta( $order_id, '_wcf_checkout_id', true );
216
+
217
+ return intval( $checkout_id );
218
+ }
219
+
220
+ /**
221
+ * We are using this function mostly in ajax on checkout page
222
+ *
223
+ * @return bool
224
+ */
225
+ function get_checkout_id_from_post_data() {
226
+
227
+ if ( isset( $_POST['_wcf_checkout_id'] ) ) {
228
+
229
+ $checkout_id = filter_var( $_POST['_wcf_checkout_id'], FILTER_SANITIZE_NUMBER_INT );
230
+
231
+ return intval( $checkout_id );
232
+ }
233
+
234
+ return false;
235
+ }
236
+
237
+ /**
238
+ * We are using this function mostly in ajax on checkout page
239
+ *
240
+ * @return bool
241
+ */
242
+ function get_flow_id_from_post_data() {
243
+
244
+ if ( isset( $_POST['_wcf_flow_id'] ) ) {
245
+
246
+ $flow_id = filter_var( $_POST['_wcf_flow_id'], FILTER_SANITIZE_NUMBER_INT );
247
+
248
+ return intval( $flow_id );
249
+ }
250
+
251
+ return false;
252
+ }
253
+
254
+ /**
255
+ * Check for thank you page
256
+ *
257
+ * @param int $step_id step ID.
258
+ * @return bool
259
+ */
260
+ function check_is_thankyou_page( $step_id ) {
261
+
262
+ $step_type = $this->get_step_type( $step_id );
263
+
264
+ if ( 'thankyou' === $step_type ) {
265
+
266
+ return true;
267
+ }
268
+
269
+ return false;
270
+ }
271
+
272
+ /**
273
+ * Check for offer page
274
+ *
275
+ * @param int $step_id step ID.
276
+ * @return bool
277
+ */
278
+ function check_is_offer_page( $step_id ) {
279
+
280
+ $step_type = $this->get_step_type( $step_id );
281
+
282
+ if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
283
+
284
+ return true;
285
+ }
286
+
287
+ return false;
288
+ }
289
+
290
+ /**
291
+ * Define constant for cache
292
+ *
293
+ * @return void
294
+ */
295
+ function do_not_cache() {
296
+
297
+ wc_maybe_define_constant( 'DONOTCACHEPAGE', true );
298
+ wc_maybe_define_constant( 'DONOTCACHEOBJECT', true );
299
+ wc_maybe_define_constant( 'DONOTCACHEDB', true );
300
+
301
+ nocache_headers();
302
+ }
303
+
304
+ /**
305
+ * Get linking url
306
+ *
307
+ * @param array $args query args.
308
+ * @return string
309
+ */
310
+ function get_linking_url( $args = array() ) {
311
+
312
+ $url = get_home_url();
313
+
314
+ $url = add_query_arg( $args, $url );
315
+
316
+ return $url;
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Get a specific property of an array without needing to check if that property exists.
322
+ *
323
+ * Provide a default value if you want to return a specific value if the property is not set.
324
+ *
325
+ * @param array $array Array from which the property's value should be retrieved.
326
+ * @param string $prop Name of the property to be retrieved.
327
+ * @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null.
328
+ *
329
+ * @return null|string|mixed The value
330
+ */
331
+ function wcf_get_prop( $array, $prop, $default = null ) {
332
+
333
+ if ( ! is_array( $array ) && ! ( is_object( $array ) && $array instanceof ArrayAccess ) ) {
334
+ return $default;
335
+ }
336
+
337
+ if ( isset( $array[ $prop ] ) ) {
338
+ $value = $array[ $prop ];
339
+ } else {
340
+ $value = '';
341
+ }
342
+
343
+ return empty( $value ) && null !== $default ? $default : $value;
344
+ }
classes/class-cartflows-wizard.php ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Schema Pro - Schema Wizard
4
+ *
5
+ * @package Schema Pro
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ if ( ! class_exists( 'CartFlows_Wizard' ) ) :
13
+
14
+ /**
15
+ * CartFlows_Wizard class.
16
+ */
17
+ class CartFlows_Wizard {
18
+
19
+ /**
20
+ * Hook in tabs.
21
+ */
22
+ public function __construct() {
23
+ if ( apply_filters( 'cartflows_enable_setup_wizard', true ) && current_user_can( 'manage_options' ) ) {
24
+ add_action( 'admin_menu', array( $this, 'admin_menus' ) );
25
+ add_action( 'admin_init', array( $this, 'setup_wizard' ) );
26
+ add_action( 'admin_notices', array( $this, 'show_setup_wizard' ) );
27
+ add_action( 'wp_ajax_page_builder_step_save', array( $this, 'page_builder_step_save' ) );
28
+
29
+ add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Show action links on the plugin screen.
35
+ *
36
+ * @since 1.0.0
37
+ * @return void
38
+ */
39
+ function show_setup_wizard() {
40
+
41
+ $status = get_option( 'wcf_setup_complete', false );
42
+
43
+ if ( false === $status ) { ?>
44
+ <div class="notice notice-info">
45
+ <p><b><?php _e( 'Thanks for installing and using CartFlows!', 'cartflows' ); ?></b></p>
46
+ <p><?php _e( 'It is easy to use the CartFlows. Please use the setup wizard to quick start setup.', 'cartflows' ); ?></p>
47
+ <p><a href="<?php echo esc_url( admin_url( 'index.php?page=cartflow-setup' ) ); ?>" class="button button-primary">Start Wizard!</a></p>
48
+ </div>
49
+ <?php
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Add admin menus/screens.
55
+ */
56
+ public function admin_menus() {
57
+ add_dashboard_page( '', '', 'manage_options', 'cartflow-setup', '' );
58
+ }
59
+
60
+ /**
61
+ * Show the setup wizard.
62
+ */
63
+ public function setup_wizard() {
64
+
65
+ if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) {
66
+ return;
67
+ }
68
+
69
+ $this->steps = array(
70
+ 'basic-config' => array(
71
+ 'name' => __( 'Welcome', 'cartflows' ),
72
+ 'view' => array( $this, 'welcome_step' ),
73
+ 'handler' => array( $this, 'welcome_step_save' ),
74
+ ),
75
+ 'page-builder' => array(
76
+ 'name' => __( 'Page Builder', 'cartflows' ),
77
+ 'view' => array( $this, 'page_builder_step' ),
78
+ // 'handler' => array( $this, 'page_builder_step_save' ),
79
+ ),
80
+ 'setup-ready' => array(
81
+ 'name' => __( 'Ready!', 'cartflows' ),
82
+ 'view' => array( $this, 'ready_step' ),
83
+ 'handler' => '',
84
+ ),
85
+ );
86
+
87
+ $this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );
88
+
89
+ wp_enqueue_style( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/css/setup-wizard.css', array( 'dashicons' ), CARTFLOWS_VER );
90
+ wp_style_add_data( 'cartflows-setup', 'rtl', 'replace' );
91
+ wp_enqueue_script( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/js/setup-wizard.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER );
92
+
93
+ wp_enqueue_media();
94
+
95
+ if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) {
96
+ call_user_func( $this->steps[ $this->step ]['handler'] );
97
+ }
98
+
99
+ ob_start();
100
+ $this->setup_wizard_header();
101
+ $this->setup_wizard_steps();
102
+ $this->setup_wizard_content();
103
+ $this->setup_wizard_footer();
104
+ exit;
105
+ }
106
+
107
+ /**
108
+ * Get current step slug
109
+ */
110
+ public function get_current_step_slug() {
111
+ $keys = array_keys( $this->steps );
112
+ return $keys[ array_search( $this->step, array_keys( $this->steps ) ) ];
113
+ }
114
+
115
+ /**
116
+ * Get previous step link
117
+ */
118
+ public function get_prev_step_link() {
119
+ $keys = array_keys( $this->steps );
120
+ return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) - 1 ] );
121
+ }
122
+
123
+ /**
124
+ * Get next step link
125
+ */
126
+ public function get_next_step_link() {
127
+ $keys = array_keys( $this->steps );
128
+ return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ] );
129
+ }
130
+
131
+ /**
132
+ * Get next step link
133
+ */
134
+ public function get_next_step_plain_link() {
135
+ $keys = array_keys( $this->steps );
136
+ $step = $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ];
137
+ return admin_url( 'index.php?page=cartflow-setup&step=' . $step );
138
+ }
139
+
140
+ /**
141
+ * Setup Wizard Header.
142
+ */
143
+ public function setup_wizard_header() {
144
+ ?>
145
+ <!DOCTYPE html>
146
+ <html>
147
+ <head>
148
+ <meta name="viewport" content="width=device-width" />
149
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
150
+ <title><?php _e( 'CartFlows Setup', 'cartflows' ); ?></title>
151
+
152
+ <script type="text/javascript">
153
+ addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
154
+ var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>';
155
+ var pagenow = '';
156
+ </script>
157
+ <?php wp_print_scripts( array( 'cartflows-setup' ) ); ?>
158
+ <?php do_action( 'admin_print_styles' ); ?>
159
+ <?php do_action( 'admin_head' ); ?>
160
+ </head>
161
+ <body class="cartflows-setup wp-core-ui cartflows-step-<?php echo esc_attr( $this->get_current_step_slug() ); ?>">
162
+ <div id="cartflows-logo">
163
+ <h1>CartFlows</h1>
164
+ </div>
165
+ <?php
166
+ }
167
+
168
+ /**
169
+ * Setup Wizard Footer.
170
+ */
171
+ public function setup_wizard_footer() {
172
+
173
+ $admin_url = admin_url( 'admin.php?page=cartflows_settings' );
174
+ ?>
175
+ <div class="close-button-wrapper">
176
+ <a href="<?php echo esc_url( $admin_url ); ?>" class="wizard-close-link" ><?php _e( 'Exit Setup Wizard', 'cartflows' ); ?></a>
177
+ </div>
178
+ </body>
179
+ </html>
180
+ <?php
181
+ }
182
+
183
+ /**
184
+ * Output the steps.
185
+ */
186
+ public function setup_wizard_steps() {
187
+
188
+ $ouput_steps = $this->steps;
189
+ ?>
190
+ <ol class="cartflows-setup-steps">
191
+ <?php
192
+ foreach ( $ouput_steps as $step_key => $step ) :
193
+ $classes = '';
194
+ $activated = false;
195
+ if ( $step_key === $this->step ) {
196
+ $classes = 'active';
197
+ $activated = true;
198
+ } elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
199
+ $classes = 'done';
200
+ $activated = true;
201
+ }
202
+ ?>
203
+ <li class="<?php echo esc_attr( $classes ); ?>">
204
+ <span><?php echo esc_html( $step['name'] ); ?></span>
205
+ </li>
206
+ <?php endforeach; ?>
207
+ </ol>
208
+ <?php
209
+ }
210
+
211
+ /**
212
+ * Output the content for the current step.
213
+ */
214
+ public function setup_wizard_content() {
215
+ echo '<div class="cartflows-setup-content">';
216
+ call_user_func( $this->steps[ $this->step ]['view'] );
217
+ echo '</div>';
218
+ }
219
+
220
+ /**
221
+ * Introduction step.
222
+ */
223
+ public function welcome_step() {
224
+ ?>
225
+ <h1><?php _e( 'Thank you for choosing CartFlows!', 'cartflows' ); ?></h1>
226
+ <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
227
+ <form method="post">
228
+ <div class="cartflows-setup-actions step">
229
+ <div class="button-prev-wrap">
230
+ </div>
231
+ <div class="button-next-wrap">
232
+ <input type="submit" class="uct-activate button-primary button button-large button-next" value="<?php _e( 'Lets Go »', 'cartflows' ); ?>" name="save_step" />
233
+ </div>
234
+ <?php wp_nonce_field( 'cartflow-setup' ); ?>
235
+ </div>
236
+ </form>
237
+ <?php
238
+ }
239
+
240
+ /**
241
+ * Save Locale Settings.
242
+ */
243
+ public function welcome_step_save() {
244
+ check_admin_referer( 'cartflow-setup' );
245
+
246
+ // Update site title & tagline.
247
+ $redirect_url = $this->get_next_step_link();
248
+
249
+ wp_redirect( esc_url_raw( $redirect_url ) );
250
+ exit;
251
+ }
252
+
253
+ /**
254
+ * Locale settings
255
+ */
256
+ public function page_builder_step() {
257
+ ?>
258
+
259
+ <h1><?php _e( 'Page Builder', 'cartflows' ); ?></h1>
260
+ <p class="description"><?php _e( 'Select a page builder which you want to use for creating your new flows.', 'cartflows' ); ?></p>
261
+ <form method="post">
262
+ <table class="cartflows-table widefat">
263
+ <tr class="cartflows-row">
264
+ <td class="cartflows-row-heading">
265
+ <label><?php esc_html_e( 'Select Page Builder', 'cartflows' ); ?></label>
266
+ <i class="cartflows-heading-help dashicons dashicons-editor-help" title="<?php echo esc_attr__( 'Add locations for where this Schema should appear.', 'cartflows' ); ?>"></i>
267
+ </td>
268
+ <td class="cartflows-row-content">
269
+ <?php
270
+ $installed_plugins = get_plugins();
271
+ $plugins = array(
272
+ array(
273
+ 'title' => __( 'Elementor', 'cartflows' ),
274
+ 'value' => 'elementor',
275
+ 'data' => array(
276
+ 'slug' => 'elementor',
277
+ 'init' => 'elementor/elementor.php',
278
+ 'active' => is_plugin_active( 'elementor/elementor.php' ) ? 'yes' : 'no',
279
+ 'install' => isset( $installed_plugins['elementor/elementor.php'] ) ? 'yes' : 'no',
280
+ ),
281
+ ),
282
+ );
283
+ ?>
284
+ <select name="page-builder" class="page-builder-list" data-redirect-link="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>">
285
+ <?php
286
+ foreach ( $plugins as $key => $plugin ) {
287
+ echo '<option value="' . esc_attr( $plugin['value'] ) . '" data-install="' . esc_attr( $plugin['data']['install'] ) . '" data-active="' . esc_attr( $plugin['data']['active'] ) . '" data-slug="' . esc_attr( $plugin['data']['slug'] ) . '" data-init="' . esc_attr( $plugin['data']['init'] ) . '">' . esc_html( $plugin['title'] ) . '</option>';
288
+ }
289
+ ?>
290
+ </select>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ <p><?php _e( 'The above plugin will be installed and activated for you!', 'cartflows' ); ?></p>
295
+ <div class="cartflows-setup-actions step">
296
+ <div class="button-prev-wrap">
297
+ <a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php _e( '« Previous', 'cartflows' ); ?></a>
298
+ </div>
299
+ <div class="button-next-wrap">
300
+ <a href="#" class="button button-primary wcf-install-plugins"><?php _e( 'Next »', 'cartflows' ); ?></a>
301
+ <!-- <input type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Next »', 'cartflows' ); ?>" name="save_step" /> -->
302
+ </div>
303
+ <?php wp_nonce_field( 'cartflow-setup' ); ?>
304
+ </div>
305
+ </form>
306
+ <?php
307
+ }
308
+
309
+ /**
310
+ * Save Locale Settings.
311
+ */
312
+ function page_builder_step_save() {
313
+
314
+ check_ajax_referer( 'wcf-page-builder-step-save', 'security' );
315
+
316
+ $stored = get_option( 'wcf_setup', array() );
317
+ $page_builder = isset( $_POST['page_builder'] ) ? sanitize_text_field( $_POST['page_builder'] ) : '';
318
+ $plugin_init = isset( $_POST['plugin_init'] ) ? sanitize_text_field( $_POST['plugin_init'] ) : '';
319
+
320
+ if ( $page_builder ) {
321
+ $stored['page-builder'] = $page_builder;
322
+ }
323
+
324
+ update_option( 'wcf_setup', $stored );
325
+
326
+ $activate = activate_plugin( $plugin_init, '', false, true );
327
+
328
+ if ( is_wp_error( $activate ) ) {
329
+ wp_send_json_error(
330
+ array(
331
+ 'success' => false,
332
+ 'message' => $activate->get_error_message(),
333
+ )
334
+ );
335
+ }
336
+
337
+ wp_send_json_success( $stored );
338
+ }
339
+
340
+ /**
341
+ * Get Location rules of schema for Custom meta box.
342
+ *
343
+ * @param array $enabled_on Enabled on rules.
344
+ * @param array $exclude_from Exlcude on rules.
345
+ * @return array
346
+ */
347
+ public static function get_display_rules_for_meta_box( $enabled_on, $exclude_from ) {
348
+ $locations = array();
349
+ $enabled_location = array();
350
+ $exclude_location = array();
351
+
352
+ $args = array(
353
+ 'public' => true,
354
+ '_builtin' => true,
355
+ );
356
+ $post_types = get_post_types( $args );
357
+ unset( $post_types['attachment'] );
358
+
359
+ $args['_builtin'] = false;
360
+ $custom_post_type = get_post_types( $args );
361
+ $post_types = array_merge( $post_types, $custom_post_type );
362
+
363
+ if ( ! empty( $enabled_on ) && isset( $enabled_on['rule'] ) ) {
364
+ $enabled_location = $enabled_on['rule'];
365
+ }
366
+ if ( ! empty( $exclude_from ) && isset( $exclude_from['rule'] ) ) {
367
+ $exclude_location = $exclude_from['rule'];
368
+ }
369
+
370
+ if ( in_array( 'specifics', $enabled_location ) || ( in_array( 'basic-singulars', $enabled_location ) && ! in_array( 'basic-singulars', $exclude_location ) ) ) {
371
+ foreach ( $post_types as $post_type ) {
372
+ $locations[ $post_type ] = 1;
373
+ }
374
+ } else {
375
+ foreach ( $post_types as $post_type ) {
376
+ $key = $post_type . '|all';
377
+ if ( in_array( $key, $enabled_location ) && ! in_array( $key, $exclude_location ) ) {
378
+ $locations[ $post_type ] = 1;
379
+ }
380
+ }
381
+ }
382
+ return $locations;
383
+ }
384
+
385
+ /**
386
+ * Final step.
387
+ */
388
+ public function ready_step() {
389
+
390
+ // Set setup wizard status to complete.
391
+ update_option( 'wcf_setup_complete', true );
392
+ ?>
393
+ <h1><?php _e( 'Congratulations!', 'cartflows' ); ?></h1>
394
+
395
+ <div class="cartflows-setup-next-steps">
396
+ <div class="cartflows-setup-next-steps-last">
397
+
398
+ <p class="success">
399
+ <?php
400
+ _e( 'You\'ve successfully completed the setup before you begin setting now you can use it.', 'cartflows' )
401
+ ?>
402
+ </p>
403
+
404
+
405
+ <ul class="wcf-wizard-next-steps">
406
+ <li class="wcf-wizard-next-step-item">
407
+ <div class="wcf-wizard-next-step-description">
408
+ <p class="next-step-heading">Next step</p>
409
+ <h3 class="next-step-description">Create First Flow</h3>
410
+ <p class="next-step-extra-info">You're ready to add flows to your website.</p>
411
+ </div>
412
+ <div class="wcf-wizard-next-step-action">
413
+ <p class="wc-setup-actions step">
414
+ <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=cartflows_flow&add-new-flow' ) ); ?>" type="button" class="button button-primary button-hero" ><?php _e( 'Create a flow', 'cartflows' ); ?></a>
415
+ </p>
416
+ </div>
417
+ </li>
418
+ </ul>
419
+
420
+ </div>
421
+ </div>
422
+ <?php
423
+ }
424
+
425
+ /**
426
+ * Localize variables in admin
427
+ *
428
+ * @param array $vars variables.
429
+ */
430
+ function localize_vars( $vars ) {
431
+
432
+ $ajax_actions = array(
433
+ 'wcf_page_builder_step_save',
434
+ );
435
+
436
+ foreach ( $ajax_actions as $action ) {
437
+
438
+ $vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
439
+ }
440
+
441
+ return $vars;
442
+ }
443
+ }
444
+
445
+ new CartFlows_Wizard();
446
+
447
+ endif;
classes/fields/typography/class-cartflows-font-families.php ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Helper class for font settings.
4
+ *
5
+ * @package CartFlows
6
+ * @author CartFlows
7
+ * @copyright Copyright (c) 2018, CartFlows
8
+ * @link https://cartflows.com/
9
+ * @since 1.0.0
10
+ */
11
+
12
+ // Exit if accessed directly.
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ /**
18
+ * Font info class for System and Google fonts.
19
+ */
20
+ if ( ! class_exists( 'CartFlows_Font_Families' ) ) :
21
+
22
+ /**
23
+ * Font info class for System and Google fonts.
24
+ */
25
+ final class CartFlows_Font_Families {
26
+
27
+ /**
28
+ * System Fonts
29
+ *
30
+ * @since 1.0.0
31
+ * @var array
32
+ */
33
+ public static $system_fonts = array();
34
+
35
+ /**
36
+ * Google Fonts
37
+ *
38
+ * @since 1.0.0
39
+ * @var array
40
+ */
41
+ public static $google_fonts = array();
42
+
43
+ /**
44
+ * Get System Fonts
45
+ *
46
+ * @since 1.0.0
47
+ *
48
+ * @return Array All the system fonts in CartFlows
49
+ */
50
+ public static function get_system_fonts() {
51
+ if ( empty( self::$system_fonts ) ) {
52
+ self::$system_fonts = array(
53
+ 'Helvetica' => array(
54
+ 'fallback' => 'Verdana, Arial, sans-serif',
55
+ 'variants' => array(
56
+ '300',
57
+ '400',
58
+ '700',
59
+ ),
60
+ ),
61
+ 'Verdana' => array(
62
+ 'fallback' => 'Helvetica, Arial, sans-serif',
63
+ 'variants' => array(
64
+ '300',
65
+ '400',
66
+ '700',
67
+ ),
68
+ ),
69
+ 'Arial' => array(
70
+ 'fallback' => 'Helvetica, Verdana, sans-serif',
71
+ 'variants' => array(
72
+ '300',
73
+ '400',
74
+ '700',
75
+ ),
76
+ ),
77
+ 'Times' => array(
78
+ 'fallback' => 'Georgia, serif',
79
+ 'variants' => array(
80
+ '300',
81
+ '400',
82
+ '700',
83
+ ),
84
+ ),
85
+ 'Georgia' => array(
86
+ 'fallback' => 'Times, serif',
87
+ 'variants' => array(
88
+ '300',
89
+ '400',
90
+ '700',
91
+ ),
92
+ ),
93
+ 'Courier' => array(
94
+ 'fallback' => 'monospace',
95
+ 'variants' => array(
96
+ '300',
97
+ '400',
98
+ '700',
99
+ ),
100
+ ),
101
+ );
102
+ }
103
+
104
+ return apply_filters( 'cartflows_system_fonts', self::$system_fonts );
105
+ }
106
+
107
+ /**
108
+ * Custom Fonts
109
+ *
110
+ * @since 1.0.0
111
+ *
112
+ * @return Array All the custom fonts in CartFlows
113
+ */
114
+ public static function get_custom_fonts() {
115
+ $custom_fonts = array();
116
+
117
+ return apply_filters( 'cartflows_custom_fonts', $custom_fonts );
118
+ }
119
+
120
+ /**
121
+ * Google Fonts used in CartFlows.
122
+ * Array is generated from the google-fonts.json file.
123
+ *
124
+ * @since 1.0.0
125
+ *
126
+ * @return Array Array of Google Fonts.
127
+ */
128
+ public static function get_google_fonts() {
129
+
130
+ if ( empty( self::$google_fonts ) ) {
131
+
132
+ $google_fonts_file = CARTFLOWS_DIR . 'classes/fields/typography/google-fonts.json';
133
+
134
+ if ( ! file_exists( $google_fonts_file ) ) {
135
+ return array();
136
+ }
137
+
138
+ global $wp_filesystem;
139
+ if ( empty( $wp_filesystem ) ) {
140
+ require_once ABSPATH . '/wp-admin/includes/file.php';
141
+ WP_Filesystem();
142
+ }
143
+
144
+ $file_contants = $wp_filesystem->get_contents( $google_fonts_file );
145
+ $google_fonts_json = json_decode( $file_contants, 1 );
146
+
147
+ foreach ( $google_fonts_json as $key => $font ) {
148
+ $name = key( $font );
149
+ foreach ( $font[ $name ] as $font_key => $single_font ) {
150
+
151
+ if ( 'variants' === $font_key ) {
152
+
153
+ foreach ( $single_font as $variant_key => $variant ) {
154
+
155
+ if ( 'regular' == $variant ) {
156
+ $font[ $name ][ $font_key ][ $variant_key ] = '400';
157
+ }
158
+ }
159
+ }
160
+
161
+ self::$google_fonts[ $name ] = array_values( $font[ $name ] );
162
+ }
163
+ }
164
+ }
165
+
166
+ return apply_filters( 'cartflows_google_fonts', self::$google_fonts );
167
+ }
168
+
169
+ /**
170
+ * Render Fonts
171
+ *
172
+ * @param array $post_id post ID.
173
+ * @return void
174
+ */
175
+ public static function render_fonts( $post_id ) {
176
+
177
+ $google_font_url = get_post_meta( $post_id, 'wcf-field-google-font-url', true );
178
+
179
+ // @todo Avoid the URL generator from the JS and remove the below static URL check condition.
180
+ if ( empty( $google_font_url ) || '//fonts.googleapis.com/css?family=' == $google_font_url ) {
181
+ return;
182
+ }
183
+
184
+ wp_enqueue_style( 'cartflows-google-fonts', esc_url( $google_font_url ), array(), CARTFLOWS_VER, 'all' );
185
+ }
186
+
187
+ /**
188
+ * Get string between
189
+ *
190
+ * @param string $string Input string.
191
+ * @param string $start First string.
192
+ * @param string $end Last string.
193
+ * @return string string.
194
+ */
195
+ public static function get_string_between( $string, $start, $end ) {
196
+ $string = ' ' . $string;
197
+ $ini = strpos( $string, $start );
198
+ if ( 0 == $ini ) {
199
+ return '';
200
+ }
201
+ $ini += strlen( $start );
202
+ $len = strpos( $string, $end, $ini ) - $ini;
203
+ return substr( $string, $ini, $len );
204
+ }
205
+
206
+ /**
207
+ * Google Font URL
208
+ * Combine multiple google font in one URL
209
+ *
210
+ * @link https://shellcreeper.com/?p=1476
211
+ * @param array $fonts Google Fonts array.
212
+ * @param array $subsets Font's Subsets array.
213
+ *
214
+ * @return string
215
+ */
216
+ static public function google_fonts_url( $fonts, $subsets = array() ) {
217
+
218
+ /* URL */
219
+ $base_url = '//fonts.googleapis.com/css';
220
+ $font_args = array();
221
+ $family = array();
222
+
223
+ $fonts = apply_filters( 'cartflows_google_fonts', $fonts );
224
+
225
+ /* Format Each Font Family in Array */
226
+ foreach ( $fonts as $font_name => $font_weight ) {
227
+ $font_name = str_replace( ' ', '+', $font_name );
228
+ if ( ! empty( $font_weight ) ) {
229
+ if ( is_array( $font_weight ) ) {
230
+ $font_weight = implode( ',', $font_weight );
231
+ }
232
+ $font_family = explode( ',', $font_name );
233
+ $font_family = str_replace( "'", '', wcf_get_prop( $font_family, 0 ) );
234
+ $family[] = trim( $font_family . ':' . urlencode( trim( $font_weight ) ) );
235
+ } else {
236
+ $family[] = trim( $font_name );
237
+ }
238
+ }
239
+
240
+ /* Only return URL if font family defined. */
241
+ if ( ! empty( $family ) ) {
242
+
243
+ /* Make Font Family a String */
244
+ $family = implode( '|', $family );
245
+
246
+ /* Add font family in args */
247
+ $font_args['family'] = $family;
248
+
249
+ /* Add font subsets in args */
250
+ if ( ! empty( $subsets ) ) {
251
+
252
+ /* format subsets to string */
253
+ if ( is_array( $subsets ) ) {
254
+ $subsets = implode( ',', $subsets );
255
+ }
256
+
257
+ $font_args['subset'] = urlencode( trim( $subsets ) );
258
+ }
259
+ return add_query_arg( $font_args, $base_url );
260
+ }
261
+
262
+ return '';
263
+ }
264
+
265
+ /**
266
+ * Generate Google Font URL from the post meta.
267
+ *
268
+ * @param integer $post_id Post ID.
269
+ * @return string Google URL if post meta is set.
270
+ */
271
+ function generate_google_url( $post_id ) {
272
+
273
+ $font_weight = array();
274
+ $fields = get_post_meta( $post_id );
275
+
276
+ foreach ( $fields as $key => $value ) {
277
+ if ( false !== strpos( $key, 'font-family' ) ) {
278
+ $font_family = ! empty( $value[0] ) ? self::get_string_between( $value[0], '\'', '\'' ) : '';
279
+ $font_list[ $font_family ] = array();
280
+ }
281
+ }
282
+
283
+ $google_fonts = array();
284
+ $font_subset = array();
285
+
286
+ $system_fonts = self::get_system_fonts();
287
+ $get_google_fonts = self::get_google_fonts();
288
+
289
+ $variants = array( 'variants' => array( 400 ) );
290
+ foreach ( $font_list as $name => $font ) {
291
+ if ( ! empty( $name ) && ! isset( $system_fonts[ $name ] ) ) {
292
+
293
+ if ( isset( $get_google_fonts[ $name ] ) ) {
294
+ $variants = $get_google_fonts[ $name ][0];
295
+ }
296
+
297
+ // Add font variants.
298
+ $google_fonts[ $name ] = $variants;
299
+
300
+ // Add Subset.
301
+ $subset = apply_filters( 'cartflows_font_subset', '', $name );
302
+ if ( ! empty( $subset ) ) {
303
+ $font_subset[] = $subset;
304
+ }
305
+ }
306
+ }
307
+
308
+ return self::google_fonts_url( $google_fonts, $font_subset );
309
+ }
310
+ }
311
+
312
+ endif;
classes/fields/typography/google-fonts.json ADDED
@@ -0,0 +1,8771 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "ABeeZee": {
4
+ "variants": [
5
+ "regular",
6
+ "italic"
7
+ ],
8
+ "category": "sans-serif"
9
+ }
10
+ },
11
+ {
12
+ "Abel": {
13
+ "variants": [
14
+ "regular"
15
+ ],
16
+ "category": "sans-serif"
17
+ }
18
+ },
19
+ {
20
+ "Abhaya Libre": {
21
+ "variants": [
22
+ "regular",
23
+ "500",
24
+ "600",
25
+ "700",
26
+ "800"
27
+ ],
28
+ "category": "serif"
29
+ }
30
+ },
31
+ {
32
+ "Abril Fatface": {
33
+ "variants": [
34
+ "regular"
35
+ ],
36
+ "category": "display"
37
+ }
38
+ },
39
+ {
40
+ "Aclonica": {
41
+ "variants": [
42
+ "regular"
43
+ ],
44
+ "category": "sans-serif"
45
+ }
46
+ },
47
+ {
48
+ "Acme": {
49
+ "variants": [
50
+ "regular"
51
+ ],
52
+ "category": "sans-serif"
53
+ }
54
+ },
55
+ {
56
+ "Actor": {
57
+ "variants": [
58
+ "regular"
59
+ ],
60
+ "category": "sans-serif"
61
+ }
62
+ },
63
+ {
64
+ "Adamina": {
65
+ "variants": [
66
+ "regular"
67
+ ],
68
+ "category": "serif"
69
+ }
70
+ },
71
+ {
72
+ "Advent Pro": {
73
+ "variants": [
74
+ "100",
75
+ "200",
76
+ "300",
77
+ "regular",
78
+ "500",
79
+ "600",
80
+ "700"
81
+ ],
82
+ "category": "sans-serif"
83
+ }
84
+ },
85
+ {
86
+ "Aguafina Script": {
87
+ "variants": [
88
+ "regular"
89
+ ],
90
+ "category": "handwriting"
91
+ }
92
+ },
93
+ {
94
+ "Akronim": {
95
+ "variants": [
96
+ "regular"
97
+ ],
98
+ "category": "display"
99
+ }
100
+ },
101
+ {
102
+ "Aladin": {
103
+ "variants": [
104
+ "regular"
105
+ ],
106
+ "category": "handwriting"
107
+ }
108
+ },
109
+ {
110
+ "Aldrich": {
111
+ "variants": [
112
+ "regular"
113
+ ],
114
+ "category": "sans-serif"
115
+ }
116
+ },
117
+ {
118
+ "Alef": {
119
+ "variants": [
120
+ "regular",
121
+ "700"
122
+ ],
123
+ "category": "sans-serif"
124
+ }
125
+ },
126
+ {
127
+ "Alegreya": {
128
+ "variants": [
129
+ "regular",
130
+ "italic",
131
+ "500",
132
+ "500italic",
133
+ "700",
134
+ "700italic",
135
+ "800",
136
+ "800italic",
137
+ "900",
138
+ "900italic"
139
+ ],
140
+ "category": "serif"
141
+ }
142
+ },
143
+ {
144
+ "Alegreya SC": {
145
+ "variants": [
146
+ "regular",
147
+ "italic",
148
+ "500",
149
+ "500italic",
150
+ "700",
151
+ "700italic",
152
+ "800",
153
+ "800italic",
154
+ "900",
155
+ "900italic"
156
+ ],
157
+ "category": "serif"
158
+ }
159
+ },
160
+ {
161
+ "Alegreya Sans": {
162
+ "variants": [
163
+ "100",
164
+ "100italic",
165
+ "300",
166
+ "300italic",
167
+ "regular",
168
+ "italic",
169
+ "500",
170
+ "500italic",
171
+ "700",
172
+ "700italic",
173
+ "800",
174
+ "800italic",
175
+ "900",
176
+ "900italic"
177
+ ],
178
+ "category": "sans-serif"
179
+ }
180
+ },
181
+ {
182
+ "Alegreya Sans SC": {
183
+ "variants": [
184
+ "100",
185
+ "100italic",
186
+ "300",
187
+ "300italic",
188
+ "regular",
189
+ "italic",
190
+ "500",
191
+ "500italic",
192
+ "700",
193
+ "700italic",
194
+ "800",
195
+ "800italic",
196
+ "900",
197
+ "900italic"
198
+ ],
199
+ "category": "sans-serif"
200
+ }
201
+ },
202
+ {
203
+ "Alex Brush": {
204
+ "variants": [
205
+ "regular"
206
+ ],
207
+ "category": "handwriting"
208
+ }
209
+ },
210
+ {
211
+ "Alfa Slab One": {
212
+ "variants": [
213
+ "regular"
214
+ ],
215
+ "category": "display"
216
+ }
217
+ },
218
+ {
219
+ "Alice": {
220
+ "variants": [
221
+ "regular"
222
+ ],
223
+ "category": "serif"
224
+ }
225
+ },
226
+ {
227
+ "Alike": {
228
+ "variants": [
229
+ "regular"
230
+ ],
231
+ "category": "serif"
232
+ }
233
+ },
234
+ {
235
+ "Alike Angular": {
236
+ "variants": [
237
+ "regular"
238
+ ],
239
+ "category": "serif"
240
+ }
241
+ },
242
+ {
243
+ "Allan": {
244
+ "variants": [
245
+ "regular",
246
+ "700"
247
+ ],
248
+ "category": "display"
249
+ }
250
+ },
251
+ {
252
+ "Allerta": {
253
+ "variants": [
254
+ "regular"
255
+ ],
256
+ "category": "sans-serif"
257
+ }
258
+ },
259
+ {
260
+ "Allerta Stencil": {
261
+ "variants": [
262
+ "regular"
263
+ ],
264
+ "category": "sans-serif"
265
+ }
266
+ },
267
+ {
268
+ "Allura": {
269
+ "variants": [
270
+ "regular"
271
+ ],
272
+ "category": "handwriting"
273
+ }
274
+ },
275
+ {
276
+ "Almendra": {
277
+ "variants": [
278
+ "regular",
279
+ "italic",
280
+ "700",
281
+ "700italic"
282
+ ],
283
+ "category": "serif"
284
+ }
285
+ },
286
+ {
287
+ "Almendra Display": {
288
+ "variants": [
289
+ "regular"
290
+ ],
291
+ "category": "display"
292
+ }
293
+ },
294
+ {
295
+ "Almendra SC": {
296
+ "variants": [
297
+ "regular"
298
+ ],
299
+ "category": "serif"
300
+ }
301
+ },
302
+ {
303
+ "Amarante": {
304
+ "variants": [
305
+ "regular"
306
+ ],
307
+ "category": "display"
308
+ }
309
+ },
310
+ {
311
+ "Amaranth": {
312
+ "variants": [
313
+ "regular",
314
+ "italic",
315
+ "700",
316
+ "700italic"
317
+ ],
318
+ "category": "sans-serif"
319
+ }
320
+ },
321
+ {
322
+ "Amatic SC": {
323
+ "variants": [
324
+ "regular",
325
+ "700"
326
+ ],
327
+ "category": "handwriting"
328
+ }
329
+ },
330
+ {
331
+ "Amethysta": {
332
+ "variants": [
333
+ "regular"
334
+ ],
335
+ "category": "serif"
336
+ }
337
+ },
338
+ {
339
+ "Amiko": {
340
+ "variants": [
341
+ "regular",
342
+ "600",
343
+ "700"
344
+ ],
345
+ "category": "sans-serif"
346
+ }
347
+ },
348
+ {
349
+ "Amiri": {
350
+ "variants": [
351
+ "regular",
352
+ "italic",
353
+ "700",
354
+ "700italic"
355
+ ],
356
+ "category": "serif"
357
+ }
358
+ },
359
+ {
360
+ "Amita": {
361
+ "variants": [
362
+ "regular",
363
+ "700"
364
+ ],
365
+ "category": "handwriting"
366
+ }
367
+ },
368
+ {
369
+ "Anaheim": {
370
+ "variants": [
371
+ "regular"
372
+ ],
373
+ "category": "sans-serif"
374
+ }
375
+ },
376
+ {
377
+ "Andada": {
378
+ "variants": [
379
+ "regular"
380
+ ],
381
+ "category": "serif"
382
+ }
383
+ },
384
+ {
385
+ "Andika": {
386
+ "variants": [
387
+ "regular"
388
+ ],
389
+ "category": "sans-serif"
390
+ }
391
+ },
392
+ {
393
+ "Angkor": {
394
+ "variants": [
395
+ "regular"
396
+ ],
397
+ "category": "display"
398
+ }
399
+ },
400
+ {
401
+ "Annie Use Your Telescope": {
402
+ "variants": [
403
+ "regular"
404
+ ],
405
+ "category": "handwriting"
406
+ }
407
+ },
408
+ {
409
+ "Anonymous Pro": {
410
+ "variants": [
411
+ "regular",
412
+ "italic",
413
+ "700",
414
+ "700italic"
415
+ ],
416
+ "category": "monospace"
417
+ }
418
+ },
419
+ {
420
+ "Antic": {
421
+ "variants": [
422
+ "regular"
423
+ ],
424
+ "category": "sans-serif"
425
+ }
426
+ },
427
+ {
428
+ "Antic Didone": {
429
+ "variants": [
430
+ "regular"
431
+ ],
432
+ "category": "serif"
433
+ }
434
+ },
435
+ {
436
+ "Antic Slab": {
437
+ "variants": [
438
+ "regular"
439
+ ],
440
+ "category": "serif"
441
+ }
442
+ },
443
+ {
444
+ "Anton": {
445
+ "variants": [
446
+ "regular"
447
+ ],
448
+ "category": "sans-serif"
449
+ }
450
+ },
451
+ {
452
+ "Arapey": {
453
+ "variants": [
454
+ "regular",
455
+ "italic"
456
+ ],
457
+ "category": "serif"
458
+ }
459
+ },
460
+ {
461
+ "Arbutus": {
462
+ "variants": [
463
+ "regular"
464
+ ],
465
+ "category": "display"
466
+ }
467
+ },
468
+ {
469
+ "Arbutus Slab": {
470
+ "variants": [
471
+ "regular"
472
+ ],
473
+ "category": "serif"
474
+ }
475
+ },
476
+ {
477
+ "Architects Daughter": {
478
+ "variants": [
479
+ "regular"
480
+ ],
481
+ "category": "handwriting"
482
+ }
483
+ },
484
+ {
485
+ "Archivo": {
486
+ "variants": [
487
+ "regular",
488
+ "italic",
489
+ "500",
490
+ "500italic",
491
+ "600",
492
+ "600italic",
493
+ "700",
494
+ "700italic"
495
+ ],
496
+ "category": "sans-serif"
497
+ }
498
+ },
499
+ {
500
+ "Archivo Black": {
501
+ "variants": [
502
+ "regular"
503
+ ],
504
+ "category": "sans-serif"
505
+ }
506
+ },
507
+ {
508
+ "Archivo Narrow": {
509
+ "variants": [
510
+ "regular",
511
+ "italic",
512
+ "500",
513
+ "500italic",
514
+ "600",
515
+ "600italic",
516
+ "700",
517
+ "700italic"
518
+ ],
519
+ "category": "sans-serif"
520
+ }
521
+ },
522
+ {
523
+ "Aref Ruqaa": {
524
+ "variants": [
525
+ "regular",
526
+ "700"
527
+ ],
528
+ "category": "serif"
529
+ }
530
+ },
531
+ {
532
+ "Arima Madurai": {
533
+ "variants": [
534
+ "100",
535
+ "200",
536
+ "300",
537
+ "regular",
538
+ "500",
539
+ "700",
540
+ "800",
541
+ "900"
542
+ ],
543
+ "category": "display"
544
+ }
545
+ },
546
+ {
547
+ "Arimo": {
548
+ "variants": [
549
+ "regular",
550
+ "italic",
551
+ "700",
552
+ "700italic"
553
+ ],
554
+ "category": "sans-serif"
555
+ }
556
+ },
557
+ {
558
+ "Arizonia": {
559
+ "variants": [
560
+ "regular"
561
+ ],
562
+ "category": "handwriting"
563
+ }
564
+ },
565
+ {
566
+ "Armata": {
567
+ "variants": [
568
+ "regular"
569
+ ],
570
+ "category": "sans-serif"
571
+ }
572
+ },
573
+ {
574
+ "Arsenal": {
575
+ "variants": [
576
+ "regular",
577
+ "italic",
578
+ "700",
579
+ "700italic"
580
+ ],
581
+ "category": "sans-serif"
582
+ }
583
+ },
584
+ {
585
+ "Artifika": {
586
+ "variants": [
587
+ "regular"
588
+ ],
589
+ "category": "serif"
590
+ }
591
+ },
592
+ {
593
+ "Arvo": {
594
+ "variants": [
595
+ "regular",
596
+ "italic",
597
+ "700",
598
+ "700italic"
599
+ ],
600
+ "category": "serif"
601
+ }
602
+ },
603
+ {
604
+ "Arya": {
605
+ "variants": [
606
+ "regular",
607
+ "700"
608
+ ],
609
+ "category": "sans-serif"
610
+ }
611
+ },
612
+ {
613
+ "Asap": {
614
+ "variants": [
615
+ "regular",
616
+ "italic",
617
+ "500",
618
+ "500italic",
619
+ "600",
620
+ "600italic",
621
+ "700",
622
+ "700italic"
623
+ ],
624
+ "category": "sans-serif"
625
+ }
626
+ },
627
+ {
628
+ "Asap Condensed": {
629
+ "variants": [
630
+ "regular",
631
+ "italic",
632
+ "500",
633
+ "500italic",
634
+ "600",
635
+ "600italic",
636
+ "700",
637
+ "700italic"
638
+ ],
639
+ "category": "sans-serif"
640
+ }
641
+ },
642
+ {
643
+ "Asar": {
644
+ "variants": [
645
+ "regular"
646
+ ],
647
+ "category": "serif"
648
+ }
649
+ },
650
+ {
651
+ "Asset": {
652
+ "variants": [
653
+ "regular"
654
+ ],
655
+ "category": "display"
656
+ }
657
+ },
658
+ {
659
+ "Assistant": {
660
+ "variants": [
661
+ "200",
662
+ "300",
663
+ "regular",
664
+ "600",
665
+ "700",
666
+ "800"
667
+ ],
668
+ "category": "sans-serif"
669
+ }
670
+ },
671
+ {
672
+ "Astloch": {
673
+ "variants": [
674
+ "regular",
675
+ "700"
676
+ ],
677
+ "category": "display"
678
+ }
679
+ },
680
+ {
681
+ "Asul": {
682
+ "variants": [
683
+ "regular",
684
+ "700"
685
+ ],
686
+ "category": "sans-serif"
687
+ }
688
+ },
689
+ {
690
+ "Athiti": {
691
+ "variants": [
692
+ "200",
693
+ "300",
694
+ "regular",
695
+ "500",
696
+ "600",
697
+ "700"
698
+ ],
699
+ "category": "sans-serif"
700
+ }
701
+ },
702
+ {
703
+ "Atma": {
704
+ "variants": [
705
+ "300",
706
+ "regular",
707
+ "500",
708
+ "600",
709
+ "700"
710
+ ],
711
+ "category": "display"
712
+ }
713
+ },
714
+ {
715
+ "Atomic Age": {
716
+ "variants": [
717
+ "regular"
718
+ ],
719
+ "category": "display"
720
+ }
721
+ },
722
+ {
723
+ "Aubrey": {
724
+ "variants": [
725
+ "regular"
726
+ ],
727
+ "category": "display"
728
+ }
729
+ },
730
+ {
731
+ "Audiowide": {
732
+ "variants": [
733
+ "regular"
734
+ ],
735
+ "category": "display"
736
+ }
737
+ },
738
+ {
739
+ "Autour One": {
740
+ "variants": [
741
+ "regular"
742
+ ],
743
+ "category": "display"
744
+ }
745
+ },
746
+ {
747
+ "Average": {
748
+ "variants": [
749
+ "regular"
750
+ ],
751
+ "category": "serif"
752
+ }
753
+ },
754
+ {
755
+ "Average Sans": {
756
+ "variants": [
757
+ "regular"
758
+ ],
759
+ "category": "sans-serif"
760
+ }
761
+ },
762
+ {
763
+ "Averia Gruesa Libre": {
764
+ "variants": [
765
+ "regular"
766
+ ],
767
+ "category": "display"
768
+ }
769
+ },
770
+ {
771
+ "Averia Libre": {
772
+ "variants": [
773
+ "300",
774
+ "300italic",
775
+ "regular",
776
+ "italic",
777
+ "700",
778
+ "700italic"
779
+ ],
780
+ "category": "display"
781
+ }
782
+ },
783
+ {
784
+ "Averia Sans Libre": {
785
+ "variants": [
786
+ "300",
787
+ "300italic",
788
+ "regular",
789
+ "italic",
790
+ "700",
791
+ "700italic"
792
+ ],
793
+ "category": "display"
794
+ }
795
+ },
796
+ {
797
+ "Averia Serif Libre": {
798
+ "variants": [
799
+ "300",
800
+ "300italic",
801
+ "regular",
802
+ "italic",
803
+ "700",
804
+ "700italic"
805
+ ],
806
+ "category": "display"
807
+ }
808
+ },
809
+ {
810
+ "Bad Script": {
811
+ "variants": [
812
+ "regular"
813
+ ],
814
+ "category": "handwriting"
815
+ }
816
+ },
817
+ {
818
+ "Bahiana": {
819
+ "variants": [
820
+ "regular"
821
+ ],
822
+ "category": "display"
823
+ }
824
+ },
825
+ {
826
+ "Bai Jamjuree": {
827
+ "variants": [
828
+ "200",
829
+ "200italic",
830
+ "300",
831
+ "300italic",
832
+ "regular",
833
+ "italic",
834
+ "500",
835
+ "500italic",
836
+ "600",
837
+ "600italic",
838
+ "700",
839
+ "700italic"
840
+ ],
841
+ "category": "sans-serif"
842
+ }
843
+ },
844
+ {
845
+ "Baloo": {
846
+ "variants": [
847
+ "regular"
848
+ ],
849
+ "category": "display"
850
+ }
851
+ },
852
+ {
853
+ "Baloo Bhai": {
854
+ "variants": [
855
+ "regular"
856
+ ],
857
+ "category": "display"
858
+ }
859
+ },
860
+ {
861
+ "Baloo Bhaijaan": {
862
+ "variants": [
863
+ "regular"
864
+ ],
865
+ "category": "display"
866
+ }
867
+ },
868
+ {
869
+ "Baloo Bhaina": {
870
+ "variants": [
871
+ "regular"
872
+ ],
873
+ "category": "display"
874
+ }
875
+ },
876
+ {
877
+ "Baloo Chettan": {
878
+ "variants": [
879
+ "regular"
880
+ ],
881
+ "category": "display"
882
+ }
883
+ },
884
+ {
885
+ "Baloo Da": {
886
+ "variants": [
887
+ "regular"
888
+ ],
889
+ "category": "display"
890
+ }
891
+ },
892
+ {
893
+ "Baloo Paaji": {
894
+ "variants": [
895
+ "regular"
896
+ ],
897
+ "category": "display"
898
+ }
899
+ },
900
+ {
901
+ "Baloo Tamma": {
902
+ "variants": [
903
+ "regular"
904
+ ],
905
+ "category": "display"
906
+ }
907
+ },
908
+ {
909
+ "Baloo Tammudu": {
910
+ "variants": [
911
+ "regular"
912
+ ],
913
+ "category": "display"
914
+ }
915
+ },
916
+ {
917
+ "Baloo Thambi": {
918
+ "variants": [
919
+ "regular"
920
+ ],
921
+ "category": "display"
922
+ }
923
+ },
924
+ {
925
+ "Balthazar": {
926
+ "variants": [
927
+ "regular"
928
+ ],
929
+ "category": "serif"
930
+ }
931
+ },
932
+ {
933
+ "Bangers": {
934
+ "variants": [
935
+ "regular"
936
+ ],
937
+ "category": "display"
938
+ }
939
+ },
940
+ {
941
+ "Barlow": {
942
+ "variants": [
943
+ "100",
944
+ "100italic",
945
+ "200",
946
+ "200italic",
947
+ "300",
948
+ "300italic",
949
+ "regular",
950
+ "italic",
951
+ "500",
952
+ "500italic",
953
+ "600",
954
+ "600italic",
955
+ "700",
956
+ "700italic",
957
+ "800",
958
+ "800italic",
959
+ "900",
960
+ "900italic"
961
+ ],
962
+ "category": "sans-serif"
963
+ }
964
+ },
965
+ {
966
+ "Barlow Condensed": {
967
+ "variants": [
968
+ "100",
969
+ "100italic",
970
+ "200",
971
+ "200italic",
972
+ "300",
973
+ "300italic",
974
+ "regular",
975
+ "italic",
976
+ "500",
977
+ "500italic",
978
+ "600",
979
+ "600italic",
980
+ "700",
981
+ "700italic",
982
+ "800",
983
+ "800italic",
984
+ "900",
985
+ "900italic"
986
+ ],
987
+ "category": "sans-serif"
988
+ }
989
+ },
990
+ {
991
+ "Barlow Semi Condensed": {
992
+ "variants": [
993
+ "100",
994
+ "100italic",
995
+ "200",
996
+ "200italic",
997
+ "300",
998
+ "300italic",
999
+ "regular",
1000
+ "italic",
1001
+ "500",
1002
+ "500italic",
1003
+ "600",
1004
+ "600italic",
1005
+ "700",
1006
+ "700italic",
1007
+ "800",
1008
+ "800italic",
1009
+ "900",
1010
+ "900italic"
1011
+ ],
1012
+ "category": "sans-serif"
1013
+ }
1014
+ },
1015
+ {
1016
+ "Barrio": {
1017
+ "variants": [
1018
+ "regular"
1019
+ ],
1020
+ "category": "display"
1021
+ }
1022
+ },
1023
+ {
1024
+ "Basic": {
1025
+ "variants": [
1026
+ "regular"
1027
+ ],
1028
+ "category": "sans-serif"
1029
+ }
1030
+ },
1031
+ {
1032
+ "Battambang": {
1033
+ "variants": [
1034
+ "regular",
1035
+ "700"
1036
+ ],
1037
+ "category": "display"
1038
+ }
1039
+ },
1040
+ {
1041
+ "Baumans": {
1042
+ "variants": [
1043
+ "regular"
1044
+ ],
1045
+ "category": "display"
1046
+ }
1047
+ },
1048
+ {
1049
+ "Bayon": {
1050
+ "variants": [
1051
+ "regular"
1052
+ ],
1053
+ "category": "display"
1054
+ }
1055
+ },
1056
+ {
1057
+ "Belgrano": {
1058
+ "variants": [
1059
+ "regular"
1060
+ ],
1061
+ "category": "serif"
1062
+ }
1063
+ },
1064
+ {
1065
+ "Bellefair": {
1066
+ "variants": [
1067
+ "regular"
1068
+ ],
1069
+ "category": "serif"
1070
+ }
1071
+ },
1072
+ {
1073
+ "Belleza": {
1074
+ "variants": [
1075
+ "regular"
1076
+ ],
1077
+ "category": "sans-serif"
1078
+ }
1079
+ },
1080
+ {
1081
+ "BenchNine": {
1082
+ "variants": [
1083
+ "300",
1084
+ "regular",
1085
+ "700"
1086
+ ],
1087
+ "category": "sans-serif"
1088
+ }
1089
+ },
1090
+ {
1091
+ "Bentham": {
1092
+ "variants": [
1093
+ "regular"
1094
+ ],
1095
+ "category": "serif"
1096
+ }
1097
+ },
1098
+ {
1099
+ "Berkshire Swash": {
1100
+ "variants": [
1101
+ "regular"
1102
+ ],
1103
+ "category": "handwriting"
1104
+ }
1105
+ },
1106
+ {
1107
+ "Bevan": {
1108
+ "variants": [
1109
+ "regular"
1110
+ ],
1111
+ "category": "display"
1112
+ }
1113
+ },
1114
+ {
1115
+ "Bigelow Rules": {
1116
+ "variants": [
1117
+ "regular"
1118
+ ],
1119
+ "category": "display"
1120
+ }
1121
+ },
1122
+ {
1123
+ "Bigshot One": {
1124
+ "variants": [
1125
+ "regular"
1126
+ ],
1127
+ "category": "display"
1128
+ }
1129
+ },
1130
+ {
1131
+ "Bilbo": {
1132
+ "variants": [
1133
+ "regular"
1134
+ ],
1135
+ "category": "handwriting"
1136
+ }
1137
+ },
1138
+ {
1139
+ "Bilbo Swash Caps": {
1140
+ "variants": [
1141
+ "regular"
1142
+ ],
1143
+ "category": "handwriting"
1144
+ }
1145
+ },
1146
+ {
1147
+ "BioRhyme": {
1148
+ "variants": [
1149
+ "200",
1150
+ "300",
1151
+ "regular",
1152
+ "700",
1153
+ "800"
1154
+ ],
1155
+ "category": "serif"
1156
+ }
1157
+ },
1158
+ {
1159
+ "BioRhyme Expanded": {
1160
+ "variants": [
1161
+ "200",
1162
+ "300",
1163
+ "regular",
1164
+ "700",
1165
+ "800"
1166
+ ],
1167
+ "category": "serif"
1168
+ }
1169
+ },
1170
+ {
1171
+ "Biryani": {
1172
+ "variants": [
1173
+ "200",
1174
+ "300",
1175
+ "regular",
1176
+ "600",
1177
+ "700",
1178
+ "800",
1179
+ "900"
1180
+ ],
1181
+ "category": "sans-serif"
1182
+ }
1183
+ },
1184
+ {
1185
+ "Bitter": {
1186
+ "variants": [
1187
+ "regular",
1188
+ "italic",
1189
+ "700"
1190
+ ],
1191
+ "category": "serif"
1192
+ }
1193
+ },
1194
+ {
1195
+ "Black And White Picture": {
1196
+ "variants": [
1197
+ "regular"
1198
+ ],
1199
+ "category": "sans-serif"
1200
+ }
1201
+ },
1202
+ {
1203
+ "Black Han Sans": {
1204
+ "variants": [
1205
+ "regular"
1206
+ ],
1207
+ "category": "sans-serif"
1208
+ }
1209
+ },
1210
+ {
1211
+ "Black Ops One": {
1212
+ "variants": [
1213
+ "regular"
1214
+ ],
1215
+ "category": "display"
1216
+ }
1217
+ },
1218
+ {
1219
+ "Bokor": {
1220
+ "variants": [
1221
+ "regular"
1222
+ ],
1223
+ "category": "display"
1224
+ }
1225
+ },
1226
+ {
1227
+ "Bonbon": {
1228
+ "variants": [
1229
+ "regular"
1230
+ ],
1231
+ "category": "handwriting"
1232
+ }
1233
+ },
1234
+ {
1235
+ "Boogaloo": {
1236
+ "variants": [
1237
+ "regular"
1238
+ ],
1239
+ "category": "display"
1240
+ }
1241
+ },
1242
+ {
1243
+ "Bowlby One": {
1244
+ "variants": [
1245
+ "regular"
1246
+ ],
1247
+ "category": "display"
1248
+ }
1249
+ },
1250
+ {
1251
+ "Bowlby One SC": {
1252
+ "variants": [
1253
+ "regular"
1254
+ ],
1255
+ "category": "display"
1256
+ }
1257
+ },
1258
+ {
1259
+ "Brawler": {
1260
+ "variants": [
1261
+ "regular"
1262
+ ],
1263
+ "category": "serif"
1264
+ }
1265
+ },
1266
+ {
1267
+ "Bree Serif": {
1268
+ "variants": [
1269
+ "regular"
1270
+ ],
1271
+ "category": "serif"
1272
+ }
1273
+ },
1274
+ {
1275
+ "Bubblegum Sans": {
1276
+ "variants": [
1277
+ "regular"
1278
+ ],
1279
+ "category": "display"
1280
+ }
1281
+ },
1282
+ {
1283
+ "Bubbler One": {
1284
+ "variants": [
1285
+ "regular"
1286
+ ],
1287
+ "category": "sans-serif"
1288
+ }
1289
+ },
1290
+ {
1291
+ "Buda": {
1292
+ "variants": [
1293
+ "300"
1294
+ ],
1295
+ "category": "display"
1296
+ }
1297
+ },
1298
+ {
1299
+ "Buenard": {
1300
+ "variants": [
1301
+ "regular",
1302
+ "700"
1303
+ ],
1304
+ "category": "serif"
1305
+ }
1306
+ },
1307
+ {
1308
+ "Bungee": {
1309
+ "variants": [
1310
+ "regular"
1311
+ ],
1312
+ "category": "display"
1313
+ }
1314
+ },
1315
+ {
1316
+ "Bungee Hairline": {
1317
+ "variants": [
1318
+ "regular"
1319
+ ],
1320
+ "category": "display"
1321
+ }
1322
+ },
1323
+ {
1324
+ "Bungee Inline": {
1325
+ "variants": [
1326
+ "regular"
1327
+ ],
1328
+ "category": "display"
1329
+ }
1330
+ },
1331
+ {
1332
+ "Bungee Outline": {
1333
+ "variants": [
1334
+ "regular"
1335
+ ],
1336
+ "category": "display"
1337
+ }
1338
+ },
1339
+ {
1340
+ "Bungee Shade": {
1341
+ "variants": [
1342
+ "regular"
1343
+ ],
1344
+ "category": "display"
1345
+ }
1346
+ },
1347
+ {
1348
+ "Butcherman": {
1349
+ "variants": [
1350
+ "regular"
1351
+ ],
1352
+ "category": "display"
1353
+ }
1354
+ },
1355
+ {
1356
+ "Butterfly Kids": {
1357
+ "variants": [
1358
+ "regular"
1359
+ ],
1360
+ "category": "handwriting"
1361
+ }
1362
+ },
1363
+ {
1364
+ "Cabin": {
1365
+ "variants": [
1366
+ "regular",
1367
+ "italic",
1368
+ "500",
1369
+ "500italic",
1370
+ "600",
1371
+ "600italic",
1372
+ "700",
1373
+ "700italic"
1374
+ ],
1375
+ "category": "sans-serif"
1376
+ }
1377
+ },
1378
+ {
1379
+ "Cabin Condensed": {
1380
+ "variants": [
1381
+ "regular",
1382
+ "500",
1383
+ "600",
1384
+ "700"
1385
+ ],
1386
+ "category": "sans-serif"
1387
+ }
1388
+ },
1389
+ {
1390
+ "Cabin Sketch": {
1391
+ "variants": [
1392
+ "regular",
1393
+ "700"
1394
+ ],
1395
+ "category": "display"
1396
+ }
1397
+ },
1398
+ {
1399
+ "Caesar Dressing": {
1400
+ "variants": [
1401
+ "regular"
1402
+ ],
1403
+ "category": "display"
1404
+ }
1405
+ },
1406
+ {
1407
+ "Cagliostro": {
1408
+ "variants": [
1409
+ "regular"
1410
+ ],
1411
+ "category": "sans-serif"
1412
+ }
1413
+ },
1414
+ {
1415
+ "Cairo": {
1416
+ "variants": [
1417
+ "200",
1418
+ "300",
1419
+ "regular",
1420
+ "600",
1421
+ "700",
1422
+ "900"
1423
+ ],
1424
+ "category": "sans-serif"
1425
+ }
1426
+ },
1427
+ {
1428
+ "Calligraffitti": {
1429
+ "variants": [
1430
+ "regular"
1431
+ ],
1432
+ "category": "handwriting"
1433
+ }
1434
+ },
1435
+ {
1436
+ "Cambay": {
1437
+ "variants": [
1438
+ "regular",
1439
+ "italic",
1440
+ "700",
1441
+ "700italic"
1442
+ ],
1443
+ "category": "sans-serif"
1444
+ }
1445
+ },
1446
+ {
1447
+ "Cambo": {
1448
+ "variants": [
1449
+ "regular"
1450
+ ],
1451
+ "category": "serif"
1452
+ }
1453
+ },
1454
+ {
1455
+ "Candal": {
1456
+ "variants": [
1457
+ "regular"
1458
+ ],
1459
+ "category": "sans-serif"
1460
+ }
1461
+ },
1462
+ {
1463
+ "Cantarell": {
1464
+ "variants": [
1465
+ "regular",
1466
+ "italic",
1467
+ "700",
1468
+ "700italic"
1469
+ ],
1470
+ "category": "sans-serif"
1471
+ }
1472
+ },
1473
+ {
1474
+ "Cantata One": {
1475
+ "variants": [
1476
+ "regular"
1477
+ ],
1478
+ "category": "serif"
1479
+ }
1480
+ },
1481
+ {
1482
+ "Cantora One": {
1483
+ "variants": [
1484
+ "regular"
1485
+ ],
1486
+ "category": "sans-serif"
1487
+ }
1488
+ },
1489
+ {
1490
+ "Capriola": {
1491
+ "variants": [
1492
+ "regular"
1493
+ ],
1494
+ "category": "sans-serif"
1495
+ }
1496
+ },
1497
+ {
1498
+ "Cardo": {
1499
+ "variants": [
1500
+ "regular",
1501
+ "italic",
1502
+ "700"
1503
+ ],
1504
+ "category": "serif"
1505
+ }
1506
+ },
1507
+ {
1508
+ "Carme": {
1509
+ "variants": [
1510
+ "regular"
1511
+ ],
1512
+ "category": "sans-serif"
1513
+ }
1514
+ },
1515
+ {
1516
+ "Carrois Gothic": {
1517
+ "variants": [
1518
+ "regular"
1519
+ ],
1520
+ "category": "sans-serif"
1521
+ }
1522
+ },
1523
+ {
1524
+ "Carrois Gothic SC": {
1525
+ "variants": [
1526
+ "regular"
1527
+ ],
1528
+ "category": "sans-serif"
1529
+ }
1530
+ },
1531
+ {
1532
+ "Carter One": {
1533
+ "variants": [
1534
+ "regular"
1535
+ ],
1536
+ "category": "display"
1537
+ }
1538
+ },
1539
+ {
1540
+ "Catamaran": {
1541
+ "variants": [
1542
+ "100",
1543
+ "200",
1544
+ "300",
1545
+ "regular",
1546
+ "500",
1547
+ "600",
1548
+ "700",
1549
+ "800",
1550
+ "900"
1551
+ ],
1552
+ "category": "sans-serif"
1553
+ }
1554
+ },
1555
+ {
1556
+ "Caudex": {
1557
+ "variants": [
1558
+ "regular",
1559
+ "italic",
1560
+ "700",
1561
+ "700italic"
1562
+ ],
1563
+ "category": "serif"
1564
+ }
1565
+ },
1566
+ {
1567
+ "Caveat": {
1568
+ "variants": [
1569
+ "regular",
1570
+ "700"
1571
+ ],
1572
+ "category": "handwriting"
1573
+ }
1574
+ },
1575
+ {
1576
+ "Caveat Brush": {
1577
+ "variants": [
1578
+ "regular"
1579
+ ],
1580
+ "category": "handwriting"
1581
+ }
1582
+ },
1583
+ {
1584
+ "Cedarville Cursive": {
1585
+ "variants": [
1586
+ "regular"
1587
+ ],
1588
+ "category": "handwriting"
1589
+ }
1590
+ },
1591
+ {
1592
+ "Ceviche One": {
1593
+ "variants": [
1594
+ "regular"
1595
+ ],
1596
+ "category": "display"
1597
+ }
1598
+ },
1599
+ {
1600
+ "Chakra Petch": {
1601
+ "variants": [
1602
+ "300",
1603
+ "300italic",
1604
+ "regular",
1605
+ "italic",
1606
+ "500",
1607
+ "500italic",
1608
+ "600",
1609
+ "600italic",
1610
+ "700",
1611
+ "700italic"
1612
+ ],
1613
+ "category": "sans-serif"
1614
+ }
1615
+ },
1616
+ {
1617
+ "Changa": {
1618
+ "variants": [
1619
+ "200",
1620
+ "300",
1621
+ "regular",
1622
+ "500",
1623
+ "600",
1624
+ "700",
1625
+ "800"
1626
+ ],
1627
+ "category": "sans-serif"
1628
+ }
1629
+ },
1630
+ {
1631
+ "Changa One": {
1632
+ "variants": [
1633
+ "regular",
1634
+ "italic"
1635
+ ],
1636
+ "category": "display"
1637
+ }
1638
+ },
1639
+ {
1640
+ "Chango": {
1641
+ "variants": [
1642
+ "regular"
1643
+ ],
1644
+ "category": "display"
1645
+ }
1646
+ },
1647
+ {
1648
+ "Charmonman": {
1649
+ "variants": [
1650
+ "regular",
1651
+ "700"
1652
+ ],
1653
+ "category": "handwriting"
1654
+ }
1655
+ },
1656
+ {
1657
+ "Chathura": {
1658
+ "variants": [
1659
+ "100",
1660
+ "300",
1661
+ "regular",
1662
+ "700",
1663
+ "800"
1664
+ ],
1665
+ "category": "sans-serif"
1666
+ }
1667
+ },
1668
+ {
1669
+ "Chau Philomene One": {
1670
+ "variants": [
1671
+ "regular",
1672
+ "italic"
1673
+ ],
1674
+ "category": "sans-serif"
1675
+ }
1676
+ },
1677
+ {
1678
+ "Chela One": {
1679
+ "variants": [
1680
+ "regular"
1681
+ ],
1682
+ "category": "display"
1683
+ }
1684
+ },
1685
+ {
1686
+ "Chelsea Market": {
1687
+ "variants": [
1688
+ "regular"
1689
+ ],
1690
+ "category": "display"
1691
+ }
1692
+ },
1693
+ {
1694
+ "Chenla": {
1695
+ "variants": [
1696
+ "regular"
1697
+ ],
1698
+ "category": "display"
1699
+ }
1700
+ },
1701
+ {
1702
+ "Cherry Cream Soda": {
1703
+ "variants": [
1704
+ "regular"
1705
+ ],
1706
+ "category": "display"
1707
+ }
1708
+ },
1709
+ {
1710
+ "Cherry Swash": {
1711
+ "variants": [
1712
+ "regular",
1713
+ "700"
1714
+ ],
1715
+ "category": "display"
1716
+ }
1717
+ },
1718
+ {
1719
+ "Chewy": {
1720
+ "variants": [
1721
+ "regular"
1722
+ ],
1723
+ "category": "display"
1724
+ }
1725
+ },
1726
+ {
1727
+ "Chicle": {
1728
+ "variants": [
1729
+ "regular"
1730
+ ],
1731
+ "category": "display"
1732
+ }
1733
+ },
1734
+ {
1735
+ "Chivo": {
1736
+ "variants": [
1737
+ "300",
1738
+ "300italic",
1739
+ "regular",
1740
+ "italic",
1741
+ "700",
1742
+ "700italic",
1743
+ "900",
1744
+ "900italic"
1745
+ ],
1746
+ "category": "sans-serif"
1747
+ }
1748
+ },
1749
+ {
1750
+ "Chonburi": {
1751
+ "variants": [
1752
+ "regular"
1753
+ ],
1754
+ "category": "display"
1755
+ }
1756
+ },
1757
+ {
1758
+ "Cinzel": {
1759
+ "variants": [
1760
+ "regular",
1761
+ "700",
1762
+ "900"
1763
+ ],
1764
+ "category": "serif"
1765
+ }
1766
+ },
1767
+ {
1768
+ "Cinzel Decorative": {
1769
+ "variants": [
1770
+ "regular",
1771
+ "700",
1772
+ "900"
1773
+ ],
1774
+ "category": "display"
1775
+ }
1776
+ },
1777
+ {
1778
+ "Clicker Script": {
1779
+ "variants": [
1780
+ "regular"
1781
+ ],
1782
+ "category": "handwriting"
1783
+ }
1784
+ },
1785
+ {
1786
+ "Coda": {
1787
+ "variants": [
1788
+ "regular",
1789
+ "800"
1790
+ ],
1791
+ "category": "display"
1792
+ }
1793
+ },
1794
+ {
1795
+ "Coda Caption": {
1796
+ "variants": [
1797
+ "800"
1798
+ ],
1799
+ "category": "sans-serif"
1800
+ }
1801
+ },
1802
+ {
1803
+ "Codystar": {
1804
+ "variants": [
1805
+ "300",
1806
+ "regular"
1807
+ ],
1808
+ "category": "display"
1809
+ }
1810
+ },
1811
+ {
1812
+ "Coiny": {
1813
+ "variants": [
1814
+ "regular"
1815
+ ],
1816
+ "category": "display"
1817
+ }
1818
+ },
1819
+ {
1820
+ "Combo": {
1821
+ "variants": [
1822
+ "regular"
1823
+ ],
1824
+ "category": "display"
1825
+ }
1826
+ },
1827
+ {
1828
+ "Comfortaa": {
1829
+ "variants": [
1830
+ "300",
1831
+ "regular",
1832
+ "700"
1833
+ ],
1834
+ "category": "display"
1835
+ }
1836
+ },
1837
+ {
1838
+ "Coming Soon": {
1839
+ "variants": [
1840
+ "regular"
1841
+ ],
1842
+ "category": "handwriting"
1843
+ }
1844
+ },
1845
+ {
1846
+ "Concert One": {
1847
+ "variants": [
1848
+ "regular"
1849
+ ],
1850
+ "category": "display"
1851
+ }
1852
+ },
1853
+ {
1854
+ "Condiment": {
1855
+ "variants": [
1856
+ "regular"
1857
+ ],
1858
+ "category": "handwriting"
1859
+ }
1860
+ },
1861
+ {
1862
+ "Content": {
1863
+ "variants": [
1864
+ "regular",
1865
+ "700"
1866
+ ],
1867
+ "category": "display"
1868
+ }
1869
+ },
1870
+ {
1871
+ "Contrail One": {
1872
+ "variants": [
1873
+ "regular"
1874
+ ],
1875
+ "category": "display"
1876
+ }
1877
+ },
1878
+ {
1879
+ "Convergence": {
1880
+ "variants": [
1881
+ "regular"
1882
+ ],
1883
+ "category": "sans-serif"
1884
+ }
1885
+ },
1886
+ {
1887
+ "Cookie": {
1888
+ "variants": [
1889
+ "regular"
1890
+ ],
1891
+ "category": "handwriting"
1892
+ }
1893
+ },
1894
+ {
1895
+ "Copse": {
1896
+ "variants": [
1897
+ "regular"
1898
+ ],
1899
+ "category": "serif"
1900
+ }
1901
+ },
1902
+ {
1903
+ "Corben": {
1904
+ "variants": [
1905
+ "regular",
1906
+ "700"
1907
+ ],
1908
+ "category": "display"
1909
+ }
1910
+ },
1911
+ {
1912
+ "Cormorant": {
1913
+ "variants": [
1914
+ "300",
1915
+ "300italic",
1916
+ "regular",
1917
+ "italic",
1918
+ "500",
1919
+ "500italic",
1920
+ "600",
1921
+ "600italic",
1922
+ "700",
1923
+ "700italic"
1924
+ ],
1925
+ "category": "serif"
1926
+ }
1927
+ },
1928
+ {
1929
+ "Cormorant Garamond": {
1930
+ "variants": [
1931
+ "300",
1932
+ "300italic",
1933
+ "regular",
1934
+ "italic",
1935
+ "500",
1936
+ "500italic",
1937
+ "600",
1938
+ "600italic",
1939
+ "700",
1940
+ "700italic"
1941
+ ],
1942
+ "category": "serif"
1943
+ }
1944
+ },
1945
+ {
1946
+ "Cormorant Infant": {
1947
+ "variants": [
1948
+ "300",
1949
+ "300italic",
1950
+ "regular",
1951
+ "italic",
1952
+ "500",
1953
+ "500italic",
1954
+ "600",
1955
+ "600italic",
1956
+ "700",
1957
+ "700italic"
1958
+ ],
1959
+ "category": "serif"
1960
+ }
1961
+ },
1962
+ {
1963
+ "Cormorant SC": {
1964
+ "variants": [
1965
+ "300",
1966
+ "regular",
1967
+ "500",
1968
+ "600",
1969
+ "700"
1970
+ ],
1971
+ "category": "serif"
1972
+ }
1973
+ },
1974
+ {
1975
+ "Cormorant Unicase": {
1976
+ "variants": [
1977
+ "300",
1978
+ "regular",
1979
+ "500",
1980
+ "600",
1981
+ "700"
1982
+ ],
1983
+ "category": "serif"
1984
+ }
1985
+ },
1986
+ {
1987
+ "Cormorant Upright": {
1988
+ "variants": [
1989
+ "300",
1990
+ "regular",
1991
+ "500",
1992
+ "600",
1993
+ "700"
1994
+ ],
1995
+ "category": "serif"
1996
+ }
1997
+ },
1998
+ {
1999
+ "Courgette": {
2000
+ "variants": [
2001
+ "regular"
2002
+ ],
2003
+ "category": "handwriting"
2004
+ }
2005
+ },
2006
+ {
2007
+ "Cousine": {
2008
+ "variants": [
2009
+ "regular",
2010
+ "italic",
2011
+ "700",
2012
+ "700italic"
2013
+ ],
2014
+ "category": "monospace"
2015
+ }
2016
+ },
2017
+ {
2018
+ "Coustard": {
2019
+ "variants": [
2020
+ "regular",
2021
+ "900"
2022
+ ],
2023
+ "category": "serif"
2024
+ }
2025
+ },
2026
+ {
2027
+ "Covered By Your Grace": {
2028
+ "variants": [
2029
+ "regular"
2030
+ ],
2031
+ "category": "handwriting"
2032
+ }
2033
+ },
2034
+ {
2035
+ "Crafty Girls": {
2036
+ "variants": [
2037
+ "regular"
2038
+ ],
2039
+ "category": "handwriting"
2040
+ }
2041
+ },
2042
+ {
2043
+ "Creepster": {
2044
+ "variants": [
2045
+ "regular"
2046
+ ],
2047
+ "category": "display"
2048
+ }
2049
+ },
2050
+ {
2051
+ "Crete Round": {
2052
+ "variants": [
2053
+ "regular",
2054
+ "italic"
2055
+ ],
2056
+ "category": "serif"
2057
+ }
2058
+ },
2059
+ {
2060
+ "Crimson Text": {
2061
+ "variants": [
2062
+ "regular",
2063
+ "italic",
2064
+ "600",
2065
+ "600italic",
2066
+ "700",
2067
+ "700italic"
2068
+ ],
2069
+ "category": "serif"
2070
+ }
2071
+ },
2072
+ {
2073
+ "Croissant One": {
2074
+ "variants": [
2075
+ "regular"
2076
+ ],
2077
+ "category": "display"
2078
+ }
2079
+ },
2080
+ {
2081
+ "Crushed": {
2082
+ "variants": [
2083
+ "regular"
2084
+ ],
2085
+ "category": "display"
2086
+ }
2087
+ },
2088
+ {
2089
+ "Cuprum": {
2090
+ "variants": [
2091
+ "regular",
2092
+ "italic",
2093
+ "700",
2094
+ "700italic"
2095
+ ],
2096
+ "category": "sans-serif"
2097
+ }
2098
+ },
2099
+ {
2100
+ "Cute Font": {
2101
+ "variants": [
2102
+ "regular"
2103
+ ],
2104
+ "category": "display"
2105
+ }
2106
+ },
2107
+ {
2108
+ "Cutive": {
2109
+ "variants": [
2110
+ "regular"
2111
+ ],
2112
+ "category": "serif"
2113
+ }
2114
+ },
2115
+ {
2116
+ "Cutive Mono": {
2117
+ "variants": [
2118
+ "regular"
2119
+ ],
2120
+ "category": "monospace"
2121
+ }
2122
+ },
2123
+ {
2124
+ "Damion": {
2125
+ "variants": [
2126
+ "regular"
2127
+ ],
2128
+ "category": "handwriting"
2129
+ }
2130
+ },
2131
+ {
2132
+ "Dancing Script": {
2133
+ "variants": [
2134
+ "regular",
2135
+ "700"
2136
+ ],
2137
+ "category": "handwriting"
2138
+ }
2139
+ },
2140
+ {
2141
+ "Dangrek": {
2142
+ "variants": [
2143
+ "regular"
2144
+ ],
2145
+ "category": "display"
2146
+ }
2147
+ },
2148
+ {
2149
+ "David Libre": {
2150
+ "variants": [
2151
+ "regular",
2152
+ "500",
2153
+ "700"
2154
+ ],
2155
+ "category": "serif"
2156
+ }
2157
+ },
2158
+ {
2159
+ "Dawning of a New Day": {
2160
+ "variants": [
2161
+ "regular"
2162
+ ],
2163
+ "category": "handwriting"
2164
+ }
2165
+ },
2166
+ {
2167
+ "Days One": {
2168
+ "variants": [
2169
+ "regular"
2170
+ ],
2171
+ "category": "sans-serif"
2172
+ }
2173
+ },
2174
+ {
2175
+ "Dekko": {
2176
+ "variants": [
2177
+ "regular"
2178
+ ],
2179
+ "category": "handwriting"
2180
+ }
2181
+ },
2182
+ {
2183
+ "Delius": {
2184
+ "variants": [
2185
+ "regular"
2186
+ ],
2187
+ "category": "handwriting"
2188
+ }
2189
+ },
2190
+ {
2191
+ "Delius Swash Caps": {
2192
+ "variants": [
2193
+ "regular"
2194
+ ],
2195
+ "category": "handwriting"
2196
+ }
2197
+ },
2198
+ {
2199
+ "Delius Unicase": {
2200
+ "variants": [
2201
+ "regular",
2202
+ "700"
2203
+ ],
2204
+ "category": "handwriting"
2205
+ }
2206
+ },
2207
+ {
2208
+ "Della Respira": {
2209
+ "variants": [
2210
+ "regular"
2211
+ ],
2212
+ "category": "serif"
2213
+ }
2214
+ },
2215
+ {
2216
+ "Denk One": {
2217
+ "variants": [
2218
+ "regular"
2219
+ ],
2220
+ "category": "sans-serif"
2221
+ }
2222
+ },
2223
+ {
2224
+ "Devonshire": {
2225
+ "variants": [
2226
+ "regular"
2227
+ ],
2228
+ "category": "handwriting"
2229
+ }
2230
+ },
2231
+ {
2232
+ "Dhurjati": {
2233
+ "variants": [
2234
+ "regular"
2235
+ ],
2236
+ "category": "sans-serif"
2237
+ }
2238
+ },
2239
+ {
2240
+ "Didact Gothic": {
2241
+ "variants": [
2242
+ "regular"
2243
+ ],
2244
+ "category": "sans-serif"
2245
+ }
2246
+ },
2247
+ {
2248
+ "Diplomata": {
2249
+ "variants": [
2250
+ "regular"
2251
+ ],
2252
+ "category": "display"
2253
+ }
2254
+ },
2255
+ {
2256
+ "Diplomata SC": {
2257
+ "variants": [
2258
+ "regular"
2259
+ ],
2260
+ "category": "display"
2261
+ }
2262
+ },
2263
+ {
2264
+ "Do Hyeon": {
2265
+ "variants": [
2266
+ "regular"
2267
+ ],
2268
+ "category": "sans-serif"
2269
+ }
2270
+ },
2271
+ {
2272
+ "Dokdo": {
2273
+ "variants": [
2274
+ "regular"
2275
+ ],
2276
+ "category": "handwriting"
2277
+ }
2278
+ },
2279
+ {
2280
+ "Domine": {
2281
+ "variants": [
2282
+ "regular",
2283
+ "700"
2284
+ ],
2285
+ "category": "serif"
2286
+ }
2287
+ },
2288
+ {
2289
+ "Donegal One": {
2290
+ "variants": [
2291
+ "regular"
2292
+ ],
2293
+ "category": "serif"
2294
+ }
2295
+ },
2296
+ {
2297
+ "Doppio One": {
2298
+ "variants": [
2299
+ "regular"
2300
+ ],
2301
+ "category": "sans-serif"
2302
+ }
2303
+ },
2304
+ {
2305
+ "Dorsa": {
2306
+ "variants": [
2307
+ "regular"
2308
+ ],
2309
+ "category": "sans-serif"
2310
+ }
2311
+ },
2312
+ {
2313
+ "Dosis": {
2314
+ "variants": [
2315
+ "200",
2316
+ "300",
2317
+ "regular",
2318
+ "500",
2319
+ "600",
2320
+ "700",
2321
+ "800"
2322
+ ],
2323
+ "category": "sans-serif"
2324
+ }
2325
+ },
2326
+ {
2327
+ "Dr Sugiyama": {
2328
+ "variants": [
2329
+ "regular"
2330
+ ],
2331
+ "category": "handwriting"
2332
+ }
2333
+ },
2334
+ {
2335
+ "Duru Sans": {
2336
+ "variants": [
2337
+ "regular"
2338
+ ],
2339
+ "category": "sans-serif"
2340
+ }
2341
+ },
2342
+ {
2343
+ "Dynalight": {
2344
+ "variants": [
2345
+ "regular"
2346
+ ],
2347
+ "category": "display"
2348
+ }
2349
+ },
2350
+ {
2351
+ "EB Garamond": {
2352
+ "variants": [
2353
+ "regular",
2354
+ "italic",
2355
+ "500",
2356
+ "500italic",
2357
+ "600",
2358
+ "600italic",
2359
+ "700",
2360
+ "700italic",
2361
+ "800",
2362
+ "800italic"
2363
+ ],
2364
+ "category": "serif"
2365
+ }
2366
+ },
2367
+ {
2368
+ "Eagle Lake": {
2369
+ "variants": [
2370
+ "regular"
2371
+ ],
2372
+ "category": "handwriting"
2373
+ }
2374
+ },
2375
+ {
2376
+ "East Sea Dokdo": {
2377
+ "variants": [
2378
+ "regular"
2379
+ ],
2380
+ "category": "handwriting"
2381
+ }
2382
+ },
2383
+ {
2384
+ "Eater": {
2385
+ "variants": [
2386
+ "regular"
2387
+ ],
2388
+ "category": "display"
2389
+ }
2390
+ },
2391
+ {
2392
+ "Economica": {
2393
+ "variants": [
2394
+ "regular",
2395
+ "italic",
2396
+ "700",
2397
+ "700italic"
2398
+ ],
2399
+ "category": "sans-serif"
2400
+ }
2401
+ },
2402
+ {
2403
+ "Eczar": {
2404
+ "variants": [
2405
+ "regular",
2406
+ "500",
2407
+ "600",
2408
+ "700",
2409
+ "800"
2410
+ ],
2411
+ "category": "serif"
2412
+ }
2413
+ },
2414
+ {
2415
+ "El Messiri": {
2416
+ "variants": [
2417
+ "regular",
2418
+ "500",
2419
+ "600",
2420
+ "700"
2421
+ ],
2422
+ "category": "sans-serif"
2423
+ }
2424
+ },
2425
+ {
2426
+ "Electrolize": {
2427
+ "variants": [
2428
+ "regular"
2429
+ ],
2430
+ "category": "sans-serif"
2431
+ }
2432
+ },
2433
+ {
2434
+ "Elsie": {
2435
+ "variants": [
2436
+ "regular",
2437
+ "900"
2438
+ ],
2439
+ "category": "display"
2440
+ }
2441
+ },
2442
+ {
2443
+ "Elsie Swash Caps": {
2444
+ "variants": [
2445
+ "regular",
2446
+ "900"
2447
+ ],
2448
+ "category": "display"
2449
+ }
2450
+ },
2451
+ {
2452
+ "Emblema One": {
2453
+ "variants": [
2454
+ "regular"
2455
+ ],
2456
+ "category": "display"
2457
+ }
2458
+ },
2459
+ {
2460
+ "Emilys Candy": {
2461
+ "variants": [
2462
+ "regular"
2463
+ ],
2464
+ "category": "display"
2465
+ }
2466
+ },
2467
+ {
2468
+ "Encode Sans": {
2469
+ "variants": [
2470
+ "100",
2471
+ "200",
2472
+ "300",
2473
+ "regular",
2474
+ "500",
2475
+ "600",
2476
+ "700",
2477
+ "800",
2478
+ "900"
2479
+ ],
2480
+ "category": "sans-serif"
2481
+ }
2482
+ },
2483
+ {
2484
+ "Encode Sans Condensed": {
2485
+ "variants": [
2486
+ "100",
2487
+ "200",
2488
+ "300",
2489
+ "regular",
2490
+ "500",
2491
+ "600",
2492
+ "700",
2493
+ "800",
2494
+ "900"
2495
+ ],
2496
+ "category": "sans-serif"
2497
+ }
2498
+ },
2499
+ {
2500
+ "Encode Sans Expanded": {
2501
+ "variants": [
2502
+ "100",
2503
+ "200",
2504
+ "300",
2505
+ "regular",
2506
+ "500",
2507
+ "600",
2508
+ "700",
2509
+ "800",
2510
+ "900"
2511
+ ],
2512
+ "category": "sans-serif"
2513
+ }
2514
+ },
2515
+ {
2516
+ "Encode Sans Semi Condensed": {
2517
+ "variants": [
2518
+ "100",
2519
+ "200",
2520
+ "300",
2521
+ "regular",
2522
+ "500",
2523
+ "600",
2524
+ "700",
2525
+ "800",
2526
+ "900"
2527
+ ],
2528
+ "category": "sans-serif"
2529
+ }
2530
+ },
2531
+ {
2532
+ "Encode Sans Semi Expanded": {
2533
+ "variants": [
2534
+ "100",
2535
+ "200",
2536
+ "300",
2537
+ "regular",
2538
+ "500",
2539
+ "600",
2540
+ "700",
2541
+ "800",
2542
+ "900"
2543
+ ],
2544
+ "category": "sans-serif"
2545
+ }
2546
+ },
2547
+ {
2548
+ "Engagement": {
2549
+ "variants": [
2550
+ "regular"
2551
+ ],
2552
+ "category": "handwriting"
2553
+ }
2554
+ },
2555
+ {
2556
+ "Englebert": {
2557
+ "variants": [
2558
+ "regular"
2559
+ ],
2560
+ "category": "sans-serif"
2561
+ }
2562
+ },
2563
+ {
2564
+ "Enriqueta": {
2565
+ "variants": [
2566
+ "regular",
2567
+ "700"
2568
+ ],
2569
+ "category": "serif"
2570
+ }
2571
+ },
2572
+ {
2573
+ "Erica One": {
2574
+ "variants": [
2575
+ "regular"
2576
+ ],
2577
+ "category": "display"
2578
+ }
2579
+ },
2580
+ {
2581
+ "Esteban": {
2582
+ "variants": [
2583
+ "regular"
2584
+ ],
2585
+ "category": "serif"
2586
+ }
2587
+ },
2588
+ {
2589
+ "Euphoria Script": {
2590
+ "variants": [
2591
+ "regular"
2592
+ ],
2593
+ "category": "handwriting"
2594
+ }
2595
+ },
2596
+ {
2597
+ "Ewert": {
2598
+ "variants": [
2599
+ "regular"
2600
+ ],
2601
+ "category": "display"
2602
+ }
2603
+ },
2604
+ {
2605
+ "Exo": {
2606
+ "variants": [
2607
+ "100",
2608
+ "100italic",
2609
+ "200",
2610
+ "200italic",
2611
+ "300",
2612
+ "300italic",
2613
+ "regular",
2614
+ "italic",
2615
+ "500",
2616
+ "500italic",
2617
+ "600",
2618
+ "600italic",
2619
+ "700",
2620
+ "700italic",
2621
+ "800",
2622
+ "800italic",
2623
+ "900",
2624
+ "900italic"
2625
+ ],
2626
+ "category": "sans-serif"
2627
+ }
2628
+ },
2629
+ {
2630
+ "Exo 2": {
2631
+ "variants": [
2632
+ "100",
2633
+ "100italic",
2634
+ "200",
2635
+ "200italic",
2636
+ "300",
2637
+ "300italic",
2638
+ "regular",
2639
+ "italic",
2640
+ "500",
2641
+ "500italic",
2642
+ "600",
2643
+ "600italic",
2644
+ "700",
2645
+ "700italic",
2646
+ "800",
2647
+ "800italic",
2648
+ "900",
2649
+ "900italic"
2650
+ ],
2651
+ "category": "sans-serif"
2652
+ }
2653
+ },
2654
+ {
2655
+ "Expletus Sans": {
2656
+ "variants": [
2657
+ "regular",
2658
+ "italic",
2659
+ "500",
2660
+ "500italic",
2661
+ "600",
2662
+ "600italic",
2663
+ "700",
2664
+ "700italic"
2665
+ ],
2666
+ "category": "display"
2667
+ }
2668
+ },
2669
+ {
2670
+ "Fahkwang": {
2671
+ "variants": [
2672
+ "200",
2673
+ "200italic",
2674
+ "300",
2675
+ "300italic",
2676
+ "regular",
2677
+ "italic",
2678
+ "500",
2679
+ "500italic",
2680
+ "600",
2681
+ "600italic",
2682
+ "700",
2683
+ "700italic"
2684
+ ],
2685
+ "category": "sans-serif"
2686
+ }
2687
+ },
2688
+ {
2689
+ "Fanwood Text": {
2690
+ "variants": [
2691
+ "regular",
2692
+ "italic"
2693
+ ],
2694
+ "category": "serif"
2695
+ }
2696
+ },
2697
+ {
2698
+ "Farsan": {
2699
+ "variants": [
2700
+ "regular"
2701
+ ],
2702
+ "category": "display"
2703
+ }
2704
+ },
2705
+ {
2706
+ "Fascinate": {
2707
+ "variants": [
2708
+ "regular"
2709
+ ],
2710
+ "category": "display"
2711
+ }
2712
+ },
2713
+ {
2714
+ "Fascinate Inline": {
2715
+ "variants": [
2716
+ "regular"
2717
+ ],
2718
+ "category": "display"
2719
+ }
2720
+ },
2721
+ {
2722
+ "Faster One": {
2723
+ "variants": [
2724
+ "regular"
2725
+ ],
2726
+ "category": "display"
2727
+ }
2728
+ },
2729
+ {
2730
+ "Fasthand": {
2731
+ "variants": [
2732
+ "regular"
2733
+ ],
2734
+ "category": "serif"
2735
+ }
2736
+ },
2737
+ {
2738
+ "Fauna One": {
2739
+ "variants": [
2740
+ "regular"
2741
+ ],
2742
+ "category": "serif"
2743
+ }
2744
+ },
2745
+ {
2746
+ "Faustina": {
2747
+ "variants": [
2748
+ "regular",
2749
+ "italic",
2750
+ "500",
2751
+ "500italic",
2752
+ "600",
2753
+ "600italic",
2754
+ "700",
2755
+ "700italic"
2756
+ ],
2757
+ "category": "serif"
2758
+ }
2759
+ },
2760
+ {
2761
+ "Federant": {
2762
+ "variants": [
2763
+ "regular"
2764
+ ],
2765
+ "category": "display"
2766
+ }
2767
+ },
2768
+ {
2769
+ "Federo": {
2770
+ "variants": [
2771
+ "regular"
2772
+ ],
2773
+ "category": "sans-serif"
2774
+ }
2775
+ },
2776
+ {
2777
+ "Felipa": {
2778
+ "variants": [
2779
+ "regular"
2780
+ ],
2781
+ "category": "handwriting"
2782
+ }
2783
+ },
2784
+ {
2785
+ "Fenix": {
2786
+ "variants": [
2787
+ "regular"
2788
+ ],
2789
+ "category": "serif"
2790
+ }
2791
+ },
2792
+ {
2793
+ "Finger Paint": {
2794
+ "variants": [
2795
+ "regular"
2796
+ ],
2797
+ "category": "display"
2798
+ }
2799
+ },
2800
+ {
2801
+ "Fira Mono": {
2802
+ "variants": [
2803
+ "regular",
2804
+ "500",
2805
+ "700"
2806
+ ],
2807
+ "category": "monospace"
2808
+ }
2809
+ },
2810
+ {
2811
+ "Fira Sans": {
2812
+ "variants": [
2813
+ "100",
2814
+ "100italic",
2815
+ "200",
2816
+ "200italic",
2817
+ "300",
2818
+ "300italic",
2819
+ "regular",
2820
+ "italic",
2821
+ "500",
2822
+ "500italic",
2823
+ "600",
2824
+ "600italic",
2825
+ "700",
2826
+ "700italic",
2827
+ "800",
2828
+ "800italic",
2829
+ "900",
2830
+ "900italic"
2831
+ ],
2832
+ "category": "sans-serif"
2833
+ }
2834
+ },
2835
+ {
2836
+ "Fira Sans Condensed": {
2837
+ "variants": [
2838
+ "100",
2839
+ "100italic",
2840
+ "200",
2841
+ "200italic",
2842
+ "300",
2843
+ "300italic",
2844
+ "regular",
2845
+ "italic",
2846
+ "500",
2847
+ "500italic",
2848
+ "600",
2849
+ "600italic",
2850
+ "700",
2851
+ "700italic",
2852
+ "800",
2853
+ "800italic",
2854
+ "900",
2855
+ "900italic"
2856
+ ],
2857
+ "category": "sans-serif"
2858
+ }
2859
+ },
2860
+ {
2861
+ "Fira Sans Extra Condensed": {
2862
+ "variants": [
2863
+ "100",
2864
+ "100italic",
2865
+ "200",
2866
+ "200italic",
2867
+ "300",
2868
+ "300italic",
2869
+ "regular",
2870
+ "italic",
2871
+ "500",
2872
+ "500italic",
2873
+ "600",
2874
+ "600italic",
2875
+ "700",
2876
+ "700italic",
2877
+ "800",
2878
+ "800italic",
2879
+ "900",
2880
+ "900italic"
2881
+ ],
2882
+ "category": "sans-serif"
2883
+ }
2884
+ },
2885
+ {
2886
+ "Fjalla One": {
2887
+ "variants": [
2888
+ "regular"
2889
+ ],
2890
+ "category": "sans-serif"
2891
+ }
2892
+ },
2893
+ {
2894
+ "Fjord One": {
2895
+ "variants": [
2896
+ "regular"
2897
+ ],
2898
+ "category": "serif"
2899
+ }
2900
+ },
2901
+ {
2902
+ "Flamenco": {
2903
+ "variants": [
2904
+ "300",
2905
+ "regular"
2906
+ ],
2907
+ "category": "display"
2908
+ }
2909
+ },
2910
+ {
2911
+ "Flavors": {
2912
+ "variants": [
2913
+ "regular"
2914
+ ],
2915
+ "category": "display"
2916
+ }
2917
+ },
2918
+ {
2919
+ "Fondamento": {
2920
+ "variants": [
2921
+ "regular",
2922
+ "italic"
2923
+ ],
2924
+ "category": "handwriting"
2925
+ }
2926
+ },
2927
+ {
2928
+ "Fontdiner Swanky": {
2929
+ "variants": [
2930
+ "regular"
2931
+ ],
2932
+ "category": "display"
2933
+ }
2934
+ },
2935
+ {
2936
+ "Forum": {
2937
+ "variants": [
2938
+ "regular"
2939
+ ],
2940
+ "category": "display"
2941
+ }
2942
+ },
2943
+ {
2944
+ "Francois One": {
2945
+ "variants": [
2946
+ "regular"
2947
+ ],
2948
+ "category": "sans-serif"
2949
+ }
2950
+ },
2951
+ {
2952
+ "Frank Ruhl Libre": {
2953
+ "variants": [
2954
+ "300",
2955
+ "regular",
2956
+ "500",
2957
+ "700",
2958
+ "900"
2959
+ ],
2960
+ "category": "serif"
2961
+ }
2962
+ },
2963
+ {
2964
+ "Freckle Face": {
2965
+ "variants": [
2966
+ "regular"
2967
+ ],
2968
+ "category": "display"
2969
+ }
2970
+ },
2971
+ {
2972
+ "Fredericka the Great": {
2973
+ "variants": [
2974
+ "regular"
2975
+ ],
2976
+ "category": "display"
2977
+ }
2978
+ },
2979
+ {
2980
+ "Fredoka One": {
2981
+ "variants": [
2982
+ "regular"
2983
+ ],
2984
+ "category": "display"
2985
+ }
2986
+ },
2987
+ {
2988
+ "Freehand": {
2989
+ "variants": [
2990
+ "regular"
2991
+ ],
2992
+ "category": "display"
2993
+ }
2994
+ },
2995
+ {
2996
+ "Fresca": {
2997
+ "variants": [
2998
+ "regular"
2999
+ ],
3000
+ "category": "sans-serif"
3001
+ }
3002
+ },
3003
+ {
3004
+ "Frijole": {
3005
+ "variants": [
3006
+ "regular"
3007
+ ],
3008
+ "category": "display"
3009
+ }
3010
+ },
3011
+ {
3012
+ "Fruktur": {
3013
+ "variants": [
3014
+ "regular"
3015
+ ],
3016
+ "category": "display"
3017
+ }
3018
+ },
3019
+ {
3020
+ "Fugaz One": {
3021
+ "variants": [
3022
+ "regular"
3023
+ ],
3024
+ "category": "display"
3025
+ }
3026
+ },
3027
+ {
3028
+ "GFS Didot": {
3029
+ "variants": [
3030
+ "regular"
3031
+ ],
3032
+ "category": "serif"
3033
+ }
3034
+ },
3035
+ {
3036
+ "GFS Neohellenic": {
3037
+ "variants": [
3038
+ "regular",
3039
+ "italic",
3040
+ "700",
3041
+ "700italic"
3042
+ ],
3043
+ "category": "sans-serif"
3044
+ }
3045
+ },
3046
+ {
3047
+ "Gabriela": {
3048
+ "variants": [
3049
+ "regular"
3050
+ ],
3051
+ "category": "serif"
3052
+ }
3053
+ },
3054
+ {
3055
+ "Gaegu": {
3056
+ "variants": [
3057
+ "300",
3058
+ "regular",
3059
+ "700"
3060
+ ],
3061
+ "category": "handwriting"
3062
+ }
3063
+ },
3064
+ {
3065
+ "Gafata": {
3066
+ "variants": [
3067
+ "regular"
3068
+ ],
3069
+ "category": "sans-serif"
3070
+ }
3071
+ },
3072
+ {
3073
+ "Galada": {
3074
+ "variants": [
3075
+ "regular"
3076
+ ],
3077
+ "category": "display"
3078
+ }
3079
+ },
3080
+ {
3081
+ "Galdeano": {
3082
+ "variants": [
3083
+ "regular"
3084
+ ],
3085
+ "category": "sans-serif"
3086
+ }
3087
+ },
3088
+ {
3089
+ "Galindo": {
3090
+ "variants": [
3091
+ "regular"
3092
+ ],
3093
+ "category": "display"
3094
+ }
3095
+ },
3096
+ {
3097
+ "Gamja Flower": {
3098
+ "variants": [
3099
+ "regular"
3100
+ ],
3101
+ "category": "handwriting"
3102
+ }
3103
+ },
3104
+ {
3105
+ "Gentium Basic": {
3106
+ "variants": [
3107
+ "regular",
3108
+ "italic",
3109
+ "700",
3110
+ "700italic"
3111
+ ],
3112
+ "category": "serif"
3113
+ }
3114
+ },
3115
+ {
3116
+ "Gentium Book Basic": {
3117
+ "variants": [
3118
+ "regular",
3119
+ "italic",
3120
+ "700",
3121
+ "700italic"
3122
+ ],
3123
+ "category": "serif"
3124
+ }
3125
+ },
3126
+ {
3127
+ "Geo": {
3128
+ "variants": [
3129
+ "regular",
3130
+ "italic"
3131
+ ],
3132
+ "category": "sans-serif"
3133
+ }
3134
+ },
3135
+ {
3136
+ "Geostar": {
3137
+ "variants": [
3138
+ "regular"
3139
+ ],
3140
+ "category": "display"
3141
+ }
3142
+ },
3143
+ {
3144
+ "Geostar Fill": {
3145
+ "variants": [
3146
+ "regular"
3147
+ ],
3148
+ "category": "display"
3149
+ }
3150
+ },
3151
+ {
3152
+ "Germania One": {
3153
+ "variants": [
3154
+ "regular"
3155
+ ],
3156
+ "category": "display"
3157
+ }
3158
+ },
3159
+ {
3160
+ "Gidugu": {
3161
+ "variants": [
3162
+ "regular"
3163
+ ],
3164
+ "category": "sans-serif"
3165
+ }
3166
+ },
3167
+ {
3168
+ "Gilda Display": {
3169
+ "variants": [
3170
+ "regular"
3171
+ ],
3172
+ "category": "serif"
3173
+ }
3174
+ },
3175
+ {
3176
+ "Give You Glory": {
3177
+ "variants": [
3178
+ "regular"
3179
+ ],
3180
+ "category": "handwriting"
3181
+ }
3182
+ },
3183
+ {
3184
+ "Glass Antiqua": {
3185
+ "variants": [
3186
+ "regular"
3187
+ ],
3188
+ "category": "display"
3189
+ }
3190
+ },
3191
+ {
3192
+ "Glegoo": {
3193
+ "variants": [
3194
+ "regular",
3195
+ "700"
3196
+ ],
3197
+ "category": "serif"
3198
+ }
3199
+ },
3200
+ {
3201
+ "Gloria Hallelujah": {
3202
+ "variants": [
3203
+ "regular"
3204
+ ],
3205
+ "category": "handwriting"
3206
+ }
3207
+ },
3208
+ {
3209
+ "Goblin One": {
3210
+ "variants": [
3211
+ "regular"
3212
+ ],
3213
+ "category": "display"
3214
+ }
3215
+ },
3216
+ {
3217
+ "Gochi Hand": {
3218
+ "variants": [
3219
+ "regular"
3220
+ ],
3221
+ "category": "handwriting"
3222
+ }
3223
+ },
3224
+ {
3225
+ "Gorditas": {
3226
+ "variants": [
3227
+ "regular",
3228
+ "700"
3229
+ ],
3230
+ "category": "display"
3231
+ }
3232
+ },
3233
+ {
3234
+ "Gothic A1": {
3235
+ "variants": [
3236
+ "100",
3237
+ "200",
3238
+ "300",
3239
+ "regular",
3240
+ "500",
3241
+ "600",
3242
+ "700",
3243
+ "800",
3244
+ "900"
3245
+ ],
3246
+ "category": "sans-serif"
3247
+ }
3248
+ },
3249
+ {
3250
+ "Goudy Bookletter 1911": {
3251
+ "variants": [
3252
+ "regular"
3253
+ ],
3254
+ "category": "serif"
3255
+ }
3256
+ },
3257
+ {
3258
+ "Graduate": {
3259
+ "variants": [
3260
+ "regular"
3261
+ ],
3262
+ "category": "display"
3263
+ }
3264
+ },
3265
+ {
3266
+ "Grand Hotel": {
3267
+ "variants": [
3268
+ "regular"
3269
+ ],
3270
+ "category": "handwriting"
3271
+ }
3272
+ },
3273
+ {
3274
+ "Gravitas One": {
3275
+ "variants": [
3276
+ "regular"
3277
+ ],
3278
+ "category": "display"
3279
+ }
3280
+ },
3281
+ {
3282
+ "Great Vibes": {
3283
+ "variants": [
3284
+ "regular"
3285
+ ],
3286
+ "category": "handwriting"
3287
+ }
3288
+ },
3289
+ {
3290
+ "Griffy": {
3291
+ "variants": [
3292
+ "regular"
3293
+ ],
3294
+ "category": "display"
3295
+ }
3296
+ },
3297
+ {
3298
+ "Gruppo": {
3299
+ "variants": [
3300
+ "regular"
3301
+ ],
3302
+ "category": "display"
3303
+ }
3304
+ },
3305
+ {
3306
+ "Gudea": {
3307
+ "variants": [
3308
+ "regular",
3309
+ "italic",
3310
+ "700"
3311
+ ],
3312
+ "category": "sans-serif"
3313
+ }
3314
+ },
3315
+ {
3316
+ "Gugi": {
3317
+ "variants": [
3318
+ "regular"
3319
+ ],
3320
+ "category": "display"
3321
+ }
3322
+ },
3323
+ {
3324
+ "Gurajada": {
3325
+ "variants": [
3326
+ "regular"
3327
+ ],
3328
+ "category": "serif"
3329
+ }
3330
+ },
3331
+ {
3332
+ "Habibi": {
3333
+ "variants": [
3334
+ "regular"
3335
+ ],
3336
+ "category": "serif"
3337
+ }
3338
+ },
3339
+ {
3340
+ "Halant": {
3341
+ "variants": [
3342
+ "300",
3343
+ "regular",
3344
+ "500",
3345
+ "600",
3346
+ "700"
3347
+ ],
3348
+ "category": "serif"
3349
+ }
3350
+ },
3351
+ {
3352
+ "Hammersmith One": {
3353
+ "variants": [
3354
+ "regular"
3355
+ ],
3356
+ "category": "sans-serif"
3357
+ }
3358
+ },
3359
+ {
3360
+ "Hanalei": {
3361
+ "variants": [
3362
+ "regular"
3363
+ ],
3364
+ "category": "display"
3365
+ }
3366
+ },
3367
+ {
3368
+ "Hanalei Fill": {
3369
+ "variants": [
3370
+ "regular"
3371
+ ],
3372
+ "category": "display"
3373
+ }
3374
+ },
3375
+ {
3376
+ "Handlee": {
3377
+ "variants": [
3378
+ "regular"
3379
+ ],
3380
+ "category": "handwriting"
3381
+ }
3382
+ },
3383
+ {
3384
+ "Hanuman": {
3385
+ "variants": [
3386
+ "regular",
3387
+ "700"
3388
+ ],
3389
+ "category": "serif"
3390
+ }
3391
+ },
3392
+ {
3393
+ "Happy Monkey": {
3394
+ "variants": [
3395
+ "regular"
3396
+ ],
3397
+ "category": "display"
3398
+ }
3399
+ },
3400
+ {
3401
+ "Harmattan": {
3402
+ "variants": [
3403
+ "regular"
3404
+ ],
3405
+ "category": "sans-serif"
3406
+ }
3407
+ },
3408
+ {
3409
+ "Headland One": {
3410
+ "variants": [
3411
+ "regular"
3412
+ ],
3413
+ "category": "serif"
3414
+ }
3415
+ },
3416
+ {
3417
+ "Heebo": {
3418
+ "variants": [
3419
+ "100",
3420
+ "300",
3421
+ "regular",
3422
+ "500",
3423
+ "700",
3424
+ "800",
3425
+ "900"
3426
+ ],
3427
+ "category": "sans-serif"
3428
+ }
3429
+ },
3430
+ {
3431
+ "Henny Penny": {
3432
+ "variants": [
3433
+ "regular"
3434
+ ],
3435
+ "category": "display"
3436
+ }
3437
+ },
3438
+ {
3439
+ "Herr Von Muellerhoff": {
3440
+ "variants": [
3441
+ "regular"
3442
+ ],
3443
+ "category": "handwriting"
3444
+ }
3445
+ },
3446
+ {
3447
+ "Hi Melody": {
3448
+ "variants": [
3449
+ "regular"
3450
+ ],
3451
+ "category": "handwriting"
3452
+ }
3453
+ },
3454
+ {
3455
+ "Hind": {
3456
+ "variants": [
3457
+ "300",
3458
+ "regular",
3459
+ "500",
3460
+ "600",
3461
+ "700"
3462
+ ],
3463
+ "category": "sans-serif"
3464
+ }
3465
+ },
3466
+ {
3467
+ "Hind Guntur": {
3468
+ "variants": [
3469
+ "300",
3470
+ "regular",
3471
+ "500",
3472
+ "600",
3473
+ "700"
3474
+ ],
3475
+ "category": "sans-serif"
3476
+ }
3477
+ },
3478
+ {
3479
+ "Hind Madurai": {
3480
+ "variants": [
3481
+ "300",
3482
+ "regular",
3483
+ "500",
3484
+ "600",
3485
+ "700"
3486
+ ],
3487
+ "category": "sans-serif"
3488
+ }
3489
+ },
3490
+ {
3491
+ "Hind Siliguri": {
3492
+ "variants": [
3493
+ "300",
3494
+ "regular",
3495
+ "500",
3496
+ "600",
3497
+ "700"
3498
+ ],
3499
+ "category": "sans-serif"
3500
+ }
3501
+ },
3502
+ {
3503
+ "Hind Vadodara": {
3504
+ "variants": [
3505
+ "300",
3506
+ "regular",
3507
+ "500",
3508
+ "600",
3509
+ "700"
3510
+ ],
3511
+ "category": "sans-serif"
3512
+ }
3513
+ },
3514
+ {
3515
+ "Holtwood One SC": {
3516
+ "variants": [
3517
+ "regular"
3518
+ ],
3519
+ "category": "serif"
3520
+ }
3521
+ },
3522
+ {
3523
+ "Homemade Apple": {
3524
+ "variants": [
3525
+ "regular"
3526
+ ],
3527
+ "category": "handwriting"
3528
+ }
3529
+ },
3530
+ {
3531
+ "Homenaje": {
3532
+ "variants": [
3533
+ "regular"
3534
+ ],
3535
+ "category": "sans-serif"
3536
+ }
3537
+ },
3538
+ {
3539
+ "IBM Plex Mono": {
3540
+ "variants": [
3541
+ "100",
3542
+ "100italic",
3543
+ "200",
3544
+ "200italic",
3545
+ "300",
3546
+ "300italic",
3547
+ "regular",
3548
+ "italic",
3549
+ "500",
3550
+ "500italic",
3551
+ "600",
3552
+ "600italic",
3553
+ "700",
3554
+ "700italic"
3555
+ ],
3556
+ "category": "monospace"
3557
+ }
3558
+ },
3559
+ {
3560
+ "IBM Plex Sans": {
3561
+ "variants": [
3562
+ "100",
3563
+ "100italic",
3564
+ "200",
3565
+ "200italic",
3566
+ "300",
3567
+ "300italic",
3568
+ "regular",
3569
+ "italic",
3570
+ "500",
3571
+ "500italic",
3572
+ "600",
3573
+ "600italic",
3574
+ "700",
3575
+ "700italic"
3576
+ ],
3577
+ "category": "sans-serif"
3578
+ }
3579
+ },
3580
+ {
3581
+ "IBM Plex Sans Condensed": {
3582
+ "variants": [
3583
+ "100",
3584
+ "100italic",
3585
+ "200",
3586
+ "200italic",
3587
+ "300",
3588
+ "300italic",
3589
+ "regular",
3590
+ "italic",
3591
+ "500",
3592
+ "500italic",
3593
+ "600",
3594
+ "600italic",
3595
+ "700",
3596
+ "700italic"
3597
+ ],
3598
+ "category": "sans-serif"
3599
+ }
3600
+ },
3601
+ {
3602
+ "IBM Plex Serif": {
3603
+ "variants": [
3604
+ "100",
3605
+ "100italic",
3606
+ "200",
3607
+ "200italic",
3608
+ "300",
3609
+ "300italic",
3610
+ "regular",
3611
+ "italic",
3612
+ "500",
3613
+ "500italic",
3614
+ "600",
3615
+ "600italic",
3616
+ "700",
3617
+ "700italic"
3618
+ ],
3619
+ "category": "serif"
3620
+ }
3621
+ },
3622
+ {
3623
+ "IM Fell DW Pica": {
3624
+ "variants": [
3625
+ "regular",
3626
+ "italic"
3627
+ ],
3628
+ "category": "serif"
3629
+ }
3630
+ },
3631
+ {
3632
+ "IM Fell DW Pica SC": {
3633
+ "variants": [
3634
+ "regular"
3635
+ ],
3636
+ "category": "serif"
3637
+ }
3638
+ },
3639
+ {
3640
+ "IM Fell Double Pica": {
3641
+ "variants": [
3642
+ "regular",
3643
+ "italic"
3644
+ ],
3645
+ "category": "serif"
3646
+ }
3647
+ },
3648
+ {
3649
+ "IM Fell Double Pica SC": {
3650
+ "variants": [
3651
+ "regular"
3652
+ ],
3653
+ "category": "serif"
3654
+ }
3655
+ },
3656
+ {
3657
+ "IM Fell English": {
3658
+ "variants": [
3659
+ "regular",
3660
+ "italic"
3661
+ ],
3662
+ "category": "serif"
3663
+ }
3664
+ },
3665
+ {
3666
+ "IM Fell English SC": {
3667
+ "variants": [
3668
+ "regular"
3669
+ ],
3670
+ "category": "serif"
3671
+ }
3672
+ },
3673
+ {
3674
+ "IM Fell French Canon": {
3675
+ "variants": [
3676
+ "regular",
3677
+ "italic"
3678
+ ],
3679
+ "category": "serif"
3680
+ }
3681
+ },
3682
+ {
3683
+ "IM Fell French Canon SC": {
3684
+ "variants": [
3685
+ "regular"
3686
+ ],
3687
+ "category": "serif"
3688
+ }
3689
+ },
3690
+ {
3691
+ "IM Fell Great Primer": {
3692
+ "variants": [
3693
+ "regular",
3694
+ "italic"
3695
+ ],
3696
+ "category": "serif"
3697
+ }
3698
+ },
3699
+ {
3700
+ "IM Fell Great Primer SC": {
3701
+ "variants": [
3702
+ "regular"
3703
+ ],
3704
+ "category": "serif"
3705
+ }
3706
+ },
3707
+ {
3708
+ "Iceberg": {
3709
+ "variants": [
3710
+ "regular"
3711
+ ],
3712
+ "category": "display"
3713
+ }
3714
+ },
3715
+ {
3716
+ "Iceland": {
3717
+ "variants": [
3718
+ "regular"
3719
+ ],
3720
+ "category": "display"
3721
+ }
3722
+ },
3723
+ {
3724
+ "Imprima": {
3725
+ "variants": [
3726
+ "regular"
3727
+ ],
3728
+ "category": "sans-serif"
3729
+ }
3730
+ },
3731
+ {
3732
+ "Inconsolata": {
3733
+ "variants": [
3734
+ "regular",
3735
+ "700"
3736
+ ],
3737
+ "category": "monospace"
3738
+ }
3739
+ },
3740
+ {
3741
+ "Inder": {
3742
+ "variants": [
3743
+ "regular"
3744
+ ],
3745
+ "category": "sans-serif"
3746
+ }
3747
+ },
3748
+ {
3749
+ "Indie Flower": {
3750
+ "variants": [
3751
+ "regular"
3752
+ ],
3753
+ "category": "handwriting"
3754
+ }
3755
+ },
3756
+ {
3757
+ "Inika": {
3758
+ "variants": [
3759
+ "regular",
3760
+ "700"
3761
+ ],
3762
+ "category": "serif"
3763
+ }
3764
+ },
3765
+ {
3766
+ "Inknut Antiqua": {
3767
+ "variants": [
3768
+ "300",
3769
+ "regular",
3770
+ "500",
3771
+ "600",
3772
+ "700",
3773
+ "800",
3774
+ "900"
3775
+ ],
3776
+ "category": "serif"
3777
+ }
3778
+ },
3779
+ {
3780
+ "Irish Grover": {
3781
+ "variants": [
3782
+ "regular"
3783
+ ],
3784
+ "category": "display"
3785
+ }
3786
+ },
3787
+ {
3788
+ "Istok Web": {
3789
+ "variants": [
3790
+ "regular",
3791
+ "italic",
3792
+ "700",
3793
+ "700italic"
3794
+ ],
3795
+ "category": "sans-serif"
3796
+ }
3797
+ },
3798
+ {
3799
+ "Italiana": {
3800
+ "variants": [
3801
+ "regular"
3802
+ ],
3803
+ "category": "serif"
3804
+ }
3805
+ },
3806
+ {
3807
+ "Italianno": {
3808
+ "variants": [
3809
+ "regular"
3810
+ ],
3811
+ "category": "handwriting"
3812
+ }
3813
+ },
3814
+ {
3815
+ "Itim": {
3816
+ "variants": [
3817
+ "regular"
3818
+ ],
3819
+ "category": "handwriting"
3820
+ }
3821
+ },
3822
+ {
3823
+ "Jacques Francois": {
3824
+ "variants": [
3825
+ "regular"
3826
+ ],
3827
+ "category": "serif"
3828
+ }
3829
+ },
3830
+ {
3831
+ "Jacques Francois Shadow": {
3832
+ "variants": [
3833
+ "regular"
3834
+ ],
3835
+ "category": "display"
3836
+ }
3837
+ },
3838
+ {
3839
+ "Jaldi": {
3840
+ "variants": [
3841
+ "regular",
3842
+ "700"
3843
+ ],
3844
+ "category": "sans-serif"
3845
+ }
3846
+ },
3847
+ {
3848
+ "Jim Nightshade": {
3849
+ "variants": [
3850
+ "regular"
3851
+ ],
3852
+ "category": "handwriting"
3853
+ }
3854
+ },
3855
+ {
3856
+ "Jockey One": {
3857
+ "variants": [
3858
+ "regular"
3859
+ ],
3860
+ "category": "sans-serif"
3861
+ }
3862
+ },
3863
+ {
3864
+ "Jolly Lodger": {
3865
+ "variants": [
3866
+ "regular"
3867
+ ],
3868
+ "category": "display"
3869
+ }
3870
+ },
3871
+ {
3872
+ "Jomhuria": {
3873
+ "variants": [
3874
+ "regular"
3875
+ ],
3876
+ "category": "display"
3877
+ }
3878
+ },
3879
+ {
3880
+ "Josefin Sans": {
3881
+ "variants": [
3882
+ "100",
3883
+ "100italic",
3884
+ "300",
3885
+ "300italic",
3886
+ "regular",
3887
+ "italic",
3888
+ "600",
3889
+ "600italic",
3890
+ "700",
3891
+ "700italic"
3892
+ ],
3893
+ "category": "sans-serif"
3894
+ }
3895
+ },
3896
+ {
3897
+ "Josefin Slab": {
3898
+ "variants": [
3899
+ "100",
3900
+ "100italic",
3901
+ "300",
3902
+ "300italic",
3903
+ "regular",
3904
+ "italic",
3905
+ "600",
3906
+ "600italic",
3907
+ "700",
3908
+ "700italic"
3909
+ ],
3910
+ "category": "serif"
3911
+ }
3912
+ },
3913
+ {
3914
+ "Joti One": {
3915
+ "variants": [
3916
+ "regular"
3917
+ ],
3918
+ "category": "display"
3919
+ }
3920
+ },
3921
+ {
3922
+ "Jua": {
3923
+ "variants": [
3924
+ "regular"
3925
+ ],
3926
+ "category": "sans-serif"
3927
+ }
3928
+ },
3929
+ {
3930
+ "Judson": {
3931
+ "variants": [
3932
+ "regular",
3933
+ "italic",
3934
+ "700"
3935
+ ],
3936
+ "category": "serif"
3937
+ }
3938
+ },
3939
+ {
3940
+ "Julee": {
3941
+ "variants": [
3942
+ "regular"
3943
+ ],
3944
+ "category": "handwriting"
3945
+ }
3946
+ },
3947
+ {
3948
+ "Julius Sans One": {
3949
+ "variants": [
3950
+ "regular"
3951
+ ],
3952
+ "category": "sans-serif"
3953
+ }
3954
+ },
3955
+ {
3956
+ "Junge": {
3957
+ "variants": [
3958
+ "regular"
3959
+ ],
3960
+ "category": "serif"
3961
+ }
3962
+ },
3963
+ {
3964
+ "Jura": {
3965
+ "variants": [
3966
+ "300",
3967
+ "regular",
3968
+ "500",
3969
+ "600",
3970
+ "700"
3971
+ ],
3972
+ "category": "sans-serif"
3973
+ }
3974
+ },
3975
+ {
3976
+ "Just Another Hand": {
3977
+ "variants": [
3978
+ "regular"
3979
+ ],
3980
+ "category": "handwriting"
3981
+ }
3982
+ },
3983
+ {
3984
+ "Just Me Again Down Here": {
3985
+ "variants": [
3986
+ "regular"
3987
+ ],
3988
+ "category": "handwriting"
3989
+ }
3990
+ },
3991
+ {
3992
+ "K2D": {
3993
+ "variants": [
3994
+ "100",
3995
+ "100italic",
3996
+ "200",
3997
+ "200italic",
3998
+ "300",
3999
+ "300italic",
4000
+ "regular",
4001
+ "italic",
4002
+ "500",
4003
+ "500italic",
4004
+ "600",
4005
+ "600italic",
4006
+ "700",
4007
+ "700italic",
4008
+ "800",
4009
+ "800italic"
4010
+ ],
4011
+ "category": "sans-serif"
4012
+ }
4013
+ },
4014
+ {
4015
+ "Kadwa": {
4016
+ "variants": [
4017
+ "regular",
4018
+ "700"
4019
+ ],
4020
+ "category": "serif"
4021
+ }
4022
+ },
4023
+ {
4024
+ "Kalam": {
4025
+ "variants": [
4026
+ "300",
4027
+ "regular",
4028
+ "700"
4029
+ ],
4030
+ "category": "handwriting"
4031
+ }
4032
+ },
4033
+ {
4034
+ "Kameron": {
4035
+ "variants": [
4036
+ "regular",
4037
+ "700"
4038
+ ],
4039
+ "category": "serif"
4040
+ }
4041
+ },
4042
+ {
4043
+ "Kanit": {
4044
+ "variants": [
4045
+ "100",
4046
+ "100italic",
4047
+ "200",
4048
+ "200italic",
4049
+ "300",
4050
+ "300italic",
4051
+ "regular",
4052
+ "italic",
4053
+ "500",
4054
+ "500italic",
4055
+ "600",
4056
+ "600italic",
4057
+ "700",
4058
+ "700italic",
4059
+ "800",
4060
+ "800italic",
4061
+ "900",
4062
+ "900italic"
4063
+ ],
4064
+ "category": "sans-serif"
4065
+ }
4066
+ },
4067
+ {
4068
+ "Kantumruy": {
4069
+ "variants": [
4070
+ "300",
4071
+ "regular",
4072
+ "700"
4073
+ ],
4074
+ "category": "sans-serif"
4075
+ }
4076
+ },
4077
+ {
4078
+ "Karla": {
4079
+ "variants": [
4080
+ "regular",
4081
+ "italic",
4082
+ "700",
4083
+ "700italic"
4084
+ ],
4085
+ "category": "sans-serif"
4086
+ }
4087
+ },
4088
+ {
4089
+ "Karma": {
4090
+ "variants": [
4091
+ "300",
4092
+ "regular",
4093
+ "500",
4094
+ "600",
4095
+ "700"
4096
+ ],
4097
+ "category": "serif"
4098
+ }
4099
+ },
4100
+ {
4101
+ "Katibeh": {
4102
+ "variants": [
4103
+ "regular"
4104
+ ],
4105
+ "category": "display"
4106
+ }
4107
+ },
4108
+ {
4109
+ "Kaushan Script": {
4110
+ "variants": [
4111
+ "regular"
4112
+ ],
4113
+ "category": "handwriting"
4114
+ }
4115
+ },
4116
+ {
4117
+ "Kavivanar": {
4118
+ "variants": [
4119
+ "regular"
4120
+ ],
4121
+ "category": "handwriting"
4122
+ }
4123
+ },
4124
+ {
4125
+ "Kavoon": {
4126
+ "variants": [
4127
+ "regular"
4128
+ ],
4129
+ "category": "display"
4130
+ }
4131
+ },
4132
+ {
4133
+ "Kdam Thmor": {
4134
+ "variants": [
4135
+ "regular"
4136
+ ],
4137
+ "category": "display"
4138
+ }
4139
+ },
4140
+ {
4141
+ "Keania One": {
4142
+ "variants": [
4143
+ "regular"
4144
+ ],
4145
+ "category": "display"
4146
+ }
4147
+ },
4148
+ {
4149
+ "Kelly Slab": {
4150
+ "variants": [
4151
+ "regular"
4152
+ ],
4153
+ "category": "display"
4154
+ }
4155
+ },
4156
+ {
4157
+ "Kenia": {
4158
+ "variants": [
4159
+ "regular"
4160
+ ],
4161
+ "category": "display"
4162
+ }
4163
+ },
4164
+ {
4165
+ "Khand": {
4166
+ "variants": [
4167
+ "300",
4168
+ "regular",
4169
+ "500",
4170
+ "600",
4171
+ "700"
4172
+ ],
4173
+ "category": "sans-serif"
4174
+ }
4175
+ },
4176
+ {
4177
+ "Khmer": {
4178
+ "variants": [
4179
+ "regular"
4180
+ ],
4181
+ "category": "display"
4182
+ }
4183
+ },
4184
+ {
4185
+ "Khula": {
4186
+ "variants": [
4187
+ "300",
4188
+ "regular",
4189
+ "600",
4190
+ "700",
4191
+ "800"
4192
+ ],
4193
+ "category": "sans-serif"
4194
+ }
4195
+ },
4196
+ {
4197
+ "Kirang Haerang": {
4198
+ "variants": [
4199
+ "regular"
4200
+ ],
4201
+ "category": "display"
4202
+ }
4203
+ },
4204
+ {
4205
+ "Kite One": {
4206
+ "variants": [
4207
+ "regular"
4208
+ ],
4209
+ "category": "sans-serif"
4210
+ }
4211
+ },
4212
+ {
4213
+ "Knewave": {
4214
+ "variants": [
4215
+ "regular"
4216
+ ],
4217
+ "category": "display"
4218
+ }
4219
+ },
4220
+ {
4221
+ "KoHo": {
4222
+ "variants": [
4223
+ "200",
4224
+ "200italic",
4225
+ "300",
4226
+ "300italic",
4227
+ "regular",
4228
+ "italic",
4229
+ "500",
4230
+ "500italic",
4231
+ "600",
4232
+ "600italic",
4233
+ "700",
4234
+ "700italic"
4235
+ ],
4236
+ "category": "sans-serif"
4237
+ }
4238
+ },
4239
+ {
4240
+ "Kodchasan": {
4241
+ "variants": [
4242
+ "200",
4243
+ "200italic",
4244
+ "300",
4245
+ "300italic",
4246
+ "regular",
4247
+ "italic",
4248
+ "500",
4249
+ "500italic",
4250
+ "600",
4251
+ "600italic",
4252
+ "700",
4253
+ "700italic"
4254
+ ],
4255
+ "category": "sans-serif"
4256
+ }
4257
+ },
4258
+ {
4259
+ "Kosugi": {
4260
+ "variants": [
4261
+ "regular"
4262
+ ],
4263
+ "category": "sans-serif"
4264
+ }
4265
+ },
4266
+ {
4267
+ "Kosugi Maru": {
4268
+ "variants": [
4269
+ "regular"
4270
+ ],
4271
+ "category": "sans-serif"
4272
+ }
4273
+ },
4274
+ {
4275
+ "Kotta One": {
4276
+ "variants": [
4277
+ "regular"
4278
+ ],
4279
+ "category": "serif"
4280
+ }
4281
+ },
4282
+ {
4283
+ "Koulen": {
4284
+ "variants": [
4285
+ "regular"
4286
+ ],
4287
+ "category": "display"
4288
+ }
4289
+ },
4290
+ {
4291
+ "Kranky": {
4292
+ "variants": [
4293
+ "regular"
4294
+ ],
4295
+ "category": "display"
4296
+ }
4297
+ },
4298
+ {
4299
+ "Kreon": {
4300
+ "variants": [
4301
+ "300",
4302
+ "regular",
4303
+ "700"
4304
+ ],
4305
+ "category": "serif"
4306
+ }
4307
+ },
4308
+ {
4309
+ "Kristi": {
4310
+ "variants": [
4311
+ "regular"
4312
+ ],
4313
+ "category": "handwriting"
4314
+ }
4315
+ },
4316
+ {
4317
+ "Krona One": {
4318
+ "variants": [
4319
+ "regular"
4320
+ ],
4321
+ "category": "sans-serif"
4322
+ }
4323
+ },
4324
+ {
4325
+ "Krub": {
4326
+ "variants": [
4327
+ "200",
4328
+ "200italic",
4329
+ "300",
4330
+ "300italic",
4331
+ "regular",
4332
+ "italic",
4333
+ "500",
4334
+ "500italic",
4335
+ "600",
4336
+ "600italic",
4337
+ "700",
4338
+ "700italic"
4339
+ ],
4340
+ "category": "sans-serif"
4341
+ }
4342
+ },
4343
+ {
4344
+ "Kumar One": {
4345
+ "variants": [
4346
+ "regular"
4347
+ ],
4348
+ "category": "display"
4349
+ }
4350
+ },
4351
+ {
4352
+ "Kumar One Outline": {
4353
+ "variants": [
4354
+ "regular"
4355
+ ],
4356
+ "category": "display"
4357
+ }
4358
+ },
4359
+ {
4360
+ "Kurale": {
4361
+ "variants": [
4362
+ "regular"
4363
+ ],
4364
+ "category": "serif"
4365
+ }
4366
+ },
4367
+ {
4368
+ "La Belle Aurore": {
4369
+ "variants": [
4370
+ "regular"
4371
+ ],
4372
+ "category": "handwriting"
4373
+ }
4374
+ },
4375
+ {
4376
+ "Laila": {
4377
+ "variants": [
4378
+ "300",
4379
+ "regular",
4380
+ "500",
4381
+ "600",
4382
+ "700"
4383
+ ],
4384
+ "category": "serif"
4385
+ }
4386
+ },
4387
+ {
4388
+ "Lakki Reddy": {
4389
+ "variants": [
4390
+ "regular"
4391
+ ],
4392
+ "category": "handwriting"
4393
+ }
4394
+ },
4395
+ {
4396
+ "Lalezar": {
4397
+ "variants": [
4398
+ "regular"
4399
+ ],
4400
+ "category": "display"
4401
+ }
4402
+ },
4403
+ {
4404
+ "Lancelot": {
4405
+ "variants": [
4406
+ "regular"
4407
+ ],
4408
+ "category": "display"
4409
+ }
4410
+ },
4411
+ {
4412
+ "Lateef": {
4413
+ "variants": [
4414
+ "regular"
4415
+ ],
4416
+ "category": "handwriting"
4417
+ }
4418
+ },
4419
+ {
4420
+ "Lato": {
4421
+ "variants": [
4422
+ "100",
4423
+ "100italic",
4424
+ "300",
4425
+ "300italic",
4426
+ "regular",
4427
+ "italic",
4428
+ "700",
4429
+ "700italic",
4430
+ "900",
4431
+ "900italic"
4432
+ ],
4433
+ "category": "sans-serif"
4434
+ }
4435
+ },
4436
+ {
4437
+ "League Script": {
4438
+ "variants": [
4439
+ "regular"
4440
+ ],
4441
+ "category": "handwriting"
4442
+ }
4443
+ },
4444
+ {
4445
+ "Leckerli One": {
4446
+ "variants": [
4447
+ "regular"
4448
+ ],
4449
+ "category": "handwriting"
4450
+ }
4451
+ },
4452
+ {
4453
+ "Ledger": {
4454
+ "variants": [
4455
+ "regular"
4456
+ ],
4457
+ "category": "serif"
4458
+ }
4459
+ },
4460
+ {
4461
+ "Lekton": {
4462
+ "variants": [
4463
+ "regular",
4464
+ "italic",
4465
+ "700"
4466
+ ],
4467
+ "category": "sans-serif"
4468
+ }
4469
+ },
4470
+ {
4471
+ "Lemon": {
4472
+ "variants": [
4473
+ "regular"
4474
+ ],
4475
+ "category": "display"
4476
+ }
4477
+ },
4478
+ {
4479
+ "Lemonada": {
4480
+ "variants": [
4481
+ "300",
4482
+ "regular",
4483
+ "600",
4484
+ "700"
4485
+ ],
4486
+ "category": "display"
4487
+ }
4488
+ },
4489
+ {
4490
+ "Libre Barcode 128": {
4491
+ "variants": [
4492
+ "regular"
4493
+ ],
4494
+ "category": "display"
4495
+ }
4496
+ },
4497
+ {
4498
+ "Libre Barcode 128 Text": {
4499
+ "variants": [
4500
+ "regular"
4501
+ ],
4502
+ "category": "display"
4503
+ }
4504
+ },
4505
+ {
4506
+ "Libre Barcode 39": {
4507
+ "variants": [
4508
+ "regular"
4509
+ ],
4510
+ "category": "display"
4511
+ }
4512
+ },
4513
+ {
4514
+ "Libre Barcode 39 Extended": {
4515
+ "variants": [
4516
+ "regular"
4517
+ ],
4518
+ "category": "display"
4519
+ }
4520
+ },
4521
+ {
4522
+ "Libre Barcode 39 Extended Text": {
4523
+ "variants": [
4524
+ "regular"
4525
+ ],
4526
+ "category": "display"
4527
+ }
4528
+ },
4529
+ {
4530
+ "Libre Barcode 39 Text": {
4531
+ "variants": [
4532
+ "regular"
4533
+ ],
4534
+ "category": "display"
4535
+ }
4536
+ },
4537
+ {
4538
+ "Libre Baskerville": {
4539
+ "variants": [
4540
+ "regular",
4541
+ "italic",
4542
+ "700"
4543
+ ],
4544
+ "category": "serif"
4545
+ }
4546
+ },
4547
+ {
4548
+ "Libre Franklin": {
4549
+ "variants": [
4550
+ "100",
4551
+ "100italic",
4552
+ "200",
4553
+ "200italic",
4554
+ "300",
4555
+ "300italic",
4556
+ "regular",
4557
+ "italic",
4558
+ "500",
4559
+ "500italic",
4560
+ "600",
4561
+ "600italic",
4562
+ "700",
4563
+ "700italic",
4564
+ "800",
4565
+ "800italic",
4566
+ "900",
4567
+ "900italic"
4568
+ ],
4569
+ "category": "sans-serif"
4570
+ }
4571
+ },
4572
+ {
4573
+ "Life Savers": {
4574
+ "variants": [
4575
+ "regular",
4576
+ "700"
4577
+ ],
4578
+ "category": "display"
4579
+ }
4580
+ },
4581
+ {
4582
+ "Lilita One": {
4583
+ "variants": [
4584
+ "regular"
4585
+ ],
4586
+ "category": "display"
4587
+ }
4588
+ },
4589
+ {
4590
+ "Lily Script One": {
4591
+ "variants": [
4592
+ "regular"
4593
+ ],
4594
+ "category": "display"
4595
+ }
4596
+ },
4597
+ {
4598
+ "Limelight": {
4599
+ "variants": [
4600
+ "regular"
4601
+ ],
4602
+ "category": "display"
4603
+ }
4604
+ },
4605
+ {
4606
+ "Linden Hill": {
4607
+ "variants": [
4608
+ "regular",
4609
+ "italic"
4610
+ ],
4611
+ "category": "serif"
4612
+ }
4613
+ },
4614
+ {
4615
+ "Lobster": {
4616
+ "variants": [
4617
+ "regular"
4618
+ ],
4619
+ "category": "display"
4620
+ }
4621
+ },
4622
+ {
4623
+ "Lobster Two": {
4624
+ "variants": [
4625
+ "regular",
4626
+ "italic",
4627
+ "700",
4628
+ "700italic"
4629
+ ],
4630
+ "category": "display"
4631
+ }
4632
+ },
4633
+ {
4634
+ "Londrina Outline": {
4635
+ "variants": [
4636
+ "regular"
4637
+ ],
4638
+ "category": "display"
4639
+ }
4640
+ },
4641
+ {
4642
+ "Londrina Shadow": {
4643
+ "variants": [
4644
+ "regular"
4645
+ ],
4646
+ "category": "display"
4647
+ }
4648
+ },
4649
+ {
4650
+ "Londrina Sketch": {
4651
+ "variants": [
4652
+ "regular"
4653
+ ],
4654
+ "category": "display"
4655
+ }
4656
+ },
4657
+ {
4658
+ "Londrina Solid": {
4659
+ "variants": [
4660
+ "100",
4661
+ "300",
4662
+ "regular",
4663
+ "900"
4664
+ ],
4665
+ "category": "display"
4666
+ }
4667
+ },
4668
+ {
4669
+ "Lora": {
4670
+ "variants": [
4671
+ "regular",
4672
+ "italic",
4673
+ "700",
4674
+ "700italic"
4675
+ ],
4676
+ "category": "serif"
4677
+ }
4678
+ },
4679
+ {
4680
+ "Love Ya Like A Sister": {
4681
+ "variants": [
4682
+ "regular"
4683
+ ],
4684
+ "category": "display"
4685
+ }
4686
+ },
4687
+ {
4688
+ "Loved by the King": {
4689
+ "variants": [
4690
+ "regular"
4691
+ ],
4692
+ "category": "handwriting"
4693
+ }
4694
+ },
4695
+ {
4696
+ "Lovers Quarrel": {
4697
+ "variants": [
4698
+ "regular"
4699
+ ],
4700
+ "category": "handwriting"
4701
+ }
4702
+ },
4703
+ {
4704
+ "Luckiest Guy": {
4705
+ "variants": [
4706
+ "regular"
4707
+ ],
4708
+ "category": "display"
4709
+ }
4710
+ },
4711
+ {
4712
+ "Lusitana": {
4713
+ "variants": [
4714
+ "regular",
4715
+ "700"
4716
+ ],
4717
+ "category": "serif"
4718
+ }
4719
+ },
4720
+ {
4721
+ "Lustria": {
4722
+ "variants": [
4723
+ "regular"
4724
+ ],
4725
+ "category": "serif"
4726
+ }
4727
+ },
4728
+ {
4729
+ "M PLUS 1p": {
4730
+ "variants": [
4731
+ "100",
4732
+ "300",
4733
+ "regular",
4734
+ "500",
4735
+ "700",
4736
+ "800",
4737
+ "900"
4738
+ ],
4739
+ "category": "sans-serif"
4740
+ }
4741
+ },
4742
+ {
4743
+ "M PLUS Rounded 1c": {
4744
+ "variants": [
4745
+ "100",
4746
+ "300",
4747
+ "regular",
4748
+ "500",
4749
+ "700",
4750
+ "800",
4751
+ "900"
4752
+ ],
4753
+ "category": "sans-serif"
4754
+ }
4755
+ },
4756
+ {
4757
+ "Macondo": {
4758
+ "variants": [
4759
+ "regular"
4760
+ ],
4761
+ "category": "display"
4762
+ }
4763
+ },
4764
+ {
4765
+ "Macondo Swash Caps": {
4766
+ "variants": [
4767
+ "regular"
4768
+ ],
4769
+ "category": "display"
4770
+ }
4771
+ },
4772
+ {
4773
+ "Mada": {
4774
+ "variants": [
4775
+ "200",
4776
+ "300",
4777
+ "regular",
4778
+ "500",
4779
+ "600",
4780
+ "700",
4781
+ "900"
4782
+ ],
4783
+ "category": "sans-serif"
4784
+ }
4785
+ },
4786
+ {
4787
+ "Magra": {
4788
+ "variants": [
4789
+ "regular",
4790
+ "700"
4791
+ ],
4792
+ "category": "sans-serif"
4793
+ }
4794
+ },
4795
+ {
4796
+ "Maiden Orange": {
4797
+ "variants": [
4798
+ "regular"
4799
+ ],
4800
+ "category": "display"
4801
+ }
4802
+ },
4803
+ {
4804
+ "Maitree": {
4805
+ "variants": [
4806
+ "200",
4807
+ "300",
4808
+ "regular",
4809
+ "500",
4810
+ "600",
4811
+ "700"
4812
+ ],
4813
+ "category": "serif"
4814
+ }
4815
+ },
4816
+ {
4817
+ "Mako": {
4818
+ "variants": [
4819
+ "regular"
4820
+ ],
4821
+ "category": "sans-serif"
4822
+ }
4823
+ },
4824
+ {
4825
+ "Mali": {
4826
+ "variants": [
4827
+ "200",
4828
+ "200italic",
4829
+ "300",
4830
+ "300italic",
4831
+ "regular",
4832
+ "italic",
4833
+ "500",
4834
+ "500italic",
4835
+ "600",
4836
+ "600italic",
4837
+ "700",
4838
+ "700italic"
4839
+ ],
4840
+ "category": "handwriting"
4841
+ }
4842
+ },
4843
+ {
4844
+ "Mallanna": {
4845
+ "variants": [
4846
+ "regular"
4847
+ ],
4848
+ "category": "sans-serif"
4849
+ }
4850
+ },
4851
+ {
4852
+ "Mandali": {
4853
+ "variants": [
4854
+ "regular"
4855
+ ],
4856
+ "category": "sans-serif"
4857
+ }
4858
+ },
4859
+ {
4860
+ "Manuale": {
4861
+ "variants": [
4862
+ "regular",
4863
+ "italic",
4864
+ "500",
4865
+ "500italic",
4866
+ "600",
4867
+ "600italic",
4868
+ "700",
4869
+ "700italic"
4870
+ ],
4871
+ "category": "serif"
4872
+ }
4873
+ },
4874
+ {
4875
+ "Marcellus": {
4876
+ "variants": [
4877
+ "regular"
4878
+ ],
4879
+ "category": "serif"
4880
+ }
4881
+ },
4882
+ {
4883
+ "Marcellus SC": {
4884
+ "variants": [
4885
+ "regular"
4886
+ ],
4887
+ "category": "serif"
4888
+ }
4889
+ },
4890
+ {
4891
+ "Marck Script": {
4892
+ "variants": [
4893
+ "regular"
4894
+ ],
4895
+ "category": "handwriting"
4896
+ }
4897
+ },
4898
+ {
4899
+ "Margarine": {
4900
+ "variants": [
4901
+ "regular"
4902
+ ],
4903
+ "category": "display"
4904
+ }
4905
+ },
4906
+ {
4907
+ "Markazi Text": {
4908
+ "variants": [
4909
+ "regular",
4910
+ "500",
4911
+ "600",
4912
+ "700"
4913
+ ],
4914
+ "category": "serif"
4915
+ }
4916
+ },
4917
+ {
4918
+ "Marko One": {
4919
+ "variants": [
4920
+ "regular"
4921
+ ],
4922
+ "category": "serif"
4923
+ }
4924
+ },
4925
+ {
4926
+ "Marmelad": {
4927
+ "variants": [
4928
+ "regular"
4929
+ ],
4930
+ "category": "sans-serif"
4931
+ }
4932
+ },
4933
+ {
4934
+ "Martel": {
4935
+ "variants": [
4936
+ "200",
4937
+ "300",
4938
+ "regular",
4939
+ "600",
4940
+ "700",
4941
+ "800",
4942
+ "900"
4943
+ ],
4944
+ "category": "serif"
4945
+ }
4946
+ },
4947
+ {
4948
+ "Martel Sans": {
4949
+ "variants": [
4950
+ "200",
4951
+ "300",
4952
+ "regular",
4953
+ "600",
4954
+ "700",
4955
+ "800",
4956
+ "900"
4957
+ ],
4958
+ "category": "sans-serif"
4959
+ }
4960
+ },
4961
+ {
4962
+ "Marvel": {
4963
+ "variants": [
4964
+ "regular",
4965
+ "italic",
4966
+ "700",
4967
+ "700italic"
4968
+ ],
4969
+ "category": "sans-serif"
4970
+ }
4971
+ },
4972
+ {
4973
+ "Mate": {
4974
+ "variants": [
4975
+ "regular",
4976
+ "italic"
4977
+ ],
4978
+ "category": "serif"
4979
+ }
4980
+ },
4981
+ {
4982
+ "Mate SC": {
4983
+ "variants": [
4984
+ "regular"
4985
+ ],
4986
+ "category": "serif"
4987
+ }
4988
+ },
4989
+ {
4990
+ "Maven Pro": {
4991
+ "variants": [
4992
+ "regular",
4993
+ "500",
4994
+ "700",
4995
+ "900"
4996
+ ],
4997
+ "category": "sans-serif"
4998
+ }
4999
+ },
5000
+ {
5001
+ "McLaren": {
5002
+ "variants": [
5003
+ "regular"
5004
+ ],
5005
+ "category": "display"
5006
+ }
5007
+ },
5008
+ {
5009
+ "Meddon": {
5010
+ "variants": [
5011
+ "regular"
5012
+ ],
5013
+ "category": "handwriting"
5014
+ }
5015
+ },
5016
+ {
5017
+ "MedievalSharp": {
5018
+ "variants": [
5019
+ "regular"
5020
+ ],
5021
+ "category": "display"
5022
+ }
5023
+ },
5024
+ {
5025
+ "Medula One": {
5026
+ "variants": [
5027
+ "regular"
5028
+ ],
5029
+ "category": "display"
5030
+ }
5031
+ },
5032
+ {
5033
+ "Meera Inimai": {
5034
+ "variants": [
5035
+ "regular"
5036
+ ],
5037
+ "category": "sans-serif"
5038
+ }
5039
+ },
5040
+ {
5041
+ "Megrim": {
5042
+ "variants": [
5043
+ "regular"
5044
+ ],
5045
+ "category": "display"
5046
+ }
5047
+ },
5048
+ {
5049
+ "Meie Script": {
5050
+ "variants": [
5051
+ "regular"
5052
+ ],
5053
+ "category": "handwriting"
5054
+ }
5055
+ },
5056
+ {
5057
+ "Merienda": {
5058
+ "variants": [
5059
+ "regular",
5060
+ "700"
5061
+ ],
5062
+ "category": "handwriting"
5063
+ }
5064
+ },
5065
+ {
5066
+ "Merienda One": {
5067
+ "variants": [
5068
+ "regular"
5069
+ ],
5070
+ "category": "handwriting"
5071
+ }
5072
+ },
5073
+ {
5074
+ "Merriweather": {
5075
+ "variants": [
5076
+ "300",
5077
+ "300italic",
5078
+ "regular",
5079
+ "italic",
5080
+ "700",
5081
+ "700italic",
5082
+ "900",
5083
+ "900italic"
5084
+ ],
5085
+ "category": "serif"
5086
+ }
5087
+ },
5088
+ {
5089
+ "Merriweather Sans": {
5090
+ "variants": [
5091
+ "300",
5092
+ "300italic",
5093
+ "regular",
5094
+ "italic",
5095
+ "700",
5096
+ "700italic",
5097
+ "800",
5098
+ "800italic"
5099
+ ],
5100
+ "category": "sans-serif"
5101
+ }
5102
+ },
5103
+ {
5104
+ "Metal": {
5105
+ "variants": [
5106
+ "regular"
5107
+ ],
5108
+ "category": "display"
5109
+ }
5110
+ },
5111
+ {
5112
+ "Metal Mania": {
5113
+ "variants": [
5114
+ "regular"
5115
+ ],
5116
+ "category": "display"
5117
+ }
5118
+ },
5119
+ {
5120
+ "Metamorphous": {
5121
+ "variants": [
5122
+ "regular"
5123
+ ],
5124
+ "category": "display"
5125
+ }
5126
+ },
5127
+ {
5128
+ "Metrophobic": {
5129
+ "variants": [
5130
+ "regular"
5131
+ ],
5132
+ "category": "sans-serif"
5133
+ }
5134
+ },
5135
+ {
5136
+ "Michroma": {
5137
+ "variants": [
5138
+ "regular"
5139
+ ],
5140
+ "category": "sans-serif"
5141
+ }
5142
+ },
5143
+ {
5144
+ "Milonga": {
5145
+ "variants": [
5146
+ "regular"
5147
+ ],
5148
+ "category": "display"
5149
+ }
5150
+ },
5151
+ {
5152
+ "Miltonian": {
5153
+ "variants": [
5154
+ "regular"
5155
+ ],
5156
+ "category": "display"
5157
+ }
5158
+ },
5159
+ {
5160
+ "Miltonian Tattoo": {
5161
+ "variants": [
5162
+ "regular"
5163
+ ],
5164
+ "category": "display"
5165
+ }
5166
+ },
5167
+ {
5168
+ "Mina": {
5169
+ "variants": [
5170
+ "regular",
5171
+ "700"
5172
+ ],
5173
+ "category": "sans-serif"
5174
+ }
5175
+ },
5176
+ {
5177
+ "Miniver": {
5178
+ "variants": [
5179
+ "regular"
5180
+ ],
5181
+ "category": "display"
5182
+ }
5183
+ },
5184
+ {
5185
+ "Miriam Libre": {
5186
+ "variants": [
5187
+ "regular",
5188
+ "700"
5189
+ ],
5190
+ "category": "sans-serif"
5191
+ }
5192
+ },
5193
+ {
5194
+ "Mirza": {
5195
+ "variants": [
5196
+ "regular",
5197
+ "500",
5198
+ "600",
5199
+ "700"
5200
+ ],
5201
+ "category": "display"
5202
+ }
5203
+ },
5204
+ {
5205
+ "Miss Fajardose": {
5206
+ "variants": [
5207
+ "regular"
5208
+ ],
5209
+ "category": "handwriting"
5210
+ }
5211
+ },
5212
+ {
5213
+ "Mitr": {
5214
+ "variants": [
5215
+ "200",
5216
+ "300",
5217
+ "regular",
5218
+ "500",
5219
+ "600",
5220
+ "700"
5221
+ ],
5222
+ "category": "sans-serif"
5223
+ }
5224
+ },
5225
+ {
5226
+ "Modak": {
5227
+ "variants": [
5228
+ "regular"
5229
+ ],
5230
+ "category": "display"
5231
+ }
5232
+ },
5233
+ {
5234
+ "Modern Antiqua": {
5235
+ "variants": [
5236
+ "regular"
5237
+ ],
5238
+ "category": "display"
5239
+ }
5240
+ },
5241
+ {
5242
+ "Mogra": {
5243
+ "variants": [
5244
+ "regular"
5245
+ ],
5246
+ "category": "display"
5247
+ }
5248
+ },
5249
+ {
5250
+ "Molengo": {
5251
+ "variants": [
5252
+ "regular"
5253
+ ],
5254
+ "category": "sans-serif"
5255
+ }
5256
+ },
5257
+ {
5258
+ "Molle": {
5259
+ "variants": [
5260
+ "italic"
5261
+ ],
5262
+ "category": "handwriting"
5263
+ }
5264
+ },
5265
+ {
5266
+ "Monda": {
5267
+ "variants": [
5268
+ "regular",
5269
+ "700"
5270
+ ],
5271
+ "category": "sans-serif"
5272
+ }
5273
+ },
5274
+ {
5275
+ "Monofett": {
5276
+ "variants": [
5277
+ "regular"
5278
+ ],
5279
+ "category": "display"
5280
+ }
5281
+ },
5282
+ {
5283
+ "Monoton": {
5284
+ "variants": [
5285
+ "regular"
5286
+ ],
5287
+ "category": "display"
5288
+ }
5289
+ },
5290
+ {
5291
+ "Monsieur La Doulaise": {
5292
+ "variants": [
5293
+ "regular"
5294
+ ],
5295
+ "category": "handwriting"
5296
+ }
5297
+ },
5298
+ {
5299
+ "Montaga": {
5300
+ "variants": [
5301
+ "regular"
5302
+ ],
5303
+ "category": "serif"
5304
+ }
5305
+ },
5306
+ {
5307
+ "Montez": {
5308
+ "variants": [
5309
+ "regular"
5310
+ ],
5311
+ "category": "handwriting"
5312
+ }
5313
+ },
5314
+ {
5315
+ "Montserrat": {
5316
+ "variants": [
5317
+ "100",
5318
+ "100italic",
5319
+ "200",
5320
+ "200italic",
5321
+ "300",
5322
+ "300italic",
5323
+ "regular",
5324
+ "italic",
5325
+ "500",
5326
+ "500italic",
5327
+ "600",
5328
+ "600italic",
5329
+ "700",
5330
+ "700italic",
5331
+ "800",
5332
+ "800italic",
5333
+ "900",
5334
+ "900italic"
5335
+ ],
5336
+ "category": "sans-serif"
5337
+ }
5338
+ },
5339
+ {
5340
+ "Montserrat Alternates": {
5341
+ "variants": [
5342
+ "100",
5343
+ "100italic",
5344
+ "200",
5345
+ "200italic",
5346
+ "300",
5347
+ "300italic",
5348
+ "regular",
5349
+ "italic",
5350
+ "500",
5351
+ "500italic",
5352
+ "600",
5353
+ "600italic",
5354
+ "700",
5355
+ "700italic",
5356
+ "800",
5357
+ "800italic",
5358
+ "900",
5359
+ "900italic"
5360
+ ],
5361
+ "category": "sans-serif"
5362
+ }
5363
+ },
5364
+ {
5365
+ "Montserrat Subrayada": {
5366
+ "variants": [
5367
+ "regular",
5368
+ "700"
5369
+ ],
5370
+ "category": "sans-serif"
5371
+ }
5372
+ },
5373
+ {
5374
+ "Moul": {
5375
+ "variants": [
5376
+ "regular"
5377
+ ],
5378
+ "category": "display"
5379
+ }
5380
+ },
5381
+ {
5382
+ "Moulpali": {
5383
+ "variants": [
5384
+ "regular"
5385
+ ],
5386
+ "category": "display"
5387
+ }
5388
+ },
5389
+ {
5390
+ "Mountains of Christmas": {
5391
+ "variants": [
5392
+ "regular",
5393
+ "700"
5394
+ ],
5395
+ "category": "display"
5396
+ }
5397
+ },
5398
+ {
5399
+ "Mouse Memoirs": {
5400
+ "variants": [
5401
+ "regular"
5402
+ ],
5403
+ "category": "sans-serif"
5404
+ }
5405
+ },
5406
+ {
5407
+ "Mr Bedfort": {
5408
+ "variants": [
5409
+ "regular"
5410
+ ],
5411
+ "category": "handwriting"
5412
+ }
5413
+ },
5414
+ {
5415
+ "Mr Dafoe": {
5416
+ "variants": [
5417
+ "regular"
5418
+ ],
5419
+ "category": "handwriting"
5420
+ }
5421
+ },
5422
+ {
5423
+ "Mr De Haviland": {
5424
+ "variants": [
5425
+ "regular"
5426
+ ],
5427
+ "category": "handwriting"
5428
+ }
5429
+ },
5430
+ {
5431
+ "Mrs Saint Delafield": {
5432
+ "variants": [
5433
+ "regular"
5434
+ ],
5435
+ "category": "handwriting"
5436
+ }
5437
+ },
5438
+ {
5439
+ "Mrs Sheppards": {
5440
+ "variants": [
5441
+ "regular"
5442
+ ],
5443
+ "category": "handwriting"
5444
+ }
5445
+ },
5446
+ {
5447
+ "Mukta": {
5448
+ "variants": [
5449
+ "200",
5450
+ "300",
5451
+ "regular",
5452
+ "500",
5453
+ "600",
5454
+ "700",
5455
+ "800"
5456
+ ],
5457
+ "category": "sans-serif"
5458
+ }
5459
+ },
5460
+ {
5461
+ "Mukta Mahee": {
5462
+ "variants": [
5463
+ "200",
5464
+ "300",
5465
+ "regular",
5466
+ "500",
5467
+ "600",
5468
+ "700",
5469
+ "800"
5470
+ ],
5471
+ "category": "sans-serif"
5472
+ }
5473
+ },
5474
+ {
5475
+ "Mukta Malar": {
5476
+ "variants": [
5477
+ "200",
5478
+ "300",
5479
+ "regular",
5480
+ "500",
5481
+ "600",
5482
+ "700",
5483
+ "800"
5484
+ ],
5485
+ "category": "sans-serif"
5486
+ }
5487
+ },
5488
+ {
5489
+ "Mukta Vaani": {
5490
+ "variants": [
5491
+ "200",
5492
+ "300",
5493
+ "regular",
5494
+ "500",
5495
+ "600",
5496
+ "700",
5497
+ "800"
5498
+ ],
5499
+ "category": "sans-serif"
5500
+ }
5501
+ },
5502
+ {
5503
+ "Muli": {
5504
+ "variants": [
5505
+ "200",
5506
+ "200italic",
5507
+ "300",
5508
+ "300italic",
5509
+ "regular",
5510
+ "italic",
5511
+ "600",
5512
+ "600italic",
5513
+ "700",
5514
+ "700italic",
5515
+ "800",
5516
+ "800italic",
5517
+ "900",
5518
+ "900italic"
5519
+ ],
5520
+ "category": "sans-serif"
5521
+ }
5522
+ },
5523
+ {
5524
+ "Mystery Quest": {
5525
+ "variants": [
5526
+ "regular"
5527
+ ],
5528
+ "category": "display"
5529
+ }
5530
+ },
5531
+ {
5532
+ "NTR": {
5533
+ "variants": [
5534
+ "regular"
5535
+ ],
5536
+ "category": "sans-serif"
5537
+ }
5538
+ },
5539
+ {
5540
+ "Nanum Brush Script": {
5541
+ "variants": [
5542
+ "regular"
5543
+ ],
5544
+ "category": "handwriting"
5545
+ }
5546
+ },
5547
+ {
5548
+ "Nanum Gothic": {
5549
+ "variants": [
5550
+ "regular",
5551
+ "700",
5552
+ "800"
5553
+ ],
5554
+ "category": "sans-serif"
5555
+ }
5556
+ },
5557
+ {
5558
+ "Nanum Gothic Coding": {
5559
+ "variants": [
5560
+ "regular",
5561
+ "700"
5562
+ ],
5563
+ "category": "monospace"
5564
+ }
5565
+ },
5566
+ {
5567
+ "Nanum Myeongjo": {
5568
+ "variants": [
5569
+ "regular",
5570
+ "700",
5571
+ "800"
5572
+ ],
5573
+ "category": "serif"
5574
+ }
5575
+ },
5576
+ {
5577
+ "Nanum Pen Script": {
5578
+ "variants": [
5579
+ "regular"
5580
+ ],
5581
+ "category": "handwriting"
5582
+ }
5583
+ },
5584
+ {
5585
+ "Neucha": {
5586
+ "variants": [
5587
+ "regular"
5588
+ ],
5589
+ "category": "handwriting"
5590
+ }
5591
+ },
5592
+ {
5593
+ "Neuton": {
5594
+ "variants": [
5595
+ "200",
5596
+ "300",
5597
+ "regular",
5598
+ "italic",
5599
+ "700",
5600
+ "800"
5601
+ ],
5602
+ "category": "serif"
5603
+ }
5604
+ },
5605
+ {
5606
+ "New Rocker": {
5607
+ "variants": [
5608
+ "regular"
5609
+ ],
5610
+ "category": "display"
5611
+ }
5612
+ },
5613
+ {
5614
+ "News Cycle": {
5615
+ "variants": [
5616
+ "regular",
5617
+ "700"
5618
+ ],
5619
+ "category": "sans-serif"
5620
+ }
5621
+ },
5622
+ {
5623
+ "Niconne": {
5624
+ "variants": [
5625
+ "regular"
5626
+ ],
5627
+ "category": "handwriting"
5628
+ }
5629
+ },
5630
+ {
5631
+ "Niramit": {
5632
+ "variants": [
5633
+ "200",
5634
+ "200italic",
5635
+ "300",
5636
+ "300italic",
5637
+ "regular",
5638
+ "italic",
5639
+ "500",
5640
+ "500italic",
5641
+ "600",
5642
+ "600italic",
5643
+ "700",
5644
+ "700italic"
5645
+ ],
5646
+ "category": "sans-serif"
5647
+ }
5648
+ },
5649
+ {
5650
+ "Nixie One": {
5651
+ "variants": [
5652
+ "regular"
5653
+ ],
5654
+ "category": "display"
5655
+ }
5656
+ },
5657
+ {
5658
+ "Nobile": {
5659
+ "variants": [
5660
+ "regular",
5661
+ "italic",
5662
+ "500",
5663
+ "500italic",
5664
+ "700",
5665
+ "700italic"
5666
+ ],
5667
+ "category": "sans-serif"
5668
+ }
5669
+ },
5670
+ {
5671
+ "Nokora": {
5672
+ "variants": [
5673
+ "regular",
5674
+ "700"
5675
+ ],
5676
+ "category": "serif"
5677
+ }
5678
+ },
5679
+ {
5680
+ "Norican": {
5681
+ "variants": [
5682
+ "regular"
5683
+ ],
5684
+ "category": "handwriting"
5685
+ }
5686
+ },
5687
+ {
5688
+ "Nosifer": {
5689
+ "variants": [
5690
+ "regular"
5691
+ ],
5692
+ "category": "display"
5693
+ }
5694
+ },
5695
+ {
5696
+ "Notable": {
5697
+ "variants": [
5698
+ "regular"
5699
+ ],
5700
+ "category": "sans-serif"
5701
+ }
5702
+ },
5703
+ {
5704
+ "Nothing You Could Do": {
5705
+ "variants": [
5706
+ "regular"
5707
+ ],
5708
+ "category": "handwriting"
5709
+ }
5710
+ },
5711
+ {
5712
+ "Noticia Text": {
5713
+ "variants": [
5714
+ "regular",
5715
+ "italic",
5716
+ "700",
5717
+ "700italic"
5718
+ ],
5719
+ "category": "serif"
5720
+ }
5721
+ },
5722
+ {
5723
+ "Noto Sans": {
5724
+ "variants": [
5725
+ "regular",
5726
+ "italic",
5727
+ "700",
5728
+ "700italic"
5729
+ ],
5730
+ "category": "sans-serif"
5731
+ }
5732
+ },
5733
+ {
5734
+ "Noto Sans JP": {
5735
+ "variants": [
5736
+ "100",
5737
+ "300",
5738
+ "regular",
5739
+ "500",
5740
+ "700",
5741
+ "900"
5742
+ ],
5743
+ "category": "sans-serif"
5744
+ }
5745
+ },
5746
+ {
5747
+ "Noto Sans KR": {
5748
+ "variants": [
5749
+ "100",
5750
+ "300",
5751
+ "regular",
5752
+ "500",
5753
+ "700",
5754
+ "900"
5755
+ ],
5756
+ "category": "sans-serif"
5757
+ }
5758
+ },
5759
+ {
5760
+ "Noto Serif": {
5761
+ "variants": [
5762
+ "regular",
5763
+ "italic",
5764
+ "700",
5765
+ "700italic"
5766
+ ],
5767
+ "category": "serif"
5768
+ }
5769
+ },
5770
+ {
5771
+ "Noto Serif JP": {
5772
+ "variants": [
5773
+ "200",
5774
+ "300",
5775
+ "regular",
5776
+ "500",
5777
+ "600",
5778
+ "700",
5779
+ "900"
5780
+ ],
5781
+ "category": "sans-serif"
5782
+ }
5783
+ },
5784
+ {
5785
+ "Noto Serif KR": {
5786
+ "variants": [
5787
+ "200",
5788
+ "300",
5789
+ "regular",
5790
+ "500",
5791
+ "600",
5792
+ "700",
5793
+ "900"
5794
+ ],
5795
+ "category": "sans-serif"
5796
+ }
5797
+ },
5798
+ {
5799
+ "Nova Cut": {
5800
+ "variants": [
5801
+ "regular"
5802
+ ],
5803
+ "category": "display"
5804
+ }
5805
+ },
5806
+ {
5807
+ "Nova Flat": {
5808
+ "variants": [
5809
+ "regular"
5810
+ ],
5811
+ "category": "display"
5812
+ }
5813
+ },
5814
+ {
5815
+ "Nova Mono": {
5816
+ "variants": [
5817
+ "regular"
5818
+ ],
5819
+ "category": "monospace"
5820
+ }
5821
+ },
5822
+ {
5823
+ "Nova Oval": {
5824
+ "variants": [
5825
+ "regular"
5826
+ ],
5827
+ "category": "display"
5828
+ }
5829
+ },
5830
+ {
5831
+ "Nova Round": {
5832
+ "variants": [
5833
+ "regular"
5834
+ ],
5835
+ "category": "display"
5836
+ }
5837
+ },
5838
+ {
5839
+ "Nova Script": {
5840
+ "variants": [
5841
+ "regular"
5842
+ ],
5843
+ "category": "display"
5844
+ }
5845
+ },
5846
+ {
5847
+ "Nova Slim": {
5848
+ "variants": [
5849
+ "regular"
5850
+ ],
5851
+ "category": "display"
5852
+ }
5853
+ },
5854
+ {
5855
+ "Nova Square": {
5856
+ "variants": [
5857
+ "regular"
5858
+ ],
5859
+ "category": "display"
5860
+ }
5861
+ },
5862
+ {
5863
+ "Numans": {
5864
+ "variants": [
5865
+ "regular"
5866
+ ],
5867
+ "category": "sans-serif"
5868
+ }
5869
+ },
5870
+ {
5871
+ "Nunito": {
5872
+ "variants": [
5873
+ "200",
5874
+ "200italic",
5875
+ "300",
5876
+ "300italic",
5877
+ "regular",
5878
+ "italic",
5879
+ "600",
5880
+ "600italic",
5881
+ "700",
5882
+ "700italic",
5883
+ "800",
5884
+ "800italic",
5885
+ "900",
5886
+ "900italic"
5887
+ ],
5888
+ "category": "sans-serif"
5889
+ }
5890
+ },
5891
+ {
5892
+ "Nunito Sans": {
5893
+ "variants": [
5894
+ "200",
5895
+ "200italic",
5896
+ "300",
5897
+ "300italic",
5898
+ "regular",
5899
+ "italic",
5900
+ "600",
5901
+ "600italic",
5902
+ "700",
5903
+ "700italic",
5904
+ "800",
5905
+ "800italic",
5906
+ "900",
5907
+ "900italic"
5908
+ ],
5909
+ "category": "sans-serif"
5910
+ }
5911
+ },
5912
+ {
5913
+ "Odor Mean Chey": {
5914
+ "variants": [
5915
+ "regular"
5916
+ ],
5917
+ "category": "display"
5918
+ }
5919
+ },
5920
+ {
5921
+ "Offside": {
5922
+ "variants": [
5923
+ "regular"
5924
+ ],
5925
+ "category": "display"
5926
+ }
5927
+ },
5928
+ {
5929
+ "Old Standard TT": {
5930
+ "variants": [
5931
+ "regular",
5932
+ "italic",
5933
+ "700"
5934
+ ],
5935
+ "category": "serif"
5936
+ }
5937
+ },
5938
+ {
5939
+ "Oldenburg": {
5940
+ "variants": [
5941
+ "regular"
5942
+ ],
5943
+ "category": "display"
5944
+ }
5945
+ },
5946
+ {
5947
+ "Oleo Script": {
5948
+ "variants": [
5949
+ "regular",
5950
+ "700"
5951
+ ],
5952
+ "category": "display"
5953
+ }
5954
+ },
5955
+ {
5956
+ "Oleo Script Swash Caps": {
5957
+ "variants": [
5958
+ "regular",
5959
+ "700"
5960
+ ],
5961
+ "category": "display"
5962
+ }
5963
+ },
5964
+ {
5965
+ "Open Sans": {
5966
+ "variants": [
5967
+ "300",
5968
+ "300italic",
5969
+ "regular",
5970
+ "italic",
5971
+ "600",
5972
+ "600italic",
5973
+ "700",
5974
+ "700italic",
5975
+ "800",
5976
+ "800italic"
5977
+ ],
5978
+ "category": "sans-serif"
5979
+ }
5980
+ },
5981
+ {
5982
+ "Open Sans Condensed": {
5983
+ "variants": [
5984
+ "300",
5985
+ "300italic",
5986
+ "700"
5987
+ ],
5988
+ "category": "sans-serif"
5989
+ }
5990
+ },
5991
+ {
5992
+ "Oranienbaum": {
5993
+ "variants": [
5994
+ "regular"
5995
+ ],
5996
+ "category": "serif"
5997
+ }
5998
+ },
5999
+ {
6000
+ "Orbitron": {
6001
+ "variants": [
6002
+ "regular",
6003
+ "500",
6004
+ "700",
6005
+ "900"
6006
+ ],
6007
+ "category": "sans-serif"
6008
+ }
6009
+ },
6010
+ {
6011
+ "Oregano": {
6012
+ "variants": [
6013
+ "regular",
6014
+ "italic"
6015
+ ],
6016
+ "category": "display"
6017
+ }
6018
+ },
6019
+ {
6020
+ "Orienta": {
6021
+ "variants": [
6022
+ "regular"
6023
+ ],
6024
+ "category": "sans-serif"
6025
+ }
6026
+ },
6027
+ {
6028
+ "Original Surfer": {
6029
+ "variants": [
6030
+ "regular"
6031
+ ],
6032
+ "category": "display"
6033
+ }
6034
+ },
6035
+ {
6036
+ "Oswald": {
6037
+ "variants": [
6038
+ "200",
6039
+ "300",
6040
+ "regular",
6041
+ "500",
6042
+ "600",
6043
+ "700"
6044
+ ],
6045
+ "category": "sans-serif"
6046
+ }
6047
+ },
6048
+ {
6049
+ "Over the Rainbow": {
6050
+ "variants": [
6051
+ "regular"
6052
+ ],
6053
+ "category": "handwriting"
6054
+ }
6055
+ },
6056
+ {
6057
+ "Overlock": {
6058
+ "variants": [
6059
+ "regular",
6060
+ "italic",
6061
+ "700",
6062
+ "700italic",
6063
+ "900",
6064
+ "900italic"
6065
+ ],
6066
+ "category": "display"
6067
+ }
6068
+ },
6069
+ {
6070
+ "Overlock SC": {
6071
+ "variants": [
6072
+ "regular"
6073
+ ],
6074
+ "category": "display"
6075
+ }
6076
+ },
6077
+ {
6078
+ "Overpass": {
6079
+ "variants": [
6080
+ "100",
6081
+ "100italic",
6082
+ "200",
6083
+ "200italic",
6084
+ "300",
6085
+ "300italic",
6086
+ "regular",
6087
+ "italic",
6088
+ "600",
6089
+ "600italic",
6090
+ "700",
6091
+ "700italic",
6092
+ "800",
6093
+ "800italic",
6094
+ "900",
6095
+ "900italic"
6096
+ ],
6097
+ "category": "sans-serif"
6098
+ }
6099
+ },
6100
+ {
6101
+ "Overpass Mono": {
6102
+ "variants": [
6103
+ "300",
6104
+ "regular",
6105
+ "600",
6106
+ "700"
6107
+ ],
6108
+ "category": "monospace"
6109
+ }
6110
+ },
6111
+ {
6112
+ "Ovo": {
6113
+ "variants": [
6114
+ "regular"
6115
+ ],
6116
+ "category": "serif"
6117
+ }
6118
+ },
6119
+ {
6120
+ "Oxygen": {
6121
+ "variants": [
6122
+ "300",
6123
+ "regular",
6124
+ "700"
6125
+ ],
6126
+ "category": "sans-serif"
6127
+ }
6128
+ },
6129
+ {
6130
+ "Oxygen Mono": {
6131
+ "variants": [
6132
+ "regular"
6133
+ ],
6134
+ "category": "monospace"
6135
+ }
6136
+ },
6137
+ {
6138
+ "PT Mono": {
6139
+ "variants": [
6140
+ "regular"
6141
+ ],
6142
+ "category": "monospace"
6143
+ }
6144
+ },
6145
+ {
6146
+ "PT Sans": {
6147
+ "variants": [
6148
+ "regular",
6149
+ "italic",
6150
+ "700",
6151
+ "700italic"
6152
+ ],
6153
+ "category": "sans-serif"
6154
+ }
6155
+ },
6156
+ {
6157
+ "PT Sans Caption": {
6158
+ "variants": [
6159
+ "regular",
6160
+ "700"
6161
+ ],
6162
+ "category": "sans-serif"
6163
+ }
6164
+ },
6165
+ {
6166
+ "PT Sans Narrow": {
6167
+ "variants": [
6168
+ "regular",
6169
+ "700"
6170
+ ],
6171
+ "category": "sans-serif"
6172
+ }
6173
+ },
6174
+ {
6175
+ "PT Serif": {
6176
+ "variants": [
6177
+ "regular",
6178
+ "italic",
6179
+ "700",
6180
+ "700italic"
6181
+ ],
6182
+ "category": "serif"
6183
+ }
6184
+ },
6185
+ {
6186
+ "PT Serif Caption": {
6187
+ "variants": [
6188
+ "regular",
6189
+ "italic"
6190
+ ],
6191
+ "category": "serif"
6192
+ }
6193
+ },
6194
+ {
6195
+ "Pacifico": {
6196
+ "variants": [
6197
+ "regular"
6198
+ ],
6199
+ "category": "handwriting"
6200
+ }
6201
+ },
6202
+ {
6203
+ "Padauk": {
6204
+ "variants": [
6205
+ "regular",
6206
+ "700"
6207
+ ],
6208
+ "category": "sans-serif"
6209
+ }
6210
+ },
6211
+ {
6212
+ "Palanquin": {
6213
+ "variants": [
6214
+ "100",
6215
+ "200",
6216
+ "300",
6217
+ "regular",
6218
+ "500",
6219
+ "600",
6220
+ "700"
6221
+ ],
6222
+ "category": "sans-serif"
6223
+ }
6224
+ },
6225
+ {
6226
+ "Palanquin Dark": {
6227
+ "variants": [
6228
+ "regular",
6229
+ "500",
6230
+ "600",
6231
+ "700"
6232
+ ],
6233
+ "category": "sans-serif"
6234
+ }
6235
+ },
6236
+ {
6237
+ "Pangolin": {
6238
+ "variants": [
6239
+ "regular"
6240
+ ],
6241
+ "category": "handwriting"
6242
+ }
6243
+ },
6244
+ {
6245
+ "Paprika": {
6246
+ "variants": [
6247
+ "regular"
6248
+ ],
6249
+ "category": "display"
6250
+ }
6251
+ },
6252
+ {
6253
+ "Parisienne": {
6254
+ "variants": [
6255
+ "regular"
6256
+ ],
6257
+ "category": "handwriting"
6258
+ }
6259
+ },
6260
+ {
6261
+ "Passero One": {
6262
+ "variants": [
6263
+ "regular"
6264
+ ],
6265
+ "category": "display"
6266
+ }
6267
+ },
6268
+ {
6269
+ "Passion One": {
6270
+ "variants": [
6271
+ "regular",
6272
+ "700",
6273
+ "900"
6274
+ ],
6275
+ "category": "display"
6276
+ }
6277
+ },
6278
+ {
6279
+ "Pathway Gothic One": {
6280
+ "variants": [
6281
+ "regular"
6282
+ ],
6283
+ "category": "sans-serif"
6284
+ }
6285
+ },
6286
+ {
6287
+ "Patrick Hand": {
6288
+ "variants": [
6289
+ "regular"
6290
+ ],
6291
+ "category": "handwriting"
6292
+ }
6293
+ },
6294
+ {
6295
+ "Patrick Hand SC": {
6296
+ "variants": [
6297
+ "regular"
6298
+ ],
6299
+ "category": "handwriting"
6300
+ }
6301
+ },
6302
+ {
6303
+ "Pattaya": {
6304
+ "variants": [
6305
+ "regular"
6306
+ ],
6307
+ "category": "sans-serif"
6308
+ }
6309
+ },
6310
+ {
6311
+ "Patua One": {
6312
+ "variants": [
6313
+ "regular"
6314
+ ],
6315
+ "category": "display"
6316
+ }
6317
+ },
6318
+ {
6319
+ "Pavanam": {
6320
+ "variants": [
6321
+ "regular"
6322
+ ],
6323
+ "category": "sans-serif"
6324
+ }
6325
+ },
6326
+ {
6327
+ "Paytone One": {
6328
+ "variants": [
6329
+ "regular"
6330
+ ],
6331
+ "category": "sans-serif"
6332
+ }
6333
+ },
6334
+ {
6335
+ "Peddana": {
6336
+ "variants": [
6337
+ "regular"
6338
+ ],
6339
+ "category": "serif"
6340
+ }
6341
+ },
6342
+ {
6343
+ "Peralta": {
6344
+ "variants": [
6345
+ "regular"
6346
+ ],
6347
+ "category": "display"
6348
+ }
6349
+ },
6350
+ {
6351
+ "Permanent Marker": {
6352
+ "variants": [
6353
+ "regular"
6354
+ ],
6355
+ "category": "handwriting"
6356
+ }
6357
+ },
6358
+ {
6359
+ "Petit Formal Script": {
6360
+ "variants": [
6361
+ "regular"
6362
+ ],
6363
+ "category": "handwriting"
6364
+ }
6365
+ },
6366
+ {
6367
+ "Petrona": {
6368
+ "variants": [
6369
+ "regular"
6370
+ ],
6371
+ "category": "serif"
6372
+ }
6373
+ },
6374
+ {
6375
+ "Philosopher": {
6376
+ "variants": [
6377
+ "regular",
6378
+ "italic",
6379
+ "700",
6380
+ "700italic"
6381
+ ],
6382
+ "category": "sans-serif"
6383
+ }
6384
+ },
6385
+ {
6386
+ "Piedra": {
6387
+ "variants": [
6388
+ "regular"
6389
+ ],
6390
+ "category": "display"
6391
+ }
6392
+ },
6393
+ {
6394
+ "Pinyon Script": {
6395
+ "variants": [
6396
+ "regular"
6397
+ ],
6398
+ "category": "handwriting"
6399
+ }
6400
+ },
6401
+ {
6402
+ "Pirata One": {
6403
+ "variants": [
6404
+ "regular"
6405
+ ],
6406
+ "category": "display"
6407
+ }
6408
+ },
6409
+ {
6410
+ "Plaster": {
6411
+ "variants": [
6412
+ "regular"
6413
+ ],
6414
+ "category": "display"
6415
+ }
6416
+ },
6417
+ {
6418
+ "Play": {
6419
+ "variants": [
6420
+ "regular",
6421
+ "700"
6422
+ ],
6423
+ "category": "sans-serif"
6424
+ }
6425
+ },
6426
+ {
6427
+ "Playball": {
6428
+ "variants": [
6429
+ "regular"
6430
+ ],
6431
+ "category": "display"
6432
+ }
6433
+ },
6434
+ {
6435
+ "Playfair Display": {
6436
+ "variants": [
6437
+ "regular",
6438
+ "italic",
6439
+ "700",
6440
+ "700italic",
6441
+ "900",
6442
+ "900italic"
6443
+ ],
6444
+ "category": "serif"
6445
+ }
6446
+ },
6447
+ {
6448
+ "Playfair Display SC": {
6449
+ "variants": [
6450
+ "regular",
6451
+ "italic",
6452
+ "700",
6453
+ "700italic",
6454
+ "900",
6455
+ "900italic"
6456
+ ],
6457
+ "category": "serif"
6458
+ }
6459
+ },
6460
+ {
6461
+ "Podkova": {
6462
+ "variants": [
6463
+ "regular",
6464
+ "500",
6465
+ "600",
6466
+ "700",
6467
+ "800"
6468
+ ],
6469
+ "category": "serif"
6470
+ }
6471
+ },
6472
+ {
6473
+ "Poiret One": {
6474
+ "variants": [
6475
+ "regular"
6476
+ ],
6477
+ "category": "display"
6478
+ }
6479
+ },
6480
+ {
6481
+ "Poller One": {
6482
+ "variants": [
6483
+ "regular"
6484
+ ],
6485
+ "category": "display"
6486
+ }
6487
+ },
6488
+ {
6489
+ "Poly": {
6490
+ "variants": [
6491
+ "regular",
6492
+ "italic"
6493
+ ],
6494
+ "category": "serif"
6495
+ }
6496
+ },
6497
+ {
6498
+ "Pompiere": {
6499
+ "variants": [
6500
+ "regular"
6501
+ ],
6502
+ "category": "display"
6503
+ }
6504
+ },
6505
+ {
6506
+ "Pontano Sans": {
6507
+ "variants": [
6508
+ "regular"
6509
+ ],
6510
+ "category": "sans-serif"
6511
+ }
6512
+ },
6513
+ {
6514
+ "Poor Story": {
6515
+ "variants": [
6516
+ "regular"
6517
+ ],
6518
+ "category": "display"
6519
+ }
6520
+ },
6521
+ {
6522
+ "Poppins": {
6523
+ "variants": [
6524
+ "100",
6525
+ "100italic",
6526
+ "200",
6527
+ "200italic",
6528
+ "300",
6529
+ "300italic",
6530
+ "regular",
6531
+ "italic",
6532
+ "500",
6533
+ "500italic",
6534
+ "600",
6535
+ "600italic",
6536
+ "700",
6537
+ "700italic",
6538
+ "800",
6539
+ "800italic",
6540
+ "900",
6541
+ "900italic"
6542
+ ],
6543
+ "category": "sans-serif"
6544
+ }
6545
+ },
6546
+ {
6547
+ "Port Lligat Sans": {
6548
+ "variants": [
6549
+ "regular"
6550
+ ],
6551
+ "category": "sans-serif"
6552
+ }
6553
+ },
6554
+ {
6555
+ "Port Lligat Slab": {
6556
+ "variants": [
6557
+ "regular"
6558
+ ],
6559
+ "category": "serif"
6560
+ }
6561
+ },
6562
+ {
6563
+ "Pragati Narrow": {
6564
+ "variants": [
6565
+ "regular",
6566
+ "700"
6567
+ ],
6568
+ "category": "sans-serif"
6569
+ }
6570
+ },
6571
+ {
6572
+ "Prata": {
6573
+ "variants": [
6574
+ "regular"
6575
+ ],
6576
+ "category": "serif"
6577
+ }
6578
+ },
6579
+ {
6580
+ "Preahvihear": {
6581
+ "variants": [
6582
+ "regular"
6583
+ ],
6584
+ "category": "display"
6585
+ }
6586
+ },
6587
+ {
6588
+ "Press Start 2P": {
6589
+ "variants": [
6590
+ "regular"
6591
+ ],
6592
+ "category": "display"
6593
+ }
6594
+ },
6595
+ {
6596
+ "Pridi": {
6597
+ "variants": [
6598
+ "200",
6599
+ "300",
6600
+ "regular",
6601
+ "500",
6602
+ "600",
6603
+ "700"
6604
+ ],
6605
+ "category": "serif"
6606
+ }
6607
+ },
6608
+ {
6609
+ "Princess Sofia": {
6610
+ "variants": [
6611
+ "regular"
6612
+ ],
6613
+ "category": "handwriting"
6614
+ }
6615
+ },
6616
+ {
6617
+ "Prociono": {
6618
+ "variants": [
6619
+ "regular"
6620
+ ],
6621
+ "category": "serif"
6622
+ }
6623
+ },
6624
+ {
6625
+ "Prompt": {
6626
+ "variants": [
6627
+ "100",
6628
+ "100italic",
6629
+ "200",
6630
+ "200italic",
6631
+ "300",
6632
+ "300italic",
6633
+ "regular",
6634
+ "italic",
6635
+ "500",
6636
+ "500italic",
6637
+ "600",
6638
+ "600italic",
6639
+ "700",
6640
+ "700italic",
6641
+ "800",
6642
+ "800italic",
6643
+ "900",
6644
+ "900italic"
6645
+ ],
6646
+ "category": "sans-serif"
6647
+ }
6648
+ },
6649
+ {
6650
+ "Prosto One": {
6651
+ "variants": [
6652
+ "regular"
6653
+ ],
6654
+ "category": "display"
6655
+ }
6656
+ },
6657
+ {
6658
+ "Proza Libre": {
6659
+ "variants": [
6660
+ "regular",
6661
+ "italic",
6662
+ "500",
6663
+ "500italic",
6664
+ "600",
6665
+ "600italic",
6666
+ "700",
6667
+ "700italic",
6668
+ "800",
6669
+ "800italic"
6670
+ ],
6671
+ "category": "sans-serif"
6672
+ }
6673
+ },
6674
+ {
6675
+ "Puritan": {
6676
+ "variants": [
6677
+ "regular",
6678
+ "italic",
6679
+ "700",
6680
+ "700italic"
6681
+ ],
6682
+ "category": "sans-serif"
6683
+ }
6684
+ },
6685
+ {
6686
+ "Purple Purse": {
6687
+ "variants": [
6688
+ "regular"
6689
+ ],
6690
+ "category": "display"
6691
+ }
6692
+ },
6693
+ {
6694
+ "Quando": {
6695
+ "variants": [
6696
+ "regular"
6697
+ ],
6698
+ "category": "serif"
6699
+ }
6700
+ },
6701
+ {
6702
+ "Quantico": {
6703
+ "variants": [
6704
+ "regular",
6705
+ "italic",
6706
+ "700",
6707
+ "700italic"
6708
+ ],
6709
+ "category": "sans-serif"
6710
+ }
6711
+ },
6712
+ {
6713
+ "Quattrocento": {
6714
+ "variants": [
6715
+ "regular",
6716
+ "700"
6717
+ ],
6718
+ "category": "serif"
6719
+ }
6720
+ },
6721
+ {
6722
+ "Quattrocento Sans": {
6723
+ "variants": [
6724
+ "regular",
6725
+ "italic",
6726
+ "700",
6727
+ "700italic"
6728
+ ],
6729
+ "category": "sans-serif"
6730
+ }
6731
+ },
6732
+ {
6733
+ "Questrial": {
6734
+ "variants": [
6735
+ "regular"
6736
+ ],
6737
+ "category": "sans-serif"
6738
+ }
6739
+ },
6740
+ {
6741
+ "Quicksand": {
6742
+ "variants": [
6743
+ "300",
6744
+ "regular",
6745
+ "500",
6746
+ "700"
6747
+ ],
6748
+ "category": "sans-serif"
6749
+ }
6750
+ },
6751
+ {
6752
+ "Quintessential": {
6753
+ "variants": [
6754
+ "regular"
6755
+ ],
6756
+ "category": "handwriting"
6757
+ }
6758
+ },
6759
+ {
6760
+ "Qwigley": {
6761
+ "variants": [
6762
+ "regular"
6763
+ ],
6764
+ "category": "handwriting"
6765
+ }
6766
+ },
6767
+ {
6768
+ "Racing Sans One": {
6769
+ "variants": [
6770
+ "regular"
6771
+ ],
6772
+ "category": "display"
6773
+ }
6774
+ },
6775
+ {
6776
+ "Radley": {
6777
+ "variants": [
6778
+ "regular",
6779
+ "italic"
6780
+ ],
6781
+ "category": "serif"
6782
+ }
6783
+ },
6784
+ {
6785
+ "Rajdhani": {
6786
+ "variants": [
6787
+ "300",
6788
+ "regular",
6789
+ "500",
6790
+ "600",
6791
+ "700"
6792
+ ],
6793
+ "category": "sans-serif"
6794
+ }
6795
+ },
6796
+ {
6797
+ "Rakkas": {
6798
+ "variants": [
6799
+ "regular"
6800
+ ],
6801
+ "category": "display"
6802
+ }
6803
+ },
6804
+ {
6805
+ "Raleway": {
6806
+ "variants": [
6807
+ "100",
6808
+ "100italic",
6809
+ "200",
6810
+ "200italic",
6811
+ "300",
6812
+ "300italic",
6813
+ "regular",
6814
+ "italic",
6815
+ "500",
6816
+ "500italic",
6817
+ "600",
6818
+ "600italic",
6819
+ "700",
6820
+ "700italic",
6821
+ "800",
6822
+ "800italic",
6823
+ "900",
6824
+ "900italic"
6825
+ ],
6826
+ "category": "sans-serif"
6827
+ }
6828
+ },
6829
+ {
6830
+ "Raleway Dots": {
6831
+ "variants": [
6832
+ "regular"
6833
+ ],
6834
+ "category": "display"
6835
+ }
6836
+ },
6837
+ {
6838
+ "Ramabhadra": {
6839
+ "variants": [
6840
+ "regular"
6841
+ ],
6842
+ "category": "sans-serif"
6843
+ }
6844
+ },
6845
+ {
6846
+ "Ramaraja": {
6847
+ "variants": [
6848
+ "regular"
6849
+ ],
6850
+ "category": "serif"
6851
+ }
6852
+ },
6853
+ {
6854
+ "Rambla": {
6855
+ "variants": [
6856
+ "regular",
6857
+ "italic",
6858
+ "700",
6859
+ "700italic"
6860
+ ],
6861
+ "category": "sans-serif"
6862
+ }
6863
+ },
6864
+ {
6865
+ "Rammetto One": {
6866
+ "variants": [
6867
+ "regular"
6868
+ ],
6869
+ "category": "display"
6870
+ }
6871
+ },
6872
+ {
6873
+ "Ranchers": {
6874
+ "variants": [
6875
+ "regular"
6876
+ ],
6877
+ "category": "display"
6878
+ }
6879
+ },
6880
+ {
6881
+ "Rancho": {
6882
+ "variants": [
6883
+ "regular"
6884
+ ],
6885
+ "category": "handwriting"
6886
+ }
6887
+ },
6888
+ {
6889
+ "Ranga": {
6890
+ "variants": [
6891
+ "regular",
6892
+ "700"
6893
+ ],
6894
+ "category": "display"
6895
+ }
6896
+ },
6897
+ {
6898
+ "Rasa": {
6899
+ "variants": [
6900
+ "300",
6901
+ "regular",
6902
+ "500",
6903
+ "600",
6904
+ "700"
6905
+ ],
6906
+ "category": "serif"
6907
+ }
6908
+ },
6909
+ {
6910
+ "Rationale": {
6911
+ "variants": [
6912
+ "regular"
6913
+ ],
6914
+ "category": "sans-serif"
6915
+ }
6916
+ },
6917
+ {
6918
+ "Ravi Prakash": {
6919
+ "variants": [
6920
+ "regular"
6921
+ ],
6922
+ "category": "display"
6923
+ }
6924
+ },
6925
+ {
6926
+ "Redressed": {
6927
+ "variants": [
6928
+ "regular"
6929
+ ],
6930
+ "category": "handwriting"
6931
+ }
6932
+ },
6933
+ {
6934
+ "Reem Kufi": {
6935
+ "variants": [
6936
+ "regular"
6937
+ ],
6938
+ "category": "sans-serif"
6939
+ }
6940
+ },
6941
+ {
6942
+ "Reenie Beanie": {
6943
+ "variants": [
6944
+ "regular"
6945
+ ],
6946
+ "category": "handwriting"
6947
+ }
6948
+ },
6949
+ {
6950
+ "Revalia": {
6951
+ "variants": [
6952
+ "regular"
6953
+ ],
6954
+ "category": "display"
6955
+ }
6956
+ },
6957
+ {
6958
+ "Rhodium Libre": {
6959
+ "variants": [
6960
+ "regular"
6961
+ ],
6962
+ "category": "serif"
6963
+ }
6964
+ },
6965
+ {
6966
+ "Ribeye": {
6967
+ "variants": [
6968
+ "regular"
6969
+ ],
6970
+ "category": "display"
6971
+ }
6972
+ },
6973
+ {
6974
+ "Ribeye Marrow": {
6975
+ "variants": [
6976
+ "regular"
6977
+ ],
6978
+ "category": "display"
6979
+ }
6980
+ },
6981
+ {
6982
+ "Righteous": {
6983
+ "variants": [
6984
+ "regular"
6985
+ ],
6986
+ "category": "display"
6987
+ }
6988
+ },
6989
+ {
6990
+ "Risque": {
6991
+ "variants": [
6992
+ "regular"
6993
+ ],
6994
+ "category": "display"
6995
+ }
6996
+ },
6997
+ {
6998
+ "Roboto": {
6999
+ "variants": [
7000
+ "100",
7001
+ "100italic",
7002
+ "300",
7003
+ "300italic",
7004
+ "regular",
7005
+ "italic",
7006
+ "500",
7007
+ "500italic",
7008
+ "700",
7009
+ "700italic",
7010
+ "900",
7011
+ "900italic"
7012
+ ],
7013
+ "category": "sans-serif"
7014
+ }
7015
+ },
7016
+ {
7017
+ "Roboto Condensed": {
7018
+ "variants": [
7019
+ "300",
7020
+ "300italic",
7021
+ "regular",
7022
+ "italic",
7023
+ "700",
7024
+ "700italic"
7025
+ ],
7026
+ "category": "sans-serif"
7027
+ }
7028
+ },
7029
+ {
7030
+ "Roboto Mono": {
7031
+ "variants": [
7032
+ "100",
7033
+ "100italic",
7034
+ "300",
7035
+ "300italic",
7036
+ "regular",
7037
+ "italic",
7038
+ "500",
7039
+ "500italic",
7040
+ "700",
7041
+ "700italic"
7042
+ ],
7043
+ "category": "monospace"
7044
+ }
7045
+ },
7046
+ {
7047
+ "Roboto Slab": {
7048
+ "variants": [
7049
+ "100",
7050
+ "300",
7051
+ "regular",
7052
+ "700"
7053
+ ],
7054
+ "category": "serif"
7055
+ }
7056
+ },
7057
+ {
7058
+ "Rochester": {
7059
+ "variants": [
7060
+ "regular"
7061
+ ],
7062
+ "category": "handwriting"
7063
+ }
7064
+ },
7065
+ {
7066
+ "Rock Salt": {
7067
+ "variants": [
7068
+ "regular"
7069
+ ],
7070
+ "category": "handwriting"
7071
+ }
7072
+ },
7073
+ {
7074
+ "Rokkitt": {
7075
+ "variants": [
7076
+ "100",
7077
+ "200",
7078
+ "300",
7079
+ "regular",
7080
+ "500",
7081
+ "600",
7082
+ "700",
7083
+ "800",
7084
+ "900"
7085
+ ],
7086
+ "category": "serif"
7087
+ }
7088
+ },
7089
+ {
7090
+ "Romanesco": {
7091
+ "variants": [
7092
+ "regular"
7093
+ ],
7094
+ "category": "handwriting"
7095
+ }
7096
+ },
7097
+ {
7098
+ "Ropa Sans": {
7099
+ "variants": [
7100
+ "regular",
7101
+ "italic"
7102
+ ],
7103
+ "category": "sans-serif"
7104
+ }
7105
+ },
7106
+ {
7107
+ "Rosario": {
7108
+ "variants": [
7109
+ "regular",
7110
+ "italic",
7111
+ "700",
7112
+ "700italic"
7113
+ ],
7114
+ "category": "sans-serif"
7115
+ }
7116
+ },
7117
+ {
7118
+ "Rosarivo": {
7119
+ "variants": [
7120
+ "regular",
7121
+ "italic"
7122
+ ],
7123
+ "category": "serif"
7124
+ }
7125
+ },
7126
+ {
7127
+ "Rouge Script": {
7128
+ "variants": [
7129
+ "regular"
7130
+ ],
7131
+ "category": "handwriting"
7132
+ }
7133
+ },
7134
+ {
7135
+ "Rozha One": {
7136
+ "variants": [
7137
+ "regular"
7138
+ ],
7139
+ "category": "serif"
7140
+ }
7141
+ },
7142
+ {
7143
+ "Rubik": {
7144
+ "variants": [
7145
+ "300",
7146
+ "300italic",
7147
+ "regular",
7148
+ "italic",
7149
+ "500",
7150
+ "500italic",
7151
+ "700",
7152
+ "700italic",
7153
+ "900",
7154
+ "900italic"
7155
+ ],
7156
+ "category": "sans-serif"
7157
+ }
7158
+ },
7159
+ {
7160
+ "Rubik Mono One": {
7161
+ "variants": [
7162
+ "regular"
7163
+ ],
7164
+ "category": "sans-serif"
7165
+ }
7166
+ },
7167
+ {
7168
+ "Ruda": {
7169
+ "variants": [
7170
+ "regular",
7171
+ "700",
7172
+ "900"
7173
+ ],
7174
+ "category": "sans-serif"
7175
+ }
7176
+ },
7177
+ {
7178
+ "Rufina": {
7179
+ "variants": [
7180
+ "regular",
7181
+ "700"
7182
+ ],
7183
+ "category": "serif"
7184
+ }
7185
+ },
7186
+ {
7187
+ "Ruge Boogie": {
7188
+ "variants": [
7189
+ "regular"
7190
+ ],
7191
+ "category": "handwriting"
7192
+ }
7193
+ },
7194
+ {
7195
+ "Ruluko": {
7196
+ "variants": [
7197
+ "regular"
7198
+ ],
7199
+ "category": "sans-serif"
7200
+ }
7201
+ },
7202
+ {
7203
+ "Rum Raisin": {
7204
+ "variants": [
7205
+ "regular"
7206
+ ],
7207
+ "category": "sans-serif"
7208
+ }
7209
+ },
7210
+ {
7211
+ "Ruslan Display": {
7212
+ "variants": [
7213
+ "regular"
7214
+ ],
7215
+ "category": "display"
7216
+ }
7217
+ },
7218
+ {
7219
+ "Russo One": {
7220
+ "variants": [
7221
+ "regular"
7222
+ ],
7223
+ "category": "sans-serif"
7224
+ }
7225
+ },
7226
+ {
7227
+ "Ruthie": {
7228
+ "variants": [
7229
+ "regular"
7230
+ ],
7231
+ "category": "handwriting"
7232
+ }
7233
+ },
7234
+ {
7235
+ "Rye": {
7236
+ "variants": [
7237
+ "regular"
7238
+ ],
7239
+ "category": "display"
7240
+ }
7241
+ },
7242
+ {
7243
+ "Sacramento": {
7244
+ "variants": [
7245
+ "regular"
7246
+ ],
7247
+ "category": "handwriting"
7248
+ }
7249
+ },
7250
+ {
7251
+ "Sahitya": {
7252
+ "variants": [
7253
+ "regular",
7254
+ "700"
7255
+ ],
7256
+ "category": "serif"
7257
+ }
7258
+ },
7259
+ {
7260
+ "Sail": {
7261
+ "variants": [
7262
+ "regular"
7263
+ ],
7264
+ "category": "display"
7265
+ }
7266
+ },
7267
+ {
7268
+ "Saira": {
7269
+ "variants": [
7270
+ "100",
7271
+ "200",
7272
+ "300",
7273
+ "regular",
7274
+ "500",
7275
+ "600",
7276
+ "700",
7277
+ "800",
7278
+ "900"
7279
+ ],
7280
+ "category": "sans-serif"
7281
+ }
7282
+ },
7283
+ {
7284
+ "Saira Condensed": {
7285
+ "variants": [
7286
+ "100",
7287
+ "200",
7288
+ "300",
7289
+ "regular",
7290
+ "500",
7291
+ "600",
7292
+ "700",
7293
+ "800",
7294
+ "900"
7295
+ ],
7296
+ "category": "sans-serif"
7297
+ }
7298
+ },
7299
+ {
7300
+ "Saira Extra Condensed": {
7301
+ "variants": [
7302
+ "100",
7303
+ "200",
7304
+ "300",
7305
+ "regular",
7306
+ "500",
7307
+ "600",
7308
+ "700",
7309
+ "800",
7310
+ "900"
7311
+ ],
7312
+ "category": "sans-serif"
7313
+ }
7314
+ },
7315
+ {
7316
+ "Saira Semi Condensed": {
7317
+ "variants": [
7318
+ "100",
7319
+ "200",
7320
+ "300",
7321
+ "regular",
7322
+ "500",
7323
+ "600",
7324
+ "700",
7325
+ "800",
7326
+ "900"
7327
+ ],
7328
+ "category": "sans-serif"
7329
+ }
7330
+ },
7331
+ {
7332
+ "Salsa": {
7333
+ "variants": [
7334
+ "regular"
7335
+ ],
7336
+ "category": "display"
7337
+ }
7338
+ },
7339
+ {
7340
+ "Sanchez": {
7341
+ "variants": [
7342
+ "regular",
7343
+ "italic"
7344
+ ],
7345
+ "category": "serif"
7346
+ }
7347
+ },
7348
+ {
7349
+ "Sancreek": {
7350
+ "variants": [
7351
+ "regular"
7352
+ ],
7353
+ "category": "display"
7354
+ }
7355
+ },
7356
+ {
7357
+ "Sansita": {
7358
+ "variants": [
7359
+ "regular",
7360
+ "italic",
7361
+ "700",
7362
+ "700italic",
7363
+ "800",
7364
+ "800italic",
7365
+ "900",
7366
+ "900italic"
7367
+ ],
7368
+ "category": "sans-serif"
7369
+ }
7370
+ },
7371
+ {
7372
+ "Sarala": {
7373
+ "variants": [
7374
+ "regular",
7375
+ "700"
7376
+ ],
7377
+ "category": "sans-serif"
7378
+ }
7379
+ },
7380
+ {
7381
+ "Sarina": {
7382
+ "variants": [
7383
+ "regular"
7384
+ ],
7385
+ "category": "display"
7386
+ }
7387
+ },
7388
+ {
7389
+ "Sarpanch": {
7390
+ "variants": [
7391
+ "regular",
7392
+ "500",
7393
+ "600",
7394
+ "700",
7395
+ "800",
7396
+ "900"
7397
+ ],
7398
+ "category": "sans-serif"
7399
+ }
7400
+ },
7401
+ {
7402
+ "Satisfy": {
7403
+ "variants": [
7404
+ "regular"
7405
+ ],
7406
+ "category": "handwriting"
7407
+ }
7408
+ },
7409
+ {
7410
+ "Sawarabi Gothic": {
7411
+ "variants": [
7412
+ "regular"
7413
+ ],
7414
+ "category": "sans-serif"
7415
+ }
7416
+ },
7417
+ {
7418
+ "Sawarabi Mincho": {
7419
+ "variants": [
7420
+ "regular"
7421
+ ],
7422
+ "category": "sans-serif"
7423
+ }
7424
+ },
7425
+ {
7426
+ "Scada": {
7427
+ "variants": [
7428
+ "regular",
7429
+ "italic",
7430
+ "700",
7431
+ "700italic"
7432
+ ],
7433
+ "category": "sans-serif"
7434
+ }
7435
+ },
7436
+ {
7437
+ "Scheherazade": {
7438
+ "variants": [
7439
+ "regular",
7440
+ "700"
7441
+ ],
7442
+ "category": "serif"
7443
+ }
7444
+ },
7445
+ {
7446
+ "Schoolbell": {
7447
+ "variants": [
7448
+ "regular"
7449
+ ],
7450
+ "category": "handwriting"
7451
+ }
7452
+ },
7453
+ {
7454
+ "Scope One": {
7455
+ "variants": [
7456
+ "regular"
7457
+ ],
7458
+ "category": "serif"
7459
+ }
7460
+ },
7461
+ {
7462
+ "Seaweed Script": {
7463
+ "variants": [
7464
+ "regular"
7465
+ ],
7466
+ "category": "display"
7467
+ }
7468
+ },
7469
+ {
7470
+ "Secular One": {
7471
+ "variants": [
7472
+ "regular"
7473
+ ],
7474
+ "category": "sans-serif"
7475
+ }
7476
+ },
7477
+ {
7478
+ "Sedgwick Ave": {
7479
+ "variants": [
7480
+ "regular"
7481
+ ],
7482
+ "category": "handwriting"
7483
+ }
7484
+ },
7485
+ {
7486
+ "Sedgwick Ave Display": {
7487
+ "variants": [
7488
+ "regular"
7489
+ ],
7490
+ "category": "handwriting"
7491
+ }
7492
+ },
7493
+ {
7494
+ "Sevillana": {
7495
+ "variants": [
7496
+ "regular"
7497
+ ],
7498
+ "category": "display"
7499
+ }
7500
+ },
7501
+ {
7502
+ "Seymour One": {
7503
+ "variants": [
7504
+ "regular"
7505
+ ],
7506
+ "category": "sans-serif"
7507
+ }
7508
+ },
7509
+ {
7510
+ "Shadows Into Light": {
7511
+ "variants": [
7512
+ "regular"
7513
+ ],
7514
+ "category": "handwriting"
7515
+ }
7516
+ },
7517
+ {
7518
+ "Shadows Into Light Two": {
7519
+ "variants": [
7520
+ "regular"
7521
+ ],
7522
+ "category": "handwriting"
7523
+ }
7524
+ },
7525
+ {
7526
+ "Shanti": {
7527
+ "variants": [
7528
+ "regular"
7529
+ ],
7530
+ "category": "sans-serif"
7531
+ }
7532
+ },
7533
+ {
7534
+ "Share": {
7535
+ "variants": [
7536
+ "regular",
7537
+ "italic",
7538
+ "700",
7539
+ "700italic"
7540
+ ],
7541
+ "category": "display"
7542
+ }
7543
+ },
7544
+ {
7545
+ "Share Tech": {
7546
+ "variants": [
7547
+ "regular"
7548
+ ],
7549
+ "category": "sans-serif"
7550
+ }
7551
+ },
7552
+ {
7553
+ "Share Tech Mono": {
7554
+ "variants": [
7555
+ "regular"
7556
+ ],
7557
+ "category": "monospace"
7558
+ }
7559
+ },
7560
+ {
7561
+ "Shojumaru": {
7562
+ "variants": [
7563
+ "regular"
7564
+ ],
7565
+ "category": "display"
7566
+ }
7567
+ },
7568
+ {
7569
+ "Short Stack": {
7570
+ "variants": [
7571
+ "regular"
7572
+ ],
7573
+ "category": "handwriting"
7574
+ }
7575
+ },
7576
+ {
7577
+ "Shrikhand": {
7578
+ "variants": [
7579
+ "regular"
7580
+ ],
7581
+ "category": "display"
7582
+ }
7583
+ },
7584
+ {
7585
+ "Siemreap": {
7586
+ "variants": [
7587
+ "regular"
7588
+ ],
7589
+ "category": "display"
7590
+ }
7591
+ },
7592
+ {
7593
+ "Sigmar One": {
7594
+ "variants": [
7595
+ "regular"
7596
+ ],
7597
+ "category": "display"
7598
+ }
7599
+ },
7600
+ {
7601
+ "Signika": {
7602
+ "variants": [
7603
+ "300",
7604
+ "regular",
7605
+ "600",
7606
+ "700"
7607
+ ],
7608
+ "category": "sans-serif"
7609
+ }
7610
+ },
7611
+ {
7612
+ "Signika Negative": {
7613
+ "variants": [
7614
+ "300",
7615
+ "regular",
7616
+ "600",
7617
+ "700"
7618
+ ],
7619
+ "category": "sans-serif"
7620
+ }
7621
+ },
7622
+ {
7623
+ "Simonetta": {
7624
+ "variants": [
7625
+ "regular",
7626
+ "italic",
7627
+ "900",
7628
+ "900italic"
7629
+ ],
7630
+ "category": "display"
7631
+ }
7632
+ },
7633
+ {
7634
+ "Sintony": {
7635
+ "variants": [
7636
+ "regular",
7637
+ "700"
7638
+ ],
7639
+ "category": "sans-serif"
7640
+ }
7641
+ },
7642
+ {
7643
+ "Sirin Stencil": {
7644
+ "variants": [
7645
+ "regular"
7646
+ ],
7647
+ "category": "display"
7648
+ }
7649
+ },
7650
+ {
7651
+ "Six Caps": {
7652
+ "variants": [
7653
+ "regular"
7654
+ ],
7655
+ "category": "sans-serif"
7656
+ }
7657
+ },
7658
+ {
7659
+ "Skranji": {
7660
+ "variants": [
7661
+ "regular",
7662
+ "700"
7663
+ ],
7664
+ "category": "display"
7665
+ }
7666
+ },
7667
+ {
7668
+ "Slabo 13px": {
7669
+ "variants": [
7670
+ "regular"
7671
+ ],
7672
+ "category": "serif"
7673
+ }
7674
+ },
7675
+ {
7676
+ "Slabo 27px": {
7677
+ "variants": [
7678
+ "regular"
7679
+ ],
7680
+ "category": "serif"
7681
+ }
7682
+ },
7683
+ {
7684
+ "Slackey": {
7685
+ "variants": [
7686
+ "regular"
7687
+ ],
7688
+ "category": "display"
7689
+ }
7690
+ },
7691
+ {
7692
+ "Smokum": {
7693
+ "variants": [
7694
+ "regular"
7695
+ ],
7696
+ "category": "display"
7697
+ }
7698
+ },
7699
+ {
7700
+ "Smythe": {
7701
+ "variants": [
7702
+ "regular"
7703
+ ],
7704
+ "category": "display"
7705
+ }
7706
+ },
7707
+ {
7708
+ "Sniglet": {
7709
+ "variants": [
7710
+ "regular",
7711
+ "800"
7712
+ ],
7713
+ "category": "display"
7714
+ }
7715
+ },
7716
+ {
7717
+ "Snippet": {
7718
+ "variants": [
7719
+ "regular"
7720
+ ],
7721
+ "category": "sans-serif"
7722
+ }
7723
+ },
7724
+ {
7725
+ "Snowburst One": {
7726
+ "variants": [
7727
+ "regular"
7728
+ ],
7729
+ "category": "display"
7730
+ }
7731
+ },
7732
+ {
7733
+ "Sofadi One": {
7734
+ "variants": [
7735
+ "regular"
7736
+ ],
7737
+ "category": "display"
7738
+ }
7739
+ },
7740
+ {
7741
+ "Sofia": {
7742
+ "variants": [
7743
+ "regular"
7744
+ ],
7745
+ "category": "handwriting"
7746
+ }
7747
+ },
7748
+ {
7749
+ "Song Myung": {
7750
+ "variants": [
7751
+ "regular"
7752
+ ],
7753
+ "category": "serif"
7754
+ }
7755
+ },
7756
+ {
7757
+ "Sonsie One": {
7758
+ "variants": [
7759
+ "regular"
7760
+ ],
7761
+ "category": "display"
7762
+ }
7763
+ },
7764
+ {
7765
+ "Sorts Mill Goudy": {
7766
+ "variants": [
7767
+ "regular",
7768
+ "italic"
7769
+ ],
7770
+ "category": "serif"
7771
+ }
7772
+ },
7773
+ {
7774
+ "Source Code Pro": {
7775
+ "variants": [
7776
+ "200",
7777
+ "300",
7778
+ "regular",
7779
+ "500",
7780
+ "600",
7781
+ "700",
7782
+ "900"
7783
+ ],
7784
+ "category": "monospace"
7785
+ }
7786
+ },
7787
+ {
7788
+ "Source Sans Pro": {
7789
+ "variants": [
7790
+ "200",
7791
+ "200italic",
7792
+ "300",
7793
+ "300italic",
7794
+ "regular",
7795
+ "italic",
7796
+ "600",
7797
+ "600italic",
7798
+ "700",
7799
+ "700italic",
7800
+ "900",
7801
+ "900italic"
7802
+ ],
7803
+ "category": "sans-serif"
7804
+ }
7805
+ },
7806
+ {
7807
+ "Source Serif Pro": {
7808
+ "variants": [
7809
+ "regular",
7810
+ "600",
7811
+ "700"
7812
+ ],
7813
+ "category": "serif"
7814
+ }
7815
+ },
7816
+ {
7817
+ "Space Mono": {
7818
+ "variants": [
7819
+ "regular",
7820
+ "italic",
7821
+ "700",
7822
+ "700italic"
7823
+ ],
7824
+ "category": "monospace"
7825
+ }
7826
+ },
7827
+ {
7828
+ "Special Elite": {
7829
+ "variants": [
7830
+ "regular"
7831
+ ],
7832
+ "category": "display"
7833
+ }
7834
+ },
7835
+ {
7836
+ "Spectral": {
7837
+ "variants": [
7838
+ "200",
7839
+ "200italic",
7840
+ "300",
7841
+ "300italic",
7842
+ "regular",
7843
+ "italic",
7844
+ "500",
7845
+ "500italic",
7846
+ "600",
7847
+ "600italic",
7848
+ "700",
7849
+ "700italic",
7850
+ "800",
7851
+ "800italic"
7852
+ ],
7853
+ "category": "serif"
7854
+ }
7855
+ },
7856
+ {
7857
+ "Spectral SC": {
7858
+ "variants": [
7859
+ "200",
7860
+ "200italic",
7861
+ "300",
7862
+ "300italic",
7863
+ "regular",
7864
+ "italic",
7865
+ "500",
7866
+ "500italic",
7867
+ "600",
7868
+ "600italic",
7869
+ "700",
7870
+ "700italic",
7871
+ "800",
7872
+ "800italic"
7873
+ ],
7874
+ "category": "serif"
7875
+ }
7876
+ },
7877
+ {
7878
+ "Spicy Rice": {
7879
+ "variants": [
7880
+ "regular"
7881
+ ],
7882
+ "category": "display"
7883
+ }
7884
+ },
7885
+ {
7886
+ "Spinnaker": {
7887
+ "variants": [
7888
+ "regular"
7889
+ ],
7890
+ "category": "sans-serif"
7891
+ }
7892
+ },
7893
+ {
7894
+ "Spirax": {
7895
+ "variants": [
7896
+ "regular"
7897
+ ],
7898
+ "category": "display"
7899
+ }
7900
+ },
7901
+ {
7902
+ "Squada One": {
7903
+ "variants": [
7904
+ "regular"
7905
+ ],
7906
+ "category": "display"
7907
+ }
7908
+ },
7909
+ {
7910
+ "Sree Krushnadevaraya": {
7911
+ "variants": [
7912
+ "regular"
7913
+ ],
7914
+ "category": "serif"
7915
+ }
7916
+ },
7917
+ {
7918
+ "Sriracha": {
7919
+ "variants": [
7920
+ "regular"
7921
+ ],
7922
+ "category": "handwriting"
7923
+ }
7924
+ },
7925
+ {
7926
+ "Srisakdi": {
7927
+ "variants": [
7928
+ "regular",
7929
+ "700"
7930
+ ],
7931
+ "category": "display"
7932
+ }
7933
+ },
7934
+ {
7935
+ "Stalemate": {
7936
+ "variants": [
7937
+ "regular"
7938
+ ],
7939
+ "category": "handwriting"
7940
+ }
7941
+ },
7942
+ {
7943
+ "Stalinist One": {
7944
+ "variants": [
7945
+ "regular"
7946
+ ],
7947
+ "category": "display"
7948
+ }
7949
+ },
7950
+ {
7951
+ "Stardos Stencil": {
7952
+ "variants": [
7953
+ "regular",
7954
+ "700"
7955
+ ],
7956
+ "category": "display"
7957
+ }
7958
+ },
7959
+ {
7960
+ "Stint Ultra Condensed": {
7961
+ "variants": [
7962
+ "regular"
7963
+ ],
7964
+ "category": "display"
7965
+ }
7966
+ },
7967
+ {
7968
+ "Stint Ultra Expanded": {
7969
+ "variants": [
7970
+ "regular"
7971
+ ],
7972
+ "category": "display"
7973
+ }
7974
+ },
7975
+ {
7976
+ "Stoke": {
7977
+ "variants": [
7978
+ "300",
7979
+ "regular"
7980
+ ],
7981
+ "category": "serif"
7982
+ }
7983
+ },
7984
+ {
7985
+ "Strait": {
7986
+ "variants": [
7987
+ "regular"
7988
+ ],
7989
+ "category": "sans-serif"
7990
+ }
7991
+ },
7992
+ {
7993
+ "Stylish": {
7994
+ "variants": [
7995
+ "regular"
7996
+ ],
7997
+ "category": "sans-serif"
7998
+ }
7999
+ },
8000
+ {
8001
+ "Sue Ellen Francisco": {
8002
+ "variants": [
8003
+ "regular"
8004
+ ],
8005
+ "category": "handwriting"
8006
+ }
8007
+ },
8008
+ {
8009
+ "Suez One": {
8010
+ "variants": [
8011
+ "regular"
8012
+ ],
8013
+ "category": "serif"
8014
+ }
8015
+ },
8016
+ {
8017
+ "Sumana": {
8018
+ "variants": [
8019
+ "regular",
8020
+ "700"
8021
+ ],
8022
+ "category": "serif"
8023
+ }
8024
+ },
8025
+ {
8026
+ "Sunflower": {
8027
+ "variants": [
8028
+ "300",
8029
+ "500",
8030
+ "700"
8031
+ ],
8032
+ "category": "sans-serif"
8033
+ }
8034
+ },
8035
+ {
8036
+ "Sunshiney": {
8037
+ "variants": [
8038
+ "regular"
8039
+ ],
8040
+ "category": "handwriting"
8041
+ }
8042
+ },
8043
+ {
8044
+ "Supermercado One": {
8045
+ "variants": [
8046
+ "regular"
8047
+ ],
8048
+ "category": "display"
8049
+ }
8050
+ },
8051
+ {
8052
+ "Sura": {
8053
+ "variants": [
8054
+ "regular",
8055
+ "700"
8056
+ ],
8057
+ "category": "serif"
8058
+ }
8059
+ },
8060
+ {
8061
+ "Suranna": {
8062
+ "variants": [
8063
+ "regular"
8064
+ ],
8065
+ "category": "serif"
8066
+ }
8067
+ },
8068
+ {
8069
+ "Suravaram": {
8070
+ "variants": [
8071
+ "regular"
8072
+ ],
8073
+ "category": "serif"
8074
+ }
8075
+ },
8076
+ {
8077
+ "Suwannaphum": {
8078
+ "variants": [
8079
+ "regular"
8080
+ ],
8081
+ "category": "display"
8082
+ }
8083
+ },
8084
+ {
8085
+ "Swanky and Moo Moo": {
8086
+ "variants": [
8087
+ "regular"
8088
+ ],
8089
+ "category": "handwriting"
8090
+ }
8091
+ },
8092
+ {
8093
+ "Syncopate": {
8094
+ "variants": [
8095
+ "regular",
8096
+ "700"
8097
+ ],
8098
+ "category": "sans-serif"
8099
+ }
8100
+ },
8101
+ {
8102
+ "Tajawal": {
8103
+ "variants": [
8104
+ "200",
8105
+ "300",
8106
+ "regular",
8107
+ "500",
8108
+ "700",
8109
+ "800",
8110
+ "900"
8111
+ ],
8112
+ "category": "sans-serif"
8113
+ }
8114
+ },
8115
+ {
8116
+ "Tangerine": {
8117
+ "variants": [
8118
+ "regular",
8119
+ "700"
8120
+ ],
8121
+ "category": "handwriting"
8122
+ }
8123
+ },
8124
+ {
8125
+ "Taprom": {
8126
+ "variants": [
8127
+ "regular"
8128
+ ],
8129
+ "category": "display"
8130
+ }
8131
+ },
8132
+ {
8133
+ "Tauri": {
8134
+ "variants": [
8135
+ "regular"
8136
+ ],
8137
+ "category": "sans-serif"
8138
+ }
8139
+ },
8140
+ {
8141
+ "Taviraj": {
8142
+ "variants": [
8143
+ "100",
8144
+ "100italic",
8145
+ "200",
8146
+ "200italic",
8147
+ "300",
8148
+ "300italic",
8149
+ "regular",
8150
+ "italic",
8151
+ "500",
8152
+ "500italic",
8153
+ "600",
8154
+ "600italic",
8155
+ "700",
8156
+ "700italic",
8157
+ "800",
8158
+ "800italic",
8159
+ "900",
8160
+ "900italic"
8161
+ ],
8162
+ "category": "serif"
8163
+ }
8164
+ },
8165
+ {
8166
+ "Teko": {
8167
+ "variants": [
8168
+ "300",
8169
+ "regular",
8170
+ "500",
8171
+ "600",
8172
+ "700"
8173
+ ],
8174
+ "category": "sans-serif"
8175
+ }
8176
+ },
8177
+ {
8178
+ "Telex": {
8179
+ "variants": [
8180
+ "regular"
8181
+ ],
8182
+ "category": "sans-serif"
8183
+ }
8184
+ },
8185
+ {
8186
+ "Tenali Ramakrishna": {
8187
+ "variants": [
8188
+ "regular"
8189
+ ],
8190
+ "category": "sans-serif"
8191
+ }
8192
+ },
8193
+ {
8194
+ "Tenor Sans": {
8195
+ "variants": [
8196
+ "regular"
8197
+ ],
8198
+ "category": "sans-serif"
8199
+ }
8200
+ },
8201
+ {
8202
+ "Text Me One": {
8203
+ "variants": [
8204
+ "regular"
8205
+ ],
8206
+ "category": "sans-serif"
8207
+ }
8208
+ },
8209
+ {
8210
+ "The Girl Next Door": {
8211
+ "variants": [
8212
+ "regular"
8213
+ ],
8214
+ "category": "handwriting"
8215
+ }
8216
+ },
8217
+ {
8218
+ "Tienne": {
8219
+ "variants": [
8220
+ "regular",
8221
+ "700",
8222
+ "900"
8223
+ ],
8224
+ "category": "serif"
8225
+ }
8226
+ },
8227
+ {
8228
+ "Tillana": {
8229
+ "variants": [
8230
+ "regular",
8231
+ "500",
8232
+ "600",
8233
+ "700",
8234
+ "800"
8235
+ ],
8236
+ "category": "handwriting"
8237
+ }
8238
+ },
8239
+ {
8240
+ "Timmana": {
8241
+ "variants": [
8242
+ "regular"
8243
+ ],
8244
+ "category": "sans-serif"
8245
+ }
8246
+ },
8247
+ {
8248
+ "Tinos": {
8249
+ "variants": [
8250
+ "regular",
8251
+ "italic",
8252
+ "700",
8253
+ "700italic"
8254
+ ],
8255
+ "category": "serif"
8256
+ }
8257
+ },
8258
+ {
8259
+ "Titan One": {
8260
+ "variants": [
8261
+ "regular"
8262
+ ],
8263
+ "category": "display"
8264
+ }
8265
+ },
8266
+ {
8267
+ "Titillium Web": {
8268
+ "variants": [
8269
+ "200",
8270
+ "200italic",
8271
+ "300",
8272
+ "300italic",
8273
+ "regular",
8274
+ "italic",
8275
+ "600",
8276
+ "600italic",
8277
+ "700",
8278
+ "700italic",
8279
+ "900"
8280
+ ],
8281
+ "category": "sans-serif"
8282
+ }
8283
+ },
8284
+ {
8285
+ "Trade Winds": {
8286
+ "variants": [
8287
+ "regular"
8288
+ ],
8289
+ "category": "display"
8290
+ }
8291
+ },
8292
+ {
8293
+ "Trirong": {
8294
+ "variants": [
8295
+ "100",
8296
+ "100italic",
8297
+ "200",
8298
+ "200italic",
8299
+ "300",
8300
+ "300italic",
8301
+ "regular",
8302
+ "italic",
8303
+ "500",
8304
+ "500italic",
8305
+ "600",
8306
+ "600italic",
8307
+ "700",
8308
+ "700italic",
8309
+ "800",
8310
+ "800italic",
8311
+ "900",
8312
+ "900italic"
8313
+ ],
8314
+ "category": "serif"
8315
+ }
8316
+ },
8317
+ {
8318
+ "Trocchi": {
8319
+ "variants": [
8320
+ "regular"
8321
+ ],
8322
+ "category": "serif"
8323
+ }
8324
+ },
8325
+ {
8326
+ "Trochut": {
8327
+ "variants": [
8328
+ "regular",
8329
+ "italic",
8330
+ "700"
8331
+ ],
8332
+ "category": "display"
8333
+ }
8334
+ },
8335
+ {
8336
+ "Trykker": {
8337
+ "variants": [
8338
+ "regular"
8339
+ ],
8340
+ "category": "serif"
8341
+ }
8342
+ },
8343
+ {
8344
+ "Tulpen One": {
8345
+ "variants": [
8346
+ "regular"
8347
+ ],
8348
+ "category": "display"
8349
+ }
8350
+ },
8351
+ {
8352
+ "Ubuntu": {
8353
+ "variants": [
8354
+ "300",
8355
+ "300italic",
8356
+ "regular",
8357
+ "italic",
8358
+ "500",
8359
+ "500italic",
8360
+ "700",
8361
+ "700italic"
8362
+ ],
8363
+ "category": "sans-serif"
8364
+ }
8365
+ },
8366
+ {
8367
+ "Ubuntu Condensed": {
8368
+ "variants": [
8369
+ "regular"
8370
+ ],
8371
+ "category": "sans-serif"
8372
+ }
8373
+ },
8374
+ {
8375
+ "Ubuntu Mono": {
8376
+ "variants": [
8377
+ "regular",
8378
+ "italic",
8379
+ "700",
8380
+ "700italic"
8381
+ ],
8382
+ "category": "monospace"
8383
+ }
8384
+ },
8385
+ {
8386
+ "Ultra": {
8387
+ "variants": [
8388
+ "regular"
8389
+ ],
8390
+ "category": "serif"
8391
+ }
8392
+ },
8393
+ {
8394
+ "Uncial Antiqua": {
8395
+ "variants": [
8396
+ "regular"
8397
+ ],
8398
+ "category": "display"
8399
+ }
8400
+ },
8401
+ {
8402
+ "Underdog": {
8403
+ "variants": [
8404
+ "regular"
8405
+ ],
8406
+ "category": "display"
8407
+ }
8408
+ },
8409
+ {
8410
+ "Unica One": {
8411
+ "variants": [
8412
+ "regular"
8413
+ ],
8414
+ "category": "display"
8415
+ }
8416
+ },
8417
+ {
8418
+ "UnifrakturCook": {
8419
+ "variants": [
8420
+ "700"
8421
+ ],
8422
+ "category": "display"
8423
+ }
8424
+ },
8425
+ {
8426
+ "UnifrakturMaguntia": {
8427
+ "variants": [
8428
+ "regular"
8429
+ ],
8430
+ "category": "display"
8431
+ }
8432
+ },
8433
+ {
8434
+ "Unkempt": {
8435
+ "variants": [
8436
+ "regular",
8437
+ "700"
8438
+ ],
8439
+ "category": "display"
8440
+ }
8441
+ },
8442
+ {
8443
+ "Unlock": {
8444
+ "variants": [
8445
+ "regular"
8446
+ ],
8447
+ "category": "display"
8448
+ }
8449
+ },
8450
+ {
8451
+ "Unna": {
8452
+ "variants": [
8453
+ "regular",
8454
+ "italic",
8455
+ "700",
8456
+ "700italic"
8457
+ ],
8458
+ "category": "serif"
8459
+ }
8460
+ },
8461
+ {
8462
+ "VT323": {
8463
+ "variants": [
8464
+ "regular"
8465
+ ],
8466
+ "category": "monospace"
8467
+ }
8468
+ },
8469
+ {
8470
+ "Vampiro One": {
8471
+ "variants": [
8472
+ "regular"
8473
+ ],
8474
+ "category": "display"
8475
+ }
8476
+ },
8477
+ {
8478
+ "Varela": {
8479
+ "variants": [
8480
+ "regular"
8481
+ ],
8482
+ "category": "sans-serif"
8483
+ }
8484
+ },
8485
+ {
8486
+ "Varela Round": {
8487
+ "variants": [
8488
+ "regular"
8489
+ ],
8490
+ "category": "sans-serif"
8491
+ }
8492
+ },
8493
+ {
8494
+ "Vast Shadow": {
8495
+ "variants": [
8496
+ "regular"
8497
+ ],
8498
+ "category": "display"
8499
+ }
8500
+ },
8501
+ {
8502
+ "Vesper Libre": {
8503
+ "variants": [
8504
+ "regular",
8505
+ "500",
8506
+ "700",
8507
+ "900"
8508
+ ],
8509
+ "category": "serif"
8510
+ }
8511
+ },
8512
+ {
8513
+ "Vibur": {
8514
+ "variants": [
8515
+ "regular"
8516
+ ],
8517
+ "category": "handwriting"
8518
+ }
8519
+ },
8520
+ {
8521
+ "Vidaloka": {
8522
+ "variants": [
8523
+ "regular"
8524
+ ],
8525
+ "category": "serif"
8526
+ }
8527
+ },
8528
+ {
8529
+ "Viga": {
8530
+ "variants": [
8531
+ "regular"
8532
+ ],
8533
+ "category": "sans-serif"
8534
+ }
8535
+ },
8536
+ {
8537
+ "Voces": {
8538
+ "variants": [
8539
+ "regular"
8540
+ ],
8541
+ "category": "display"
8542
+ }
8543
+ },
8544
+ {
8545
+ "Volkhov": {
8546
+ "variants": [
8547
+ "regular",
8548
+ "italic",
8549
+ "700",
8550
+ "700italic"
8551
+ ],
8552
+ "category": "serif"
8553
+ }
8554
+ },
8555
+ {
8556
+ "Vollkorn": {
8557
+ "variants": [
8558
+ "regular",
8559
+ "italic",
8560
+ "600",
8561
+ "600italic",
8562
+ "700",
8563
+ "700italic",
8564
+ "900",
8565
+ "900italic"
8566
+ ],
8567
+ "category": "serif"
8568
+ }
8569
+ },
8570
+ {
8571
+ "Vollkorn SC": {
8572
+ "variants": [
8573
+ "regular",
8574
+ "600",
8575
+ "700",
8576
+ "900"
8577
+ ],
8578
+ "category": "serif"
8579
+ }
8580
+ },
8581
+ {
8582
+ "Voltaire": {
8583
+ "variants": [
8584
+ "regular"
8585
+ ],
8586
+ "category": "sans-serif"
8587
+ }
8588
+ },
8589
+ {
8590
+ "Waiting for the Sunrise": {
8591
+ "variants": [
8592
+ "regular"
8593
+ ],
8594
+ "category": "handwriting"
8595
+ }
8596
+ },
8597
+ {
8598
+ "Wallpoet": {
8599
+ "variants": [
8600
+ "regular"
8601
+ ],
8602
+ "category": "display"
8603
+ }
8604
+ },
8605
+ {
8606
+ "Walter Turncoat": {
8607
+ "variants": [
8608
+ "regular"
8609
+ ],
8610
+ "category": "handwriting"
8611
+ }
8612
+ },
8613
+ {
8614
+ "Warnes": {
8615
+ "variants": [
8616
+ "regular"
8617
+ ],
8618
+ "category": "display"
8619
+ }
8620
+ },
8621
+ {
8622
+ "Wellfleet": {
8623
+ "variants": [
8624
+ "regular"
8625
+ ],
8626
+ "category": "display"
8627
+ }
8628
+ },
8629
+ {
8630
+ "Wendy One": {
8631
+ "variants": [
8632
+ "regular"
8633
+ ],
8634
+ "category": "sans-serif"
8635
+ }
8636
+ },
8637
+ {
8638
+ "Wire One": {
8639
+ "variants": [
8640
+ "regular"
8641
+ ],
8642
+ "category": "sans-serif"
8643
+ }
8644
+ },
8645
+ {
8646
+ "Work Sans": {
8647
+ "variants": [
8648
+ "100",
8649
+ "200",
8650
+ "300",
8651
+ "regular",
8652
+ "500",
8653
+ "600",
8654
+ "700",
8655
+ "800",
8656
+ "900"
8657
+ ],
8658
+ "category": "sans-serif"
8659
+ }
8660
+ },
8661
+ {
8662
+ "Yanone Kaffeesatz": {
8663
+ "variants": [
8664
+ "200",
8665
+ "300",
8666
+ "regular",
8667
+ "700"
8668
+ ],
8669
+ "category": "sans-serif"
8670
+ }
8671
+ },
8672
+ {
8673
+ "Yantramanav": {
8674
+ "variants": [
8675
+ "100",
8676
+ "300",
8677
+ "regular",
8678
+ "500",
8679
+ "700",
8680
+ "900"
8681
+ ],
8682
+ "category": "sans-serif"
8683
+ }
8684
+ },
8685
+ {
8686
+ "Yatra One": {
8687
+ "variants": [
8688
+ "regular"
8689
+ ],
8690
+ "category": "display"
8691
+ }
8692
+ },
8693
+ {
8694
+ "Yellowtail": {
8695
+ "variants": [
8696
+ "regular"
8697
+ ],
8698
+ "category": "handwriting"
8699
+ }
8700
+ },
8701
+ {
8702
+ "Yeon Sung": {
8703
+ "variants": [
8704
+ "regular"
8705
+ ],
8706
+ "category": "display"
8707
+ }
8708
+ },
8709
+ {
8710
+ "Yeseva One": {
8711
+ "variants": [
8712
+ "regular"
8713
+ ],
8714
+ "category": "display"
8715
+ }
8716
+ },
8717
+ {
8718
+ "Yesteryear": {
8719
+ "variants": [
8720
+ "regular"
8721
+ ],
8722
+ "category": "handwriting"
8723
+ }
8724
+ },
8725
+ {
8726
+ "Yrsa": {
8727
+ "variants": [
8728
+ "300",
8729
+ "regular",
8730
+ "500",
8731
+ "600",
8732
+ "700"
8733
+ ],
8734
+ "category": "serif"
8735
+ }
8736
+ },
8737
+ {
8738
+ "Zeyada": {
8739
+ "variants": [
8740
+ "regular"
8741
+ ],
8742
+ "category": "handwriting"
8743
+ }
8744
+ },
8745
+ {
8746
+ "Zilla Slab": {
8747
+ "variants": [
8748
+ "300",
8749
+ "300italic",
8750
+ "regular",
8751
+ "italic",
8752
+ "500",
8753
+ "500italic",
8754
+ "600",
8755
+ "600italic",
8756
+ "700",
8757
+ "700italic"
8758
+ ],
8759
+ "category": "serif"
8760
+ }
8761
+ },
8762
+ {
8763
+ "Zilla Slab Highlight": {
8764
+ "variants": [
8765
+ "regular",
8766
+ "700"
8767
+ ],
8768
+ "category": "display"
8769
+ }
8770
+ }
8771
+ ]
classes/index.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Index file
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ /* Silence is golden, and we agree. */
includes/admin/cartflows-admin.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CARTFLOWS Admin HTML.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ ?>
9
+ <div class="wcf-menu-page-wrapper">
10
+ <div id="wcf-menu-page">
11
+ <div class="wcf-menu-page-header <?php echo esc_attr( implode( ' ', $header_wrapper_class ) ); ?>">
12
+ <div class="wcf-container wcf-flex">
13
+ <div class="wcf-title">
14
+ <span class="screen-reader-text"><?php echo CARTFLOWS_PLUGIN_NAME; ?></span>
15
+ <img class="wcf-logo" src="<?php echo CARTFLOWS_URL . 'assets/images/cartflows-logo.svg'; ?>" />
16
+ </div>
17
+ <div class="wcf-top-links">
18
+ <?php
19
+ esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
20
+ ?>
21
+ </div>
22
+ </div>
23
+ </div>
24
+
25
+ <?php
26
+ // Settings update message.
27
+ if ( isset( $_REQUEST['message'] ) && ( 'saved' == $_REQUEST['message'] || 'saved_ext' == $_REQUEST['message'] ) ) {
28
+ ?>
29
+ <div id="message" class="notice notice-success is-dismissive wcf-notice"><p> <?php esc_html_e( 'Settings saved successfully.', 'cartflows' ); ?> </p></div>
30
+ <?php
31
+ }
32
+ ?>
33
+ <?php do_action( 'cartflows_render_admin_content' ); ?>
34
+ </div>
35
+ </div>
includes/admin/cartflows-general-bck.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * General Setting Form
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ $extensions = array(
9
+ 'common' => array(
10
+ 'title' => __( 'Selec', 'cartflows' ),
11
+ 'setting_url' => admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS . '&action=common-settings' ),
12
+ ),
13
+ );
14
+
15
+ ?>
16
+
17
+ <div class="wcf-container wcf-<?php echo $action; ?>">
18
+ <div id="poststuff">
19
+ <div id="post-body" class="columns-2">
20
+ <div id="post-body-content">
21
+ <!-- All WordPress Notices below header -->
22
+ <h1 class="screen-reader-text"> <?php _e( 'General', 'cartflows' ); ?> </h1>
23
+ <div class="widgets postbox">
24
+ <h2 class="hndle wcf-flex wcf-widgets-heading"><span><?php esc_html_e( 'Welcome', 'cartflows' ); ?></span>
25
+ </h2>
26
+ <div class="inside">
27
+ <ul class="wcf-setting-tab-wrapper" >
28
+ <?php
29
+
30
+ foreach ( $extensions as $key => $data ) {
31
+ echo '<li id="' . esc_attr( $key ) . '" class="wcf-setting-tab ' . esc_attr( $key ) . '">';
32
+ echo '<a class="wcf-tab-title" href="#" target="_blank" rel="noopener">' . esc_attr( $data['title'] ) . '</a>';
33
+ echo '<div class="wcf-tab-link-wrapper">';
34
+ echo '<a class="wcf-tab-link" href="' . esc_url( $data['setting_url'] ) . '">' . __( 'Settings', 'cartflows' ) . '</a>';
35
+ echo '</div>';
36
+ echo '</li>';
37
+ }
38
+ ?>
39
+ </ul>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <!-- /post-body -->
45
+ <br class="clear">
46
+ </div>
47
+ </div>
includes/admin/cartflows-general.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * General settings
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $settings = Cartflows_Helper::get_common_settings();
9
+
10
+ ?>
11
+
12
+ <form method="post" class="wrap wcf-clear" action="" >
13
+ <div class="wrap wcf-addon-wrap wcf-clear wcf-container">
14
+ <input type="hidden" name="action" value="wcf_save_common_settings">
15
+ <h1 class="screen-reader-text"><?php _e( 'General Settings', 'cartflows' ); ?></h1>
16
+
17
+ <div id="poststuff">
18
+ <div id="post-body" class="columns-2">
19
+ <div id="post-body-content">
20
+ <div class="postbox introduction">
21
+ <h2 class="hndle wcf-normal-cusror ui-sortable-handle">
22
+ <span><?php _e( 'Getting Started', 'cartflows' ); ?></span>
23
+ </h2>
24
+ <div class="inside">
25
+ <div class="iframe-wrap">
26
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/SlE0moPKjMY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
27
+ </div>
28
+ <p>
29
+ <?php
30
+ esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
31
+ ?>
32
+ </p>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="general-settings-form postbox">
37
+ <h2 class="hndle wcf-normal-cusror ui-sortable-handle">
38
+ <span><?php _e( 'General Settings', 'cartflows' ); ?></span>
39
+ </h2>
40
+ <div class="inside">
41
+ <div class="form-wrap">
42
+ <?php
43
+
44
+ do_action( 'cartflows_before_settings_fields', $settings );
45
+
46
+ echo Cartflows_Admin_Fields::checkobox_field(
47
+ array(
48
+ 'id' => 'wcf_disallow_indexing',
49
+ 'name' => '_cartflows_common[disallow_indexing]',
50
+ 'title' => __( 'Disallow search engines from indexing flows', 'cartflows' ),
51
+ 'value' => $settings['disallow_indexing'],
52
+ )
53
+ );
54
+ echo Cartflows_Admin_Fields::flow_checkout_selection_field(
55
+ array(
56
+ 'id' => 'wcf_global_checkout',
57
+ 'name' => '_cartflows_common[global_checkout]',
58
+ 'title' => __( 'Global Checkout', 'cartflows' ),
59
+ 'value' => $settings['global_checkout'],
60
+ )
61
+ );
62
+
63
+ do_action( 'cartflows_after_settings_fields', $settings );
64
+
65
+ ?>
66
+ </div>
67
+ <?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
68
+ <?php wp_nonce_field( 'cartflows-common-settings', 'cartflows-common-settings-nonce' ); ?>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="postbox-container" id="postbox-container-1">
73
+ <div id="side-sortables">
74
+
75
+ <div class="postbox">
76
+ <h2 class="hndle">
77
+ <span class="dashicons dashicons-book"></span>
78
+ <span><?php esc_html_e( 'Knowledge Base', 'cartflows' ); ?></span>
79
+ </h2>
80
+ <div class="inside">
81
+ <p>
82
+ <?php esc_html_e( 'Not sure how something works? Take a peek at the knowledge base and learn.', 'cartflows' ); ?>
83
+ </p>
84
+ <p>
85
+ <a href="<?php echo esc_url( 'https://cartflows.com/docs' ); ?>" target="_blank" rel="noopener"><?php _e( 'Visit Knowledge Base »', 'cartflows' ); ?></a>
86
+ </p>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="postbox">
91
+ <h2 class="hndle">
92
+ <span class="dashicons dashicons-groups"></span>
93
+ <span><?php esc_html_e( 'Community', 'cartflows' ); ?></span>
94
+ </h2>
95
+ <div class="inside">
96
+ <p>
97
+ <?php esc_html_e( 'Join the community of super helpful CartFlows users. Say hello, ask questions, give feedback and help each other!', 'cartflows' ); ?>
98
+ </p>
99
+ <p>
100
+ <a href="<?php echo esc_url( 'https://www.facebook.com/groups/cartflows/' ); ?>" target="_blank" rel="noopener"><?php _e( 'Join Our Facebook Group »', 'cartflows' ); ?></a>
101
+ </p>
102
+ </div>
103
+ </div>
104
+
105
+ <div class="postbox">
106
+ <h2 class="hndle">
107
+ <span class="dashicons dashicons-sos"></span>
108
+ <span><?php esc_html_e( 'Five Star Support', 'cartflows' ); ?></span>
109
+ </h2>
110
+ <div class="inside">
111
+ <p>
112
+ <?php esc_html_e( 'Got a question? Get in touch with CartFlows developers. We\'re happy to help!', 'cartflows' ); ?>
113
+ </p>
114
+ <p>
115
+ <a href="<?php echo esc_url( 'https://cartflows.com/contact' ); ?>" target="_blank" rel="noopener"><?php _e( 'Submit a Ticket »', 'cartflows' ); ?></a>
116
+ </p>
117
+ </div>
118
+ </div>
119
+
120
+ </div>
121
+ </div>
122
+ </div>
123
+ <!-- /post-body -->
124
+ <br class="clear">
125
+ </div>
126
+ </div>
127
+ </form>
languages/cartflows.pot ADDED
@@ -0,0 +1,1048 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2018 CartFlows Inc
2
+ # This file is distributed under the same license as the CartFlows package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: CartFlows 1.0.3\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
7
+ "POT-Creation-Date: 2018-11-23 07:25:22+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "Language: en\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Poedit-Country: United States\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: "
19
+ "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
20
+ "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
21
+ "X-Poedit-Basepath: ../\n"
22
+ "X-Poedit-SearchPath-0: .\n"
23
+ "X-Poedit-Bookmarks: \n"
24
+ "X-Textdomain-Support: yes\n"
25
+ "X-Generator: grunt-wp-i18n1.0.2\n"
26
+
27
+ #: classes/batch-process/class-cartflows-importer-elementor.php:44
28
+ msgid "Invalid content."
29
+ msgstr ""
30
+
31
+ #: classes/batch-process/class-cartflows-importer-elementor.php:52
32
+ msgid "Invalid content. Expected an array."
33
+ msgstr ""
34
+
35
+ #: classes/batch-process/helpers/class-wp-background-process.php:435
36
+ msgid "Every %d Minutes"
37
+ msgstr ""
38
+
39
+ #: classes/class-cartflows-admin-fields.php:121
40
+ msgid "Select"
41
+ msgstr ""
42
+
43
+ #: classes/class-cartflows-admin-fields.php:124
44
+ msgid "No Checkout Steps"
45
+ msgstr ""
46
+
47
+ #: classes/class-cartflows-admin-fields.php:149
48
+ msgid ""
49
+ "Be sure not to add any products in the Global checkout page you select "
50
+ "above."
51
+ msgstr ""
52
+
53
+ #: classes/class-cartflows-admin.php:106 classes/class-cartflows-admin.php:107
54
+ #: includes/admin/cartflows-general-bck.php:34
55
+ msgid "Settings"
56
+ msgstr ""
57
+
58
+ #: classes/class-cartflows-admin.php:301
59
+ msgid "Flows Library"
60
+ msgstr ""
61
+
62
+ #: classes/class-cartflows-admin.php:306 classes/class-cartflows-wizard.php:273
63
+ #: modules/flow/view/meta-flow-steps.php:120
64
+ msgid "Elementor"
65
+ msgstr ""
66
+
67
+ #: classes/class-cartflows-admin.php:307
68
+ #: modules/flow/view/meta-flow-steps.php:121
69
+ msgid "Divi"
70
+ msgstr ""
71
+
72
+ #: classes/class-cartflows-admin.php:308
73
+ #: modules/flow/view/meta-flow-steps.php:122
74
+ msgid "Beaver Builder"
75
+ msgstr ""
76
+
77
+ #: classes/class-cartflows-admin.php:320
78
+ #: modules/flow/view/meta-flow-steps.php:132
79
+ msgid "Search Sites"
80
+ msgstr ""
81
+
82
+ #: classes/class-cartflows-admin.php:321
83
+ #: modules/flow/view/meta-flow-steps.php:133
84
+ msgid "Search Flow..."
85
+ msgstr ""
86
+
87
+ #: classes/class-cartflows-api.php:363
88
+ msgid "Request successfully processed!"
89
+ msgstr ""
90
+
91
+ #: classes/class-cartflows-cloning.php:407
92
+ msgid "Clone this flow"
93
+ msgstr ""
94
+
95
+ #: classes/class-cartflows-cloning.php:407
96
+ msgid "Clone"
97
+ msgstr ""
98
+
99
+ #: classes/class-cartflows-flow-frontend.php:52
100
+ msgid ""
101
+ "NOTE: Test mode is active — which may display any random products for the "
102
+ "sake of preview."
103
+ msgstr ""
104
+
105
+ #: classes/class-cartflows-importer.php:89
106
+ msgid "Loading Steps"
107
+ msgstr ""
108
+
109
+ #: classes/class-cartflows-importer.php:91
110
+ msgid "Getting steps from the cloud. Please wait for the moment."
111
+ msgstr ""
112
+
113
+ #: classes/class-cartflows-importer.php:102
114
+ msgid "Searching Template.."
115
+ msgstr ""
116
+
117
+ #: classes/class-cartflows-importer.php:104
118
+ msgid "Getting templates from the cloud. Please wait for the moment."
119
+ msgstr ""
120
+
121
+ #: classes/class-cartflows-importer.php:113
122
+ msgid "Importing.."
123
+ msgstr ""
124
+
125
+ #: classes/class-cartflows-importer.php:122
126
+ #: classes/class-cartflows-importer.php:162
127
+ msgid "Imported"
128
+ msgstr ""
129
+
130
+ #: classes/class-cartflows-importer.php:123
131
+ #: classes/class-cartflows-importer.php:163
132
+ msgid "Thanks for patience"
133
+ msgstr ""
134
+
135
+ #: classes/class-cartflows-importer.php:132
136
+ msgid "Steps not found!"
137
+ msgstr ""
138
+
139
+ #: classes/class-cartflows-importer.php:133
140
+ msgid "We'll provide the ready made steps to import."
141
+ msgstr ""
142
+
143
+ #: classes/class-cartflows-importer.php:144
144
+ msgid "Flows not found!"
145
+ msgstr ""
146
+
147
+ #: classes/class-cartflows-importer.php:145
148
+ msgid "We'll provide the ready made flows to import."
149
+ msgstr ""
150
+
151
+ #: classes/class-cartflows-importer.php:163
152
+ msgid "Redirecting to the Elementor edit window."
153
+ msgstr ""
154
+
155
+ #: classes/class-cartflows-importer.php:185
156
+ msgid "Import"
157
+ msgstr ""
158
+
159
+ #: classes/class-cartflows-importer.php:195
160
+ msgid "Activate Elementor & Import"
161
+ msgstr ""
162
+
163
+ #: classes/class-cartflows-importer.php:197
164
+ msgid "Install Elementor & Import"
165
+ msgstr ""
166
+
167
+ #: classes/class-cartflows-importer.php:241
168
+ #: classes/class-cartflows-importer.php:309
169
+ msgid "Pro"
170
+ msgstr ""
171
+
172
+ #: classes/class-cartflows-importer.php:251
173
+ #: classes/class-cartflows-importer.php:318
174
+ msgid "Activate License"
175
+ msgstr ""
176
+
177
+ #: classes/class-cartflows-importer.php:253
178
+ #: classes/class-cartflows-importer.php:279
179
+ #: classes/class-cartflows-importer.php:320
180
+ msgid "Get Pro"
181
+ msgstr ""
182
+
183
+ #: classes/class-cartflows-importer.php:281
184
+ msgid "Create"
185
+ msgstr ""
186
+
187
+ #: classes/class-cartflows-importer.php:378
188
+ msgid "Import from Cloud"
189
+ msgstr ""
190
+
191
+ #: classes/class-cartflows-importer.php:636
192
+ #: modules/flow/classes/class-cartflows-flow-meta.php:224
193
+ msgid "Landing Page"
194
+ msgstr ""
195
+
196
+ #: classes/class-cartflows-importer.php:637
197
+ #: modules/flow/classes/class-cartflows-flow-meta.php:225
198
+ msgid "Checkout Page"
199
+ msgstr ""
200
+
201
+ #: classes/class-cartflows-importer.php:638
202
+ #: modules/flow/classes/class-cartflows-flow-meta.php:226
203
+ msgid "Thank You Page"
204
+ msgstr ""
205
+
206
+ #: classes/class-cartflows-importer.php:743
207
+ #. translators: %s: template ID
208
+ msgid "Invalid template id %1$s or post id %2$s."
209
+ msgstr ""
210
+
211
+ #: classes/class-cartflows-importer.php:787
212
+ #. translators: %s: flow ID
213
+ msgid "Invalid flow id %1$s or step type %2$s."
214
+ msgstr ""
215
+
216
+ #: classes/class-cartflows-importer.php:907
217
+ msgid ""
218
+ "Elementor is not activated. Please activate plugin Elementor Page Builder "
219
+ "to import the step."
220
+ msgstr ""
221
+
222
+ #: classes/class-cartflows-loader.php:334
223
+ #. translators: %s: html tags
224
+ msgid ""
225
+ "The %1$sCartFlows%2$s plugin requires %1$sWooCommerce%2$s plugin installed "
226
+ "& activated."
227
+ msgstr ""
228
+
229
+ #: classes/class-cartflows-loader.php:344
230
+ msgid "Activate WooCommerce"
231
+ msgstr ""
232
+
233
+ #: classes/class-cartflows-loader.php:352
234
+ msgid "Install WooCommerce"
235
+ msgstr ""
236
+
237
+ #: classes/class-cartflows-meta-fields.php:83
238
+ msgid "Thin 100"
239
+ msgstr ""
240
+
241
+ #: classes/class-cartflows-meta-fields.php:84
242
+ msgid "Extra-Light 200"
243
+ msgstr ""
244
+
245
+ #: classes/class-cartflows-meta-fields.php:85
246
+ msgid "Light 300"
247
+ msgstr ""
248
+
249
+ #: classes/class-cartflows-meta-fields.php:86
250
+ msgid "Normal 400"
251
+ msgstr ""
252
+
253
+ #: classes/class-cartflows-meta-fields.php:87
254
+ msgid "Medium 500"
255
+ msgstr ""
256
+
257
+ #: classes/class-cartflows-meta-fields.php:88
258
+ msgid "Semi-Bold 600"
259
+ msgstr ""
260
+
261
+ #: classes/class-cartflows-meta-fields.php:89
262
+ msgid "Bold 700"
263
+ msgstr ""
264
+
265
+ #: classes/class-cartflows-meta-fields.php:90
266
+ msgid "Extra-Bold 800"
267
+ msgstr ""
268
+
269
+ #: classes/class-cartflows-meta-fields.php:91
270
+ msgid "Ultra-Bold 900"
271
+ msgstr ""
272
+
273
+ #: classes/class-cartflows-meta-fields.php:200
274
+ #: classes/class-cartflows-meta-fields.php:876
275
+ msgid "Remove"
276
+ msgstr ""
277
+
278
+ #: classes/class-cartflows-meta-fields.php:582
279
+ #: classes/class-cartflows-meta-fields.php:868
280
+ msgid "Search for a product&hellip;"
281
+ msgstr ""
282
+
283
+ #: classes/class-cartflows-meta-fields.php:623
284
+ msgid "Search for a coupon&hellip;"
285
+ msgstr ""
286
+
287
+ #: classes/class-cartflows-meta.php:34
288
+ msgid "Update"
289
+ msgstr ""
290
+
291
+ #: classes/class-cartflows-meta.php:42
292
+ #: modules/flow/classes/class-cartflows-flow-meta.php:84
293
+ msgid "Back to edit Flow"
294
+ msgstr ""
295
+
296
+ #: classes/class-cartflows-wizard.php:45
297
+ msgid "Thanks for installing and using CartFlows!"
298
+ msgstr ""
299
+
300
+ #: classes/class-cartflows-wizard.php:46
301
+ msgid ""
302
+ "It is easy to use the CartFlows. Please use the setup wizard to quick start "
303
+ "setup."
304
+ msgstr ""
305
+
306
+ #: classes/class-cartflows-wizard.php:71
307
+ #: includes/admin/cartflows-general-bck.php:24
308
+ msgid "Welcome"
309
+ msgstr ""
310
+
311
+ #: classes/class-cartflows-wizard.php:76 classes/class-cartflows-wizard.php:259
312
+ msgid "Page Builder"
313
+ msgstr ""
314
+
315
+ #: classes/class-cartflows-wizard.php:81
316
+ msgid "Ready!"
317
+ msgstr ""
318
+
319
+ #: classes/class-cartflows-wizard.php:150
320
+ msgid "CartFlows Setup"
321
+ msgstr ""
322
+
323
+ #: classes/class-cartflows-wizard.php:176
324
+ msgid "Exit Setup Wizard"
325
+ msgstr ""
326
+
327
+ #: classes/class-cartflows-wizard.php:225
328
+ msgid "Thank you for choosing CartFlows!"
329
+ msgstr ""
330
+
331
+ #: classes/class-cartflows-wizard.php:232
332
+ msgid "Lets Go »"
333
+ msgstr ""
334
+
335
+ #: classes/class-cartflows-wizard.php:260
336
+ msgid "Select a page builder which you want to use for creating your new flows."
337
+ msgstr ""
338
+
339
+ #: classes/class-cartflows-wizard.php:265
340
+ msgid "Select Page Builder"
341
+ msgstr ""
342
+
343
+ #: classes/class-cartflows-wizard.php:266
344
+ msgid "Add locations for where this Schema should appear."
345
+ msgstr ""
346
+
347
+ #: classes/class-cartflows-wizard.php:294
348
+ msgid "The above plugin will be installed and activated for you!"
349
+ msgstr ""
350
+
351
+ #: classes/class-cartflows-wizard.php:297
352
+ msgid "« Previous"
353
+ msgstr ""
354
+
355
+ #: classes/class-cartflows-wizard.php:300
356
+ #: classes/class-cartflows-wizard.php:301
357
+ msgid "Next »"
358
+ msgstr ""
359
+
360
+ #: classes/class-cartflows-wizard.php:393
361
+ msgid "Congratulations!"
362
+ msgstr ""
363
+
364
+ #: classes/class-cartflows-wizard.php:400
365
+ msgid ""
366
+ "You've successfully completed the setup before you begin setting now you "
367
+ "can use it."
368
+ msgstr ""
369
+
370
+ #: classes/class-cartflows-wizard.php:414
371
+ msgid "Create a flow"
372
+ msgstr ""
373
+
374
+ #: includes/admin/cartflows-admin.php:19
375
+ #: includes/admin/cartflows-general.php:30
376
+ msgid "Modernizing WordPress eCommerce!"
377
+ msgstr ""
378
+
379
+ #: includes/admin/cartflows-admin.php:29
380
+ msgid "Settings saved successfully."
381
+ msgstr ""
382
+
383
+ #: includes/admin/cartflows-general-bck.php:10
384
+ msgid "Selec"
385
+ msgstr ""
386
+
387
+ #: includes/admin/cartflows-general-bck.php:22
388
+ msgid "General"
389
+ msgstr ""
390
+
391
+ #: includes/admin/cartflows-general.php:15
392
+ #: includes/admin/cartflows-general.php:38
393
+ msgid "General Settings"
394
+ msgstr ""
395
+
396
+ #: includes/admin/cartflows-general.php:22
397
+ msgid "Getting Started"
398
+ msgstr ""
399
+
400
+ #: includes/admin/cartflows-general.php:50
401
+ msgid "Disallow search engines from indexing flows"
402
+ msgstr ""
403
+
404
+ #: includes/admin/cartflows-general.php:58
405
+ msgid "Global Checkout"
406
+ msgstr ""
407
+
408
+ #: includes/admin/cartflows-general.php:67
409
+ msgid "Save Changes"
410
+ msgstr ""
411
+
412
+ #: includes/admin/cartflows-general.php:78
413
+ msgid "Knowledge Base"
414
+ msgstr ""
415
+
416
+ #: includes/admin/cartflows-general.php:82
417
+ msgid "Not sure how something works? Take a peek at the knowledge base and learn."
418
+ msgstr ""
419
+
420
+ #: includes/admin/cartflows-general.php:85
421
+ msgid "Visit Knowledge Base »"
422
+ msgstr ""
423
+
424
+ #: includes/admin/cartflows-general.php:93
425
+ msgid "Community"
426
+ msgstr ""
427
+
428
+ #: includes/admin/cartflows-general.php:97
429
+ msgid ""
430
+ "Join the community of super helpful CartFlows users. Say hello, ask "
431
+ "questions, give feedback and help each other!"
432
+ msgstr ""
433
+
434
+ #: includes/admin/cartflows-general.php:100
435
+ msgid "Join Our Facebook Group »"
436
+ msgstr ""
437
+
438
+ #: includes/admin/cartflows-general.php:108
439
+ msgid "Five Star Support"
440
+ msgstr ""
441
+
442
+ #: includes/admin/cartflows-general.php:112
443
+ msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
444
+ msgstr ""
445
+
446
+ #: includes/admin/cartflows-general.php:115
447
+ msgid "Submit a Ticket »"
448
+ msgstr ""
449
+
450
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:153
451
+ msgid "Checkout ID not found"
452
+ msgstr ""
453
+
454
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:309
455
+ msgid "Variations Not set"
456
+ msgstr ""
457
+
458
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:317
459
+ msgid "This product can't be purcahsed"
460
+ msgstr ""
461
+
462
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:68
463
+ msgid "Checkout Layout"
464
+ msgstr ""
465
+
466
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:153
467
+ #: modules/landing/classes/class-cartflows-landing-meta.php:126
468
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:130
469
+ msgid "Shortcodes"
470
+ msgstr ""
471
+
472
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:160
473
+ msgid "Select Product"
474
+ msgstr ""
475
+
476
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:166
477
+ msgid "Order Bump"
478
+ msgstr ""
479
+
480
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:172
481
+ msgid "Checkout Design"
482
+ msgstr ""
483
+
484
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:178
485
+ msgid "Checkout Fields"
486
+ msgstr ""
487
+
488
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:184
489
+ msgid "Logo ( Optional )"
490
+ msgstr ""
491
+
492
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:239
493
+ msgid "Add this shortcode to your checkout page"
494
+ msgstr ""
495
+
496
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:290
497
+ msgid "Upgrade to <a href=\"#\">CartFlows Pro</a> for Order Bump feature"
498
+ msgstr ""
499
+
500
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:317
501
+ msgid "Upgrade to <a href=\"#\">CartFlows Pro</a> for Custom Fields feature"
502
+ msgstr ""
503
+
504
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:345
505
+ msgid "One Column (Available in CartFlows Pro) "
506
+ msgstr ""
507
+
508
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:351
509
+ msgid "Checkout Skin"
510
+ msgstr ""
511
+
512
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:355
513
+ msgid "One Column"
514
+ msgstr ""
515
+
516
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:356
517
+ msgid "Two Column"
518
+ msgstr ""
519
+
520
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:365
521
+ msgid "Primary Color"
522
+ msgstr ""
523
+
524
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:374
525
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:409
526
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:455
527
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:547
528
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:197
529
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:220
530
+ msgid "Font Family"
531
+ msgstr ""
532
+
533
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:382
534
+ msgid "Advance Options"
535
+ msgstr ""
536
+
537
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:394
538
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:205
539
+ msgid "Heading"
540
+ msgstr ""
541
+
542
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:400
543
+ msgid "Heading Color"
544
+ msgstr ""
545
+
546
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:418
547
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:464
548
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:556
549
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:229
550
+ msgid "Font Weight"
551
+ msgstr ""
552
+
553
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:426
554
+ msgid "Input Fields"
555
+ msgstr ""
556
+
557
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:434
558
+ msgid "Style 1 (Available in CartFlows Pro)"
559
+ msgstr ""
560
+
561
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:440
562
+ msgid "Style"
563
+ msgstr ""
564
+
565
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:444
566
+ msgid "Default"
567
+ msgstr ""
568
+
569
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:445
570
+ msgid "Style 1"
571
+ msgstr ""
572
+
573
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:472
574
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:564
575
+ msgid "Size"
576
+ msgstr ""
577
+
578
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:476
579
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:568
580
+ msgid "Extra Small"
581
+ msgstr ""
582
+
583
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:477
584
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:569
585
+ msgid "Small"
586
+ msgstr ""
587
+
588
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:478
589
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:570
590
+ msgid "Medium"
591
+ msgstr ""
592
+
593
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:479
594
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:571
595
+ msgid "Large"
596
+ msgstr ""
597
+
598
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:480
599
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:572
600
+ msgid "Extra Large"
601
+ msgstr ""
602
+
603
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:481
604
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:573
605
+ msgid "Custom"
606
+ msgstr ""
607
+
608
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:488
609
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:580
610
+ msgid "Top Bottom Spacing"
611
+ msgstr ""
612
+
613
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:496
614
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:588
615
+ msgid "Left Right Spacing"
616
+ msgstr ""
617
+
618
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:504
619
+ msgid "Text / Placeholder Color"
620
+ msgstr ""
621
+
622
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:512
623
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:612
624
+ msgid "Background Color"
625
+ msgstr ""
626
+
627
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:520
628
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:628
629
+ msgid "Border Color"
630
+ msgstr ""
631
+
632
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:527
633
+ msgid "Label Color"
634
+ msgstr ""
635
+
636
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:540
637
+ msgid "Buttons"
638
+ msgstr ""
639
+
640
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:596
641
+ msgid "Text Color"
642
+ msgstr ""
643
+
644
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:604
645
+ msgid "Text Hover Color"
646
+ msgstr ""
647
+
648
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:620
649
+ msgid "Background Hover Color"
650
+ msgstr ""
651
+
652
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:636
653
+ msgid "Border Hover Color"
654
+ msgstr ""
655
+
656
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:649
657
+ msgid "Sections"
658
+ msgstr ""
659
+
660
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:655
661
+ msgid "Highlight Area Background Color"
662
+ msgstr ""
663
+
664
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:694
665
+ msgid "Header Logo"
666
+ msgstr ""
667
+
668
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:702
669
+ msgid "Logo Width (In px)"
670
+ msgstr ""
671
+
672
+ #: modules/checkout/templates/embed/checkout-template-simple.php:22
673
+ #: modules/checkout/templates/wcf-template.php:36
674
+ msgid "Your cart is currently empty."
675
+ msgstr ""
676
+
677
+ #: modules/checkout/templates/wcf-template.php:46
678
+ msgid "Copyright &copy;"
679
+ msgstr ""
680
+
681
+ #: modules/checkout/templates/wcf-template.php:50
682
+ msgid "All Rights Reserved"
683
+ msgstr ""
684
+
685
+ #: modules/flow/classes/class-cartflows-flow-meta.php:199
686
+ #. translators: %s flow id
687
+ msgid "Steps not created for flow - %s"
688
+ msgstr ""
689
+
690
+ #: modules/flow/classes/class-cartflows-flow-meta.php:213
691
+ #. translators: %s flow id
692
+ msgid "Steps already exists. Flow - %s"
693
+ msgstr ""
694
+
695
+ #: modules/flow/classes/class-cartflows-flow-meta.php:262
696
+ #. translators: %s flow id
697
+ msgid "Steps created for flow - %s"
698
+ msgstr ""
699
+
700
+ #: modules/flow/classes/class-cartflows-flow-meta.php:333
701
+ #. translators: %s flow id
702
+ msgid "Step not deleted for flow - %s"
703
+ msgstr ""
704
+
705
+ #: modules/flow/classes/class-cartflows-flow-meta.php:364
706
+ #. translators: %s flow id
707
+ msgid "Step deleted for flow - %s"
708
+ msgstr ""
709
+
710
+ #: modules/flow/classes/class-cartflows-flow-meta.php:387
711
+ #. translators: %s flow id
712
+ msgid "Steps not sorted for flow - %s"
713
+ msgstr ""
714
+
715
+ #: modules/flow/classes/class-cartflows-flow-meta.php:410
716
+ #. translators: %s flow id
717
+ msgid "Steps sorted for flow - %s"
718
+ msgstr ""
719
+
720
+ #: modules/flow/classes/class-cartflows-flow-meta.php:521
721
+ msgid "Flow Settings"
722
+ msgstr ""
723
+
724
+ #: modules/flow/classes/class-cartflows-flow-meta.php:606
725
+ msgid "Enable Test Mode"
726
+ msgstr ""
727
+
728
+ #: modules/flow/classes/class-cartflows-flow-meta.php:613
729
+ msgid ""
730
+ "Test mode enables you to preview your pages with random products for the "
731
+ "sake of testing."
732
+ msgstr ""
733
+
734
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:57
735
+ msgid "Search Flows"
736
+ msgstr ""
737
+
738
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:58
739
+ msgid "All Flows"
740
+ msgstr ""
741
+
742
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:59
743
+ msgid "Edit Flow"
744
+ msgstr ""
745
+
746
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:60
747
+ msgid "View Flow"
748
+ msgstr ""
749
+
750
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:61
751
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:63
752
+ #: modules/flow/classes/class-cartflows-step-post-type.php:143
753
+ #: modules/flow/classes/class-cartflows-step-post-type.php:145
754
+ msgid "Add New"
755
+ msgstr ""
756
+
757
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:62
758
+ msgid "Update Flow"
759
+ msgstr ""
760
+
761
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:64
762
+ msgid "New Flow Name"
763
+ msgstr ""
764
+
765
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:123
766
+ msgid "View"
767
+ msgstr ""
768
+
769
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:230
770
+ msgid "Flows"
771
+ msgstr ""
772
+
773
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:252
774
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:258
775
+ #: modules/flow/classes/class-cartflows-step-post-type.php:371
776
+ #: modules/flow/classes/class-cartflows-step-post-type.php:377
777
+ #. translators: %s: singular custom post type name
778
+ msgid "%s updated."
779
+ msgstr ""
780
+
781
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:254
782
+ #: modules/flow/classes/class-cartflows-step-post-type.php:373
783
+ #. translators: %s: singular custom post type name
784
+ msgid "Custom %s updated."
785
+ msgstr ""
786
+
787
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:256
788
+ #: modules/flow/classes/class-cartflows-step-post-type.php:375
789
+ #. translators: %s: singular custom post type name
790
+ msgid "Custom %s deleted."
791
+ msgstr ""
792
+
793
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:260
794
+ #: modules/flow/classes/class-cartflows-step-post-type.php:379
795
+ #. translators: %1$s: singular custom post type name ,%2$s: date and time of
796
+ #. the revision
797
+ msgid "%1$s restored to revision from %2$s"
798
+ msgstr ""
799
+
800
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:262
801
+ #: modules/flow/classes/class-cartflows-step-post-type.php:381
802
+ #. translators: %s: singular custom post type name
803
+ msgid "%s published."
804
+ msgstr ""
805
+
806
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:264
807
+ #: modules/flow/classes/class-cartflows-step-post-type.php:383
808
+ #. translators: %s: singular custom post type name
809
+ msgid "%s saved."
810
+ msgstr ""
811
+
812
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:266
813
+ #: modules/flow/classes/class-cartflows-step-post-type.php:385
814
+ #. translators: %s: singular custom post type name
815
+ msgid "%s submitted."
816
+ msgstr ""
817
+
818
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:268
819
+ #: modules/flow/classes/class-cartflows-step-post-type.php:387
820
+ #. translators: %s: singular custom post type name
821
+ msgid "%s scheduled for."
822
+ msgstr ""
823
+
824
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:270
825
+ #: modules/flow/classes/class-cartflows-step-post-type.php:389
826
+ #. translators: %s: singular custom post type name
827
+ msgid "%s draft updated."
828
+ msgstr ""
829
+
830
+ #: modules/flow/classes/class-cartflows-flow-shortcodes.php:148
831
+ #: modules/widgets/class-cartflows-next-step.php:79
832
+ msgid "Next Step"
833
+ msgstr ""
834
+
835
+ #: modules/flow/classes/class-cartflows-step-post-type.php:139
836
+ msgid "Search Steps"
837
+ msgstr ""
838
+
839
+ #: modules/flow/classes/class-cartflows-step-post-type.php:140
840
+ msgid "All Steps"
841
+ msgstr ""
842
+
843
+ #: modules/flow/classes/class-cartflows-step-post-type.php:141
844
+ #: modules/flow/view/meta-flow-steps.php:76
845
+ msgid "Edit Step"
846
+ msgstr ""
847
+
848
+ #: modules/flow/classes/class-cartflows-step-post-type.php:142
849
+ #: modules/flow/view/meta-flow-steps.php:72
850
+ msgid "View Step"
851
+ msgstr ""
852
+
853
+ #: modules/flow/classes/class-cartflows-step-post-type.php:144
854
+ msgid "Update Step"
855
+ msgstr ""
856
+
857
+ #: modules/flow/classes/class-cartflows-step-post-type.php:146
858
+ msgid "New Step Name"
859
+ msgstr ""
860
+
861
+ #: modules/flow/classes/class-cartflows-step-post-type.php:169
862
+ msgid "Step Type"
863
+ msgstr ""
864
+
865
+ #: modules/flow/classes/class-cartflows-step-post-type.php:178
866
+ msgid "Step Flow"
867
+ msgstr ""
868
+
869
+ #: modules/flow/classes/class-cartflows-step-post-type.php:195
870
+ #: modules/flow/view/meta-flow-steps.php:9
871
+ msgid "Landing"
872
+ msgstr ""
873
+
874
+ #: modules/flow/classes/class-cartflows-step-post-type.php:201
875
+ #: modules/flow/view/meta-flow-steps.php:10
876
+ msgid "Checkout"
877
+ msgstr ""
878
+
879
+ #: modules/flow/classes/class-cartflows-step-post-type.php:207
880
+ #: modules/flow/view/meta-flow-steps.php:11
881
+ msgid "Thank You"
882
+ msgstr ""
883
+
884
+ #: modules/flow/classes/class-cartflows-step-post-type.php:213
885
+ #: modules/flow/view/meta-flow-steps.php:12
886
+ msgid "Upsell"
887
+ msgstr ""
888
+
889
+ #: modules/flow/classes/class-cartflows-step-post-type.php:219
890
+ #: modules/flow/view/meta-flow-steps.php:13
891
+ msgid "Downsell"
892
+ msgstr ""
893
+
894
+ #: modules/flow/view/meta-flow-steps.php:64
895
+ msgid "No Product Assigned"
896
+ msgstr ""
897
+
898
+ #: modules/flow/view/meta-flow-steps.php:80
899
+ msgid "Clone Step"
900
+ msgstr ""
901
+
902
+ #: modules/flow/view/meta-flow-steps.php:84
903
+ msgid "Delete Step"
904
+ msgstr ""
905
+
906
+ #: modules/flow/view/meta-flow-steps.php:99
907
+ msgid "Add New Step"
908
+ msgstr ""
909
+
910
+ #: modules/flow/view/meta-flow-steps.php:115
911
+ msgid "Templates"
912
+ msgstr ""
913
+
914
+ #: modules/flow/view/meta-flow-steps.php:136
915
+ msgid "You need a Cartflows Pro version to import Upsell / Downsell"
916
+ msgstr ""
917
+
918
+ #: modules/landing/classes/class-cartflows-landing-meta.php:66
919
+ msgid "Landing Page Settings"
920
+ msgstr ""
921
+
922
+ #: modules/landing/classes/class-cartflows-landing-meta.php:159
923
+ msgid "Next Step Link"
924
+ msgstr ""
925
+
926
+ #: modules/thankyou/classes/class-cartflows-thankyou-markup.php:59
927
+ msgid ""
928
+ "WooCommerce functions not exists. If you are in iframe, please reload the "
929
+ "iframe"
930
+ msgstr ""
931
+
932
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:65
933
+ msgid "Thank You Page Settings"
934
+ msgstr ""
935
+
936
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:136
937
+ msgid "Thank You Design"
938
+ msgstr ""
939
+
940
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:142
941
+ msgid "Thank You Fields"
942
+ msgstr ""
943
+
944
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:170
945
+ msgid "Order Details"
946
+ msgstr ""
947
+
948
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:182
949
+ msgid "Text"
950
+ msgstr ""
951
+
952
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:188
953
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:211
954
+ msgid "Color"
955
+ msgstr ""
956
+
957
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:237
958
+ msgid "Advanced Options"
959
+ msgstr ""
960
+
961
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:247
962
+ msgid "Container Width (In px)"
963
+ msgstr ""
964
+
965
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:255
966
+ msgid "Section Background Color"
967
+ msgstr ""
968
+
969
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:269
970
+ msgid "Enable Order Overview "
971
+ msgstr ""
972
+
973
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:277
974
+ msgid "Enable Order Details "
975
+ msgstr ""
976
+
977
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:285
978
+ msgid "Enable Billing Details "
979
+ msgstr ""
980
+
981
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:293
982
+ msgid "Enable Shipping Details "
983
+ msgstr ""
984
+
985
+ #: modules/widgets/class-cartflows-next-step.php:25
986
+ msgid "CartFlows Next Step"
987
+ msgstr ""
988
+
989
+ #: modules/widgets/class-cartflows-next-step.php:27
990
+ msgid "Next Step Widgets"
991
+ msgstr ""
992
+
993
+ #: modules/widgets/class-cartflows-next-step.php:107
994
+ msgid "New title"
995
+ msgstr ""
996
+
997
+ #: modules/widgets/class-cartflows-next-step.php:124
998
+ msgid "Title:"
999
+ msgstr ""
1000
+
1001
+ #: modules/widgets/class-cartflows-next-step.php:128
1002
+ msgid "Flow ID:"
1003
+ msgstr ""
1004
+
1005
+ #: modules/widgets/class-cartflows-next-step.php:132
1006
+ msgid "Step ID:"
1007
+ msgstr ""
1008
+
1009
+ #. Plugin Name of the plugin/theme
1010
+ msgid "CartFlows"
1011
+ msgstr ""
1012
+
1013
+ #. Author URI of the plugin/theme
1014
+ msgid "https://cartflows.com/"
1015
+ msgstr ""
1016
+
1017
+ #. Description of the plugin/theme
1018
+ msgid "Create beautiful checkout pages & sales flows for WooCommerce."
1019
+ msgstr ""
1020
+
1021
+ #. Author of the plugin/theme
1022
+ msgid "CartFlows Inc"
1023
+ msgstr ""
1024
+
1025
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:55
1026
+ msgctxt "flow general name"
1027
+ msgid "Flows"
1028
+ msgstr ""
1029
+
1030
+ #: modules/flow/classes/class-cartflows-flow-post-type.php:56
1031
+ msgctxt "flow singular name"
1032
+ msgid "Flow"
1033
+ msgstr ""
1034
+
1035
+ #: modules/flow/classes/class-cartflows-step-post-type.php:137
1036
+ msgctxt "flow step general name"
1037
+ msgid "Steps"
1038
+ msgstr ""
1039
+
1040
+ #: modules/flow/classes/class-cartflows-step-post-type.php:138
1041
+ msgctxt "flow step singular name"
1042
+ msgid "Step"
1043
+ msgstr ""
1044
+
1045
+ #: modules/flow/classes/class-cartflows-step-post-type.php:257
1046
+ msgctxt "cartflows"
1047
+ msgid "Template for Page Builders"
1048
+ msgstr ""
modules/checkout/class-cartflows-checkout.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout
4
+ *
5
+ * @package Woo Funnel Cart
6
+ */
7
+
8
+ define( 'CARTFLOWS_CHECKOUT_DIR', CARTFLOWS_DIR . 'modules/checkout/' );
9
+ define( 'CARTFLOWS_CHECKOUT_URL', CARTFLOWS_URL . 'modules/checkout/' );
10
+
11
+ /**
12
+ * Initial Setup
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Checkout {
17
+
18
+
19
+ /**
20
+ * Member Variable
21
+ *
22
+ * @var object instance
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Initiator
28
+ */
29
+ public static function get_instance() {
30
+ if ( ! isset( self::$instance ) ) {
31
+ self::$instance = new self;
32
+ }
33
+ return self::$instance;
34
+ }
35
+
36
+ /**
37
+ * Constructor function that initializes required actions and hooks
38
+ */
39
+ public function __construct() {
40
+ require_once CARTFLOWS_CHECKOUT_DIR . 'classes/class-cartflows-checkout-markup.php';
41
+ require_once CARTFLOWS_CHECKOUT_DIR . 'classes/class-cartflows-checkout-meta.php';
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Kicking this off by calling 'get_instance()' method
47
+ */
48
+ Cartflows_Checkout::get_instance();
modules/checkout/classes/class-cartflows-checkout-markup.php ADDED
@@ -0,0 +1,942 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout markup.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Checkout_Markup {
14
+
15
+ /**
16
+ * Member Variable
17
+ *
18
+ * @var object instance
19
+ */
20
+ private static $instance;
21
+
22
+ /**
23
+ * Initiator
24
+ */
25
+ public static function get_instance() {
26
+ if ( ! isset( self::$instance ) ) {
27
+ self::$instance = new self;
28
+ }
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Constructor
34
+ */
35
+ public function __construct() {
36
+
37
+ /* Set is checkout flag */
38
+ add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
39
+
40
+ add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_checkout_fields' ), 10, 2 );
41
+
42
+ /* Checkout Shortcode */
43
+ add_shortcode( 'cartflows_checkout', array( $this, 'checkout_shortcode_markup' ) );
44
+
45
+ /* Preconfigured cart data */
46
+ add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
47
+
48
+ /* Embed Checkout */
49
+ add_action( 'wp', array( $this, 'shortcode_load_data' ), 999 );
50
+
51
+ /* Ajax Endpoint */
52
+ add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ) );
53
+
54
+ add_filter( 'cartflows_add_before_main_section', array( $this, 'enable_logo_in_header' ) );
55
+
56
+ add_filter( 'cartflows_primary_container_bottom', array( $this, 'show_cartflows_copyright_message' ) );
57
+
58
+ add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
59
+
60
+ add_action( 'wp_ajax_cf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
61
+ add_action( 'wp_ajax_nopriv_cf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
62
+
63
+ add_filter( 'global_cartflows_js_localize', array( $this, 'add_localize_vars' ) );
64
+
65
+ /* Global Checkout */
66
+ add_action( 'template_redirect', array( $this, 'global_checkout_template_redirect' ), 1 );
67
+ }
68
+
69
+ /**
70
+ * Redirect from default to the global checkout page
71
+ *
72
+ * @since 1.0.0
73
+ */
74
+ function global_checkout_template_redirect() {
75
+
76
+ if ( ! is_checkout() ) {
77
+ return;
78
+ }
79
+
80
+ if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
81
+ return;
82
+ }
83
+
84
+ // redirect only from any non HC checkout pages.
85
+ $order_pay_endpoint = get_option( 'woocommerce_checkout_order_pay_endpoint', 'order-pay' );
86
+ $order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );
87
+
88
+ $common = Cartflows_Helper::get_common_settings();
89
+
90
+ $global_checkout = $common['global_checkout'];
91
+
92
+ if (
93
+ // ignore on order-pay.
94
+ false === mb_strpos( $_SERVER['REQUEST_URI'], '/' . $order_pay_endpoint . '/' ) &&
95
+ // ignore on TY page.
96
+ false === mb_strpos( $_SERVER['REQUEST_URI'], '/' . $order_received_endpoint . '/' )
97
+ ) {
98
+
99
+ if ( '' !== $global_checkout ) {
100
+
101
+ $link = get_permalink( $global_checkout );
102
+
103
+ if ( ! empty( $link ) ) {
104
+
105
+ wp_redirect( $link );
106
+ die();
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Check for checkout flag
114
+ *
115
+ * @param bool $is_checkout is checkout.
116
+ *
117
+ * @return bool
118
+ */
119
+ function woo_checkout_flag( $is_checkout ) {
120
+
121
+ if ( ! is_admin() ) {
122
+
123
+ if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
124
+
125
+ $is_checkout = true;
126
+ }
127
+ }
128
+
129
+ return $is_checkout;
130
+ }
131
+
132
+ /**
133
+ * Render checkout shortcode markup.
134
+ *
135
+ * @param array $atts attributes.
136
+ * @return string
137
+ */
138
+ function checkout_shortcode_markup( $atts ) {
139
+
140
+ $atts = shortcode_atts(
141
+ array(
142
+ 'id' => 0,
143
+ ),
144
+ $atts
145
+ );
146
+
147
+ $checkout_id = intval( $atts['id'] );
148
+
149
+ if ( empty( $checkout_id ) ) {
150
+
151
+ if ( ! _is_wcf_checkout_type() ) {
152
+
153
+ return '<h4>' . __( 'Checkout ID not found', 'cartflows' ) . '</h4>';
154
+ }
155
+
156
+ global $post;
157
+
158
+ $checkout_id = intval( $post->ID );
159
+ }
160
+
161
+ $output = '';
162
+
163
+ ob_start();
164
+
165
+ do_action( 'cartflows_checkout_form_before', $checkout_id );
166
+
167
+ $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
168
+
169
+ $template_default = CARTFLOWS_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php';
170
+
171
+ $template_layout = apply_filters( 'cartflows_checkout_layout_template', $checkout_layout );
172
+
173
+ if ( file_exists( $template_layout ) ) {
174
+ include $template_layout;
175
+ } else {
176
+ include $template_default;
177
+ }
178
+
179
+ $output .= ob_get_clean();
180
+
181
+ return $output;
182
+ }
183
+
184
+ /**
185
+ * Configure Cart Data.
186
+ *
187
+ * @since 1.0.0
188
+ *
189
+ * @return void
190
+ */
191
+ function preconfigured_cart_data() {
192
+
193
+ if ( is_admin() ) {
194
+ return;
195
+ }
196
+
197
+ global $post;
198
+
199
+ if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
200
+
201
+ if ( wp_doing_ajax() ) {
202
+
203
+ return;
204
+ } else {
205
+
206
+ if ( _is_wcf_checkout_type() ) {
207
+ $checkout_id = $post->ID;
208
+ } else {
209
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
210
+ }
211
+
212
+ $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
213
+
214
+ if ( wcf()->flow->is_flow_testmode( $flow_id ) ) {
215
+ $products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products', 'dummy' );
216
+ } else {
217
+ $products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
218
+ }
219
+
220
+ if ( ! is_array( $products ) ) {
221
+
222
+ if ( 'dummy' === $products ) {
223
+
224
+ $args = array(
225
+ 'posts_per_page' => 1,
226
+ 'orderby' => 'rand',
227
+ 'post_type' => 'product',
228
+ 'meta_query' => array(
229
+ // Exclude out of stock products.
230
+ array(
231
+ 'key' => '_stock_status',
232
+ 'value' => 'outofstock',
233
+ 'compare' => 'NOT IN',
234
+ ),
235
+ ),
236
+ 'tax_query' => array(
237
+ array(
238
+ 'taxonomy' => 'product_type',
239
+ 'field' => 'slug',
240
+ 'terms' => 'simple',
241
+ ),
242
+ ),
243
+ );
244
+
245
+ $random_product = get_posts( $args );
246
+
247
+ if ( isset( $random_product[0]->ID ) ) {
248
+ $products = array(
249
+ array(
250
+ 'product' => $random_product[0]->ID,
251
+ ),
252
+ );
253
+ } else {
254
+ return;
255
+ }
256
+ } else {
257
+ return;
258
+ }
259
+ }
260
+
261
+ if ( is_array( $products ) && count( $products ) < 1 ) {
262
+
263
+ return;
264
+ }
265
+ /* Empty the current cart */
266
+ WC()->cart->empty_cart();
267
+
268
+ /* Set customer session if not set */
269
+ if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
270
+ WC()->session->set_customer_session_cookie( true );
271
+ }
272
+
273
+ foreach ( $products as $index => $data ) {
274
+
275
+ if ( ! isset( $data['product'] ) ) {
276
+ return;
277
+ }
278
+
279
+ $product_id = $data['product'];
280
+ $_product = wc_get_product( $product_id );
281
+
282
+ if ( ! empty( $_product ) ) {
283
+
284
+ $quantity = 1;
285
+
286
+ if ( ! $_product->is_type( 'grouped' ) && ! $_product->is_type( 'external' ) ) {
287
+
288
+ if ( $_product->is_type( 'variable' ) ) {
289
+
290
+ $default_attributes = $_product->get_default_attributes();
291
+
292
+ if ( ! empty( $default_attributes ) ) {
293
+
294
+ foreach ( $_product->get_children() as $variation_id ) {
295
+
296
+ $single_variation = new WC_Product_Variation( $variation_id );
297
+
298
+ if ( $default_attributes == $single_variation->get_attributes() ) {
299
+ WC()->cart->add_to_cart( $variation_id, $quantity );
300
+ }
301
+ }
302
+ } else {
303
+
304
+ $product_childrens = $_product->get_children();
305
+
306
+ if ( isset( $product_childrens[0] ) ) {
307
+ WC()->cart->add_to_cart( $product_childrens[0], $quantity );
308
+ } else {
309
+ echo '<p>' . __( 'Variations Not set', 'cartflows' ) . '</p>';
310
+ }
311
+ }
312
+ } else {
313
+ WC()->cart->add_to_cart( $product_id, $quantity );
314
+ }
315
+ } else {
316
+
317
+ echo '<p>' . __( 'This product can\'t be purcahsed', 'cartflows' ) . '</p>';
318
+ // WC()->cart->add_to_cart( $product_id, $quantity );.
319
+ }
320
+ }
321
+ }
322
+
323
+ do_action( 'cartflows_checkout_aftet_configure_cart', $checkout_id );
324
+ }
325
+ }
326
+ }
327
+
328
+ /**
329
+ * Load shortcode data.
330
+ *
331
+ * @return void
332
+ */
333
+ function shortcode_load_data() {
334
+
335
+ if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
336
+
337
+ add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
338
+
339
+ // Outputting the hidden field in checkout page.
340
+ add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
341
+ add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
342
+
343
+ remove_all_actions( 'woocommerce_checkout_billing' );
344
+ remove_all_actions( 'woocommerce_checkout_shipping' );
345
+
346
+ // Hook in actions once.
347
+ add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
348
+ add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
349
+
350
+ remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
351
+
352
+ add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
353
+
354
+ add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
355
+
356
+ global $post;
357
+
358
+ if ( _is_wcf_checkout_type() ) {
359
+ $checkout_id = $post->ID;
360
+ } else {
361
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
362
+ }
363
+
364
+ do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
365
+ }
366
+ }
367
+
368
+ /**
369
+ * Render checkout ID hidden field.
370
+ *
371
+ * @param array $checkout checkout session data.
372
+ * @return void
373
+ */
374
+ function checkout_shortcode_post_id( $checkout ) {
375
+
376
+ global $post;
377
+
378
+ if ( _is_wcf_checkout_type() ) {
379
+ $checkout_id = $post->ID;
380
+ } else {
381
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
382
+ }
383
+
384
+ $flow_id = get_post_meta( $checkout_id, 'wcf-flow-id', true );
385
+
386
+ echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
387
+ echo '<input type="hidden" class="input-hidden _wcf_checkout_id" name="_wcf_checkout_id" value="' . intval( $checkout_id ) . '">';
388
+ }
389
+
390
+ /**
391
+ * Load shortcode scripts.
392
+ *
393
+ * @return void
394
+ */
395
+ function shortcode_scripts() {
396
+
397
+ wp_enqueue_style( 'wcf-checkout-template', CARTFLOWS_URL . 'assets/css/checkout-template.css', '', CARTFLOWS_VER );
398
+ wp_style_add_data( 'wcf-checkout-template', 'rtl', 'replace' );
399
+
400
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ) {
401
+ wp_enqueue_style( 'wcf-checkout-template-divi', CARTFLOWS_URL . 'assets/css/checkout-template-divi.css', '', CARTFLOWS_VER );
402
+ wp_style_add_data( 'wcf-checkout-template-divi', 'rtl', 'replace' );
403
+ }
404
+
405
+ wp_enqueue_script(
406
+ 'wcf-checkout-template',
407
+ CARTFLOWS_URL . 'assets/js/checkout-template.js',
408
+ array( 'jquery' ),
409
+ CARTFLOWS_VER,
410
+ true
411
+ );
412
+
413
+ do_action( 'cartflows_checkout_scripts' );
414
+
415
+ $style = $this->generate_style();
416
+
417
+ wp_add_inline_style( 'wcf-checkout-template', $style );
418
+
419
+ }
420
+
421
+ /**
422
+ * Generate styles.
423
+ *
424
+ * @return string
425
+ */
426
+ function generate_style() {
427
+
428
+ global $post;
429
+
430
+ if ( _is_wcf_checkout_type() ) {
431
+ $checkout_id = $post->ID;
432
+ } else {
433
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
434
+ }
435
+
436
+ CartFlows_Font_Families::render_fonts( $checkout_id );
437
+
438
+ $primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' );
439
+
440
+ $base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' );
441
+
442
+ $header_logo_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-width' );
443
+
444
+ /*$base_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-weight' );*/
445
+
446
+ $field_tb_padding = '';
447
+ $field_lr_padding = '';
448
+
449
+ $field_heading_color = '';
450
+ $field_color = '';
451
+ $field_bg_color = '';
452
+ $field_border_color = '';
453
+ $field_label_color = '';
454
+ $submit_tb_padding = '';
455
+ $submit_lr_padding = '';
456
+ $hl_bg_color = '';
457
+ $field_input_size = '';
458
+ $box_border_color = '';
459
+ $section_bg_color = '';
460
+ $submit_button_height = '';
461
+ $submit_color = '';
462
+ $submit_bg_color = $primary_color;
463
+ $submit_border_color = $primary_color;
464
+
465
+ $submit_hover_color = '';
466
+ $submit_bg_hover_color = $primary_color;
467
+ $submit_border_hover_color = $primary_color;
468
+
469
+ $section_heading_color = '';
470
+
471
+ $is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' );
472
+
473
+ $button_font_family = '';
474
+ $button_font_weight = '';
475
+ $input_font_family = '';
476
+ $input_font_weight = '';
477
+ $heading_font_family = '';
478
+ $heading_font_weight = '';
479
+ $base_font_family = $base_font_family;
480
+ /*$base_font_weight = $base_font_weight;*/
481
+
482
+ if ( 'yes' == $is_advance_option ) {
483
+
484
+ /**
485
+ * Get Font Family and Font Weight weight values
486
+ */
487
+ $section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' );
488
+
489
+ $heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' );
490
+ $heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' );
491
+ $section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' );
492
+ $button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' );
493
+ $button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' );
494
+ $input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' );
495
+ $input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' );
496
+ $field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' );
497
+ $field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' );
498
+ $field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' );
499
+
500
+ $field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' );
501
+
502
+ $field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' );
503
+
504
+ $field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' );
505
+
506
+ $field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' );
507
+
508
+ $field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' );
509
+
510
+ $submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' );
511
+
512
+ $submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' );
513
+
514
+ $submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' );
515
+
516
+ $submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color );
517
+
518
+ $submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color );
519
+
520
+ $submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color );
521
+
522
+ $submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' );
523
+
524
+ $submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color );
525
+
526
+ $hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' );
527
+
528
+ $box_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-box-border-color' );
529
+
530
+ $submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' );
531
+
532
+ /**
533
+ * Get font values
534
+ */
535
+
536
+ if ( 'custom' == $submit_button_height ) {
537
+ $submit_button_height = '38px';
538
+ }
539
+
540
+ if ( 'custom' == $field_input_size ) {
541
+ $field_input_size = '38px';
542
+ }
543
+ }
544
+
545
+ $output = "
546
+ .wcf-embed-checkout-form .wcf-checkout-header-image img{
547
+ width: {$header_logo_width}px;
548
+ }
549
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:after,
550
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:not(:checked):after,
551
+ .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label:after,
552
+ .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label:after {
553
+ background: {$primary_color};
554
+ }
555
+
556
+ .wcf-embed-checkout-form .woocommerce-checkout label{
557
+ color: {$field_label_color};
558
+ }
559
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
560
+ background-color: {$hl_bg_color};
561
+ font-family: {$input_font_family};
562
+ font-weight: {$input_font_weight};
563
+ }
564
+
565
+ .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
566
+ .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
567
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before
568
+ {
569
+ border-color: {$hl_bg_color};
570
+ border-right-color: transparent;
571
+ border-left-color: transparent;
572
+ border-top-color: transparent;
573
+ position: absolute;
574
+ }
575
+
576
+ .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
577
+ .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label{
578
+ font-family: {$input_font_family};
579
+ font-weight: {$input_font_weight};
580
+ }
581
+
582
+ .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type='text'],
583
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
584
+ .wcf-embed-checkout-form .woocommerce form .form-row textarea,
585
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
586
+ color: {$field_color};
587
+ background: {$field_bg_color};
588
+ border-color: {$field_border_color};
589
+ padding-top: {$field_tb_padding}px;
590
+ padding-bottom: {$field_tb_padding}px;
591
+ padding-left: {$field_lr_padding}px;
592
+ padding-right: {$field_lr_padding}px;
593
+ min-height: {$field_input_size};
594
+ font-family: {$input_font_family};
595
+ font-weight: {$input_font_weight};
596
+ }
597
+
598
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
599
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
600
+ .wcf-embed-checkout-form .woocommerce-checkout .shop_table,
601
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
602
+ .wcf-embed-checkout-form .woocommerce-checkout #payment,
603
+ .wcf-embed-checkout-form .woocommerce form.checkout_coupon
604
+ {
605
+ background-color: {$section_bg_color};
606
+ border-color: {$box_border_color};
607
+ font-family: {$input_font_family};
608
+ font-weight: {$input_font_weight};
609
+ }
610
+
611
+ .woocommerce table.shop_table th{
612
+ color: {$field_label_color};
613
+ }
614
+ .wcf-embed-checkout-form .woocommerce .woocommerce-info,
615
+ .wcf-embed-checkout-form .woocommerce-message{
616
+ border-top-color: {$primary_color};
617
+ background-color: {$hl_bg_color};
618
+ }
619
+ .wcf-embed-checkout-form .woocommerce a{
620
+ color: {$primary_color};
621
+ }
622
+ .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
623
+ color: {$field_color};
624
+ }
625
+ .wcf-embed-checkout-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
626
+ color: {$field_color};
627
+ }
628
+ .wcf-embed-checkout-form ::-moz-placeholder { /* Firefox 19+ */
629
+ color: {$field_color};
630
+ }
631
+ .wcf-embed-checkout-form :-ms-input-placeholder { /* IE 10+ */
632
+ color: {$field_color};
633
+ }
634
+ .wcf-embed-checkout-form :-moz-placeholder { /* Firefox 18- */
635
+ color: {$field_color};
636
+ }
637
+ .wcf-embed-checkout-form .woocommerce form p.form-row label {
638
+ color: {$field_label_color};
639
+ font-family: {$input_font_family};
640
+ font-weight: {$input_font_weight};
641
+ }
642
+ .wcf-embed-checkout-form .woocommerce #order_review button {
643
+ color: {$submit_color};
644
+ background: {$submit_bg_color};
645
+ padding-top: {$submit_tb_padding}px;
646
+ padding-bottom: {$submit_tb_padding}px;
647
+ padding-left: {$submit_lr_padding}px;
648
+ padding-right: {$submit_lr_padding}px;
649
+ border-color: {$submit_border_color};
650
+ min-height: {$submit_button_height};
651
+ font-family: {$button_font_family};
652
+ font-weight: {$button_font_weight};
653
+ }
654
+ .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
655
+ .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button{
656
+ background: {$submit_bg_color};
657
+ border: 1px {$submit_border_color} solid;
658
+ color: {$submit_color};
659
+ min-height: {$submit_button_height};
660
+ font-family: {$button_font_family};
661
+ font-weight: {$button_font_weight};
662
+ }
663
+ .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
664
+ .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
665
+ .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
666
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
667
+ color: {$submit_hover_color};
668
+ background-color: {$submit_bg_hover_color};
669
+ border-color: {$submit_border_hover_color};
670
+ }
671
+ .wcf-embed-checkout-form .woocommerce h3,
672
+ .wcf-embed-checkout-form .woocommerce h3 span,
673
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
674
+ color: {$section_heading_color};
675
+ font-family: {$heading_font_family};
676
+ font-weight: {$heading_font_weight};
677
+ }
678
+ .wcf-embed-checkout-form .woocommerce-info::before,
679
+ .wcf-embed-checkout-form .woocommerce-message::before{
680
+ color: {$primary_color};
681
+ }
682
+ .wcf-embed-checkout-form{
683
+ font-family: {$base_font_family};
684
+ }";
685
+
686
+ return $output;
687
+ }
688
+
689
+ /**
690
+ * Get ajax end points.
691
+ *
692
+ * @param string $endpoint_url end point URL.
693
+ * @return string
694
+ */
695
+ function get_ajax_endpoint( $endpoint_url ) {
696
+
697
+ global $post;
698
+
699
+ if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
700
+
701
+ if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
702
+
703
+ if ( mb_strpos( $endpoint_url, 'checkout' ) === false ) {
704
+
705
+ $query_args = array(
706
+ 'wc-ajax' => '%%endpoint%%',
707
+ );
708
+
709
+ $uri = explode( '?', $_SERVER['REQUEST_URI'], 2 );
710
+ $uri = $uri[0];
711
+
712
+ $endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
713
+ }
714
+ }
715
+ }
716
+
717
+ return $endpoint_url;
718
+ }
719
+
720
+
721
+ /**
722
+ * Save checkout fields.
723
+ *
724
+ * @param int $order_id order id.
725
+ * @param array $posted posted data.
726
+ * @return void
727
+ */
728
+ function save_checkout_fields( $order_id, $posted ) {
729
+
730
+ if ( isset( $_POST['_wcf_checkout_id'] ) ) {
731
+
732
+ $checkout_id = wc_clean( $_POST['_wcf_checkout_id'] );
733
+
734
+ update_post_meta( $order_id, '_wcf_checkout_id', $checkout_id );
735
+
736
+ /*
737
+ Custom Field To Do
738
+ $custom_fields = get_post_meta( $checkout_id, 'wcf-custom-checkout-fields', true );
739
+
740
+ if ( 'yes' === $custom_fields ) {
741
+
742
+ $billing_fields = get_post_meta( $checkout_id, 'wcf_fields_billing', true );
743
+
744
+ foreach ( $billing_fields as $field => $data ) {
745
+
746
+ if ( isset( $data['custom'] ) && $data['custom'] ) {
747
+
748
+ if ( isset( $_POST[ $field ] ) ) {
749
+ update_post_meta( $order_id, $field, wc_clean( $_POST[ $field ] ) );
750
+ }
751
+ }
752
+ }
753
+
754
+ $shipping_fields = get_post_meta( $checkout_id, 'wcf_fields_shipping', true );
755
+
756
+ foreach ( $shipping_fields as $field => $data ) {
757
+
758
+ if ( isset( $data['custom'] ) && $data['custom'] ) {
759
+
760
+ if ( isset( $_POST[ $field ] ) ) {
761
+ update_post_meta( $order_id, $field, wc_clean( $_POST[ $field ] ) );
762
+ }
763
+ }
764
+ }
765
+ }
766
+ */
767
+ if ( isset( $_POST['_wcf_flow_id'] ) ) {
768
+
769
+ $checkout_id = wc_clean( $_POST['_wcf_flow_id'] );
770
+
771
+ update_post_meta( $order_id, '_wcf_flow_id', $checkout_id );
772
+ }
773
+ }
774
+
775
+ }
776
+
777
+ /**
778
+ * Enable Logo In Header Of Checkout Page
779
+ *
780
+ * @return void
781
+ */
782
+ function enable_logo_in_header() {
783
+ global $post;
784
+
785
+ if ( _is_wcf_checkout_type() ) {
786
+ $checkout_id = $post->ID;
787
+ } else {
788
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
789
+ }
790
+
791
+ $header_logo_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-image' );
792
+ $add_image_markup = '';
793
+
794
+ if ( isset( $header_logo_image ) && ! empty( $header_logo_image ) ) {
795
+ $add_image_markup = '<div class="wcf-checkout-header-image">';
796
+ $add_image_markup .= '<img src="' . $header_logo_image . '" />';
797
+ $add_image_markup .= '</div>';
798
+ }
799
+
800
+ echo $add_image_markup;
801
+ }
802
+
803
+ /**
804
+ * Add text to the bootom of the checkout page.
805
+ *
806
+ * @return void
807
+ */
808
+ function show_cartflows_copyright_message() {
809
+ $output_string = '';
810
+
811
+ $output_string .= '<div class="wcf-footer-primary">';
812
+ $output_string .= '<div class="wcf-footer-content">';
813
+ $output_string .= '<p class="wcf-footer-message">';
814
+ $output_string .= 'Checkout powered by CartFlows';
815
+ $output_string .= '</p>';
816
+ $output_string .= '</div>';
817
+ $output_string .= '</div>';
818
+
819
+ echo $output_string;
820
+ }
821
+
822
+ /**
823
+ * Redirect users to our checkout if hidden param
824
+ *
825
+ * @param string $redirect redirect url.
826
+ * @param object $user user.
827
+ * @return string
828
+ */
829
+ function after_login_redirect( $redirect, $user ) {
830
+
831
+ if ( isset( $_POST['_wcf_checkout_id'] ) ) {
832
+
833
+ $checkout_id = intval( $_POST['_wcf_checkout_id'] );
834
+
835
+ $redirect = get_permalink( $checkout_id );
836
+ }
837
+
838
+ return $redirect;
839
+ }
840
+
841
+ /**
842
+ * Display coupon code field after review order fields.
843
+ */
844
+ function display_custom_coupon_field() {
845
+
846
+ $coupon_enabled = apply_filters( 'woocommerce_coupons_enabled', true );
847
+
848
+ if ( ! $coupon_enabled ) {
849
+ return;
850
+ }
851
+
852
+ ob_start();
853
+
854
+ ?>
855
+ <div class="wcf-custom-coupon-field">
856
+ <div class="wcf-coupon-col-1">
857
+ <span>
858
+ <input type="text" name="coupon_code" class="input-text cf-coupon-code-input" placeholder="Coupon code" id="coupon_code" value="">
859
+ </span>
860
+ </div>
861
+ <div class="wcf-coupon-col-2">
862
+ <span>
863
+ <button type="button" class="button cf-submit-coupon wcf-btn-small" name="apply_coupon" value="Apply">Apply</button>
864
+ </span>
865
+ </div>
866
+ </div>
867
+
868
+ <?php
869
+
870
+ echo ob_get_clean();
871
+ }
872
+
873
+ /**
874
+ * Apply coupon on submit of custom coupon form.
875
+ */
876
+ function apply_coupon() {
877
+
878
+ check_ajax_referer( 'cf-apply-coupon', 'security' );
879
+
880
+ $result = WC()->cart->add_discount( sanitize_text_field( wp_unslash( $_POST['coupon_code'] ) ) );
881
+
882
+ echo json_encode( $result );
883
+ die();
884
+ }
885
+
886
+ /**
887
+ * Added ajax nonce to localize variable.
888
+ *
889
+ * @param array $vars localize variables.
890
+ */
891
+ function add_localize_vars( $vars ) {
892
+
893
+ $vars['cf_validate_coupon_nonce'] = wp_create_nonce( 'cf-apply-coupon' );
894
+
895
+ return $vars;
896
+ }
897
+
898
+ /**
899
+ * Add custom class to the fields to change the UI to three column.
900
+ *
901
+ * @param array $fields fields.
902
+ */
903
+ function add_three_column_layout_fields( $fields ) {
904
+
905
+ if ( empty( $fields['billing']['billing_address_2'] ) ) {
906
+
907
+ if ( isset( $fields['billing']['billing_address_1'] ) ) {
908
+ $fields['billing']['billing_address_1']['class'] = array( 'form-row-full' );
909
+ }
910
+ }
911
+
912
+ if ( empty( $fields['shipping']['shipping_address_2'] ) ) {
913
+
914
+ if ( isset( $fields['shipping']['shipping_address_1'] ) ) {
915
+ $fields['shipping']['shipping_address_1']['class'] = array( 'form-row-full' );
916
+ }
917
+ }
918
+
919
+ if ( isset( $fields['billing']['billing_city'] ) &&
920
+ isset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] ) ) {
921
+
922
+ $fields['billing']['billing_city']['class'] = array( 'wcf-form-col-3' );
923
+ $fields['billing']['billing_state']['class'] = array( 'wcf-form-col-3' );
924
+ $fields['billing']['billing_postcode']['class'] = array( 'wcf-form-col-3' );
925
+ }
926
+
927
+ if ( isset( $fields['shipping']['shipping_city'] ) &&
928
+ isset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] ) ) {
929
+
930
+ $fields['shipping']['shipping_city']['class'] = array( 'wcf-form-col-3' );
931
+ $fields['shipping']['shipping_state']['class'] = array( 'wcf-form-col-3' );
932
+ $fields['shipping']['shipping_postcode']['class'] = array( 'wcf-form-col-3' );
933
+ }
934
+
935
+ return $fields;
936
+ }
937
+ }
938
+
939
+ /**
940
+ * Kicking this off by calling 'get_instance()' method
941
+ */
942
+ Cartflows_Checkout_Markup::get_instance();
modules/checkout/classes/class-cartflows-checkout-meta.php ADDED
@@ -0,0 +1,757 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout post meta
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Checkout_Meta extends Cartflows_Meta {
12
+
13
+ /**
14
+ * Instance
15
+ *
16
+ * @var $instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Meta Option
22
+ *
23
+ * @var $meta_option
24
+ */
25
+ private static $meta_option = null;
26
+
27
+ /**
28
+ * Initiator
29
+ */
30
+ public static function get_instance() {
31
+ if ( ! isset( self::$instance ) ) {
32
+ self::$instance = new self;
33
+ }
34
+
35
+ return self::$instance;
36
+ }
37
+
38
+ /**
39
+ * Constructor
40
+ */
41
+ public function __construct() {
42
+
43
+ /* Init Metabox */
44
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
45
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
46
+ }
47
+
48
+ /**
49
+ * Init Metabox
50
+ */
51
+ public function init_metabox() {
52
+
53
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
54
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
55
+ }
56
+
57
+ /**
58
+ * Setup Metabox
59
+ */
60
+ function setup_meta_box() {
61
+
62
+ // Get all posts.
63
+ $post_types = get_post_types();
64
+
65
+ if ( _is_wcf_checkout_type() ) {
66
+ add_meta_box(
67
+ 'wcf-checkout-settings', // Id.
68
+ __( 'Checkout Layout', 'cartflows' ), // Title.
69
+ array( $this, 'markup_meta_box' ), // Callback.
70
+ wcf()->utils->get_step_post_type(), // Post_type.
71
+ 'normal', // Context.
72
+ 'high' // Priority.
73
+ );
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Metabox Markup
79
+ *
80
+ * @param object $post Post object.
81
+ * @return void
82
+ */
83
+ function markup_meta_box( $post ) {
84
+
85
+ wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
86
+
87
+ $stored = get_post_meta( $post->ID );
88
+
89
+ $checkout_meta = self::get_meta_option( $post->ID );
90
+
91
+ // Set stored and override defaults.
92
+ foreach ( $stored as $key => $value ) {
93
+ if ( array_key_exists( $key, $checkout_meta ) ) {
94
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
95
+ } else {
96
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
97
+ }
98
+ }
99
+
100
+ // Get defaults.
101
+ $meta = self::get_meta_option( $post->ID );
102
+ $checkout_data = array();
103
+
104
+ foreach ( $meta as $key => $value ) {
105
+
106
+ $checkout_data[ $key ] = $meta[ $key ]['default'];
107
+ }
108
+
109
+ /*
110
+ $billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post->ID );
111
+
112
+ foreach ( $billing_fields as $key => $value ) {
113
+
114
+ $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
115
+ }
116
+
117
+ $shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post->ID );
118
+
119
+ foreach ( $shipping_fields as $key => $value ) {
120
+
121
+ $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
122
+ }
123
+
124
+ $additional_fields = Cartflows_Helper::get_checkout_fields( 'additional', $post->ID );
125
+
126
+ foreach ( $additional_fields as $key => $value ) {
127
+
128
+ $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
129
+ }
130
+ */
131
+
132
+ do_action( 'wcf_checkout_settings_markup_before' );
133
+ $this->tabs_markup( $checkout_data, $post->ID );
134
+ do_action( 'wcf_checkout_settings_markup_after' );
135
+ }
136
+
137
+ /**
138
+ * Page Header Tabs
139
+ *
140
+ * @param array $options options.
141
+ * @param int $post_id post ID.
142
+ */
143
+ function tabs_markup( $options, $post_id ) {
144
+
145
+ $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
146
+
147
+ if ( empty( $active_tab ) ) {
148
+ $active_tab = 'wcf-checkout-shortcodes';
149
+ }
150
+
151
+ $tabs = array(
152
+ array(
153
+ 'title' => __( 'Shortcodes', 'cartflows' ),
154
+ 'id' => 'wcf-checkout-shortcodes',
155
+ 'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
156
+ 'icon' => 'dashicons-editor-code',
157
+ 'help_text' => 'Help Helpppp...',
158
+ ),
159
+ array(
160
+ 'title' => __( 'Select Product', 'cartflows' ),
161
+ 'id' => 'wcf-checkout-general',
162
+ 'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
163
+ 'icon' => 'dashicons-info',
164
+ ),
165
+ array(
166
+ 'title' => __( 'Order Bump', 'cartflows' ),
167
+ 'id' => 'wcf-product-order-bump',
168
+ 'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
169
+ 'icon' => 'dashicons-cart',
170
+ ),
171
+ array(
172
+ 'title' => __( 'Checkout Design', 'cartflows' ),
173
+ 'id' => 'wcf-checkout-style',
174
+ 'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
175
+ 'icon' => 'dashicons-admin-customizer',
176
+ ),
177
+ array(
178
+ 'title' => __( 'Checkout Fields', 'cartflows' ),
179
+ 'id' => 'wcf-checkout-custom-fields',
180
+ 'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
181
+ 'icon' => 'dashicons-welcome-widgets-menus',
182
+ ),
183
+ array(
184
+ 'title' => __( 'Logo ( Optional )', 'cartflows' ),
185
+ 'id' => 'wcf-checkout-header',
186
+ 'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
187
+ 'icon' => 'dashicons-format-image',
188
+ ),
189
+ );
190
+
191
+ ?>
192
+ <div class="wcf-checkout-table wcf-metabox-wrap widefat">
193
+ <div class="wcf-table-container">
194
+ <div class="wcf-column-left">
195
+ <div class="wcf-tab-wrapper">
196
+
197
+ <?php foreach ( $tabs as $key => $tab ) { ?>
198
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
199
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
200
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
201
+ </div>
202
+ <?php } ?>
203
+
204
+ <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
205
+ </div>
206
+ </div>
207
+ <div class="wcf-column-right">
208
+ <?php $this->tab_shortcodes( $options, $post_id ); ?>
209
+ <?php $this->tab_general( $options, $post_id ); ?>
210
+ <?php $this->tab_style( $options, $post_id ); ?>
211
+ <?php $this->tab_product_bump( $options, $post_id ); ?>
212
+ <?php $this->tab_custom_fields( $options, $post_id ); ?>
213
+ <?php $this->tab_header_content( $options, $post_id ); ?>
214
+ <?php $this->right_column_footer( $options, $post_id ); ?>
215
+ </div>
216
+ </div>
217
+ </div>
218
+
219
+ <?php
220
+ }
221
+
222
+ /**
223
+ * Shortcodes tab
224
+ *
225
+ * @param array $options options.
226
+ * @param int $post_id post ID.
227
+ */
228
+ function tab_shortcodes( $options, $post_id ) {
229
+ ?>
230
+ <div class="wcf-checkout-shortcodes wcf-tab-content widefat">
231
+
232
+ <?php
233
+
234
+ echo wcf()->meta->get_shortcode_field(
235
+ array(
236
+ 'label' => 'Checkout Page',
237
+ 'name' => 'wcf-checkout-shortcode',
238
+ 'content' => '[cartflows_checkout]',
239
+ 'help' => __( 'Add this shortcode to your checkout page', 'cartflows' ),
240
+ )
241
+ );
242
+ ?>
243
+ </div>
244
+ <?php
245
+ }
246
+
247
+
248
+ /**
249
+ * General tab
250
+ *
251
+ * @param array $options options.
252
+ * @param int $post_id post ID.
253
+ */
254
+ function tab_general( $options, $post_id ) {
255
+ ?>
256
+ <div class="wcf-checkout-general wcf-tab-content widefat">
257
+
258
+ <?php
259
+
260
+ echo wcf()->meta->get_product_selection_repeater(
261
+ array(
262
+ 'name' => 'wcf-checkout-products',
263
+ 'value' => $options['wcf-checkout-products'],
264
+ 'allow_clear' => true,
265
+ )
266
+ );
267
+
268
+ do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
269
+
270
+ ?>
271
+ </div>
272
+ <?php
273
+ }
274
+
275
+ /**
276
+ * Product bump tab
277
+ *
278
+ * @param array $options options.
279
+ * @param int $post_id post ID.
280
+ */
281
+ function tab_product_bump( $options, $post_id ) {
282
+ ?>
283
+ <div class="wcf-product-order-bump wcf-tab-content widefat">
284
+ <?php
285
+ if ( ! _is_cartflows_pro() ) {
286
+
287
+ echo wcf()->meta->get_description_field(
288
+ array(
289
+ 'name' => 'wcf-upgrade-to-pro',
290
+ 'content' => '<i>' . __( 'Upgrade to <a href="#">CartFlows Pro</a> for Order Bump feature', 'cartflows' ) . '</i>',
291
+ )
292
+ );
293
+ }
294
+ ?>
295
+
296
+ <?php do_action( 'cartflows_order_bump_tab_content', $options, $post_id ); ?>
297
+ </div>
298
+ <?php
299
+ }
300
+ /**
301
+ * Tab custom fields
302
+ *
303
+ * @param array $options options.
304
+ * @param int $post_id post ID.
305
+ */
306
+ function tab_custom_fields( $options, $post_id ) {
307
+ ?>
308
+ <div class="wcf-checkout-custom-fields wcf-tab-content widefat">
309
+ <?php
310
+ /* Custom Checkout Fields Section */
311
+
312
+ if ( ! _is_cartflows_pro() ) {
313
+
314
+ echo wcf()->meta->get_description_field(
315
+ array(
316
+ 'name' => 'wcf-upgrade-to-pro',
317
+ 'content' => '<i>' . __( 'Upgrade to <a href="#">CartFlows Pro</a> for Custom Fields feature', 'cartflows' ) . '</i>',
318
+ )
319
+ );
320
+ }
321
+ ?>
322
+ <?php do_action( 'cartflows_custom_fields_tab_content', $options, $post_id ); ?>
323
+ </div>
324
+ <?php
325
+ }
326
+
327
+ /**
328
+ * Tab style
329
+ *
330
+ * @param array $options options.
331
+ * @param int $post_id post ID.
332
+ */
333
+ function tab_style( $options, $post_id ) {
334
+ ?>
335
+
336
+ <div class="wcf-checkout-style wcf-tab-content widefat">
337
+ <div class="wcf-cs-fields">
338
+ <div class="wcf-cs-checkbox-field">
339
+ <?php
340
+
341
+ $layout_pro_option = array();
342
+
343
+ if ( ! _is_cartflows_pro() ) {
344
+ $layout_pro_option = array(
345
+ 'one-column' => __( 'One Column (Available in CartFlows Pro) ', 'cartflows' ),
346
+ );
347
+ }
348
+
349
+ echo wcf()->meta->get_select_field(
350
+ array(
351
+ 'label' => __( 'Checkout Skin', 'cartflows' ),
352
+ 'name' => 'wcf-checkout-layout',
353
+ 'value' => $options['wcf-checkout-layout'],
354
+ 'options' => array(
355
+ 'one-column' => __( 'One Column', 'cartflows' ),
356
+ 'two-column' => __( 'Two Column', 'cartflows' ),
357
+ ),
358
+ 'pro-options' => $layout_pro_option,
359
+
360
+ )
361
+ );
362
+
363
+ echo wcf()->meta->get_color_picker_field(
364
+ array(
365
+ 'label' => __( 'Primary Color', 'cartflows' ),
366
+ 'name' => 'wcf-primary-color',
367
+ 'value' => $options['wcf-primary-color'],
368
+ )
369
+ );
370
+
371
+ echo wcf()->meta->get_font_family_field(
372
+ array(
373
+ 'for' => 'wcf-base',
374
+ 'label' => __( 'Font Family', 'cartflows' ),
375
+ 'name' => 'wcf-base-font-family',
376
+ 'value' => $options['wcf-base-font-family'],
377
+ )
378
+ );
379
+
380
+ echo wcf()->meta->get_checkbox_field(
381
+ array(
382
+ 'label' => __( 'Advance Options', 'cartflows' ),
383
+ 'name' => 'wcf-advance-options-fields',
384
+ 'value' => $options['wcf-advance-options-fields'],
385
+ 'after' => 'Enable',
386
+ )
387
+ );
388
+ ?>
389
+ </div>
390
+ <div class="wcf-cs-fields-options">
391
+ <?php
392
+ echo wcf()->meta->get_section(
393
+ array(
394
+ 'label' => __( 'Heading', 'cartflows' ),
395
+ )
396
+ );
397
+
398
+ echo wcf()->meta->get_color_picker_field(
399
+ array(
400
+ 'label' => __( 'Heading Color', 'cartflows' ),
401
+ 'name' => 'wcf-heading-color',
402
+ 'value' => $options['wcf-heading-color'],
403
+ )
404
+ );
405
+
406
+ echo wcf()->meta->get_font_family_field(
407
+ array(
408
+ 'for' => 'wcf-heading',
409
+ 'label' => __( 'Font Family', 'cartflows' ),
410
+ 'name' => 'wcf-heading-font-family',
411
+ 'value' => $options['wcf-heading-font-family'],
412
+ )
413
+ );
414
+
415
+ echo wcf()->meta->get_font_weight_field(
416
+ array(
417
+ 'for' => 'wcf-heading',
418
+ 'label' => __( 'Font Weight', 'cartflows' ),
419
+ 'name' => 'wcf-heading-font-weight',
420
+ 'value' => $options['wcf-heading-font-weight'],
421
+ )
422
+ );
423
+
424
+ echo wcf()->meta->get_section(
425
+ array(
426
+ 'label' => __( 'Input Fields', 'cartflows' ),
427
+ )
428
+ );
429
+
430
+ $fields_skin_pro_option = array();
431
+
432
+ if ( ! _is_cartflows_pro() ) {
433
+ $fields_skin_pro_option = array(
434
+ 'skin-one' => __( 'Style 1 (Available in CartFlows Pro)', 'cartflows' ),
435
+ );
436
+ }
437
+
438
+ echo wcf()->meta->get_select_field(
439
+ array(
440
+ 'label' => __( 'Style', 'cartflows' ),
441
+ 'name' => 'wcf-fields-skins',
442
+ 'value' => $options['wcf-fields-skins'],
443
+ 'options' => array(
444
+ 'default' => __( 'Default', 'cartflows' ),
445
+ 'style-one' => __( 'Style 1', 'cartflows' ),
446
+ ),
447
+ 'pro-options' => $fields_skin_pro_option,
448
+
449
+ )
450
+ );
451
+
452
+ echo wcf()->meta->get_font_family_field(
453
+ array(
454
+ 'for' => 'wcf-input',
455
+ 'label' => __( 'Font Family', 'cartflows' ),
456
+ 'name' => 'wcf-input-font-family',
457
+ 'value' => $options['wcf-input-font-family'],
458
+ )
459
+ );
460
+
461
+ echo wcf()->meta->get_font_weight_field(
462
+ array(
463
+ 'for' => 'wcf-input',
464
+ 'label' => __( 'Font Weight', 'cartflows' ),
465
+ 'name' => 'wcf-input-font-weight',
466
+ 'value' => $options['wcf-input-font-weight'],
467
+ )
468
+ );
469
+
470
+ echo wcf()->meta->get_select_field(
471
+ array(
472
+ 'label' => __( 'Size', 'cartflows' ),
473
+ 'name' => 'wcf-input-field-size',
474
+ 'value' => $options['wcf-input-field-size'],
475
+ 'options' => array(
476
+ '33px' => __( 'Extra Small', 'cartflows' ),
477
+ '38px' => __( 'Small', 'cartflows' ),
478
+ '44px' => __( 'Medium', 'cartflows' ),
479
+ '58px' => __( 'Large', 'cartflows' ),
480
+ '68px' => __( 'Extra Large', 'cartflows' ),
481
+ 'custom' => __( 'Custom', 'cartflows' ),
482
+ ),
483
+ )
484
+ );
485
+
486
+ echo wcf()->meta->get_number_field(
487
+ array(
488
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
489
+ 'name' => 'wcf-field-tb-padding',
490
+ 'value' => $options['wcf-field-tb-padding'],
491
+ )
492
+ );
493
+
494
+ echo wcf()->meta->get_number_field(
495
+ array(
496
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
497
+ 'name' => 'wcf-field-lr-padding',
498
+ 'value' => $options['wcf-field-lr-padding'],
499
+ )
500
+ );
501
+
502
+ echo wcf()->meta->get_color_picker_field(
503
+ array(
504
+ 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
505
+ 'name' => 'wcf-field-color',
506
+ 'value' => $options['wcf-field-color'],
507
+ )
508
+ );
509
+
510
+ echo wcf()->meta->get_color_picker_field(
511
+ array(
512
+ 'label' => __( 'Background Color', 'cartflows' ),
513
+ 'name' => 'wcf-field-bg-color',
514
+ 'value' => $options['wcf-field-bg-color'],
515
+ )
516
+ );
517
+
518
+ echo wcf()->meta->get_color_picker_field(
519
+ array(
520
+ 'label' => __( 'Border Color', 'cartflows' ),
521
+ 'name' => 'wcf-field-border-color',
522
+ 'value' => $options['wcf-field-border-color'],
523
+ )
524
+ );
525
+ echo wcf()->meta->get_color_picker_field(
526
+ array(
527
+ 'label' => __( 'Label Color', 'cartflows' ),
528
+ 'name' => 'wcf-field-label-color',
529
+ 'value' => $options['wcf-field-label-color'],
530
+ )
531
+ );
532
+
533
+ ?>
534
+ </div>
535
+ <div class="wcf-cs-button-options">
536
+ <?php
537
+
538
+ echo wcf()->meta->get_section(
539
+ array(
540
+ 'label' => __( 'Buttons', 'cartflows' ),
541
+ )
542
+ );
543
+
544
+ echo wcf()->meta->get_font_family_field(
545
+ array(
546
+ 'for' => 'wcf-button',
547
+ 'label' => __( 'Font Family', 'cartflows' ),
548
+ 'name' => 'wcf-button-font-family',
549
+ 'value' => $options['wcf-button-font-family'],
550
+ )
551
+ );
552
+
553
+ echo wcf()->meta->get_font_weight_field(
554
+ array(
555
+ 'for' => 'wcf-button',
556
+ 'label' => __( 'Font Weight', 'cartflows' ),
557
+ 'name' => 'wcf-button-font-weight',
558
+ 'value' => $options['wcf-button-font-weight'],
559
+ )
560
+ );
561
+
562
+ echo wcf()->meta->get_select_field(
563
+ array(
564
+ 'label' => __( 'Size', 'cartflows' ),
565
+ 'name' => 'wcf-input-button-size',
566
+ 'value' => $options['wcf-input-button-size'],
567
+ 'options' => array(
568
+ '33px' => __( 'Extra Small', 'cartflows' ),
569
+ '38px' => __( 'Small', 'cartflows' ),
570
+ '44px' => __( 'Medium', 'cartflows' ),
571
+ '58px' => __( 'Large', 'cartflows' ),
572
+ '68px' => __( 'Extra Large', 'cartflows' ),
573
+ 'custom' => __( 'Custom', 'cartflows' ),
574
+ ),
575
+ )
576
+ );
577
+
578
+ echo wcf()->meta->get_number_field(
579
+ array(
580
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
581
+ 'name' => 'wcf-submit-tb-padding',
582
+ 'value' => $options['wcf-submit-tb-padding'],
583
+ )
584
+ );
585
+
586
+ echo wcf()->meta->get_number_field(
587
+ array(
588
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
589
+ 'name' => 'wcf-submit-lr-padding',
590
+ 'value' => $options['wcf-submit-lr-padding'],
591
+ )
592
+ );
593
+
594
+ echo wcf()->meta->get_color_picker_field(
595
+ array(
596
+ 'label' => __( 'Text Color', 'cartflows' ),
597
+ 'name' => 'wcf-submit-color',
598
+ 'value' => $options['wcf-submit-color'],
599
+ )
600
+ );
601
+
602
+ echo wcf()->meta->get_color_picker_field(
603
+ array(
604
+ 'label' => __( 'Text Hover Color', 'cartflows' ),
605
+ 'name' => 'wcf-submit-hover-color',
606
+ 'value' => $options['wcf-submit-hover-color'],
607
+ )
608
+ );
609
+
610
+ echo wcf()->meta->get_color_picker_field(
611
+ array(
612
+ 'label' => __( 'Background Color', 'cartflows' ),
613
+ 'name' => 'wcf-submit-bg-color',
614
+ 'value' => $options['wcf-submit-bg-color'],
615
+ )
616
+ );
617
+
618
+ echo wcf()->meta->get_color_picker_field(
619
+ array(
620
+ 'label' => __( 'Background Hover Color', 'cartflows' ),
621
+ 'name' => 'wcf-submit-bg-hover-color',
622
+ 'value' => $options['wcf-submit-bg-hover-color'],
623
+ )
624
+ );
625
+
626
+ echo wcf()->meta->get_color_picker_field(
627
+ array(
628
+ 'label' => __( 'Border Color', 'cartflows' ),
629
+ 'name' => 'wcf-submit-border-color',
630
+ 'value' => $options['wcf-submit-border-color'],
631
+ )
632
+ );
633
+
634
+ echo wcf()->meta->get_color_picker_field(
635
+ array(
636
+ 'label' => __( 'Border Hover Color', 'cartflows' ),
637
+ 'name' => 'wcf-submit-border-hover-color',
638
+ 'value' => $options['wcf-submit-border-hover-color'],
639
+ )
640
+ );
641
+
642
+ ?>
643
+ </div>
644
+ <div class="wcf-cs-section-options">
645
+ <?php
646
+
647
+ echo wcf()->meta->get_section(
648
+ array(
649
+ 'label' => __( 'Sections', 'cartflows' ),
650
+ )
651
+ );
652
+
653
+ echo wcf()->meta->get_color_picker_field(
654
+ array(
655
+ 'label' => __( 'Highlight Area Background Color', 'cartflows' ),
656
+ 'name' => 'wcf-hl-bg-color',
657
+ 'value' => $options['wcf-hl-bg-color'],
658
+ )
659
+ );
660
+
661
+ echo wcf()->meta->get_hidden_field(
662
+ array(
663
+ 'name' => 'wcf-field-google-font-url',
664
+ 'value' => $options['wcf-field-google-font-url'],
665
+ )
666
+ );
667
+ ?>
668
+ </div>
669
+ <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
670
+ </div>
671
+ </div>
672
+ <?php
673
+ }
674
+
675
+
676
+ /**
677
+ * Tab Header (Used for add logo into header)
678
+ *
679
+ * @param array $options options.
680
+ * @param int $post_id post ID.
681
+ */
682
+ function tab_header_content( $options, $post_id ) {
683
+ ?>
684
+
685
+ <div class="wcf-checkout-header wcf-tab-content widefat">
686
+ <?php
687
+
688
+ $layout_pro_option = array();
689
+
690
+ echo wcf()->meta->get_image_field(
691
+ array(
692
+ 'name' => 'wcf-header-logo-image',
693
+ 'value' => $options['wcf-header-logo-image'],
694
+ 'label' => __( 'Header Logo', 'cartflows' ),
695
+ )
696
+ );
697
+
698
+ echo wcf()->meta->get_number_field(
699
+ array(
700
+ 'name' => 'wcf-header-logo-width',
701
+ 'value' => $options['wcf-header-logo-width'],
702
+ 'label' => __( 'Logo Width (In px)', 'cartflows' ),
703
+ )
704
+ );
705
+ ?>
706
+ <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
707
+ </div>
708
+ <?php
709
+ }
710
+ /**
711
+ * Get metabox options
712
+ *
713
+ * @param int $post_id post ID.
714
+ */
715
+ public static function get_meta_option( $post_id ) {
716
+
717
+ if ( null === self::$meta_option ) {
718
+
719
+ /**
720
+ * Set metabox options
721
+ *
722
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
723
+ */
724
+ self::$meta_option = wcf()->options->get_checkout_fields( $post_id );
725
+ }
726
+
727
+ return self::$meta_option;
728
+ }
729
+
730
+ /**
731
+ * Metabox Save
732
+ *
733
+ * @param number $post_id Post ID.
734
+ * @return void
735
+ */
736
+ function save_meta_box( $post_id ) {
737
+
738
+ // Checks save status.
739
+ $is_autosave = wp_is_post_autosave( $post_id );
740
+ $is_revision = wp_is_post_revision( $post_id );
741
+
742
+ $is_valid_nonce = ( isset( $_POST['nonce-checkout-step-meta'] ) && wp_verify_nonce( $_POST['nonce-checkout-step-meta'], 'save-nonce-checkout-step-meta' ) ) ? true : false;
743
+
744
+ // Exits script depending on save status.
745
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
746
+ return;
747
+ }
748
+
749
+ wcf()->options->save_checkout_fields( $post_id );
750
+ }
751
+
752
+ }
753
+
754
+ /**
755
+ * Kicking this off by calling 'get_instance()' method
756
+ */
757
+ Cartflows_Checkout_Meta::get_instance();
modules/checkout/templates/embed/checkout-template-simple.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout template
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
9
+ $fields_skins = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-fields-skins' );
10
+ ?>
11
+ <div id="wcf-embed-checkout-form" class="wcf-embed-checkout-form wcf-embed-checkout-form-<?php echo $checkout_layout; ?> wcf-field-<?php echo $fields_skins; ?>">
12
+ <!-- CHECKOUT SHORTCODE -->
13
+ <?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
14
+
15
+ <?php
16
+ $checkout_html = do_shortcode( '[woocommerce_checkout]' );
17
+
18
+ if (
19
+ empty( $checkout_html ) ||
20
+ trim( $checkout_html ) == '<div class="woocommerce"></div>'
21
+ ) {
22
+ echo __( 'Your cart is currently empty.', 'cartflows' );
23
+ } else {
24
+ echo $checkout_html;
25
+ }
26
+ ?>
27
+
28
+ <?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
29
+ <!-- END CHECKOUT SHORTCODE -->
30
+ </div>
modules/checkout/templates/wcf-template.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ ?>
9
+ <!DOCTYPE html>
10
+ <html <?php language_attributes(); ?>>
11
+ <head>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>">
13
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
14
+ <meta name="robots" content="noindex">
15
+ <title><?php wp_title( '-', true, 'right' ); ?><?php bloginfo( 'name' ); ?></title>
16
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
17
+
18
+ <?php wp_head(); ?>
19
+ </head>
20
+ <body <?php body_class(); ?>>
21
+ <div class="wrapper">
22
+ <header class="header">
23
+ </header>
24
+
25
+ <div class="main-container">
26
+ <div class="checkout-forms">
27
+ <!-- CHECKOUT SHORTCODE -->
28
+ <?php
29
+
30
+ $checkout_html = do_shortcode( '[woocommerce_checkout]' );
31
+
32
+ if (
33
+ empty( $checkout_html ) ||
34
+ trim( $checkout_html ) == '<div class="woocommerce"></div>'
35
+ ) {
36
+ echo __( 'Your cart is currently empty.', 'cartflows' );
37
+ } else {
38
+ echo $checkout_html;
39
+ }
40
+ ?>
41
+ <!-- END CHECKOUT SHORTCODE -->
42
+ </div>
43
+ </div>
44
+
45
+ <footer class="footer">
46
+ <p><?php _e( 'Copyright &copy;', 'cartflows' ); ?> <?php
47
+ echo date( 'Y' );
48
+ echo ' ' . get_bloginfo( 'name' );
49
+ ?>
50
+ - <?php _e( 'All Rights Reserved', 'cartflows' ); ?></p>
51
+ </footer>
52
+ </div>
53
+
54
+ <div class="wcf-hide">
55
+ <?php wp_footer(); ?>
56
+ </div>
57
+ </body>
58
+ </html>
modules/flow/class-cartflows-flow.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ define( 'CARTFLOWS_FLOW_DIR', CARTFLOWS_DIR . 'modules/flow/' );
9
+ define( 'CARTFLOWS_FLOW_URL', CARTFLOWS_URL . 'modules/flow/' );
10
+
11
+ /**
12
+ * Initial Setup
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Flow {
17
+
18
+
19
+ /**
20
+ * Member Variable
21
+ *
22
+ * @var object instance
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Initiator
28
+ */
29
+ public static function get_instance() {
30
+ if ( ! isset( self::$instance ) ) {
31
+ self::$instance = new self;
32
+ }
33
+ return self::$instance;
34
+ }
35
+
36
+ /**
37
+ * Constructor function that initializes required actions and hooks
38
+ */
39
+ public function __construct() {
40
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-loader.php';
41
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-meta.php';
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Kicking this off by calling 'get_instance()' method
47
+ */
48
+ Cartflows_Flow::get_instance();
modules/flow/classes/class-cartflows-flow-loader.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow loader
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Flow_Loader {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+ $this->include_files();
38
+ }
39
+
40
+ /**
41
+ * Load classes.
42
+ *
43
+ * @since 1.0.0
44
+ *
45
+ * @return void
46
+ */
47
+ function include_files() {
48
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-post-type.php';
49
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-step-post-type.php';
50
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-step-post-meta.php';
51
+ require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-shortcodes.php';
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Kicking this off by calling 'get_instance()' method
57
+ */
58
+ Cartflows_Flow_Loader::get_instance();
modules/flow/classes/class-cartflows-flow-meta.php ADDED
@@ -0,0 +1,743 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow meta
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Flow_Meta {
12
+
13
+
14
+ /**
15
+ * Instance
16
+ *
17
+ * @var $instance
18
+ */
19
+ private static $instance;
20
+
21
+ /**
22
+ * Meta Option
23
+ *
24
+ * @var $meta_option
25
+ */
26
+ private static $meta_option;
27
+
28
+ /**
29
+ * Initiator
30
+ */
31
+ public static function get_instance() {
32
+ if ( ! isset( self::$instance ) ) {
33
+ self::$instance = new self;
34
+ }
35
+
36
+ return self::$instance;
37
+ }
38
+
39
+ /**
40
+ * Constructor
41
+ */
42
+ public function __construct() {
43
+
44
+ add_action( 'admin_head', array( $this, 'menu_highlight' ) );
45
+
46
+ add_action( 'admin_init', array( $this, 'admin_init_actions' ) );
47
+
48
+ /* Init Metabox */
49
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
50
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
51
+
52
+ /* Add Scripts */
53
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 20 );
54
+
55
+ add_action( 'wp_ajax_cartflows_setup_default_steps', array( $this, 'cartflows_setup_default_steps' ) );
56
+ add_action( 'wp_ajax_cartflows_delete_flow_step', array( $this, 'cartflows_delete_flow_step' ) );
57
+
58
+ add_action( 'wp_ajax_cartflows_reorder_flow_steps', array( $this, 'cartflows_reorder_flow_steps' ) );
59
+
60
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
61
+
62
+ add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
63
+ }
64
+
65
+ /**
66
+ * Display admin notices.
67
+ *
68
+ * @since 1.0.0
69
+ *
70
+ * @return void
71
+ */
72
+ function admin_notices() {
73
+
74
+ if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type() ) {
75
+ return;
76
+ }
77
+
78
+ $flow_id = get_post_meta( get_the_id(), 'wcf-flow-id', true );
79
+ if ( $flow_id ) { ?>
80
+ <div class="wcf-notice-back-edit-flow">
81
+ <p>
82
+ <a href="<?php echo esc_url( get_edit_post_link( $flow_id ) ); ?>" class="button button-primary button-hero" style="text-decoration: none;">
83
+ <i class="dashicons dashicons-arrow-left-alt"></i>
84
+ <?php _e( 'Back to edit Flow', 'cartflows' ); ?>
85
+ </a>
86
+ </p>
87
+ </div>
88
+ <?php
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Initialize admin actions.
94
+ *
95
+ * @since 1.0.0
96
+ *
97
+ * @return void
98
+ */
99
+ function admin_init_actions() {
100
+ add_action( 'before_delete_post', array( $this, 'step_post_sync' ) );
101
+ add_action( 'wp_trash_post', array( $this, 'step_post_trash_sync' ) );
102
+ add_action( 'untrashed_post', array( $this, 'step_post_untrash_sync' ) );
103
+ }
104
+
105
+ /**
106
+ * Delete term data and steps data after deleting flow.
107
+ *
108
+ * @since 1.0.0
109
+ * @param int $pid post id.
110
+ *
111
+ * @return void
112
+ */
113
+ function step_post_sync( $pid ) {
114
+
115
+ global $post_type;
116
+
117
+ if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
118
+
119
+ $steps = get_post_meta( $pid, 'wcf-steps', true );
120
+
121
+ if ( $steps && is_array( $steps ) ) {
122
+ foreach ( $steps as $i => $step ) {
123
+ wp_delete_post( $step['id'], true );
124
+ }
125
+ }
126
+
127
+ $term_data = term_exists( 'flow-' . $pid, CARTFLOWS_TAXONOMY_STEP_FLOW );
128
+
129
+ if ( is_array( $term_data ) ) {
130
+ wp_delete_term( $term_data['term_id'], CARTFLOWS_TAXONOMY_STEP_FLOW );
131
+ }
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Trash steps data after trashing flow.
137
+ *
138
+ * @since 1.0.0
139
+ * @param int $pid post id.
140
+ *
141
+ * @return void
142
+ */
143
+ function step_post_trash_sync( $pid ) {
144
+
145
+ global $post_type;
146
+
147
+ if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
148
+
149
+ $steps = get_post_meta( $pid, 'wcf-steps', true );
150
+
151
+ if ( $steps && is_array( $steps ) ) {
152
+ foreach ( $steps as $i => $step ) {
153
+ wp_trash_post( $step['id'] );
154
+ }
155
+ }
156
+ }
157
+ }
158
+
159
+ /**
160
+ * Untrash steps data after restoring flow.
161
+ *
162
+ * @since 1.0.0
163
+ * @param int $pid post id.
164
+ *
165
+ * @return void
166
+ */
167
+ function step_post_untrash_sync( $pid ) {
168
+
169
+ global $post_type;
170
+
171
+ if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
172
+
173
+ $steps = get_post_meta( $pid, 'wcf-steps', true );
174
+
175
+ if ( $steps && is_array( $steps ) ) {
176
+ foreach ( $steps as $i => $step ) {
177
+ wp_untrash_post( $step['id'] );
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Setup default steps for flow
185
+ *
186
+ * @since 1.0.0
187
+ *
188
+ * @return void
189
+ */
190
+ public function cartflows_setup_default_steps() {
191
+
192
+ check_ajax_referer( 'wcf-setup-default-steps', 'security' );
193
+
194
+ $flow_id = intval( $_POST['post_id'] );
195
+
196
+ $result = array(
197
+ 'status' => false,
198
+ /* translators: %s flow id */
199
+ 'text' => sprintf( __( 'Steps not created for flow - %s', 'cartflows' ), $flow_id ),
200
+ );
201
+
202
+ if ( ! $flow_id ) {
203
+ wp_send_json( $result );
204
+ }
205
+
206
+ $is_step_exists = get_post_meta( $flow_id, 'wcf-steps', true );
207
+
208
+ if ( $is_step_exists ) {
209
+
210
+ $result = array(
211
+ 'status' => false,
212
+ /* translators: %s flow id */
213
+ 'text' => sprintf( __( 'Steps already exists. Flow - %s', 'cartflows' ), $flow_id ),
214
+ );
215
+
216
+ wp_send_json( $result );
217
+ }
218
+
219
+ /* Start Creating */
220
+
221
+ $flow_steps = array();
222
+
223
+ $steps_data = array(
224
+ 'landing' => __( 'Landing Page', 'cartflows' ),
225
+ 'checkout' => __( 'Checkout Page', 'cartflows' ),
226
+ 'thankyou' => __( 'Thank You Page', 'cartflows' ),
227
+ );
228
+
229
+ foreach ( $steps_data as $slug => $title ) {
230
+
231
+ $step_id = wp_insert_post(
232
+ array(
233
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
234
+ 'post_title' => $title,
235
+ 'post_content' => '[cartflows_navigation]',
236
+ 'post_status' => 'publish',
237
+ )
238
+ );
239
+
240
+ if ( $step_id ) {
241
+
242
+ $flow_steps[] = array(
243
+ 'id' => $step_id,
244
+ 'title' => $title,
245
+ 'type' => $slug,
246
+ );
247
+
248
+ // insert post meta.
249
+ update_post_meta( $step_id, 'wcf-flow-id', $flow_id );
250
+ update_post_meta( $step_id, 'wcf-step-type', $slug );
251
+
252
+ wp_set_object_terms( $step_id, $slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
253
+ wp_set_object_terms( $step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
254
+ }
255
+ }
256
+
257
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
258
+
259
+ $result = array(
260
+ 'status' => true,
261
+ /* translators: %s flow id */
262
+ 'text' => sprintf( __( 'Steps created for flow - %s', 'cartflows' ), $flow_id ),
263
+ 'redirect' => get_edit_post_link( $flow_id ),
264
+ );
265
+
266
+ wp_send_json( $result );
267
+ }
268
+
269
+ /**
270
+ * Create step for given flow.
271
+ *
272
+ * @param int $flow_id flow ID.
273
+ * @param int $step_type step type.
274
+ * @param int $step_title step title.
275
+ * @since 1.0.0
276
+ *
277
+ * @return int
278
+ */
279
+ public function create_step( $flow_id, $step_type, $step_title ) {
280
+
281
+ $new_step_id = wp_insert_post(
282
+ array(
283
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
284
+ 'post_title' => $step_title,
285
+ 'post_status' => 'publish',
286
+ )
287
+ );
288
+
289
+ if ( $new_step_id ) {
290
+
291
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
292
+
293
+ if ( ! is_array( $flow_steps ) ) {
294
+ $flow_steps = array();
295
+ }
296
+
297
+ $flow_steps[] = array(
298
+ 'id' => $new_step_id,
299
+ 'title' => $step_title,
300
+ 'type' => $step_type,
301
+ );
302
+
303
+ // insert post meta.
304
+ update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
305
+ update_post_meta( $new_step_id, 'wcf-step-type', $step_type );
306
+
307
+ wp_set_object_terms( $new_step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
308
+ wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
309
+ }
310
+
311
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
312
+
313
+ return $new_step_id;
314
+ }
315
+
316
+ /**
317
+ * Delete step for flow
318
+ *
319
+ * @since 1.0.0
320
+ *
321
+ * @return void
322
+ */
323
+ public function cartflows_delete_flow_step() {
324
+
325
+ check_ajax_referer( 'wcf-delete-flow-step', 'security' );
326
+
327
+ $flow_id = intval( $_POST['post_id'] );
328
+ $step_id = intval( $_POST['step_id'] );
329
+
330
+ $result = array(
331
+ 'status' => false,
332
+ /* translators: %s flow id */
333
+ 'text' => sprintf( __( 'Step not deleted for flow - %s', 'cartflows' ), $flow_id ),
334
+ );
335
+
336
+ if ( ! $flow_id || ! $step_id ) {
337
+ wp_send_json( $result );
338
+ }
339
+
340
+ wp_delete_post( $step_id, true );
341
+
342
+ $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
343
+
344
+ if ( ! is_array( $flow_steps ) ) {
345
+ wp_send_json( $result );
346
+ }
347
+
348
+ foreach ( $flow_steps as $index => $data ) {
349
+
350
+ if ( intval( $data['id'] ) === $step_id ) {
351
+ unset( $flow_steps[ $index ] );
352
+ break;
353
+ }
354
+ }
355
+
356
+ /* Set index order properly */
357
+ $flow_steps = array_merge( $flow_steps );
358
+
359
+ update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
360
+
361
+ $result = array(
362
+ 'status' => true,
363
+ /* translators: %s flow id */
364
+ 'text' => sprintf( __( 'Step deleted for flow - %s', 'cartflows' ), $flow_id ),
365
+ );
366
+
367
+ wp_send_json( $result );
368
+ }
369
+
370
+ /**
371
+ * Reorder step flow
372
+ *
373
+ * @since 1.0.0
374
+ *
375
+ * @return void
376
+ */
377
+ public function cartflows_reorder_flow_steps() {
378
+
379
+ check_ajax_referer( 'wcf-reorder-flow-steps', 'security' );
380
+
381
+ $flow_id = intval( $_POST['post_id'] );
382
+ $step_ids = array_map( 'intval', $_POST['step_ids'] );
383
+
384
+ $result = array(
385
+ 'status' => false,
386
+ /* translators: %s flow id */
387
+ 'text' => sprintf( __( 'Steps not sorted for flow - %s', 'cartflows' ), $flow_id ),
388
+ );
389
+
390
+ if ( ! $flow_id || ! is_array( $step_ids ) ) {
391
+ wp_send_json( $result );
392
+ }
393
+
394
+ $new_flow_steps = array();
395
+
396
+ foreach ( $step_ids as $index => $step_id ) {
397
+
398
+ $new_flow_steps[] = array(
399
+ 'id' => intval( $step_id ),
400
+ 'title' => get_the_title( $step_id ),
401
+ 'type' => get_post_meta( $step_id, 'wcf-step-type', true ),
402
+ );
403
+ }
404
+
405
+ update_post_meta( $flow_id, 'wcf-steps', $new_flow_steps );
406
+
407
+ $result = array(
408
+ 'status' => true,
409
+ /* translators: %s flow id */
410
+ 'text' => sprintf( __( 'Steps sorted for flow - %s', 'cartflows' ), $flow_id ),
411
+ );
412
+
413
+ wp_send_json( $result );
414
+ }
415
+
416
+
417
+ /**
418
+ * Load admin scripts
419
+ *
420
+ * @since 1.0.0
421
+ *
422
+ * @return void
423
+ */
424
+ public function admin_scripts() {
425
+
426
+ global $pagenow;
427
+ global $post;
428
+
429
+ $screen = get_current_screen();
430
+
431
+ if ( ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) && CARTFLOWS_FLOW_POST_TYPE == $screen->post_type ) {
432
+
433
+ wp_enqueue_script(
434
+ 'wcf-flow-meta',
435
+ CARTFLOWS_URL . 'admin/assets/js/flow-admin-edit.js',
436
+ array( 'jquery', 'jquery-ui-sortable' ),
437
+ CARTFLOWS_VER,
438
+ true
439
+ );
440
+
441
+ wp_enqueue_style( 'wcf-flow-meta', CARTFLOWS_URL . 'admin/assets/css/flow-admin-edit.css', '', CARTFLOWS_VER );
442
+ wp_style_add_data( 'wcf-flow-meta', 'rtl', 'replace' );
443
+
444
+ $localize = array(
445
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
446
+ );
447
+
448
+ wp_localize_script( 'jquery', 'cartflows', apply_filters( 'wcf_js_localize', $localize ) );
449
+ }
450
+ }
451
+
452
+ /**
453
+ * Initialize meta box
454
+ *
455
+ * @since 1.0.0
456
+ *
457
+ * @return void
458
+ */
459
+ public function init_metabox() {
460
+
461
+ /**
462
+ * Fires after the title field.
463
+ *
464
+ * @param WP_Post $post Post object.
465
+ */
466
+ add_action( 'add_meta_boxes', array( $this, 'settings_meta_box' ) );
467
+ add_action( 'edit_form_after_title', array( $this, 'setup_meta_box' ) );
468
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
469
+ }
470
+
471
+ /**
472
+ * Is first time import?
473
+ *
474
+ * @param integer $post_id post ID.
475
+ * @return bool
476
+ */
477
+ function is_flow_imported( $post_id = 0 ) {
478
+
479
+ if ( 0 === $post_id ) {
480
+ $post_id = get_the_ID();
481
+ }
482
+
483
+ $steps = get_post_meta( $post_id, 'wcf-steps', true );
484
+ $choice = get_post_meta( $post_id, 'wcf-flow-choise', true );
485
+
486
+ if ( empty( $steps ) && 'import' === $choice ) {
487
+ return true;
488
+ }
489
+
490
+ return false;
491
+ }
492
+
493
+ /**
494
+ * Setup meta box.
495
+ *
496
+ * @return void
497
+ */
498
+ function setup_meta_box() {
499
+ if ( ! Cartflows_Admin::is_flow_edit_admin() ) {
500
+ return;
501
+ }
502
+
503
+ /**
504
+ * Adding Add new step button to the top*/
505
+ echo $this->add_add_new_step_button();
506
+
507
+ $this->markup_meta_box();
508
+ }
509
+
510
+ /**
511
+ * Settings meta box.
512
+ *
513
+ * @return void
514
+ */
515
+ function settings_meta_box() {
516
+
517
+ if ( CARTFLOWS_FLOW_POST_TYPE == get_post_type() ) {
518
+
519
+ add_meta_box(
520
+ 'wcf-sandbox-settings', // Id.
521
+ __( 'Flow Settings', 'cartflows' ), // Title.
522
+ array( $this, 'sandbox_meta_box' ), // Callback.
523
+ CARTFLOWS_FLOW_POST_TYPE, // Post_type.
524
+ 'side', // Context.
525
+ 'high' // Priority.
526
+ );
527
+
528
+ do_action( 'cartflows_add_flow_metabox' );
529
+ }
530
+ }
531
+
532
+ /**
533
+ * Metabox Markup
534
+ *
535
+ * @return void
536
+ */
537
+ function markup_meta_box() {
538
+ global $post;
539
+
540
+ wp_nonce_field( 'save-nonce-flow-meta', 'nonce-flow-meta' );
541
+
542
+ // Get defaults.
543
+ $meta = self::get_current_post_meta( $post->ID );
544
+
545
+ /**
546
+ * Get options
547
+ */
548
+ $updated_data = array(
549
+ 'steps' => $meta['wcf-steps']['default'],
550
+ );
551
+
552
+ do_action( 'wcf_flow_settings_markup_before', $meta );
553
+ $this->page_header_tab( $updated_data );
554
+ do_action( 'wcf_flow_settings_markup_after', $meta );
555
+ }
556
+
557
+ /**
558
+ * Metabox Markup
559
+ *
560
+ * @param object $post Post object.
561
+ * @return void
562
+ */
563
+ function sandbox_meta_box( $post ) {
564
+
565
+ // Get defaults.
566
+ $meta = self::get_current_post_meta( $post->ID );
567
+
568
+ /**
569
+ * Get options
570
+ */
571
+ foreach ( $meta as $key => $value ) {
572
+ $updated_data[ $key ] = $meta[ $key ]['default'];
573
+ }
574
+
575
+ do_action( 'wcf_flow_sandbox_markup_before', $meta );
576
+ $this->sandbox_markup( $updated_data );
577
+ do_action( 'wcf_flow_sandbox_markup_after', $meta );
578
+ }
579
+
580
+ /**
581
+ * Page Header Tabs
582
+ *
583
+ * @param array $options Post meta.
584
+ * @return void
585
+ */
586
+ function page_header_tab( $options ) {
587
+
588
+ include_once CARTFLOWS_FLOW_DIR . 'view/meta-flow-steps.php';
589
+ }
590
+
591
+ /**
592
+ * Sandbox Markup
593
+ *
594
+ * @param array $options Post meta.
595
+ * @return void
596
+ */
597
+ function sandbox_markup( $options ) {
598
+ ?>
599
+ <div class="wcf-flow-sandbox-table wcf-general-metabox-wrap widefat">
600
+ <div class="wcf-flow-sandbox-table-container">
601
+ <?php
602
+ echo wcf()->meta->get_checkbox_field(
603
+ array(
604
+ 'name' => 'wcf-testing',
605
+ 'value' => $options['wcf-testing'],
606
+ 'after' => __( 'Enable Test Mode', 'cartflows' ),
607
+ )
608
+ );
609
+
610
+ echo wcf()->meta->get_description_field(
611
+ array(
612
+ 'name' => 'wcf-testing-note',
613
+ 'content' => __( 'Test mode enables you to preview your pages with random products for the sake of testing.', 'cartflows' ),
614
+ )
615
+ );
616
+
617
+ ?>
618
+ </div>
619
+ </div>
620
+ <?php
621
+ }
622
+
623
+ /**
624
+ * Keep the menu open when editing the flows.
625
+ * Highlights the wanted admin (sub-) menu items for the CPT.
626
+ *
627
+ * @since 1.0.0
628
+ */
629
+ public function menu_highlight() {
630
+ global $parent_file, $submenu_file, $post_type;
631
+ if ( CARTFLOWS_FLOW_POST_TYPE == $post_type ) :
632
+ $parent_file = CARTFLOWS_SLUG;
633
+ $submenu_file = 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE;
634
+ endif;
635
+ }
636
+
637
+ /**
638
+ * Get metabox options
639
+ *
640
+ * @param int $post_id post id.
641
+ * @return array
642
+ */
643
+ public static function get_meta_option( $post_id ) {
644
+
645
+ if ( null === self::$meta_option ) {
646
+ /**
647
+ * Set metabox options
648
+ */
649
+ self::$meta_option = wcf()->options->get_flow_fields( $post_id );
650
+ }
651
+
652
+ return self::$meta_option;
653
+ }
654
+
655
+ /**
656
+ * Get metabox options
657
+ *
658
+ * @param int $post_id post ID.
659
+ * @return array
660
+ */
661
+ public static function get_current_post_meta( $post_id ) {
662
+
663
+ $stored = get_post_meta( $post_id );
664
+
665
+ $default_meta = self::get_meta_option( $post_id );
666
+
667
+ // Set stored and override defaults.
668
+ foreach ( $stored as $key => $value ) {
669
+ if ( array_key_exists( $key, $default_meta ) ) {
670
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
671
+ } else {
672
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
673
+ }
674
+ }
675
+
676
+ return self::get_meta_option( $post_id );
677
+ }
678
+
679
+ /**
680
+ * Metabox Save
681
+ *
682
+ * @param number $post_id Post ID.
683
+ * @return void
684
+ */
685
+ function save_meta_box( $post_id ) {
686
+
687
+ // Checks save status.
688
+ $is_autosave = wp_is_post_autosave( $post_id );
689
+ $is_revision = wp_is_post_revision( $post_id );
690
+
691
+ $is_valid_nonce = ( isset( $_POST['nonce-flow-meta'] ) && wp_verify_nonce( $_POST['nonce-flow-meta'], 'save-nonce-flow-meta' ) ) ? true : false;
692
+
693
+ // Exits script depending on save status.
694
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
695
+ return;
696
+ }
697
+
698
+ wcf()->options->save_flow_fields( $post_id );
699
+ }
700
+
701
+ /**
702
+ * Localize variables in admin
703
+ *
704
+ * @param array $vars variables.
705
+ */
706
+ function localize_vars( $vars ) {
707
+
708
+ $ajax_actions = array(
709
+ 'wcf_setup_default_steps',
710
+ 'wcf_add_flow_step',
711
+ 'wcf_delete_flow_step',
712
+ 'wcf_reorder_flow_steps',
713
+ );
714
+
715
+ foreach ( $ajax_actions as $action ) {
716
+
717
+ $vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
718
+ }
719
+
720
+ return $vars;
721
+ }
722
+
723
+ /**
724
+ * Add New Step Button
725
+ *
726
+ * @return string
727
+ */
728
+ function add_add_new_step_button() {
729
+ $add_new_btn_markup = '<style>.wrap{ position:relative;}</style>';
730
+ $add_new_btn_markup .= "<div class='wcf-button-wrap'>";
731
+ $add_new_btn_markup .= "<button class='wcf-trigger-popup button button-primary'>";
732
+ $add_new_btn_markup .= esc_html( 'Add New Step', 'cartflows' );
733
+ $add_new_btn_markup .= '</button>';
734
+ $add_new_btn_markup .= '</div>';
735
+
736
+ return $add_new_btn_markup;
737
+ }
738
+ }
739
+
740
+ /**
741
+ * Kicking this off by calling 'get_instance()' method
742
+ */
743
+ Cartflows_Flow_Meta::get_instance();
modules/flow/classes/class-cartflows-flow-post-type.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow post type
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Flow_Post_Type {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ add_action( 'init', array( $this, 'flow_post_type' ) );
39
+ add_action( 'admin_menu', array( $this, 'register_as_submenu' ), 100 );
40
+
41
+ add_filter( 'post_updated_messages', array( $this, 'custom_post_type_post_update_messages' ) );
42
+
43
+ /* View Post URL */
44
+ add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
45
+ add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 10, 2 );
46
+ add_action( 'template_redirect', array( $this, 'redirect_to_step' ), 10 );
47
+ }
48
+
49
+ /**
50
+ * Create custom post type
51
+ */
52
+ function flow_post_type() {
53
+
54
+ $labels = array(
55
+ 'name' => esc_html_x( 'Flows', 'flow general name', 'cartflows' ),
56
+ 'singular_name' => esc_html_x( 'Flow', 'flow singular name', 'cartflows' ),
57
+ 'search_items' => esc_html__( 'Search Flows', 'cartflows' ),
58
+ 'all_items' => esc_html__( 'All Flows', 'cartflows' ),
59
+ 'edit_item' => esc_html__( 'Edit Flow', 'cartflows' ),
60
+ 'view_item' => esc_html__( 'View Flow', 'cartflows' ),
61
+ 'add_new' => esc_html__( 'Add New', 'cartflows' ),
62
+ 'update_item' => esc_html__( 'Update Flow', 'cartflows' ),
63
+ 'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
64
+ 'new_item_name' => esc_html__( 'New Flow Name', 'cartflows' ),
65
+ );
66
+
67
+ $args = array(
68
+ 'labels' => $labels,
69
+ 'show_in_menu' => false,
70
+ 'public' => false, // it's not public, not own permalink.
71
+ 'publicly_queryable' => true, // you should be able to query it.
72
+ 'show_ui' => true,
73
+ 'query_var' => true,
74
+ 'can_export' => true,
75
+ 'show_in_admin_bar' => true,
76
+ 'exclude_from_search' => true,
77
+ 'has_archive' => false, // it shouldn't have archive page.
78
+ 'rewrite' => false, // it shouldn't have rewrite rules.
79
+ 'supports' => array( 'title' ),
80
+ 'capability_type' => 'post',
81
+ );
82
+
83
+ if ( false && ! _is_cartflows_pro() ) {
84
+
85
+ $flow_posts = get_posts(
86
+ array(
87
+ 'posts_per_page' => 4,
88
+ 'post_type' => CARTFLOWS_FLOW_POST_TYPE,
89
+ 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit', 'trash' ),
90
+ )
91
+ );
92
+
93
+ if ( is_array( $flow_posts ) ) {
94
+
95
+ $flow_count = count( $flow_posts );
96
+
97
+ if ( $flow_count > 3 || 3 === $flow_count ) {
98
+
99
+ $args['capabilities'] = array(
100
+ 'create_posts' => 'do_not_allow',
101
+ );
102
+ $args['map_meta_cap'] = true;
103
+ }
104
+ }
105
+ }
106
+
107
+ register_post_type( CARTFLOWS_FLOW_POST_TYPE, $args );
108
+ }
109
+
110
+ /**
111
+ * Add post raw actions
112
+ *
113
+ * @param array $actions actions.
114
+ * @param array $post post data.
115
+ * @return array
116
+ */
117
+ function post_row_actions( $actions, $post ) {
118
+
119
+ $first_step = $this->get_first_step_url( $post );
120
+
121
+ if ( $first_step && isset( $actions['view'] ) ) {
122
+
123
+ $actions['view'] = '<a href="' . $first_step . '">' . __( 'View', 'cartflows' ) . '</a>';
124
+ }
125
+
126
+ return $actions;
127
+ }
128
+
129
+ /**
130
+ * Returns previous post link
131
+ *
132
+ * @param string $prev_link previous link.
133
+ * @param array $post post data.
134
+ * @return string
135
+ */
136
+ function preview_post_link( $prev_link, $post ) {
137
+
138
+ if ( $this->is_flow_post_type( $post ) ) {
139
+
140
+ $first_step = $this->get_first_step_url( $post );
141
+
142
+ if ( $first_step ) {
143
+
144
+ return $first_step;
145
+ }
146
+
147
+ return '';
148
+ }
149
+
150
+ return $prev_link;
151
+ }
152
+
153
+ /**
154
+ * Check if post type is flow
155
+ *
156
+ * @param array $post post data.
157
+ * @return bool
158
+ */
159
+ function is_flow_post_type( $post ) {
160
+
161
+ if ( isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
162
+
163
+ return true;
164
+ }
165
+
166
+ return false;
167
+ }
168
+
169
+ /**
170
+ * Redirect to first step
171
+ *
172
+ * @return void
173
+ */
174
+ function redirect_to_step() {
175
+
176
+ global $post;
177
+
178
+ $first_step = $this->get_first_step_url( $post );
179
+
180
+ if ( $first_step ) {
181
+
182
+ wp_redirect( $first_step );
183
+ die;
184
+ }
185
+ }
186
+
187
+ /**
188
+ * Return first step URL
189
+ *
190
+ * @param array $post post data.
191
+ * @return bool
192
+ */
193
+ function get_first_step_url( $post ) {
194
+
195
+ if ( $this->is_flow_post_type( $post ) ) {
196
+
197
+ $flow_id = $post->ID;
198
+ $title = $post->post_title;
199
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
200
+
201
+ if ( is_array( $steps ) && ! empty( $steps ) && isset( $steps[0]['id'] ) ) {
202
+
203
+ return get_permalink( $steps[0]['id'] );
204
+ }
205
+ }
206
+
207
+ return false;
208
+ }
209
+
210
+ /**
211
+ * Register the admin menu for Custom Layouts
212
+ *
213
+ * @since 1.0.0
214
+ * Moved the menu under Appearance -> Custom Layouts
215
+ public function register_admin_menu() {
216
+ add_submenu_page(
217
+ CARTFLOWS_SLUG,
218
+ __( 'Flows', 'wcf' ),
219
+ __( 'Flows', 'wcf' ),
220
+ 'edit_pages',
221
+ 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE
222
+ );
223
+ }
224
+ */
225
+ public function register_as_submenu() {
226
+
227
+ global $submenu;
228
+
229
+ $submenu[ CARTFLOWS_SLUG ][0] = array(
230
+ __( 'Flows', 'cartflows' ),
231
+ 'edit_pages',
232
+ 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE,
233
+ );
234
+ }
235
+
236
+ /**
237
+ * Add Update messages for any custom post type
238
+ *
239
+ * @param array $messages Array of default messages.
240
+ */
241
+ function custom_post_type_post_update_messages( $messages ) {
242
+
243
+ $custom_post_type = get_post_type( get_the_ID() );
244
+
245
+ if ( CARTFLOWS_FLOW_POST_TYPE == $custom_post_type ) {
246
+
247
+ $obj = get_post_type_object( $custom_post_type );
248
+ $singular_name = $obj->labels->singular_name;
249
+ $messages[ $custom_post_type ] = array(
250
+ 0 => '', // Unused. Messages start at index 1.
251
+ /* translators: %s: singular custom post type name */
252
+ 1 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
253
+ /* translators: %s: singular custom post type name */
254
+ 2 => sprintf( __( 'Custom %s updated.', 'cartflows' ), $singular_name ),
255
+ /* translators: %s: singular custom post type name */
256
+ 3 => sprintf( __( 'Custom %s deleted.', 'cartflows' ), $singular_name ),
257
+ /* translators: %s: singular custom post type name */
258
+ 4 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
259
+ /* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */
260
+ 5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'cartflows' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
261
+ /* translators: %s: singular custom post type name */
262
+ 6 => sprintf( __( '%s published.', 'cartflows' ), $singular_name ),
263
+ /* translators: %s: singular custom post type name */
264
+ 7 => sprintf( __( '%s saved.', 'cartflows' ), $singular_name ),
265
+ /* translators: %s: singular custom post type name */
266
+ 8 => sprintf( __( '%s submitted.', 'cartflows' ), $singular_name ),
267
+ /* translators: %s: singular custom post type name */
268
+ 9 => sprintf( __( '%s scheduled for.', 'cartflows' ), $singular_name ),
269
+ /* translators: %s: singular custom post type name */
270
+ 10 => sprintf( __( '%s draft updated.', 'cartflows' ), $singular_name ),
271
+ );
272
+ }
273
+
274
+ return $messages;
275
+ }
276
+ }
277
+
278
+ /**
279
+ * Kicking this off by calling 'get_instance()' method
280
+ */
281
+ Cartflows_Flow_Post_Type::get_instance();
modules/flow/classes/class-cartflows-flow-shortcodes.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Flow shortcodes
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Flow_Shortcodes {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ add_shortcode( 'cartflows_next_step_link', array( $this, 'next_step_link' ) );
39
+
40
+ add_shortcode( 'cartflows_navigation', array( $this, 'navigation_shortcode' ) );
41
+ }
42
+
43
+ /**
44
+ * Returns next step link
45
+ *
46
+ * @param array $atts attributes.
47
+ * @return string
48
+ */
49
+ function next_step_link( $atts ) {
50
+
51
+ global $post;
52
+
53
+ $output = '#';
54
+
55
+ if ( $post && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
56
+
57
+ $navigation = false;
58
+
59
+ $step_id = intval( $post->ID );
60
+ $flow_id = get_post_meta( $step_id, 'wcf-flow-id', true );
61
+
62
+ if ( ! $flow_id ) {
63
+ return $output;
64
+ }
65
+
66
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
67
+
68
+ if ( ! is_array( $steps ) || ( is_array( $steps ) && empty( $steps ) ) ) {
69
+ return $output;
70
+ }
71
+
72
+ foreach ( $steps as $i => $step ) {
73
+
74
+ if ( intval( $step['id'] ) === $step_id ) {
75
+
76
+ $next_i = $i + 1;
77
+
78
+ if ( isset( $steps[ $next_i ] ) ) {
79
+ $navigation = $steps[ $next_i ];
80
+ }
81
+
82
+ break;
83
+ }
84
+ }
85
+
86
+ if ( $navigation && is_array( $navigation ) ) {
87
+
88
+ $output = get_permalink( $navigation['id'] );
89
+ }
90
+ }
91
+
92
+ return $output;
93
+ }
94
+
95
+ /**
96
+ * Navigation shortcode callback
97
+ *
98
+ * @param array $atts attributes for shortcode.
99
+ * @return string
100
+ */
101
+ function navigation_shortcode( $atts ) {
102
+ $atts = shortcode_atts(
103
+ array(
104
+ 'label' => '',
105
+ 'icon' => '',
106
+ 'icon_position' => '',
107
+ ),
108
+ $atts
109
+ );
110
+
111
+ global $post;
112
+
113
+ $output = '';
114
+
115
+ if ( $post && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
116
+
117
+ $navigation = false;
118
+
119
+ $step_id = intval( $post->ID );
120
+ $flow_id = get_post_meta( $step_id, 'wcf-flow-id', true );
121
+
122
+ if ( ! $flow_id ) {
123
+ return $output;
124
+ }
125
+
126
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
127
+
128
+ if ( ! is_array( $steps ) || ( is_array( $steps ) && empty( $steps ) ) ) {
129
+ return $output;
130
+ }
131
+
132
+ foreach ( $steps as $i => $step ) {
133
+
134
+ if ( intval( $step['id'] ) === $step_id ) {
135
+
136
+ $next_i = $i + 1;
137
+
138
+ if ( isset( $steps[ $next_i ] ) ) {
139
+ $navigation = $steps[ $next_i ];
140
+ }
141
+
142
+ break;
143
+ }
144
+ }
145
+
146
+ if ( $navigation && is_array( $navigation ) ) {
147
+
148
+ $label = ( '' != $atts['label'] ) ? $atts['label'] : __( 'Next Step', 'cartflows' );
149
+ $before = '';
150
+ $after = '';
151
+
152
+ if ( '' != $atts['icon'] ) {
153
+ if ( '' != $atts['icon_position'] ) {
154
+ if ( 'before' == $atts['icon_position'] ) {
155
+ $before = '<span class="wcf-nextstep-icon wcf-nextstep-icon-before"><i class="' . $atts['icon'] . '" aria-hidden="true"></i></span>';
156
+ } else {
157
+ $after = '<span class="wcf-nextstep-icon wcf-nextstep-icon-after"><i class="' . $atts['icon'] . '" aria-hidden="true"></i></span>';
158
+ }
159
+ }
160
+ }
161
+
162
+ $output = '<div><a target="_self" href="' . get_permalink( $navigation['id'] ) . '">' . $before . $label . $after . '</a></div>';
163
+ }
164
+ }
165
+
166
+ return $output;
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Kicking this off by calling 'get_instance()' method
172
+ */
173
+ Cartflows_Flow_Shortcodes::get_instance();
modules/flow/classes/class-cartflows-step-post-meta.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Step post meta.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Step_Post_Meta {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Kicking this off by calling 'get_instance()' method
42
+ */
43
+ Cartflows_Step_Post_Meta::get_instance();
modules/flow/classes/class-cartflows-step-post-type.php ADDED
@@ -0,0 +1,449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Step post type.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Step_Post_Type {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Member Variable
25
+ *
26
+ * @var body_classes
27
+ */
28
+ private $body_classes = array();
29
+
30
+ /**
31
+ * Initiator
32
+ */
33
+ public static function get_instance() {
34
+ if ( ! isset( self::$instance ) ) {
35
+ self::$instance = new self;
36
+ }
37
+ return self::$instance;
38
+ }
39
+
40
+ /**
41
+ * Constructor
42
+ */
43
+ public function __construct() {
44
+
45
+ add_action( 'init', array( $this, 'step_post_type' ) );
46
+ add_action( 'init', array( $this, 'add_wp_templates_support' ) );
47
+ add_filter( 'post_updated_messages', array( $this, 'post_update_messages' ) );
48
+ add_filter( 'post_type_link', array( $this, 'post_type_permalinks' ), 10, 3 );
49
+ add_filter( 'wp_unique_post_slug', array( $this, 'prevent_slug_duplicates' ), 10, 6 );
50
+ add_action( 'pre_get_posts', array( $this, 'add_cpt_post_names_to_main_query' ) );
51
+
52
+ add_filter( 'template_include', array( $this, 'load_page_template' ), 99 );
53
+ }
54
+
55
+ /**
56
+ * Trys to load page.php for a header, footer or part theme layout.
57
+ *
58
+ * @since 1.0.0
59
+ * @param string $template The current template to be loaded.
60
+ * @return string
61
+ */
62
+ function load_page_template( $template ) {
63
+
64
+ global $post;
65
+
66
+ if ( 'string' == gettype( $template ) && is_object( $post ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
67
+
68
+ /**
69
+ * Remove Next/Prev Navigation
70
+ * add_filter('next_post_link', '__return_empty_string');
71
+ * add_filter('previous_post_link', '__return_empty_string');
72
+ *
73
+ * $page = locate_template( array( 'page.php' ) );
74
+ *
75
+ * if ( ! empty( $page ) ) {
76
+ * return $page;
77
+ * }
78
+ */
79
+
80
+ $page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true );
81
+
82
+ $page_template = apply_filters( 'cartflows_page_template', $page_template );
83
+
84
+ $file = '';
85
+
86
+ switch ( $page_template ) {
87
+
88
+ case 'cartflows-default':
89
+ $file = CARTFLOWS_FLOW_DIR . 'templates/template-default.php';
90
+ $this->body_classes[] = $page_template;
91
+ break;
92
+ case 'cartflows-canvas':
93
+ $file = CARTFLOWS_FLOW_DIR . 'templates/template-canvas.php';
94
+ $this->body_classes[] = $page_template;
95
+ break;
96
+ default:
97
+ $file = CARTFLOWS_FLOW_DIR . 'templates/template-default.php';
98
+ $this->body_classes[] = 'cartflows-default';
99
+ break;
100
+ }
101
+
102
+ // Just to be safe, we check if the file exist first.
103
+ if ( file_exists( $file ) ) {
104
+
105
+ /* Add Body Class */
106
+ add_filter( 'body_class', [ $this, 'body_class' ] );
107
+
108
+ return $file;
109
+ } else {
110
+ echo $file;
111
+ }
112
+ }
113
+
114
+ return $template;
115
+ }
116
+
117
+ /**
118
+ * Body classes.
119
+ *
120
+ * @since 1.0.0
121
+ * @param array $classes Body classes.
122
+ * @return array
123
+ */
124
+ function body_class( $classes = [] ) {
125
+
126
+ $classes = array_merge( $classes, $this->body_classes );
127
+
128
+ return $classes;
129
+ }
130
+
131
+ /**
132
+ * Create custom post type
133
+ */
134
+ function step_post_type() {
135
+
136
+ $labels = array(
137
+ 'name' => esc_html_x( 'Steps', 'flow step general name', 'cartflows' ),
138
+ 'singular_name' => esc_html_x( 'Step', 'flow step singular name', 'cartflows' ),
139
+ 'search_items' => esc_html__( 'Search Steps', 'cartflows' ),
140
+ 'all_items' => esc_html__( 'All Steps', 'cartflows' ),
141
+ 'edit_item' => esc_html__( 'Edit Step', 'cartflows' ),
142
+ 'view_item' => esc_html__( 'View Step', 'cartflows' ),
143
+ 'add_new' => esc_html__( 'Add New', 'cartflows' ),
144
+ 'update_item' => esc_html__( 'Update Step', 'cartflows' ),
145
+ 'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
146
+ 'new_item_name' => esc_html__( 'New Step Name', 'cartflows' ),
147
+ );
148
+
149
+ $args = array(
150
+ 'labels' => $labels,
151
+ 'public' => true,
152
+ 'query_var' => true,
153
+ 'can_export' => true,
154
+ 'exclude_from_search' => true,
155
+ 'show_ui' => true,
156
+ 'show_in_menu' => false,
157
+ 'show_in_admin_bar' => true,
158
+ 'supports' => array( 'title', 'editor', 'elementor' ),
159
+ 'capability_type' => 'post',
160
+ 'capabilities' => array(
161
+ 'create_posts' => 'do_not_allow', // Prior to Wordpress 4.5, this was false.
162
+ ),
163
+ 'map_meta_cap' => true,
164
+ );
165
+
166
+ register_post_type( CARTFLOWS_STEP_POST_TYPE, $args );
167
+
168
+ $args = array(
169
+ 'label' => __( 'Step Type', 'cartflows' ),
170
+ 'public' => false,
171
+ 'rewrite' => false,
172
+ 'hierarchical' => false,
173
+ );
174
+
175
+ register_taxonomy( CARTFLOWS_TAXONOMY_STEP_TYPE, CARTFLOWS_STEP_POST_TYPE, $args );
176
+
177
+ $args = array(
178
+ 'label' => __( 'Step Flow', 'cartflows' ),
179
+ 'public' => false,
180
+ 'rewrite' => false,
181
+ 'hierarchical' => false,
182
+ );
183
+
184
+ register_taxonomy( CARTFLOWS_TAXONOMY_STEP_FLOW, CARTFLOWS_STEP_POST_TYPE, $args );
185
+
186
+ /**
187
+ * Register 'Elementor' & 'Beaver Builder' site types.
188
+ *
189
+ * @see self::add_terms();
190
+ */
191
+ $taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
192
+
193
+ $terms = array(
194
+ array(
195
+ 'name' => __( 'Landing', 'cartflows' ),
196
+ 'args' => array(
197
+ 'slug' => 'landing',
198
+ ),
199
+ ),
200
+ array(
201
+ 'name' => __( 'Checkout', 'cartflows' ),
202
+ 'args' => array(
203
+ 'slug' => 'checkout',
204
+ ),
205
+ ),
206
+ array(
207
+ 'name' => __( 'Thank You', 'cartflows' ),
208
+ 'args' => array(
209
+ 'slug' => 'thankyou',
210
+ ),
211
+ ),
212
+ array(
213
+ 'name' => __( 'Upsell', 'cartflows' ),
214
+ 'args' => array(
215
+ 'slug' => 'upsell',
216
+ ),
217
+ ),
218
+ array(
219
+ 'name' => __( 'Downsell', 'cartflows' ),
220
+ 'args' => array(
221
+ 'slug' => 'downsell',
222
+ ),
223
+ ),
224
+ );
225
+
226
+ $this->add_terms( $taxonomy, $terms );
227
+ }
228
+
229
+ /**
230
+ * Add WordPress templates.
231
+ *
232
+ * Adds Cartflows templates to steps
233
+ *
234
+ * @since 1.0.0
235
+ * @access public
236
+ */
237
+ function add_wp_templates_support() {
238
+ add_filter( 'theme_' . CARTFLOWS_STEP_POST_TYPE . '_templates', array( $this, 'add_page_templates' ), 99, 4 );
239
+ }
240
+
241
+ /**
242
+ * Add page templates.
243
+ *
244
+ * @since 1.0.0
245
+ * @access public
246
+ *
247
+ * @param array $page_templates Array of page templates.
248
+ *
249
+ * @param object $wp_theme wp theme.
250
+ * @param object $post post.
251
+ *
252
+ * @return array Page templates.
253
+ */
254
+ function add_page_templates( $page_templates, $wp_theme, $post ) {
255
+
256
+ $page_templates = array(
257
+ 'cartflows-canvas' => _x( 'Template for Page Builders', 'cartflows' ),
258
+ );
259
+
260
+ return $page_templates;
261
+ }
262
+
263
+ /**
264
+ * Have WordPress match postname to any of our public post types.
265
+ * All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts.
266
+ * By default, WordPress only accounts for posts and pages where the slug is /post-name/.
267
+ *
268
+ * @param string $query query statement.
269
+ */
270
+ function add_cpt_post_names_to_main_query( $query ) {
271
+
272
+ // Bail if this is not the main query.
273
+ if ( ! $query->is_main_query() ) {
274
+ return;
275
+ }
276
+ // Bail if this query doesn't match our very specific rewrite rule.
277
+ if ( ! isset( $query->query['page'] ) || 2 !== count( $query->query ) ) {
278
+ return;
279
+ }
280
+ // Bail if we're not querying based on the post name.
281
+ if ( empty( $query->query['name'] ) ) {
282
+ return;
283
+ }
284
+ // Add CPT to the list of post types WP will include when it queries based on the post name.
285
+ $query->set( 'post_type', array( 'post', 'page', CARTFLOWS_STEP_POST_TYPE ) );
286
+ }
287
+
288
+ /**
289
+ * Modify permalink
290
+ *
291
+ * @param string $post_link post link.
292
+ * @param array $post post data.
293
+ * @param string $leavename leave name.
294
+ * @return string
295
+ */
296
+ function post_type_permalinks( $post_link, $post, $leavename ) {
297
+
298
+ // If elementor page preview, return post link as it is.
299
+ if ( isset( $_REQUEST['elementor-preview'] ) ) {
300
+ return $post_link;
301
+ }
302
+
303
+ $structure = get_option( 'permalink_structure' );
304
+
305
+ if ( '/%postname%/' === $structure ) {
306
+
307
+ if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE == $post->post_type ) {
308
+
309
+ $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
310
+ }
311
+ }
312
+
313
+ return $post_link;
314
+ }
315
+
316
+ /**
317
+ * Prevent slug duplicated
318
+ *
319
+ * @param string $slug post slug.
320
+ * @param int $post_ID post id.
321
+ * @param string $post_status post status.
322
+ * @param string $post_type post type.
323
+ * @param int $post_parent post parent id.
324
+ * @param string $original_slug original slug.
325
+ * @return string
326
+ */
327
+ function prevent_slug_duplicates( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) {
328
+
329
+ $check_post_types = array(
330
+ 'post',
331
+ 'page',
332
+ CARTFLOWS_STEP_POST_TYPE,
333
+ );
334
+
335
+ if ( ! in_array( $post_type, $check_post_types ) ) {
336
+ return $slug;
337
+ }
338
+
339
+ if ( CARTFLOWS_STEP_POST_TYPE == $post_type ) {
340
+ // Saving a post, check for duplicates in POST or PAGE post types.
341
+ $post_match = get_page_by_path( $slug, 'OBJECT', 'post' );
342
+ $page_match = get_page_by_path( $slug, 'OBJECT', 'page' );
343
+
344
+ if ( $post_match || $page_match ) {
345
+ $slug .= '-2';
346
+ }
347
+ } else {
348
+
349
+ // Saving a POST or PAGE, check for duplicates in CARTFLOWS_STEP_POST_TYPE post type.
350
+ $custom_post_type_match = get_page_by_path( $slug, 'OBJECT', CARTFLOWS_STEP_POST_TYPE );
351
+
352
+ if ( $custom_post_type_match ) {
353
+ $slug .= '-2';
354
+ }
355
+ }
356
+
357
+ return $slug;
358
+ }
359
+
360
+ /**
361
+ * Add Update messages for any custom post type
362
+ *
363
+ * @param array $messages Array of default messages.
364
+ */
365
+ function post_update_messages( $messages ) {
366
+
367
+ $custom_post_type = get_post_type( get_the_ID() );
368
+
369
+ if ( CARTFLOWS_STEP_POST_TYPE == $custom_post_type ) {
370
+
371
+ $obj = get_post_type_object( $custom_post_type );
372
+ $singular_name = $obj->labels->singular_name;
373
+ $messages[ $custom_post_type ] = array(
374
+ 0 => '', // Unused. Messages start at index 1.
375
+ /* translators: %s: singular custom post type name */
376
+ 1 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
377
+ /* translators: %s: singular custom post type name */
378
+ 2 => sprintf( __( 'Custom %s updated.', 'cartflows' ), $singular_name ),
379
+ /* translators: %s: singular custom post type name */
380
+ 3 => sprintf( __( 'Custom %s deleted.', 'cartflows' ), $singular_name ),
381
+ /* translators: %s: singular custom post type name */
382
+ 4 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
383
+ /* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */
384
+ 5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'cartflows' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
385
+ /* translators: %s: singular custom post type name */
386
+ 6 => sprintf( __( '%s published.', 'cartflows' ), $singular_name ),
387
+ /* translators: %s: singular custom post type name */
388
+ 7 => sprintf( __( '%s saved.', 'cartflows' ), $singular_name ),
389
+ /* translators: %s: singular custom post type name */
390
+ 8 => sprintf( __( '%s submitted.', 'cartflows' ), $singular_name ),
391
+ /* translators: %s: singular custom post type name */
392
+ 9 => sprintf( __( '%s scheduled for.', 'cartflows' ), $singular_name ),
393
+ /* translators: %s: singular custom post type name */
394
+ 10 => sprintf( __( '%s draft updated.', 'cartflows' ), $singular_name ),
395
+ );
396
+ }
397
+
398
+ return $messages;
399
+ }
400
+
401
+ /**
402
+ * Add Terms for Taxonomy.
403
+ *
404
+ * => Example.
405
+ *
406
+ * $taxonomy = '{taxonomy}';
407
+ * $terms = array(
408
+ * array(
409
+ * 'name' => 'Free',
410
+ * ),
411
+ * array(
412
+ * 'name' => 'Premium',
413
+ * ),
414
+ * );
415
+ *
416
+ * self::add_terms( $taxonomy, $terms );
417
+ *
418
+ * @since 1.0.0
419
+ * @param string $taxonomy Taxonomy Name.
420
+ * @param array $terms Terms list.
421
+ * @return void
422
+ */
423
+ function add_terms( $taxonomy = '', $terms = array() ) {
424
+
425
+ foreach ( $terms as $key => $term ) {
426
+
427
+ $term_exist = term_exists( $term['name'], $taxonomy );
428
+
429
+ if ( empty( $term_exist ) ) {
430
+
431
+ /**
432
+ * Add additional args if passed from request.
433
+ *
434
+ * @see https://codex.wordpress.org/Function_Reference/wp_insert_term
435
+ */
436
+ if ( array_key_exists( 'args', $term ) ) {
437
+ wp_insert_term( $term['name'], $taxonomy, $term['args'] );
438
+ } else {
439
+ wp_insert_term( $term['name'], $taxonomy );
440
+ }
441
+ }
442
+ }
443
+ }
444
+ }
445
+
446
+ /**
447
+ * Kicking this off by calling 'get_instance()' method
448
+ */
449
+ Cartflows_Step_Post_Type::get_instance();
modules/flow/templates/index.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Index.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /* Silence is golden, and we agree. */
modules/flow/templates/template-canvas.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template Name: No Header Footer
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ ?>
9
+
10
+ <!DOCTYPE html>
11
+ <html <?php language_attributes(); ?> class="no-js">
12
+ <head>
13
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
14
+ <meta name="viewport" content="width=device-width, initial-scale=1">
15
+ <link rel="profile" href="http://gmpg.org/xfn/11">
16
+ <?php wp_head(); ?>
17
+ </head>
18
+
19
+ <body <?php body_class(); ?>>
20
+ <div class="cartflows-container">
21
+
22
+ <?php
23
+ do_action( 'cartflows_container_top' );
24
+ while ( have_posts() ) :
25
+
26
+ the_post();
27
+ the_content();
28
+
29
+ endwhile;
30
+ do_action( 'cartflows_container_bottom' );
31
+ ?>
32
+ </div>
33
+ <?php wp_footer(); ?>
34
+
35
+ </body>
36
+
37
+ </html>
38
+
39
+ <?php
modules/flow/templates/template-default.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template Name: No Header Footer
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ ?>
9
+
10
+ <!DOCTYPE html>
11
+ <html <?php language_attributes(); ?> class="no-js">
12
+ <head>
13
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
14
+ <meta name="viewport" content="width=device-width, initial-scale=1">
15
+ <link rel="profile" href="http://gmpg.org/xfn/11">
16
+ <?php wp_head(); ?>
17
+ </head>
18
+
19
+ <body <?php body_class(); ?>>
20
+ <div class="cartflows-container">
21
+ <?php
22
+ do_action( 'cartflows_container_top' );
23
+ ?>
24
+ <div class="cartflows-primary">
25
+ <?php
26
+ while ( have_posts() ) :
27
+
28
+ the_post();
29
+ the_content();
30
+
31
+ endwhile;
32
+ ?>
33
+ </div>
34
+ <?php
35
+ do_action( 'cartflows_container_bottom' );
36
+ ?>
37
+ </div>
38
+ <?php wp_footer(); ?>
39
+
40
+ </body>
41
+
42
+ </html>
43
+
44
+ <?php
modules/flow/view/meta-flow-steps.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * View Flow steps
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $get_steps = array(
9
+ 'landing' => __( 'Landing', 'cartflows' ),
10
+ 'checkout' => __( 'Checkout', 'cartflows' ),
11
+ 'thankyou' => __( 'Thank You', 'cartflows' ),
12
+ 'upsell' => __( 'Upsell', 'cartflows' ),
13
+ 'downsell' => __( 'Downsell', 'cartflows' ),
14
+
15
+ );
16
+
17
+ ?>
18
+ <div class="wcf-flow-steps-meta-box">
19
+ <div class="wcf-flow-settings">
20
+ <?php do_action( 'cartflows_above_flow_steps' ); ?>
21
+ <div class="wcf-flow-steps-wrap">
22
+ <div class="wcf-flow-steps-container">
23
+ <?php if ( is_array( $options['steps'] ) ) { ?>
24
+ <?php foreach ( $options['steps'] as $index => $data ) { ?>
25
+ <?php
26
+ $term_slug = '';
27
+ $term_name = '';
28
+ $step_wrap_class = '';
29
+ $has_product_assigned = true;
30
+
31
+ if ( isset( $data['type'] ) ) {
32
+ $term_slug = $data['type'];
33
+ $term_name = $get_steps[ $data['type'] ];
34
+ }
35
+
36
+ if ( ! _is_cartflows_pro() && ( 'upsell' === $term_slug || 'downsell' === $term_slug ) ) {
37
+ $step_wrap_class .= ' invalid-step';
38
+ }
39
+
40
+ if ( isset( $_GET['highlight-step-id'] ) && $_GET['highlight-step-id'] == $data['id'] ) {
41
+ $step_wrap_class .= ' wcf-new-step-highlight';
42
+ }
43
+
44
+ if ( 'upsell' === $term_slug || 'downsell' === $term_slug || 'checkout' === $term_slug ) {
45
+
46
+ $has_product_assigned = Cartflows_Helper::has_product_assigned( $data['id'] );
47
+
48
+ if ( ! $has_product_assigned ) {
49
+ $step_wrap_class .= ' wcf-no-product-step';
50
+ }
51
+ }
52
+
53
+ ?>
54
+ <div class="wcf-step-wrap <?php echo $step_wrap_class; ?>" data-id="<?php echo $data['id']; ?>" data-term-slug="<?php echo esc_attr( $term_slug ); ?>">
55
+ <div class="wcf-step">
56
+ <div class="wcf-step-left-content">
57
+ <span class="dashicons dashicons-menu"></span>
58
+ <span><?php echo wp_trim_words( get_the_title( $data['id'] ), 3 ); ?></span>
59
+ <span class="wcf-flow-badge"><?php echo esc_attr( $term_name ); ?></span>
60
+
61
+ <?php
62
+ if ( ! $has_product_assigned ) {
63
+ ?>
64
+ <span class="wcf-no-product-badge"><?php _e( 'No Product Assigned', 'cartflows' ); ?></span>
65
+ <?php
66
+ }
67
+
68
+ ?>
69
+ <input type="hidden" class="wcf-steps-hidden" name="wcf-steps[]" value="<?php echo $data['id']; ?>">
70
+ </div>
71
+ <div class="wcf-steps-action-buttons">
72
+ <a href="<?php echo get_permalink( $data['id'] ); ?>" target="_blank" class="wcf-step-view wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'View Step', 'cartflows' ); ?>" >
73
+ <span class="dashicons dashicons-visibility"></span>
74
+ <span class="wcf-step-act-btn-text">View</span>
75
+ </a>
76
+ <a href="<?php echo get_edit_post_link( $data['id'] ); ?>" class="wcf-step-edit wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Edit Step', 'cartflows' ); ?>" >
77
+ <span class="dashicons dashicons-edit"></span>
78
+ <span class="wcf-step-act-btn-text">Edit</span>
79
+ </a>
80
+ <a href="<?php echo wp_nonce_url( 'admin.php?action=cartflows_clone_step&post=' . $data['id'], 'step_clone', 'step_clone_nonce' ); ?>" class="wcf-step-clone wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Clone Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
81
+ <span class="dashicons dashicons-admin-page"></span>
82
+ <span class="wcf-step-act-btn-text">Clone</span>
83
+ </a>
84
+ <a href="#" class="wcf-step-delete wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Delete Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
85
+ <span class="dashicons dashicons-trash"></span>
86
+ <span class="wcf-step-act-btn-text">Delete</span>
87
+ </a>
88
+ </div>
89
+ </div>
90
+ </div><!-- .wcf-step-wrap -->
91
+ <?php } ?>
92
+ <?php } ?>
93
+ </div><!-- .wcf-flow-steps-container -->
94
+ </div> <!-- .wcf-flow-steps-wrap -->
95
+ <div class="wcf-flow-buttons-wrap"> <!-- .wcf-flow-buttons-wrap -->
96
+ <?php do_action( 'cartflows_bellow_flow_steps' ); ?>
97
+ <div class='wcf-add-new-step-btn-wrap'>
98
+ <button class='wcf-trigger-popup button button-primary'>
99
+ <?php echo __( 'Add New Step', 'cartflows' ); ?>
100
+ </button>
101
+ </div>
102
+ </div><!-- .wcf-flow-buttons-wrap -->
103
+ </div><!-- .wcf-flow-settings -->
104
+
105
+ <div id="wcf-remote-step-importer" class="wcf-templates-popup-overlay">
106
+ <div class="wcf-templates-popup-content">
107
+ <div class="spinner"></div>
108
+ <div class="wcf-templates-wrap wcf-templates-wrap-flows">
109
+
110
+ <div id="wcf-remote-step-actions" class="wcf-template-header">
111
+ <div class="wcf-template-logo-wrap">
112
+ <span class="wcf-cartflows-logo-img">
113
+ <span class="cartflows-icon"></span>
114
+ </span>
115
+ <span class="wcf-cartflows-title"><?php _e( 'Templates', 'cartflows' ); ?></span>
116
+ </div>
117
+ <div class="wcf-tab-wrapper">
118
+ <div id="wcf-page-builders">
119
+ <ul class="wcf-page-builder-links filter-links">
120
+ <li><a href="#" class="current" data-id="elementor"><?php _e( 'Elementor', 'cartflows' ); ?></a></li>
121
+ <li><a href="#" data-id="divi"><?php _e( 'Divi', 'cartflows' ); ?></a></li>
122
+ <li><a href="#" data-id="bb"><?php _e( 'Beaver Builder', 'cartflows' ); ?></a></li>
123
+ </ul>
124
+ </div>
125
+ </div>
126
+ <div class="wcf-popup-close-wrap">
127
+ <span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
128
+ </div>
129
+ </div>
130
+
131
+ <!--<div class="wcf-search-form">
132
+ <label class="screen-reader-text" for="wp-filter-search-input"><?php _e( 'Search Sites', 'cartflows' ); ?> </label>
133
+ <input placeholder="<?php _e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
134
+ </div>-->
135
+ <?php if ( ! _is_cartflows_pro() ) { ?>
136
+ <div class="wcf-template-notice"><p><?php echo __( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
137
+ <?php } ?>
138
+ <div id="wcf-remote-content">
139
+ <div id="wcf-remote-step-filters"></div>
140
+ <div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"></div>
141
+ <div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div><!-- .wcf-templates-popup-overlay -->
146
+ </div>
147
+ <?php
modules/index.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Index file
4
+ *
5
+ * @package CartFlows
6
+ * @since 1.0.0
7
+ */
8
+
9
+ /* Silence is golden, and we agree. */
modules/landing/class-cartflows-landing.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Landing
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ define( 'CARTFLOWS_LANDING_DIR', CARTFLOWS_DIR . 'modules/landing/' );
9
+ define( 'CARTFLOWS_LANDING_URL', CARTFLOWS_URL . 'modules/landing/' );
10
+
11
+ /**
12
+ * Initial Setup
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Landing {
17
+
18
+
19
+ /**
20
+ * Member Variable
21
+ *
22
+ * @var object instance
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Initiator
28
+ */
29
+ public static function get_instance() {
30
+ if ( ! isset( self::$instance ) ) {
31
+ self::$instance = new self;
32
+ }
33
+ return self::$instance;
34
+ }
35
+
36
+ /**
37
+ * Constructor function that initializes required actions and hooks
38
+ */
39
+ public function __construct() {
40
+ require_once CARTFLOWS_LANDING_DIR . 'classes/class-cartflows-landing-meta.php';
41
+ require_once CARTFLOWS_LANDING_DIR . 'classes/class-cartflows-landing-markup.php';
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Kicking this off by calling 'get_instance()' method
47
+ */
48
+ Cartflows_Landing::get_instance();
modules/landing/classes/class-cartflows-landing-markup.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Landing_Markup {
14
+
15
+
16
+ /**
17
+ * Member Variable
18
+ *
19
+ * @var object instance
20
+ */
21
+ private static $instance;
22
+
23
+ /**
24
+ * Initiator
25
+ */
26
+ public static function get_instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ }
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ */
36
+ public function __construct() {
37
+
38
+ add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
39
+ add_action( 'template_redirect', array( $this, 'template_redirect' ) );
40
+
41
+ if ( is_admin() ) {
42
+ add_filter( 'wp_dropdown_pages', array( $this, 'wp_dropdown_pages' ) );
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Add landing pages in WordPress reading section.
48
+ *
49
+ * @param array $output output.
50
+ */
51
+ function wp_dropdown_pages( $output ) {
52
+
53
+ global $pagenow;
54
+
55
+ if ( ( 'options-reading.php' === $pagenow || 'customize.php' === $pagenow ) && preg_match( '#page_on_front#', $output ) ) {
56
+
57
+ $args = array(
58
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
59
+ 'meta_query' => array(
60
+ array(
61
+ 'key' => 'wcf-step-type',
62
+ 'value' => 'landing',
63
+ ),
64
+ ),
65
+ );
66
+
67
+ $landing_pages = get_posts( $args );
68
+
69
+ if ( is_array( $landing_pages ) && ! empty( $landing_pages ) ) {
70
+
71
+ $cartflows_custom_option = '';
72
+
73
+ $front_page_id = get_option( 'page_on_front' );
74
+
75
+ foreach ( $landing_pages as $key => $landing_page ) {
76
+
77
+ $selected = selected( $front_page_id, $landing_page->ID, false );
78
+
79
+ $cartflows_custom_option .= "<option value=\"{$landing_page->ID}\"{$selected}>{$landing_page->post_title} (CartFlows)</option>";
80
+ }
81
+
82
+ $cartflows_custom_option .= '</select>';
83
+
84
+ $output = str_replace( '</select>', $cartflows_custom_option, $output );
85
+ }
86
+ }
87
+
88
+ return $output;
89
+ }
90
+
91
+ /**
92
+ * Set post query.
93
+ *
94
+ * @param string $query post query.
95
+ */
96
+ function pre_get_posts( $query ) {
97
+
98
+ if ( $query->is_main_query() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
99
+
100
+ $post_type = $query->get( 'post_type' );
101
+
102
+ $page_id = $query->get( 'page_id' );
103
+
104
+ if ( empty( $post_type ) && ! empty( $page_id ) ) {
105
+ $query->set( 'post_type', get_post_type( $page_id ) );
106
+ }
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Redirect to homepage if landing page set as home page.
112
+ */
113
+ function template_redirect() {
114
+
115
+ $compatibiliy = Cartflows_Compatibility::get_instance();
116
+
117
+ // Do not redirect for page builder preview.
118
+ if ( $compatibiliy->is_page_builder_preview() ) {
119
+ return;
120
+ }
121
+
122
+ global $post;
123
+
124
+ if ( is_singular() && ! is_front_page() && get_option( 'page_on_front' ) == $post->ID ) {
125
+ wp_safe_redirect( site_url(), 301 );
126
+ }
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Kicking this off by calling 'get_instance()' method
132
+ */
133
+ Cartflows_Landing_Markup::get_instance();
modules/landing/classes/class-cartflows-landing-meta.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Landing post meta box
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Landing_Meta extends Cartflows_Meta {
12
+
13
+
14
+ /**
15
+ * Instance
16
+ *
17
+ * @var $instance
18
+ */
19
+ private static $instance;
20
+
21
+ /**
22
+ * Meta Option
23
+ *
24
+ * @var $meta_option
25
+ */
26
+ private static $meta_option = null;
27
+
28
+ /**
29
+ * Initiator
30
+ */
31
+ public static function get_instance() {
32
+ if ( ! isset( self::$instance ) ) {
33
+ self::$instance = new self;
34
+ }
35
+
36
+ return self::$instance;
37
+ }
38
+
39
+ /**
40
+ * Constructor
41
+ */
42
+ public function __construct() {
43
+
44
+ /* Init Metabox */
45
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
46
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
47
+ }
48
+
49
+ /**
50
+ * Init Metabox
51
+ */
52
+ public function init_metabox() {
53
+
54
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
55
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
56
+ }
57
+
58
+ /**
59
+ * Setup Metabox
60
+ */
61
+ function setup_meta_box() {
62
+
63
+ if ( _is_wcf_landing_type() ) {
64
+ add_meta_box(
65
+ 'wcf-ladning-settings', // Id.
66
+ __( 'Landing Page Settings', 'cartflows' ), // Title.
67
+ array( $this, 'markup_meta_box' ), // Callback.
68
+ wcf()->utils->get_step_post_type(), // Post_type.
69
+ 'normal', // Context.
70
+ 'high' // Priority.
71
+ );
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Metabox Markup
77
+ *
78
+ * @param object $post Post object.
79
+ * @return void
80
+ */
81
+ function markup_meta_box( $post ) {
82
+
83
+ wp_nonce_field( 'save-nonce-landing-step-meta', 'nonce-landing-step-meta' );
84
+ $stored = get_post_meta( $post->ID );
85
+
86
+ $checkout_meta = self::get_meta_option( $post->ID );
87
+
88
+ // Set stored and override defaults.
89
+ foreach ( $stored as $key => $value ) {
90
+ if ( array_key_exists( $key, $checkout_meta ) ) {
91
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
92
+ } else {
93
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
94
+ }
95
+ }
96
+
97
+ // Get defaults.
98
+ $meta = self::get_meta_option( $post->ID );
99
+
100
+ /**
101
+ * Get options
102
+ */
103
+ $checkout_data = array();
104
+
105
+ do_action( 'wcf_thankyou_settings_markup_before', $meta );
106
+ $this->page_header_tab( $checkout_data, $post->ID );
107
+ do_action( 'wcf_thankyou_settings_markup_after', $meta );
108
+ }
109
+
110
+ /**
111
+ * Page Header Tabs
112
+ *
113
+ * @param array $options Post meta.
114
+ * @param int $post_id Post ID.
115
+ */
116
+ function page_header_tab( $options, $post_id ) {
117
+
118
+ $active_tab = get_post_meta( $post_id, 'wcf_active_tab', true );
119
+
120
+ if ( empty( $active_tab ) ) {
121
+ $active_tab = 'wcf-thankyou-shortcodes';
122
+ }
123
+
124
+ $tabs = array(
125
+ array(
126
+ 'title' => __( 'Shortcodes', 'cartflows' ),
127
+ 'id' => 'wcf-thankyou-shortcodes',
128
+ 'class' => 'wcf-thankyou-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
129
+ 'icon' => 'dashicons-info',
130
+ ),
131
+ );
132
+
133
+ ?>
134
+ <div class="wcf-thankyou-table wcf-metabox-wrap widefat">
135
+ <div class="wcf-table-container">
136
+ <div class="wcf-column-left">
137
+ <div class="wcf-tab-wrapper">
138
+
139
+ <?php foreach ( $tabs as $key => $tab ) { ?>
140
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
141
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
142
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
143
+ </div>
144
+ <?php } ?>
145
+ <input type="hidden" id="wcf_active_tab" name="wcf_active_tab" value="<?php echo esc_attr( $active_tab ); ?>" />
146
+
147
+ </div>
148
+ </div>
149
+ <div class="wcf-column-right">
150
+ <div class="wcf-thankyou-shortcodes wcf-tab-content active widefat">
151
+ <?php
152
+
153
+ $next_step_link = wcf()->utils->get_linking_url(
154
+ array( 'class' => 'wcf-next-step' )
155
+ );
156
+
157
+ echo wcf()->meta->get_shortcode_field(
158
+ array(
159
+ 'label' => __( 'Next Step Link', 'cartflows' ),
160
+ 'name' => 'wcf-next-step-link',
161
+ 'content' => $next_step_link,
162
+ )
163
+ );
164
+
165
+ ?>
166
+ </div>
167
+ <?php $this->right_column_footer( $options, $post_id ); ?>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <?php
173
+
174
+ }
175
+
176
+ /**
177
+ * Get metabox options
178
+ *
179
+ * @param int $post_id post ID.
180
+ * @return array
181
+ */
182
+ public static function get_meta_option( $post_id ) {
183
+
184
+ if ( null === self::$meta_option ) {
185
+
186
+ /**
187
+ * Set metabox options
188
+ *
189
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
190
+ */
191
+ self::$meta_option = array();
192
+ }
193
+
194
+ return self::$meta_option;
195
+ }
196
+
197
+ /**
198
+ * Metabox Save
199
+ *
200
+ * @param number $post_id Post ID.
201
+ * @return void
202
+ */
203
+ function save_meta_box( $post_id ) {
204
+
205
+ // Checks save status.
206
+ $is_autosave = wp_is_post_autosave( $post_id );
207
+ $is_revision = wp_is_post_revision( $post_id );
208
+
209
+ $is_valid_nonce = ( isset( $_POST['nonce-landing-step-meta'] ) && wp_verify_nonce( $_POST['nonce-landing-step-meta'], 'save-nonce-landing-step-meta' ) ) ? true : false;
210
+
211
+ // Exits script depending on save status.
212
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
213
+ return;
214
+ }
215
+
216
+ /**
217
+ * Get meta options
218
+ */
219
+ $post_meta = self::get_meta_option( $post_id );
220
+
221
+ foreach ( $post_meta as $key => $data ) {
222
+
223
+ $meta_value = false;
224
+
225
+ if ( in_array( $key, array( ' ' ) ) ) {
226
+
227
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) {
228
+ $meta_value = array_map( 'sanitize_text_field', $_POST[ $key ] );
229
+ }
230
+ } else {
231
+ // Sanitize values.
232
+ $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT';
233
+
234
+ switch ( $sanitize_filter ) {
235
+
236
+ case 'FILTER_SANITIZE_STRING':
237
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
238
+ break;
239
+
240
+ case 'FILTER_SANITIZE_URL':
241
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL );
242
+ break;
243
+
244
+ case 'FILTER_SANITIZE_NUMBER_INT':
245
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT );
246
+ break;
247
+
248
+ default:
249
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
250
+ break;
251
+ }
252
+ }
253
+
254
+ if ( $meta_value ) {
255
+ update_post_meta( $post_id, $key, $meta_value );
256
+ } else {
257
+ delete_post_meta( $post_id, $key );
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Kicking this off by calling 'get_instance()' method
265
+ */
266
+ Cartflows_Landing_Meta::get_instance();
modules/thankyou/class-cartflows-thankyou.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Thankyou
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ define( 'CARTFLOWS_THANKYOU_DIR', CARTFLOWS_DIR . 'modules/thankyou/' );
9
+ define( 'CARTFLOWS_THANKYOU_URL', CARTFLOWS_URL . 'modules/thankyou/' );
10
+
11
+ /**
12
+ * Initial Setup
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Thankyou {
17
+
18
+
19
+ /**
20
+ * Member Variable
21
+ *
22
+ * @var object instance
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Initiator
28
+ */
29
+ public static function get_instance() {
30
+ if ( ! isset( self::$instance ) ) {
31
+ self::$instance = new self;
32
+ }
33
+ return self::$instance;
34
+ }
35
+
36
+ /**
37
+ * Constructor function that initializes required actions and hooks
38
+ */
39
+ public function __construct() {
40
+ require_once CARTFLOWS_THANKYOU_DIR . 'classes/class-cartflows-thankyou-meta.php';
41
+ require_once CARTFLOWS_THANKYOU_DIR . 'classes/class-cartflows-thankyou-markup.php';
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Kicking this off by calling 'get_instance()' method
47
+ */
48
+ Cartflows_Thankyou::get_instance();
modules/thankyou/classes/class-cartflows-thankyou-markup.php ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Front end and markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Thankyou_Markup {
14
+
15
+ /**
16
+ * Member Variable
17
+ *
18
+ * @var object instance
19
+ */
20
+ private static $instance;
21
+
22
+ /**
23
+ * Initiator
24
+ */
25
+ public static function get_instance() {
26
+ if ( ! isset( self::$instance ) ) {
27
+ self::$instance = new self;
28
+ }
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Constructor
34
+ */
35
+ public function __construct() {
36
+
37
+ /* Downsell Shortcode */
38
+ add_shortcode( 'cartflows_order_details', array( $this, 'cartflows_order_details_shortcode_markup' ) );
39
+
40
+ add_action( 'wp_enqueue_scripts', array( $this, 'thank_you_scripts' ), 21 );
41
+ }
42
+
43
+ /**
44
+ * Order shortcode markup
45
+ *
46
+ * @param array $atts attributes.
47
+ * @since 1.0.0
48
+ */
49
+ function cartflows_order_details_shortcode_markup( $atts ) {
50
+
51
+ $output = '';
52
+
53
+ if ( _is_wcf_thankyou_type() ) {
54
+
55
+ /* Remove order item link */
56
+ add_filter( 'woocommerce_order_item_permalink', '__return_false' );
57
+
58
+ if ( ! function_exists( 'wc_print_notices' ) ) {
59
+ return '<p class="woocommerce-notice">' . __( 'WooCommerce functions not exists. If you are in iframe, please reload the iframe', 'cartflows' ) . '</p>';
60
+ }
61
+
62
+ wc_print_notices();
63
+
64
+ $order = false;
65
+
66
+ if ( ! isset( $_GET['wcf-order'] ) && wcf()->flow->is_flow_testmode() ) {
67
+
68
+ $args = array(
69
+ 'limit' => 1,
70
+ 'order' => 'DESC',
71
+ 'status' => array( 'completed', 'processing' ),
72
+ );
73
+
74
+ $latest_order = wc_get_orders( $args );
75
+
76
+ $order_id = ( ! empty( $latest_order ) ) ? current( $latest_order )->get_id() : 0;
77
+
78
+ if ( $order_id > 0 ) {
79
+
80
+ $order = wc_get_order( $order_id );
81
+
82
+ if ( ! $order ) {
83
+ $order = false;
84
+ }
85
+ }
86
+ } else {
87
+ if ( ! isset( $_GET['wcf-order'] ) ) {
88
+ return '<p class="woocommerce-notice">Order not found. You cannot access this page directly.</p>';
89
+ }
90
+
91
+ // Get the order.
92
+ $order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET['wcf-order'] ) ? 0 : intval( $_GET['wcf-order'] ) );
93
+ $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['wcf-key'] ) ? '' : wc_clean( wp_unslash( $_GET['wcf-key'] ) ) ); // WPCS: input var ok, CSRF ok.
94
+
95
+ if ( $order_id > 0 ) {
96
+
97
+ $order = wc_get_order( $order_id );
98
+
99
+ if ( ! $order || $order->get_order_key() !== $order_key ) {
100
+ $order = false;
101
+ }
102
+ }
103
+ }
104
+
105
+ // Empty awaiting payment session.
106
+ unset( WC()->session->order_awaiting_payment );
107
+
108
+ // Empty current cart.
109
+ wc_empty_cart();
110
+
111
+ ob_start();
112
+ echo "<div class='wcf-thankyou-wrap'>";
113
+ wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) );
114
+ echo '</div>';
115
+ $output = ob_get_clean();
116
+ }
117
+
118
+ return $output;
119
+ }
120
+
121
+ /**
122
+ * Load Thank You scripts.
123
+ *
124
+ * @return void
125
+ */
126
+ function thank_you_scripts() {
127
+
128
+ if ( _is_wcf_thankyou_type() ) {
129
+
130
+ do_action( 'cartflows_thank_you_scripts' );
131
+
132
+ $style = $this->generate_thank_you_style();
133
+
134
+ wp_add_inline_style( 'wcf-frontend-global', $style );
135
+ }
136
+ }
137
+
138
+
139
+ /**
140
+ * Generate Thank You Styles.
141
+ *
142
+ * @return string
143
+ */
144
+ function generate_thank_you_style() {
145
+
146
+ global $post;
147
+
148
+ if ( _is_wcf_thankyou_type() ) {
149
+ $thank_you_id = $post->ID;
150
+ } else {
151
+ $thank_you_id = _get_wcf_thankyou_id( $post->post_content );
152
+ }
153
+
154
+ CartFlows_Font_Families::render_fonts( $thank_you_id );
155
+
156
+ $text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
157
+ $text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
158
+ $heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
159
+ $heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
160
+ $heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
161
+ $container_width = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-container-width' );
162
+ $section_bg_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-section-bg-color' );
163
+
164
+ $show_order_review = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-overview-section' );
165
+
166
+ $show_order_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-details-section' );
167
+
168
+ $show_billing_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-billing-section' );
169
+
170
+ $show_shipping_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-shipping-section' );
171
+
172
+ $output = "
173
+ .wcf-thankyou-wrap{
174
+ color: {$text_color};
175
+ font-family: {$text_font_family};
176
+ max-width:{$container_width}px;
177
+ }
178
+
179
+ .woocommerce-order h2.woocommerce-column__title,
180
+ .woocommerce-order h2.woocommerce-order-details__title,
181
+ .woocommerce-order .woocommerce-thankyou-order-received,
182
+ .woocommerce-order-details h2 {
183
+ color: {$heading_text_color};
184
+ font-family: {$heading_font_family};
185
+ font-weight: {$heading_font_weight};
186
+ }
187
+
188
+ .woocommerce-order ul.order_details,
189
+ .woocommerce-order .woocommerce-order-details,
190
+ .woocommerce-order .woocommerce-customer-details{
191
+ background-color: {$section_bg_color}
192
+ }
193
+ ";
194
+
195
+ if ( 'no' == $show_order_review ) {
196
+ $output .= '
197
+ .woocommerce-order ul.order_details{
198
+ display: none;
199
+ }
200
+ ';
201
+ }
202
+
203
+ if ( 'no' == $show_order_details ) {
204
+ $output .= '
205
+ .woocommerce-order .woocommerce-order-details{
206
+ display: none;
207
+ }
208
+ ';
209
+ }
210
+
211
+ if ( 'no' == $show_billing_details ) {
212
+ $output .= '
213
+ .woocommerce-order .woocommerce-customer-details .woocommerce-column--billing-address{
214
+ display: none;
215
+ }
216
+ ';
217
+ }
218
+
219
+ if ( 'no' == $show_shipping_details ) {
220
+ $output .= '
221
+ .woocommerce-order .woocommerce-customer-details .woocommerce-column--shipping-address{
222
+ display: none;
223
+ }
224
+ ';
225
+ }
226
+
227
+ if ( 'no' == $show_billing_details && 'no' == $show_shipping_details ) {
228
+ $output .= '
229
+ .woocommerce-order .woocommerce-customer-details{
230
+ display: none;
231
+ }
232
+ ';
233
+ }
234
+
235
+ return $output;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Kicking this off by calling 'get_instance()' method
241
+ */
242
+ Cartflows_Thankyou_Markup::get_instance();
modules/thankyou/classes/class-cartflows-thankyou-meta.php ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout post meta box
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Thankyou_Meta extends Cartflows_Meta {
12
+
13
+ /**
14
+ * Instance
15
+ *
16
+ * @var $instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Meta Option
22
+ *
23
+ * @var $meta_option
24
+ */
25
+ private static $meta_option = null;
26
+
27
+ /**
28
+ * Initiator
29
+ */
30
+ public static function get_instance() {
31
+ if ( ! isset( self::$instance ) ) {
32
+ self::$instance = new self;
33
+ }
34
+
35
+ return self::$instance;
36
+ }
37
+
38
+ /**
39
+ * Constructor
40
+ */
41
+ public function __construct() {
42
+
43
+ /* Init Metabox */
44
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
45
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
46
+ }
47
+
48
+ /**
49
+ * Init Metabox
50
+ */
51
+ public function init_metabox() {
52
+
53
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
54
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
55
+ }
56
+
57
+ /**
58
+ * Setup Metabox
59
+ */
60
+ function setup_meta_box() {
61
+
62
+ if ( _is_wcf_thankyou_type() ) {
63
+ add_meta_box(
64
+ 'wcf-thankyou-settings', // Id.
65
+ __( 'Thank You Page Settings', 'cartflows' ), // Title.
66
+ array( $this, 'markup_meta_box' ), // Callback.
67
+ wcf()->utils->get_step_post_type(), // Post_type.
68
+ 'normal', // Context.
69
+ 'high' // Priority.
70
+ );
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Metabox Markup
76
+ *
77
+ * @param object $post Post object.
78
+ * @return void
79
+ */
80
+ function markup_meta_box( $post ) {
81
+
82
+ wp_nonce_field( 'save-nonce-thankyou-step-meta', 'nonce-thankyou-step-meta' );
83
+ $stored = get_post_meta( $post->ID );
84
+
85
+ $checkout_meta = self::get_meta_option( $post->ID );
86
+
87
+ // Set stored and override defaults.
88
+ foreach ( $stored as $key => $value ) {
89
+ if ( array_key_exists( $key, $checkout_meta ) ) {
90
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
91
+ } else {
92
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
93
+ }
94
+ }
95
+
96
+ // Get defaults.
97
+ $meta = self::get_meta_option( $post->ID );
98
+
99
+ /**
100
+ * Get options
101
+ */
102
+ $thankyou_data = array();
103
+
104
+ foreach ( $meta as $key => $value ) {
105
+
106
+ $thankyou_data[ $key ] = $meta[ $key ]['default'];
107
+ }
108
+
109
+ do_action( 'wcf_thankyou_settings_markup_before', $meta );
110
+ $this->page_header_tab( $thankyou_data, $post->ID );
111
+ do_action( 'wcf_thankyou_settings_markup_after', $meta );
112
+ }
113
+
114
+ /**
115
+ * Page Header Tabs
116
+ *
117
+ * @param array $options Post meta.
118
+ * @param int $post_id Post ID.
119
+ */
120
+ function page_header_tab( $options, $post_id ) {
121
+
122
+ $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
123
+
124
+ if ( empty( $active_tab ) ) {
125
+ $active_tab = 'wcf-thankyou-shortcodes';
126
+ }
127
+
128
+ $tabs = array(
129
+ array(
130
+ 'title' => __( 'Shortcodes', 'cartflows' ),
131
+ 'id' => 'wcf-thankyou-shortcodes',
132
+ 'class' => 'wcf-thankyou-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
133
+ 'icon' => 'dashicons-editor-code',
134
+ ),
135
+ array(
136
+ 'title' => __( 'Thank You Design', 'cartflows' ),
137
+ 'id' => 'wcf-thankyou-design',
138
+ 'class' => 'wcf-thankyou-design' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
139
+ 'icon' => 'dashicons-admin-customizer',
140
+ ),
141
+ array(
142
+ 'title' => __( 'Thank You Fields', 'cartflows' ),
143
+ 'id' => 'wcf-thankyou-fields',
144
+ 'class' => 'wcf-thankyou-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
145
+ 'icon' => 'dashicons-welcome-widgets-menus',
146
+ ),
147
+ );
148
+
149
+ ?>
150
+ <div class="wcf-thankyou-table wcf-metabox-wrap widefat">
151
+ <div class="wcf-table-container">
152
+ <div class="wcf-column-left">
153
+ <div class="wcf-tab-wrapper">
154
+
155
+ <?php foreach ( $tabs as $key => $tab ) { ?>
156
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
157
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
158
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
159
+ </div>
160
+ <?php } ?>
161
+ <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
162
+
163
+ </div>
164
+ </div>
165
+ <div class="wcf-column-right">
166
+ <div class="wcf-thankyou-shortcodes wcf-tab-content active widefat">
167
+ <?php
168
+ echo wcf()->meta->get_shortcode_field(
169
+ array(
170
+ 'label' => __( 'Order Details', 'cartflows' ),
171
+ 'name' => 'wcf-order-details',
172
+ 'content' => esc_html( '[cartflows_order_details]' ),
173
+ )
174
+ );
175
+ ?>
176
+ </div>
177
+ <div class="wcf-thankyou-design wcf-tab-content widefat">
178
+ <?php
179
+
180
+ echo wcf()->meta->get_section(
181
+ array(
182
+ 'label' => __( 'Text', 'cartflows' ),
183
+ )
184
+ );
185
+
186
+ echo wcf()->meta->get_color_picker_field(
187
+ array(
188
+ 'label' => __( 'Color', 'cartflows' ),
189
+ 'name' => 'wcf-tq-text-color',
190
+ 'value' => $options['wcf-tq-text-color'],
191
+ )
192
+ );
193
+
194
+ echo wcf()->meta->get_font_family_field(
195
+ array(
196
+ 'for' => 'wcf-tq-font-family',
197
+ 'label' => __( 'Font Family', 'cartflows' ),
198
+ 'name' => 'wcf-tq-font-family',
199
+ 'value' => $options['wcf-tq-font-family'],
200
+ )
201
+ );
202
+
203
+ echo wcf()->meta->get_section(
204
+ array(
205
+ 'label' => __( 'Heading', 'cartflows' ),
206
+ )
207
+ );
208
+
209
+ echo wcf()->meta->get_color_picker_field(
210
+ array(
211
+ 'label' => __( 'Color', 'cartflows' ),
212
+ 'name' => 'wcf-tq-heading-color',
213
+ 'value' => $options['wcf-tq-heading-color'],
214
+ )
215
+ );
216
+
217
+ echo wcf()->meta->get_font_family_field(
218
+ array(
219
+ 'for' => 'wcf-tq-heading-font-family',
220
+ 'label' => __( 'Font Family', 'cartflows' ),
221
+ 'name' => 'wcf-tq-heading-font-family',
222
+ 'value' => $options['wcf-tq-heading-font-family'],
223
+ )
224
+ );
225
+
226
+ echo wcf()->meta->get_font_weight_field(
227
+ array(
228
+ 'for' => 'wcf-tq-heading-font-family',
229
+ 'label' => __( 'Font Weight', 'cartflows' ),
230
+ 'name' => 'wcf-tq-heading-font-wt',
231
+ 'value' => $options['wcf-tq-heading-font-wt'],
232
+ )
233
+ );
234
+
235
+ echo wcf()->meta->get_checkbox_field(
236
+ array(
237
+ 'label' => __( 'Advanced Options', 'cartflows' ),
238
+ 'name' => 'wcf-tq-advance-options-fields',
239
+ 'value' => $options['wcf-tq-advance-options-fields'],
240
+ 'after' => 'Enable',
241
+ )
242
+ );
243
+
244
+ echo wcf()->meta->get_number_field(
245
+ array(
246
+ 'for' => 'wcf-heading',
247
+ 'label' => __( 'Container Width (In px)', 'cartflows' ),
248
+ 'name' => 'wcf-tq-container-width',
249
+ 'value' => $options['wcf-tq-container-width'],
250
+ )
251
+ );
252
+
253
+ echo wcf()->meta->get_color_picker_field(
254
+ array(
255
+ 'label' => __( 'Section Background Color', 'cartflows' ),
256
+ 'name' => 'wcf-tq-section-bg-color',
257
+ 'value' => $options['wcf-tq-section-bg-color'],
258
+ )
259
+ );
260
+
261
+ ?>
262
+ </div>
263
+ <div class="wcf-thankyou-fields wcf-tab-content widefat">
264
+ <?php
265
+ echo wcf()->meta->get_checkbox_field(
266
+ array(
267
+ 'name' => 'wcf-show-overview-section',
268
+ 'value' => $options['wcf-show-overview-section'],
269
+ 'after' => __( 'Enable Order Overview ', 'cartflows' ),
270
+ )
271
+ );
272
+
273
+ echo wcf()->meta->get_checkbox_field(
274
+ array(
275
+ 'name' => 'wcf-show-details-section',
276
+ 'value' => $options['wcf-show-details-section'],
277
+ 'after' => __( 'Enable Order Details ', 'cartflows' ),
278
+ )
279
+ );
280
+
281
+ echo wcf()->meta->get_checkbox_field(
282
+ array(
283
+ 'name' => 'wcf-show-billing-section',
284
+ 'value' => $options['wcf-show-billing-section'],
285
+ 'after' => __( 'Enable Billing Details ', 'cartflows' ),
286
+ )
287
+ );
288
+
289
+ echo wcf()->meta->get_checkbox_field(
290
+ array(
291
+ 'name' => 'wcf-show-shipping-section',
292
+ 'value' => $options['wcf-show-shipping-section'],
293
+ 'after' => __( 'Enable Shipping Details ', 'cartflows' ),
294
+ )
295
+ );
296
+
297
+ echo wcf()->meta->get_hidden_field(
298
+ array(
299
+ 'name' => 'wcf-field-google-font-url',
300
+ 'value' => $options['wcf-field-google-font-url'],
301
+ )
302
+ );
303
+ ?>
304
+ </div>
305
+ <?php $this->right_column_footer( $options, $post_id ); ?>
306
+ </div>
307
+ </div>
308
+ </div>
309
+
310
+ <?php
311
+
312
+ }
313
+
314
+ /**
315
+ * Get metabox options
316
+ *
317
+ * @param int $post_id post ID.
318
+ * @return array
319
+ */
320
+ public static function get_meta_option( $post_id ) {
321
+
322
+ if ( null === self::$meta_option ) {
323
+
324
+ /**
325
+ * Set metabox options
326
+ *
327
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
328
+ */
329
+ self::$meta_option = wcf()->options->get_thankyou_fields( $post_id );
330
+ }
331
+
332
+ return self::$meta_option;
333
+
334
+ }
335
+
336
+ /**
337
+ * Metabox Save
338
+ *
339
+ * @param number $post_id Post ID.
340
+ * @return void
341
+ */
342
+ function save_meta_box( $post_id ) {
343
+
344
+ // Checks save status.
345
+ $is_autosave = wp_is_post_autosave( $post_id );
346
+ $is_revision = wp_is_post_revision( $post_id );
347
+
348
+ $is_valid_nonce = ( isset( $_POST['nonce-thankyou-step-meta'] ) && wp_verify_nonce( $_POST['nonce-thankyou-step-meta'], 'save-nonce-thankyou-step-meta' ) ) ? true : false;
349
+
350
+ // Exits script depending on save status.
351
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
352
+ return;
353
+ }
354
+
355
+ /**
356
+ * Get meta options
357
+ */
358
+ $post_meta = self::get_meta_option( $post_id );
359
+
360
+ foreach ( $post_meta as $key => $data ) {
361
+
362
+ $meta_value = false;
363
+
364
+ if ( in_array( $key, array( ' ' ) ) ) {
365
+
366
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) {
367
+ $meta_value = array_map( 'sanitize_text_field', $_POST[ $key ] );
368
+ }
369
+ } else {
370
+ // Sanitize values.
371
+ $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT';
372
+
373
+ switch ( $sanitize_filter ) {
374
+
375
+ case 'FILTER_SANITIZE_STRING':
376
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
377
+ break;
378
+
379
+ case 'FILTER_SANITIZE_URL':
380
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL );
381
+ break;
382
+
383
+ case 'FILTER_SANITIZE_NUMBER_INT':
384
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT );
385
+ break;
386
+
387
+ default:
388
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
389
+ break;
390
+ }
391
+ }
392
+
393
+ if ( $meta_value ) {
394
+ update_post_meta( $post_id, $key, $meta_value );
395
+ } else {
396
+ delete_post_meta( $post_id, $key );
397
+ }
398
+ }
399
+ }
400
+ }
401
+
402
+ /**
403
+ * Kicking this off by calling 'get_instance()' method
404
+ */
405
+ Cartflows_Thankyou_Meta::get_instance();
modules/widgets/class-cartflows-next-step.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Next Step Widget
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Initial Setup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Next_Step extends WP_Widget {
14
+
15
+ /**
16
+ * Constructor
17
+ */
18
+ function __construct() {
19
+
20
+ parent::__construct(
21
+
22
+ // Base ID of your widget.
23
+ 'cartflows_next_step',
24
+ // Widget name will appear in UI.
25
+ __( 'CartFlows Next Step', 'cartflows' ),
26
+ // Widget description.
27
+ array( 'description' => __( 'Next Step Widgets', 'cartflows' ) )
28
+ );
29
+ }
30
+
31
+ /**
32
+ * Creating widget front-end
33
+ *
34
+ * @param array $args arguments array.
35
+ * @param array $instance widget instance.
36
+ */
37
+ function widget( $args, $instance ) {
38
+
39
+ $title = apply_filters( 'widget_title', $instance['title'] );
40
+
41
+ $step_id = intval( $instance['step_id'] );
42
+ $flow_id = intval( $instance['flow_id'] );
43
+
44
+ if ( ! $step_id || ! $flow_id ) {
45
+
46
+ global $post;
47
+
48
+ if ( $post && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
49
+ $step_id = intval( $post->ID );
50
+ $flow_id = intval( get_post_meta( $step_id, 'wcf-flow-id', true ) );
51
+ }
52
+ }
53
+ $output = 'No Data';
54
+
55
+ if ( $flow_id ) {
56
+
57
+ $navigation = false;
58
+
59
+ $steps = get_post_meta( $flow_id, 'wcf-steps', true );
60
+
61
+ if ( is_array( $steps ) && ! empty( $steps ) ) {
62
+
63
+ foreach ( $steps as $i => $step ) {
64
+
65
+ if ( intval( $step['id'] ) === $step_id ) {
66
+
67
+ $next_i = $i + 1;
68
+
69
+ if ( isset( $steps[ $next_i ] ) ) {
70
+ $navigation = $steps[ $next_i ];
71
+ }
72
+
73
+ break;
74
+ }
75
+ }
76
+
77
+ if ( $navigation && is_array( $navigation ) ) {
78
+
79
+ $output = '<div class="wcf-step-navigation"><a class="button" target="_self" href="' . get_permalink( $navigation['id'] ) . '">' . __( 'Next Step', 'cartflows' ) . '</a></div>';
80
+ }
81
+ }
82
+ }
83
+
84
+ // before and after widget arguments are defined by themes.
85
+ echo $args['before_widget'];
86
+
87
+ if ( ! empty( $title ) ) {
88
+ echo $args['before_title'] . $title . $args['after_title'];
89
+ }
90
+
91
+ // This is where you run the code and display the output.
92
+ echo $output;
93
+
94
+ echo $args['after_widget'];
95
+ }
96
+
97
+ /**
98
+ * Creating widget back-end
99
+ *
100
+ * @param array $instance widget instance.
101
+ */
102
+ function form( $instance ) {
103
+
104
+ if ( isset( $instance['title'] ) ) {
105
+ $title = $instance['title'];
106
+ } else {
107
+ $title = __( 'New title', 'cartflows' );
108
+ }
109
+
110
+ if ( isset( $instance['flow_id'] ) ) {
111
+ $flow_id = $instance['flow_id'];
112
+ } else {
113
+ $flow_id = '';
114
+ }
115
+
116
+ if ( isset( $instance['step_id'] ) ) {
117
+ $step_id = $instance['step_id'];
118
+ } else {
119
+ $step_id = '';
120
+ }
121
+ // Widget admin form.
122
+ ?>
123
+ <p>
124
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'cartflows' ); ?></label>
125
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
126
+ </p>
127
+ <p>
128
+ <label for="<?php echo $this->get_field_id( 'flow_id' ); ?>"><?php _e( 'Flow ID:', 'cartflows' ); ?></label>
129
+ <input class="widefat" id="<?php echo $this->get_field_id( 'flow_id' ); ?>" name="<?php echo $this->get_field_name( 'flow_id' ); ?>" type="text" value="<?php echo esc_attr( $flow_id ); ?>" />
130
+ </p>
131
+ <p>
132
+ <label for="<?php echo $this->get_field_id( 'step_id' ); ?>"><?php _e( 'Step ID:', 'cartflows' ); ?></label>
133
+ <input class="widefat" id="<?php echo $this->get_field_id( 'step_id' ); ?>" name="<?php echo $this->get_field_name( 'step_id' ); ?>" type="text" value="<?php echo esc_attr( $step_id ); ?>" />
134
+ </p>
135
+ <?php
136
+ }
137
+
138
+ /**
139
+ * Updating widget replacing old instances with new
140
+ *
141
+ * @param array $new_instance new widget instance.
142
+ * @param array $old_instance old widget instance.
143
+ * @return array
144
+ */
145
+ function update( $new_instance, $old_instance ) {
146
+
147
+ $instance = array();
148
+
149
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
150
+ $instance['flow_id'] = ( ! empty( $new_instance['flow_id'] ) ) ? strip_tags( $new_instance['flow_id'] ) : '';
151
+ $instance['step_id'] = ( ! empty( $new_instance['step_id'] ) ) ? strip_tags( $new_instance['step_id'] ) : '';
152
+
153
+ return $instance;
154
+ }
155
+ }
modules/widgets/class-cartflows-widgets.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widgets
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ define( 'CARTFLOWS_WIDGETS_DIR', CARTFLOWS_DIR . 'modules/widgets/' );
9
+ define( 'CARTFLOWS_WIDGETS_URL', CARTFLOWS_URL . 'modules/widgets/' );
10
+
11
+ /**
12
+ * Initial Setup
13
+ *
14
+ * @since 1.0.0
15
+ */
16
+ class Cartflows_Widgets {
17
+
18
+
19
+ /**
20
+ * Member Variable
21
+ *
22
+ * @var object instance
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Initiator
28
+ */
29
+ public static function get_instance() {
30
+ if ( ! isset( self::$instance ) ) {
31
+ self::$instance = new self;
32
+ }
33
+ return self::$instance;
34
+ }
35
+
36
+ /**
37
+ * Constructor function that initializes required actions and hooks
38
+ */
39
+ public function __construct() {
40
+
41
+ require_once CARTFLOWS_WIDGETS_DIR . 'class-cartflows-next-step.php';
42
+
43
+ // Register and load the widget.
44
+ add_action( 'widgets_init', array( $this, 'register_widgets' ) );
45
+ }
46
+
47
+ /**
48
+ * Register widgets
49
+ */
50
+ function register_widgets() {
51
+ register_widget( 'cartflows_next_step' );
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Kicking this off by calling 'get_instance()' method
57
+ */
58
+ Cartflows_Widgets::get_instance();
readme.txt ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === CartFlows ===
2
+ Contributors: brainstormforce, wpcrafter
3
+ Donate link: https://www.paypal.me/BrainstormForce
4
+ Tags: woocommerce, cart
5
+ Requires at least: 4.4
6
+ Requires PHP: 5.6
7
+ Tested up to: 5.0
8
+ Stable tag: 1.0.4
9
+ License: GPLv2 or later
10
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ Create beautiful checkout pages & sales flows for WooCommerce.
13
+
14
+ == Description ==
15
+
16
+ Create beautiful checkout pages & sales flows for WooCommerce.
17
+
18
+ == Installation ==
19
+
20
+ 1. Upload `cartflows.zip` to the `/wp-content/plugins/` directory
21
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
22
+
23
+ == Changelog ==
24
+
25
+ Version 1.0.4 - Friday, 23rd November 2018
26
+ - Fix: Thank you page style meta option issue.
27
+
28
+ Version 1.0.3 - Friday, 23rd November 2018
29
+ - Improvement: Optimized flow and step import.
30
+ - Fix: Elementor page preview not working if landing page is set as homepage.
31
+ - Fix: Landing page issue when set as home-page. Used Home url instead of Site url.
32
+
33
+ Version 1.0.2 - Wednesday, 21st November 2018
34
+ - Fix: Address fields misalignment on checkout page.
35
+
36
+ Version 1.0.1 - Wednesday, 21st November 2018
37
+ - New: Checkout persistence remember data
38
+ - Fix: Link issue in Beaver Builder
39
+ - Fix: Unwanted fields on checkout page.
40
+
41
+ Version 1.0.0 - Monday, 19th November 2018
42
+ - Initial Release