Version Description
Download this release
Release Info
Developer | sandesh055 |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.1.16 |
Comparing to | |
See all releases |
Code changes from version 1.1.15 to 1.1.16
- cartflows.php +24 -24
- changelog.txt +4 -1
- classes/class-cartflows-loader.php +455 -437
- classes/class-cartflows-update.php +78 -77
- languages/cartflows.pot +5 -5
- readme.txt +5 -2
cartflows.php
CHANGED
@@ -1,24 +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.1.
|
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 |
-
* Loader
|
23 |
-
*/
|
24 |
-
require_once 'classes/class-cartflows-loader.php';
|
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.1.16
|
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 |
+
* Loader
|
23 |
+
*/
|
24 |
+
require_once 'classes/class-cartflows-loader.php';
|
changelog.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
|
|
|
|
|
|
1 |
Version 1.1.15 - Wednesday, 24th April 2019
|
2 |
-
- Fix:
|
3 |
|
4 |
Version 1.1.14 - Wednesday, 24th April 2019
|
5 |
- Improvement: Minify CSS and Js files filter added.
|
1 |
+
Version 1.1.16 - Thursday, 25th April 2019
|
2 |
+
- Improvement: Added compatibility for the Cartflows Pro plugin update for an older versions.
|
3 |
+
|
4 |
Version 1.1.15 - Wednesday, 24th April 2019
|
5 |
+
- Fix: WooCommerce dependency issue.
|
6 |
|
7 |
Version 1.1.14 - Wednesday, 24th April 2019
|
8 |
- Improvement: Minify CSS and Js files filter added.
|
classes/class-cartflows-loader.php
CHANGED
@@ -1,437 +1,455 @@
|
|
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 |
-
* Member Variable
|
67 |
-
*
|
68 |
-
* @var assets_vars
|
69 |
-
*/
|
70 |
-
public $assets_vars = null;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Initiator
|
74 |
-
*/
|
75 |
-
public static function get_instance() {
|
76 |
-
|
77 |
-
if ( is_null( self::$instance ) ) {
|
78 |
-
|
79 |
-
self::$instance = new self;
|
80 |
-
|
81 |
-
/**
|
82 |
-
* CartFlows loaded.
|
83 |
-
*
|
84 |
-
* Fires when Cartflows was fully loaded and instantiated.
|
85 |
-
*
|
86 |
-
* @since 1.0.0
|
87 |
-
*/
|
88 |
-
do_action( 'cartflows_loaded' );
|
89 |
-
}
|
90 |
-
|
91 |
-
return self::$instance;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Constructor
|
96 |
-
*/
|
97 |
-
public function __construct() {
|
98 |
-
|
99 |
-
$this->define_constants();
|
100 |
-
|
101 |
-
// Activation hook.
|
102 |
-
register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
|
103 |
-
|
104 |
-
// deActivation hook.
|
105 |
-
register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
|
106 |
-
|
107 |
-
add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
|
108 |
-
add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
define( '
|
122 |
-
define( '
|
123 |
-
define( '
|
124 |
-
|
125 |
-
define( '
|
126 |
-
define( '
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
define( '
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
if ( ! defined( '
|
140 |
-
define( '
|
141 |
-
}
|
142 |
-
if ( ! defined( '
|
143 |
-
define( '
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
*
|
152 |
-
*
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
$this
|
166 |
-
$this
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
*
|
172 |
-
*
|
173 |
-
*
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
*
|
182 |
-
*
|
183 |
-
* @
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
*
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
/*
|
251 |
-
include_once CARTFLOWS_DIR . '
|
252 |
-
include_once CARTFLOWS_DIR . '
|
253 |
-
include_once CARTFLOWS_DIR . '
|
254 |
-
|
255 |
-
|
256 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-
|
257 |
-
|
258 |
-
|
259 |
-
include_once CARTFLOWS_DIR . 'classes/
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
*
|
283 |
-
*
|
284 |
-
* @
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
*
|
311 |
-
*
|
312 |
-
*
|
313 |
-
*/
|
314 |
-
$
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
$
|
320 |
-
|
321 |
-
if (
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
/**
|
424 |
-
*
|
425 |
-
*
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* Member Variable
|
67 |
+
*
|
68 |
+
* @var assets_vars
|
69 |
+
*/
|
70 |
+
public $assets_vars = null;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Initiator
|
74 |
+
*/
|
75 |
+
public static function get_instance() {
|
76 |
+
|
77 |
+
if ( is_null( self::$instance ) ) {
|
78 |
+
|
79 |
+
self::$instance = new self;
|
80 |
+
|
81 |
+
/**
|
82 |
+
* CartFlows loaded.
|
83 |
+
*
|
84 |
+
* Fires when Cartflows was fully loaded and instantiated.
|
85 |
+
*
|
86 |
+
* @since 1.0.0
|
87 |
+
*/
|
88 |
+
do_action( 'cartflows_loaded' );
|
89 |
+
}
|
90 |
+
|
91 |
+
return self::$instance;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Constructor
|
96 |
+
*/
|
97 |
+
public function __construct() {
|
98 |
+
|
99 |
+
$this->define_constants();
|
100 |
+
|
101 |
+
// Activation hook.
|
102 |
+
register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
|
103 |
+
|
104 |
+
// deActivation hook.
|
105 |
+
register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
|
106 |
+
|
107 |
+
add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
|
108 |
+
add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Defines all constants
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
*/
|
116 |
+
public function define_constants() {
|
117 |
+
|
118 |
+
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
119 |
+
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
120 |
+
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
121 |
+
define( 'CARTFLOWS_VER', '1.1.16' );
|
122 |
+
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
123 |
+
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
124 |
+
|
125 |
+
define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
|
126 |
+
define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
|
127 |
+
|
128 |
+
if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
|
129 |
+
define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
|
130 |
+
}
|
131 |
+
define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
|
132 |
+
define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
|
133 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
|
134 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
|
135 |
+
|
136 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
|
137 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
|
138 |
+
}
|
139 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
|
140 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
|
141 |
+
}
|
142 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
|
143 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Loads plugin files.
|
149 |
+
*
|
150 |
+
* @since 1.0.0
|
151 |
+
*
|
152 |
+
* @return void
|
153 |
+
*/
|
154 |
+
function load_plugin() {
|
155 |
+
|
156 |
+
if ( ! function_exists( 'WC' ) ) {
|
157 |
+
add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
|
158 |
+
return;
|
159 |
+
}
|
160 |
+
|
161 |
+
$this->load_helper_files_components();
|
162 |
+
$this->load_core_files();
|
163 |
+
$this->load_core_components();
|
164 |
+
|
165 |
+
add_action( 'wp_loaded', array( $this, 'initialize' ) );
|
166 |
+
add_action( 'cartflows_pro_init', array( $this, 'licence_setup' ) );
|
167 |
+
|
168 |
+
/**
|
169 |
+
* CartFlows Init.
|
170 |
+
*
|
171 |
+
* Fires when Cartflows is instantiated.
|
172 |
+
*
|
173 |
+
* @since 1.0.0
|
174 |
+
*/
|
175 |
+
do_action( 'cartflows_init' );
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Licence Setup Fallback.
|
180 |
+
*
|
181 |
+
* @since 1.1.16
|
182 |
+
*
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
function licence_setup() {
|
186 |
+
|
187 |
+
if ( version_compare( CARTFLOWS_PRO_VER, '1.1.13', '<' ) ) {
|
188 |
+
|
189 |
+
if ( method_exists( 'Cartflows_Pro_Loader', 'licence_setup' ) ) {
|
190 |
+
wcf_pro()->licence_setup();
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Load Helper Files and Components.
|
197 |
+
*
|
198 |
+
* @since 1.0.0
|
199 |
+
*
|
200 |
+
* @return void
|
201 |
+
*/
|
202 |
+
function load_helper_files_components() {
|
203 |
+
|
204 |
+
/* Public Utils */
|
205 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
|
206 |
+
|
207 |
+
/* Public Session */
|
208 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-session.php';
|
209 |
+
|
210 |
+
/* Public Global namespace functions */
|
211 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
212 |
+
|
213 |
+
/* Admin Helper */
|
214 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
215 |
+
|
216 |
+
/* Meta Default Values */
|
217 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
218 |
+
|
219 |
+
$this->utils = Cartflows_Utils::get_instance();
|
220 |
+
$this->session = Cartflows_Session::get_instance();
|
221 |
+
$this->options = Cartflows_Default_Meta::get_instance();
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Init hooked function.
|
226 |
+
*
|
227 |
+
* @since 1.0.0
|
228 |
+
*
|
229 |
+
* @return void
|
230 |
+
*/
|
231 |
+
function initialize() {
|
232 |
+
$this->assets_vars = $this->utils->get_assets_path();
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Load Core Files.
|
237 |
+
*
|
238 |
+
* @since 1.0.0
|
239 |
+
*
|
240 |
+
* @return void
|
241 |
+
*/
|
242 |
+
function load_core_files() {
|
243 |
+
|
244 |
+
/* Update compatibility. */
|
245 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
|
246 |
+
|
247 |
+
/* Page builder compatibilty class */
|
248 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
|
249 |
+
|
250 |
+
/* Admin Meta Fields*/
|
251 |
+
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
252 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
|
253 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
|
254 |
+
|
255 |
+
/* Cloning */
|
256 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
|
257 |
+
|
258 |
+
/* Admin Settings */
|
259 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
260 |
+
|
261 |
+
/* Core Modules */
|
262 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
|
263 |
+
|
264 |
+
/* Frontend Global */
|
265 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
|
266 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
|
267 |
+
|
268 |
+
/* Modules */
|
269 |
+
include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
|
270 |
+
include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
|
271 |
+
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
272 |
+
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
273 |
+
|
274 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
275 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
|
276 |
+
|
277 |
+
include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
|
278 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Load Core Components.
|
283 |
+
*
|
284 |
+
* @since 1.0.0
|
285 |
+
*
|
286 |
+
* @return void
|
287 |
+
*/
|
288 |
+
function load_core_components() {
|
289 |
+
|
290 |
+
$this->meta = Cartflows_Meta_Fields::get_instance();
|
291 |
+
$this->logger = Cartflows_Logger::get_instance();
|
292 |
+
$this->flow = Cartflows_Flow_Frontend::get_instance();
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Load CartFlows Pro Text Domain.
|
297 |
+
* This will load the translation textdomain depending on the file priorities.
|
298 |
+
* 1. Global Languages /wp-content/languages/cartflows/ folder
|
299 |
+
* 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
|
300 |
+
*
|
301 |
+
* @since 1.0.3
|
302 |
+
* @return void
|
303 |
+
*/
|
304 |
+
public function load_cf_textdomain() {
|
305 |
+
|
306 |
+
// Default languages directory for CartFlows Pro.
|
307 |
+
$lang_dir = CARTFLOWS_DIR . 'languages/';
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Filters the languages directory path to use for CartFlows Pro.
|
311 |
+
*
|
312 |
+
* @param string $lang_dir The languages directory path.
|
313 |
+
*/
|
314 |
+
$lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
|
315 |
+
|
316 |
+
// Traditional WordPress plugin locale filter.
|
317 |
+
global $wp_version;
|
318 |
+
|
319 |
+
$get_locale = get_locale();
|
320 |
+
|
321 |
+
if ( $wp_version >= 4.7 ) {
|
322 |
+
$get_locale = get_user_locale();
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Language Locale for CartFlows Pro
|
327 |
+
*
|
328 |
+
* @var $get_locale The locale to use.
|
329 |
+
* Uses get_user_locale()` in WordPress 4.7 or greater,
|
330 |
+
* otherwise uses `get_locale()`.
|
331 |
+
*/
|
332 |
+
$locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
|
333 |
+
$mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
|
334 |
+
|
335 |
+
// Setup paths to current locale file.
|
336 |
+
$mofile_local = $lang_dir . $mofile;
|
337 |
+
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
|
338 |
+
|
339 |
+
if ( file_exists( $mofile_global ) ) {
|
340 |
+
// Look in global /wp-content/languages/cartflows/ folder.
|
341 |
+
load_textdomain( 'cartflows', $mofile_global );
|
342 |
+
} elseif ( file_exists( $mofile_local ) ) {
|
343 |
+
// Look in local /wp-content/plugins/cartflows/languages/ folder.
|
344 |
+
load_textdomain( 'cartflows', $mofile_local );
|
345 |
+
} else {
|
346 |
+
// Load the default language files.
|
347 |
+
load_plugin_textdomain( 'cartflows', false, $lang_dir );
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Fires admin notice when Elementor is not installed and activated.
|
353 |
+
*
|
354 |
+
* @since 1.0.0
|
355 |
+
*
|
356 |
+
* @return void
|
357 |
+
*/
|
358 |
+
public function fails_to_load() {
|
359 |
+
|
360 |
+
$screen = get_current_screen();
|
361 |
+
|
362 |
+
if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
|
363 |
+
return;
|
364 |
+
}
|
365 |
+
|
366 |
+
$class = 'notice notice-error';
|
367 |
+
/* translators: %s: html tags */
|
368 |
+
$message = sprintf( __( 'The %1$sCartFlows%2$s plugin requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
|
369 |
+
|
370 |
+
$plugin = 'woocommerce/woocommerce.php';
|
371 |
+
|
372 |
+
if ( _is_woo_installed() ) {
|
373 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
374 |
+
return;
|
375 |
+
}
|
376 |
+
|
377 |
+
$action_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
378 |
+
$button_label = __( 'Activate WooCommerce', 'cartflows' );
|
379 |
+
|
380 |
+
} else {
|
381 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
382 |
+
return;
|
383 |
+
}
|
384 |
+
|
385 |
+
$action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
|
386 |
+
$button_label = __( 'Install WooCommerce', 'cartflows' );
|
387 |
+
}
|
388 |
+
|
389 |
+
$button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
|
390 |
+
|
391 |
+
printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Activation Reset
|
396 |
+
*/
|
397 |
+
function activation_reset() {
|
398 |
+
|
399 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
|
400 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
|
401 |
+
|
402 |
+
Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
|
403 |
+
Cartflows_Step_Post_Type::get_instance()->step_post_type();
|
404 |
+
flush_rewrite_rules();
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Deactivation Reset
|
409 |
+
*/
|
410 |
+
function deactivation_reset() {
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Logger Class Instance
|
415 |
+
*/
|
416 |
+
function logger() {
|
417 |
+
return Cartflows_Logger::get_instance();
|
418 |
+
}
|
419 |
+
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Prepare if class 'Cartflows_Loader' exist.
|
425 |
+
* Kicking this off by calling 'get_instance()' method
|
426 |
+
*/
|
427 |
+
Cartflows_Loader::get_instance();
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Get global class.
|
432 |
+
*
|
433 |
+
* @return object
|
434 |
+
*/
|
435 |
+
function wcf() {
|
436 |
+
return Cartflows_Loader::get_instance();
|
437 |
+
}
|
438 |
+
|
439 |
+
if ( ! function_exists( '_is_woo_installed' ) ) {
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Is woocommerce plugin installed.
|
443 |
+
*
|
444 |
+
* @since 1.0.0
|
445 |
+
*
|
446 |
+
* @access public
|
447 |
+
*/
|
448 |
+
function _is_woo_installed() {
|
449 |
+
|
450 |
+
$path = 'woocommerce/woocommerce.php';
|
451 |
+
$plugins = get_plugins();
|
452 |
+
|
453 |
+
return isset( $plugins[ $path ] );
|
454 |
+
}
|
455 |
+
}
|
classes/class-cartflows-update.php
CHANGED
@@ -1,77 +1,78 @@
|
|
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 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
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 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
// If equals then return.
|
62 |
+
if ( version_compare( $saved_version, CARTFLOWS_VER, '=' ) ) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
|
66 |
+
// Update auto saved version number.
|
67 |
+
update_option( 'cartflows-version', CARTFLOWS_VER );
|
68 |
+
|
69 |
+
do_action( 'cartflows_update_after' );
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Kicking this off by calling 'get_instance()' method
|
75 |
+
*/
|
76 |
+
Cartflows_Update::get_instance();
|
77 |
+
|
78 |
+
endif;
|
languages/cartflows.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the CartFlows package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: CartFlows 1.1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
-
"POT-Creation-Date: 2019-04-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -268,18 +268,18 @@ msgstr ""
|
|
268 |
msgid "Plugin Successfully Activated"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: classes/class-cartflows-loader.php:
|
272 |
#. translators: %s: html tags
|
273 |
msgid ""
|
274 |
"The %1$sCartFlows%2$s plugin requires %1$sWooCommerce%2$s plugin installed "
|
275 |
"& activated."
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: classes/class-cartflows-loader.php:
|
279 |
msgid "Activate WooCommerce"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: classes/class-cartflows-loader.php:
|
283 |
msgid "Install WooCommerce"
|
284 |
msgstr ""
|
285 |
|
2 |
# This file is distributed under the same license as the CartFlows package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: CartFlows 1.1.16\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
+
"POT-Creation-Date: 2019-04-25 10:43:16+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
268 |
msgid "Plugin Successfully Activated"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: classes/class-cartflows-loader.php:368
|
272 |
#. translators: %s: html tags
|
273 |
msgid ""
|
274 |
"The %1$sCartFlows%2$s plugin requires %1$sWooCommerce%2$s plugin installed "
|
275 |
"& activated."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: classes/class-cartflows-loader.php:378
|
279 |
msgid "Activate WooCommerce"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: classes/class-cartflows-loader.php:386
|
283 |
msgid "Install WooCommerce"
|
284 |
msgstr ""
|
285 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, cart
|
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.1
|
8 |
-
Stable tag: 1.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -93,8 +93,11 @@ Say goodby to using the same ridgid checkout page that everyone else is using. C
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
96 |
= Version 1.1.15 - Wednesday, 24th April 2019 =
|
97 |
-
* Fix:
|
98 |
|
99 |
= Version 1.1.14 - Wednesday, 24th April 2019 =
|
100 |
* Improvement: Minify CSS and Js files filter added.
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.1
|
8 |
+
Stable tag: 1.1.16
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
93 |
|
94 |
== Changelog ==
|
95 |
|
96 |
+
= Version 1.1.16 - Thursday, 25th April 2019 =
|
97 |
+
* Improvement: Added compatibility for the Cartflows Pro plugin update for an older versions.
|
98 |
+
|
99 |
= Version 1.1.15 - Wednesday, 24th April 2019 =
|
100 |
+
* Fix: WooCommerce dependency issue.
|
101 |
|
102 |
= Version 1.1.14 - Wednesday, 24th April 2019 =
|
103 |
* Improvement: Minify CSS and Js files filter added.
|