Version Description
Download this release
Release Info
Developer | sandesh055 |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.5.21 |
Comparing to | |
See all releases |
Code changes from version 1.5.20 to 1.5.21
- cartflows.php +24 -24
- changelog.txt +3 -0
- classes/class-cartflows-functions.php +601 -601
- classes/class-cartflows-importer.php +1740 -1740
- classes/class-cartflows-loader.php +612 -612
- classes/class-cartflows-utils.php +606 -606
- languages/cartflows.pot +3070 -3070
- modules/beaver-builder/cartflows-bb-checkout-form/includes/frontend.css.php +381 -381
- modules/beaver-builder/cartflows-bb-next-step/includes/frontend.css.php +596 -596
- modules/beaver-builder/cartflows-bb-order-details/includes/frontend.css.php +206 -206
- modules/checkout/classes/class-cartflows-checkout-markup.php +1405 -1405
- modules/checkout/templates/embed/checkout-template-simple.php +32 -32
- modules/flow/classes/class-cartflows-permalink.php +175 -165
- modules/gutenberg/classes/class-cartflows-block-config.php +528 -528
- modules/gutenberg/classes/class-cartflows-block-helper.php +672 -672
- modules/gutenberg/classes/class-cartflows-block-js.php +170 -170
- modules/gutenberg/classes/class-cartflows-block-loader.php +67 -67
- modules/gutenberg/classes/class-cartflows-gb-helper.php +661 -661
- modules/gutenberg/classes/class-cartflows-gutenberg-editor.php +129 -129
- modules/gutenberg/classes/class-cartflows-init-blocks.php +339 -339
- modules/gutenberg/dist/blocks/checkout-form/class-wcfb-checkout-form.php +581 -581
- modules/gutenberg/dist/blocks/optin-form/class-wcfb-optin-form.php +395 -395
- modules/gutenberg/dist/blocks/order-detail-form/class-wcfb-order-detail-form.php +834 -834
- modules/optin/classes/class-cartflows-optin-markup.php +824 -824
- modules/thankyou/classes/class-cartflows-thankyou-markup.php +113 -336
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.5.
|
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: 4.6.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.5.21
|
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: 4.6.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,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
Version 1.5.20 - Thursday, 5th November 2020
|
2 |
- New: Introduced Gutenberg Blocks.
|
3 |
|
1 |
+
Version 1.5.21 - Thursday, 5th November 2020
|
2 |
+
- Fix: Pages showing 404 error due to permalink issue.
|
3 |
+
|
4 |
Version 1.5.20 - Thursday, 5th November 2020
|
5 |
- New: Introduced Gutenberg Blocks.
|
6 |
|
classes/class-cartflows-functions.php
CHANGED
@@ -1,601 +1,601 @@
|
|
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 |
-
* Fatal error mb_strpos fallback.
|
14 |
-
*
|
15 |
-
* @param string $string string where to find.
|
16 |
-
* @param string $search string to search.
|
17 |
-
* @since 1.0.0
|
18 |
-
*/
|
19 |
-
function wcf_mb_strpos( $string, $search ) {
|
20 |
-
|
21 |
-
if ( function_exists( 'mb_strpos' ) ) {
|
22 |
-
return mb_strpos( $string, $search, 0, 'utf-8' );
|
23 |
-
} else {
|
24 |
-
return strpos( $string, $search );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Check if cartflows pro activated.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
function _is_cartflows_pro() {
|
34 |
-
|
35 |
-
if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
|
36 |
-
return true;
|
37 |
-
}
|
38 |
-
|
39 |
-
return false;
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Returns pro version number.
|
45 |
-
*
|
46 |
-
* @param int $version version number.
|
47 |
-
* @since 1.0.0
|
48 |
-
*/
|
49 |
-
function _is_cartflows_pro_ver_less_than( $version ) {
|
50 |
-
|
51 |
-
if ( defined( 'CARTFLOWS_PRO_VER' ) && version_compare( CARTFLOWS_PRO_VER, $version, '<' ) ) {
|
52 |
-
return true;
|
53 |
-
}
|
54 |
-
|
55 |
-
return false;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Returns step id.
|
60 |
-
*
|
61 |
-
* @since 1.0.0
|
62 |
-
*/
|
63 |
-
function _get_wcf_post_id() {
|
64 |
-
|
65 |
-
global $post;
|
66 |
-
|
67 |
-
if ( isset( $post->ID ) ) {
|
68 |
-
return $post->ID;
|
69 |
-
}
|
70 |
-
|
71 |
-
return 0;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Returns step id.
|
76 |
-
*
|
77 |
-
* @since 1.0.0
|
78 |
-
*/
|
79 |
-
function _get_wcf_step_id() {
|
80 |
-
|
81 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
82 |
-
|
83 |
-
global $post;
|
84 |
-
|
85 |
-
return $post->ID;
|
86 |
-
}
|
87 |
-
|
88 |
-
return false;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Check if it is a landing page?
|
93 |
-
*
|
94 |
-
* @since 1.0.0
|
95 |
-
*/
|
96 |
-
function _is_wcf_landing_type() {
|
97 |
-
|
98 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
99 |
-
|
100 |
-
global $post;
|
101 |
-
|
102 |
-
if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
103 |
-
|
104 |
-
return true;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
return false;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Returns landing id.
|
113 |
-
*
|
114 |
-
* @since 1.0.0
|
115 |
-
*/
|
116 |
-
function _get_wcf_landing_id() {
|
117 |
-
|
118 |
-
if ( _is_wcf_landing_type() ) {
|
119 |
-
|
120 |
-
global $post;
|
121 |
-
|
122 |
-
return $post->ID;
|
123 |
-
}
|
124 |
-
|
125 |
-
return false;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Is custom checkout?
|
130 |
-
*
|
131 |
-
* @param int $checkout_id checkout ID.
|
132 |
-
* @since 1.0.0
|
133 |
-
*/
|
134 |
-
function _is_wcf_meta_custom_checkout( $checkout_id ) {
|
135 |
-
|
136 |
-
$is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
|
137 |
-
|
138 |
-
if ( 'yes' === $is_custom ) {
|
139 |
-
|
140 |
-
return true;
|
141 |
-
}
|
142 |
-
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Check if page is cartflow checkout.
|
148 |
-
*
|
149 |
-
* @since 1.0.0
|
150 |
-
* @return bool
|
151 |
-
*/
|
152 |
-
function _is_wcf_checkout_type() {
|
153 |
-
|
154 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
155 |
-
|
156 |
-
global $post;
|
157 |
-
|
158 |
-
if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
159 |
-
|
160 |
-
return true;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
return false;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Check if AJAX call is in progress.
|
169 |
-
*
|
170 |
-
* @since 1.0.0
|
171 |
-
* @return bool
|
172 |
-
*/
|
173 |
-
function _is_wcf_doing_checkout_ajax() {
|
174 |
-
|
175 |
-
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
176 |
-
|
177 |
-
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
178 |
-
isset( $_POST['_wcf_checkout_id'] ) //phpcs:ignore
|
179 |
-
) {
|
180 |
-
return true;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
return false;
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Check if optin AJAX call is in progress.
|
189 |
-
*
|
190 |
-
* @since 1.0.0
|
191 |
-
* @return bool
|
192 |
-
*/
|
193 |
-
function _is_wcf_doing_optin_ajax() {
|
194 |
-
|
195 |
-
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
196 |
-
|
197 |
-
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
198 |
-
isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
|
199 |
-
) {
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
return false;
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Returns checkout ID.
|
209 |
-
*
|
210 |
-
* @since 1.0.0
|
211 |
-
* @return int/bool
|
212 |
-
*/
|
213 |
-
function _get_wcf_checkout_id() {
|
214 |
-
|
215 |
-
if ( _is_wcf_checkout_type() ) {
|
216 |
-
|
217 |
-
global $post;
|
218 |
-
|
219 |
-
return $post->ID;
|
220 |
-
}
|
221 |
-
|
222 |
-
return false;
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Check if it is checkout shortcode.
|
227 |
-
*
|
228 |
-
* @since 1.0.0
|
229 |
-
* @return bool
|
230 |
-
*/
|
231 |
-
function _is_wcf_checkout_shortcode() {
|
232 |
-
|
233 |
-
global $post;
|
234 |
-
|
235 |
-
if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
|
236 |
-
|
237 |
-
return true;
|
238 |
-
}
|
239 |
-
|
240 |
-
return false;
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Check if it is checkout shortcode.
|
245 |
-
*
|
246 |
-
* @since 1.0.0
|
247 |
-
* @param string $content shortcode content.
|
248 |
-
* @return bool
|
249 |
-
*/
|
250 |
-
function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
|
251 |
-
|
252 |
-
$checkout_id = 0;
|
253 |
-
|
254 |
-
if ( ! empty( $content ) ) {
|
255 |
-
|
256 |
-
$regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
|
257 |
-
|
258 |
-
preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
|
259 |
-
|
260 |
-
if ( ! empty( $regex_matches ) ) {
|
261 |
-
|
262 |
-
if ( 'cartflows_checkout' == $regex_matches[2] ) {
|
263 |
-
|
264 |
-
$attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
|
265 |
-
$attribure_str = str_replace( '"', '', $attribure_str );
|
266 |
-
|
267 |
-
$attributes = wp_parse_args( $attribure_str );
|
268 |
-
|
269 |
-
if ( isset( $attributes['id'] ) ) {
|
270 |
-
$checkout_id = $attributes['id'];
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
return $checkout_id;
|
277 |
-
}
|
278 |
-
|
279 |
-
/**
|
280 |
-
* Check if post type is upsell.
|
281 |
-
*
|
282 |
-
* @since 1.0.0
|
283 |
-
* @return bool
|
284 |
-
*/
|
285 |
-
function _is_wcf_upsell_type() {
|
286 |
-
|
287 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
288 |
-
|
289 |
-
global $post;
|
290 |
-
|
291 |
-
if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
292 |
-
|
293 |
-
return true;
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
return false;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Returns upsell ID.
|
302 |
-
*
|
303 |
-
* @since 1.0.0
|
304 |
-
* @return int/bool
|
305 |
-
*/
|
306 |
-
function _get_wcf_upsell_id() {
|
307 |
-
|
308 |
-
if ( _is_wcf_upsell_type() ) {
|
309 |
-
|
310 |
-
global $post;
|
311 |
-
|
312 |
-
return $post->ID;
|
313 |
-
}
|
314 |
-
|
315 |
-
return false;
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Check if post is of type downsell.
|
320 |
-
*
|
321 |
-
* @since 1.0.0
|
322 |
-
* @return int/bool
|
323 |
-
*/
|
324 |
-
function _is_wcf_downsell_type() {
|
325 |
-
|
326 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
327 |
-
|
328 |
-
global $post;
|
329 |
-
|
330 |
-
if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
331 |
-
|
332 |
-
return true;
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
return false;
|
337 |
-
}
|
338 |
-
|
339 |
-
/**
|
340 |
-
* Get downsell page ID.
|
341 |
-
*
|
342 |
-
* @since 1.0.0
|
343 |
-
* @return int/bool
|
344 |
-
*/
|
345 |
-
function _get_wcf_downsell_id() {
|
346 |
-
|
347 |
-
if ( _is_wcf_downsell_type() ) {
|
348 |
-
|
349 |
-
global $post;
|
350 |
-
|
351 |
-
return $post->ID;
|
352 |
-
}
|
353 |
-
|
354 |
-
return false;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Check if page is of thank you type.
|
359 |
-
*
|
360 |
-
* @since 1.0.0
|
361 |
-
* @return int/bool
|
362 |
-
*/
|
363 |
-
function _is_wcf_thankyou_type() {
|
364 |
-
|
365 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
366 |
-
|
367 |
-
global $post;
|
368 |
-
|
369 |
-
if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
370 |
-
|
371 |
-
return true;
|
372 |
-
}
|
373 |
-
}
|
374 |
-
|
375 |
-
return false;
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Get thank you page ID.
|
380 |
-
*
|
381 |
-
* @since 1.0.0
|
382 |
-
* @return int/bool
|
383 |
-
*/
|
384 |
-
function _get_wcf_thankyou_id() {
|
385 |
-
|
386 |
-
if ( _is_wcf_thankyou_type() ) {
|
387 |
-
|
388 |
-
global $post;
|
389 |
-
|
390 |
-
return $post->ID;
|
391 |
-
}
|
392 |
-
|
393 |
-
return false;
|
394 |
-
}
|
395 |
-
|
396 |
-
|
397 |
-
/**
|
398 |
-
* Check if post type is upsell.
|
399 |
-
*
|
400 |
-
* @since 1.0.0
|
401 |
-
* @return bool
|
402 |
-
*/
|
403 |
-
function _is_wcf_base_offer_type() {
|
404 |
-
|
405 |
-
$result = false;
|
406 |
-
|
407 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
408 |
-
|
409 |
-
global $post;
|
410 |
-
|
411 |
-
$step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
|
412 |
-
|
413 |
-
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
414 |
-
|
415 |
-
$result = true;
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
return apply_filters( 'cartflows_is_offer_type', $result );
|
420 |
-
}
|
421 |
-
|
422 |
-
/**
|
423 |
-
* Returns upsell ID.
|
424 |
-
*
|
425 |
-
* @since 1.0.0
|
426 |
-
* @return int/bool
|
427 |
-
*/
|
428 |
-
function _get_wcf_base_offer_id() {
|
429 |
-
|
430 |
-
if ( _is_wcf_base_offer_type() ) {
|
431 |
-
|
432 |
-
global $post;
|
433 |
-
|
434 |
-
return $post->ID;
|
435 |
-
}
|
436 |
-
|
437 |
-
return false;
|
438 |
-
}
|
439 |
-
|
440 |
-
/**
|
441 |
-
* Check if page is of optin type.
|
442 |
-
*
|
443 |
-
* @since 1.0.0
|
444 |
-
* @return int/bool
|
445 |
-
*/
|
446 |
-
function _is_wcf_optin_type() {
|
447 |
-
|
448 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
449 |
-
|
450 |
-
global $post;
|
451 |
-
|
452 |
-
if ( 'optin' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
453 |
-
|
454 |
-
return true;
|
455 |
-
}
|
456 |
-
}
|
457 |
-
|
458 |
-
return false;
|
459 |
-
}
|
460 |
-
|
461 |
-
/**
|
462 |
-
* Get optin page ID.
|
463 |
-
*
|
464 |
-
* @since 1.0.0
|
465 |
-
* @return int/bool
|
466 |
-
*/
|
467 |
-
function _get_wcf_optin_id() {
|
468 |
-
|
469 |
-
if ( _is_wcf_optin_type() ) {
|
470 |
-
|
471 |
-
global $post;
|
472 |
-
|
473 |
-
return $post->ID;
|
474 |
-
}
|
475 |
-
|
476 |
-
return false;
|
477 |
-
}
|
478 |
-
|
479 |
-
/**
|
480 |
-
* Define a constant if it is not already defined.
|
481 |
-
*
|
482 |
-
* @since 3.0.0
|
483 |
-
* @param string $name Constant name.
|
484 |
-
* @param mixed $value Value.
|
485 |
-
*/
|
486 |
-
function wcf_maybe_define_constant( $name, $value ) {
|
487 |
-
if ( ! defined( $name ) ) {
|
488 |
-
define( $name, $value );
|
489 |
-
}
|
490 |
-
}
|
491 |
-
|
492 |
-
|
493 |
-
if ( ! function_exists( 'wp_body_open' ) ) {
|
494 |
-
/**
|
495 |
-
* Fire the wp_body_open action.
|
496 |
-
*
|
497 |
-
* Added for backwards compatibility to support WordPress versions prior to 5.2.0.
|
498 |
-
*/
|
499 |
-
function wp_body_open() {
|
500 |
-
/**
|
501 |
-
* Triggered after the opening <body> tag.
|
502 |
-
*/
|
503 |
-
do_action( 'wp_body_open' );
|
504 |
-
}
|
505 |
-
}
|
506 |
-
|
507 |
-
/**
|
508 |
-
* Check if type is optin by id.
|
509 |
-
*
|
510 |
-
* @param int $post_id post id.
|
511 |
-
*
|
512 |
-
* @return int/bool
|
513 |
-
* @since 1.0.0
|
514 |
-
*/
|
515 |
-
function _wcf_check_is_optin_by_id( $post_id ) {
|
516 |
-
|
517 |
-
if ( 'optin' === get_post_meta( $post_id, 'wcf-step-type', true ) ) {
|
518 |
-
|
519 |
-
return true;
|
520 |
-
}
|
521 |
-
|
522 |
-
return false;
|
523 |
-
}
|
524 |
-
|
525 |
-
/**
|
526 |
-
* Supported Page Template
|
527 |
-
*
|
528 |
-
* @param string $page_template current page template.
|
529 |
-
*
|
530 |
-
* @return int/bool
|
531 |
-
* @since 1.5.7
|
532 |
-
*/
|
533 |
-
function _wcf_supported_template( $page_template ) {
|
534 |
-
|
535 |
-
if ( in_array( $page_template, array( 'cartflows-default', 'cartflows-canvas' ), true ) ) {
|
536 |
-
|
537 |
-
return true;
|
538 |
-
}
|
539 |
-
|
540 |
-
return false;
|
541 |
-
}
|
542 |
-
|
543 |
-
/**
|
544 |
-
* Display design Metabox Notice.
|
545 |
-
*
|
546 |
-
* @return string
|
547 |
-
* @since x.x.x
|
548 |
-
*/
|
549 |
-
function wcf_get_page_builder_notice() {
|
550 |
-
|
551 |
-
$notice = '';
|
552 |
-
$page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
553 |
-
|
554 |
-
$supported_page_builders = array( 'elementor', 'beaver-builder' );
|
555 |
-
|
556 |
-
$page_builder_data = array(
|
557 |
-
'elementor' => array(
|
558 |
-
'name' => 'Elementor',
|
559 |
-
'doc' => 'https://cartflows.com/docs/elementor-widgets-of-cartflows/',
|
560 |
-
),
|
561 |
-
'beaver-builder' => array(
|
562 |
-
'name' => 'Beaver Builder',
|
563 |
-
'doc' => 'https://cartflows.com/docs/beaver-builder-modules-of-cartflows/',
|
564 |
-
),
|
565 |
-
'gutenberg' => array(
|
566 |
-
'name' => 'Gutenebrg',
|
567 |
-
'doc' => 'https://cartflows.com/docs/cartflows-gutenberg-blocks/',
|
568 |
-
),
|
569 |
-
);
|
570 |
-
|
571 |
-
if ( isset( $page_builder_data[ $page_builder ] ) ) {
|
572 |
-
|
573 |
-
$page_builder_name = $page_builder_data[ $page_builder ]['name'];
|
574 |
-
$doc_link = $page_builder_data[ $page_builder ]['doc'];
|
575 |
-
|
576 |
-
$notice = '<div class="wcf-metabox-notice-wrap"><p class="wcf-metabox-notice wcf-pb-modules-notice">';
|
577 |
-
$notice .= '<span class="dashicons dashicons-info"></span> ';
|
578 |
-
/* translators: %1$s page builder name "string" */
|
579 |
-
$notice .= sprintf( __( 'We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can add/change/update design settings directly from the page builder as well.', 'cartflows' ), $page_builder_name );
|
580 |
-
$notice .= ' <a href="' . $doc_link . '" target="_blank">' . __( 'Learn More »', 'cartflows' ) . '</span></a>';
|
581 |
-
$notice .= '</p></div>';
|
582 |
-
}
|
583 |
-
|
584 |
-
return $notice;
|
585 |
-
}
|
586 |
-
|
587 |
-
/**
|
588 |
-
* Get get step object.
|
589 |
-
*
|
590 |
-
* @param int $step_id current step ID.
|
591 |
-
* @since 1.5.9
|
592 |
-
*/
|
593 |
-
function wcf_get_step( $step_id ) {
|
594 |
-
|
595 |
-
if ( ! isset( wcf()->wcf_step_objs[ $step_id ] ) ) {
|
596 |
-
|
597 |
-
wcf()->wcf_step_objs[ $step_id ] = new Cartflows_Step_Factory( $step_id );
|
598 |
-
}
|
599 |
-
|
600 |
-
return wcf()->wcf_step_objs[ $step_id ];
|
601 |
-
}
|
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 |
+
* Fatal error mb_strpos fallback.
|
14 |
+
*
|
15 |
+
* @param string $string string where to find.
|
16 |
+
* @param string $search string to search.
|
17 |
+
* @since 1.0.0
|
18 |
+
*/
|
19 |
+
function wcf_mb_strpos( $string, $search ) {
|
20 |
+
|
21 |
+
if ( function_exists( 'mb_strpos' ) ) {
|
22 |
+
return mb_strpos( $string, $search, 0, 'utf-8' );
|
23 |
+
} else {
|
24 |
+
return strpos( $string, $search );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Check if cartflows pro activated.
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
function _is_cartflows_pro() {
|
34 |
+
|
35 |
+
if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
|
39 |
+
return false;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Returns pro version number.
|
45 |
+
*
|
46 |
+
* @param int $version version number.
|
47 |
+
* @since 1.0.0
|
48 |
+
*/
|
49 |
+
function _is_cartflows_pro_ver_less_than( $version ) {
|
50 |
+
|
51 |
+
if ( defined( 'CARTFLOWS_PRO_VER' ) && version_compare( CARTFLOWS_PRO_VER, $version, '<' ) ) {
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Returns step id.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
*/
|
63 |
+
function _get_wcf_post_id() {
|
64 |
+
|
65 |
+
global $post;
|
66 |
+
|
67 |
+
if ( isset( $post->ID ) ) {
|
68 |
+
return $post->ID;
|
69 |
+
}
|
70 |
+
|
71 |
+
return 0;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Returns step id.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*/
|
79 |
+
function _get_wcf_step_id() {
|
80 |
+
|
81 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
82 |
+
|
83 |
+
global $post;
|
84 |
+
|
85 |
+
return $post->ID;
|
86 |
+
}
|
87 |
+
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Check if it is a landing page?
|
93 |
+
*
|
94 |
+
* @since 1.0.0
|
95 |
+
*/
|
96 |
+
function _is_wcf_landing_type() {
|
97 |
+
|
98 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
99 |
+
|
100 |
+
global $post;
|
101 |
+
|
102 |
+
if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
103 |
+
|
104 |
+
return true;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Returns landing id.
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
*/
|
116 |
+
function _get_wcf_landing_id() {
|
117 |
+
|
118 |
+
if ( _is_wcf_landing_type() ) {
|
119 |
+
|
120 |
+
global $post;
|
121 |
+
|
122 |
+
return $post->ID;
|
123 |
+
}
|
124 |
+
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Is custom checkout?
|
130 |
+
*
|
131 |
+
* @param int $checkout_id checkout ID.
|
132 |
+
* @since 1.0.0
|
133 |
+
*/
|
134 |
+
function _is_wcf_meta_custom_checkout( $checkout_id ) {
|
135 |
+
|
136 |
+
$is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
|
137 |
+
|
138 |
+
if ( 'yes' === $is_custom ) {
|
139 |
+
|
140 |
+
return true;
|
141 |
+
}
|
142 |
+
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Check if page is cartflow checkout.
|
148 |
+
*
|
149 |
+
* @since 1.0.0
|
150 |
+
* @return bool
|
151 |
+
*/
|
152 |
+
function _is_wcf_checkout_type() {
|
153 |
+
|
154 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
155 |
+
|
156 |
+
global $post;
|
157 |
+
|
158 |
+
if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
159 |
+
|
160 |
+
return true;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if AJAX call is in progress.
|
169 |
+
*
|
170 |
+
* @since 1.0.0
|
171 |
+
* @return bool
|
172 |
+
*/
|
173 |
+
function _is_wcf_doing_checkout_ajax() {
|
174 |
+
|
175 |
+
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
176 |
+
|
177 |
+
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
178 |
+
isset( $_POST['_wcf_checkout_id'] ) //phpcs:ignore
|
179 |
+
) {
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Check if optin AJAX call is in progress.
|
189 |
+
*
|
190 |
+
* @since 1.0.0
|
191 |
+
* @return bool
|
192 |
+
*/
|
193 |
+
function _is_wcf_doing_optin_ajax() {
|
194 |
+
|
195 |
+
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
196 |
+
|
197 |
+
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
198 |
+
isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
|
199 |
+
) {
|
200 |
+
return true;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Returns checkout ID.
|
209 |
+
*
|
210 |
+
* @since 1.0.0
|
211 |
+
* @return int/bool
|
212 |
+
*/
|
213 |
+
function _get_wcf_checkout_id() {
|
214 |
+
|
215 |
+
if ( _is_wcf_checkout_type() ) {
|
216 |
+
|
217 |
+
global $post;
|
218 |
+
|
219 |
+
return $post->ID;
|
220 |
+
}
|
221 |
+
|
222 |
+
return false;
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Check if it is checkout shortcode.
|
227 |
+
*
|
228 |
+
* @since 1.0.0
|
229 |
+
* @return bool
|
230 |
+
*/
|
231 |
+
function _is_wcf_checkout_shortcode() {
|
232 |
+
|
233 |
+
global $post;
|
234 |
+
|
235 |
+
if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
|
236 |
+
|
237 |
+
return true;
|
238 |
+
}
|
239 |
+
|
240 |
+
return false;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Check if it is checkout shortcode.
|
245 |
+
*
|
246 |
+
* @since 1.0.0
|
247 |
+
* @param string $content shortcode content.
|
248 |
+
* @return bool
|
249 |
+
*/
|
250 |
+
function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
|
251 |
+
|
252 |
+
$checkout_id = 0;
|
253 |
+
|
254 |
+
if ( ! empty( $content ) ) {
|
255 |
+
|
256 |
+
$regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
|
257 |
+
|
258 |
+
preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
|
259 |
+
|
260 |
+
if ( ! empty( $regex_matches ) ) {
|
261 |
+
|
262 |
+
if ( 'cartflows_checkout' == $regex_matches[2] ) {
|
263 |
+
|
264 |
+
$attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
|
265 |
+
$attribure_str = str_replace( '"', '', $attribure_str );
|
266 |
+
|
267 |
+
$attributes = wp_parse_args( $attribure_str );
|
268 |
+
|
269 |
+
if ( isset( $attributes['id'] ) ) {
|
270 |
+
$checkout_id = $attributes['id'];
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
return $checkout_id;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Check if post type is upsell.
|
281 |
+
*
|
282 |
+
* @since 1.0.0
|
283 |
+
* @return bool
|
284 |
+
*/
|
285 |
+
function _is_wcf_upsell_type() {
|
286 |
+
|
287 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
288 |
+
|
289 |
+
global $post;
|
290 |
+
|
291 |
+
if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
292 |
+
|
293 |
+
return true;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
return false;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Returns upsell ID.
|
302 |
+
*
|
303 |
+
* @since 1.0.0
|
304 |
+
* @return int/bool
|
305 |
+
*/
|
306 |
+
function _get_wcf_upsell_id() {
|
307 |
+
|
308 |
+
if ( _is_wcf_upsell_type() ) {
|
309 |
+
|
310 |
+
global $post;
|
311 |
+
|
312 |
+
return $post->ID;
|
313 |
+
}
|
314 |
+
|
315 |
+
return false;
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Check if post is of type downsell.
|
320 |
+
*
|
321 |
+
* @since 1.0.0
|
322 |
+
* @return int/bool
|
323 |
+
*/
|
324 |
+
function _is_wcf_downsell_type() {
|
325 |
+
|
326 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
327 |
+
|
328 |
+
global $post;
|
329 |
+
|
330 |
+
if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
331 |
+
|
332 |
+
return true;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Get downsell page ID.
|
341 |
+
*
|
342 |
+
* @since 1.0.0
|
343 |
+
* @return int/bool
|
344 |
+
*/
|
345 |
+
function _get_wcf_downsell_id() {
|
346 |
+
|
347 |
+
if ( _is_wcf_downsell_type() ) {
|
348 |
+
|
349 |
+
global $post;
|
350 |
+
|
351 |
+
return $post->ID;
|
352 |
+
}
|
353 |
+
|
354 |
+
return false;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Check if page is of thank you type.
|
359 |
+
*
|
360 |
+
* @since 1.0.0
|
361 |
+
* @return int/bool
|
362 |
+
*/
|
363 |
+
function _is_wcf_thankyou_type() {
|
364 |
+
|
365 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
366 |
+
|
367 |
+
global $post;
|
368 |
+
|
369 |
+
if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
370 |
+
|
371 |
+
return true;
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
return false;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Get thank you page ID.
|
380 |
+
*
|
381 |
+
* @since 1.0.0
|
382 |
+
* @return int/bool
|
383 |
+
*/
|
384 |
+
function _get_wcf_thankyou_id() {
|
385 |
+
|
386 |
+
if ( _is_wcf_thankyou_type() ) {
|
387 |
+
|
388 |
+
global $post;
|
389 |
+
|
390 |
+
return $post->ID;
|
391 |
+
}
|
392 |
+
|
393 |
+
return false;
|
394 |
+
}
|
395 |
+
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Check if post type is upsell.
|
399 |
+
*
|
400 |
+
* @since 1.0.0
|
401 |
+
* @return bool
|
402 |
+
*/
|
403 |
+
function _is_wcf_base_offer_type() {
|
404 |
+
|
405 |
+
$result = false;
|
406 |
+
|
407 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
408 |
+
|
409 |
+
global $post;
|
410 |
+
|
411 |
+
$step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
|
412 |
+
|
413 |
+
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
414 |
+
|
415 |
+
$result = true;
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
return apply_filters( 'cartflows_is_offer_type', $result );
|
420 |
+
}
|
421 |
+
|
422 |
+
/**
|
423 |
+
* Returns upsell ID.
|
424 |
+
*
|
425 |
+
* @since 1.0.0
|
426 |
+
* @return int/bool
|
427 |
+
*/
|
428 |
+
function _get_wcf_base_offer_id() {
|
429 |
+
|
430 |
+
if ( _is_wcf_base_offer_type() ) {
|
431 |
+
|
432 |
+
global $post;
|
433 |
+
|
434 |
+
return $post->ID;
|
435 |
+
}
|
436 |
+
|
437 |
+
return false;
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Check if page is of optin type.
|
442 |
+
*
|
443 |
+
* @since 1.0.0
|
444 |
+
* @return int/bool
|
445 |
+
*/
|
446 |
+
function _is_wcf_optin_type() {
|
447 |
+
|
448 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
449 |
+
|
450 |
+
global $post;
|
451 |
+
|
452 |
+
if ( 'optin' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
453 |
+
|
454 |
+
return true;
|
455 |
+
}
|
456 |
+
}
|
457 |
+
|
458 |
+
return false;
|
459 |
+
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Get optin page ID.
|
463 |
+
*
|
464 |
+
* @since 1.0.0
|
465 |
+
* @return int/bool
|
466 |
+
*/
|
467 |
+
function _get_wcf_optin_id() {
|
468 |
+
|
469 |
+
if ( _is_wcf_optin_type() ) {
|
470 |
+
|
471 |
+
global $post;
|
472 |
+
|
473 |
+
return $post->ID;
|
474 |
+
}
|
475 |
+
|
476 |
+
return false;
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Define a constant if it is not already defined.
|
481 |
+
*
|
482 |
+
* @since 3.0.0
|
483 |
+
* @param string $name Constant name.
|
484 |
+
* @param mixed $value Value.
|
485 |
+
*/
|
486 |
+
function wcf_maybe_define_constant( $name, $value ) {
|
487 |
+
if ( ! defined( $name ) ) {
|
488 |
+
define( $name, $value );
|
489 |
+
}
|
490 |
+
}
|
491 |
+
|
492 |
+
|
493 |
+
if ( ! function_exists( 'wp_body_open' ) ) {
|
494 |
+
/**
|
495 |
+
* Fire the wp_body_open action.
|
496 |
+
*
|
497 |
+
* Added for backwards compatibility to support WordPress versions prior to 5.2.0.
|
498 |
+
*/
|
499 |
+
function wp_body_open() {
|
500 |
+
/**
|
501 |
+
* Triggered after the opening <body> tag.
|
502 |
+
*/
|
503 |
+
do_action( 'wp_body_open' );
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Check if type is optin by id.
|
509 |
+
*
|
510 |
+
* @param int $post_id post id.
|
511 |
+
*
|
512 |
+
* @return int/bool
|
513 |
+
* @since 1.0.0
|
514 |
+
*/
|
515 |
+
function _wcf_check_is_optin_by_id( $post_id ) {
|
516 |
+
|
517 |
+
if ( 'optin' === get_post_meta( $post_id, 'wcf-step-type', true ) ) {
|
518 |
+
|
519 |
+
return true;
|
520 |
+
}
|
521 |
+
|
522 |
+
return false;
|
523 |
+
}
|
524 |
+
|
525 |
+
/**
|
526 |
+
* Supported Page Template
|
527 |
+
*
|
528 |
+
* @param string $page_template current page template.
|
529 |
+
*
|
530 |
+
* @return int/bool
|
531 |
+
* @since 1.5.7
|
532 |
+
*/
|
533 |
+
function _wcf_supported_template( $page_template ) {
|
534 |
+
|
535 |
+
if ( in_array( $page_template, array( 'cartflows-default', 'cartflows-canvas' ), true ) ) {
|
536 |
+
|
537 |
+
return true;
|
538 |
+
}
|
539 |
+
|
540 |
+
return false;
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Display design Metabox Notice.
|
545 |
+
*
|
546 |
+
* @return string
|
547 |
+
* @since x.x.x
|
548 |
+
*/
|
549 |
+
function wcf_get_page_builder_notice() {
|
550 |
+
|
551 |
+
$notice = '';
|
552 |
+
$page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
553 |
+
|
554 |
+
$supported_page_builders = array( 'elementor', 'beaver-builder' );
|
555 |
+
|
556 |
+
$page_builder_data = array(
|
557 |
+
'elementor' => array(
|
558 |
+
'name' => 'Elementor',
|
559 |
+
'doc' => 'https://cartflows.com/docs/elementor-widgets-of-cartflows/',
|
560 |
+
),
|
561 |
+
'beaver-builder' => array(
|
562 |
+
'name' => 'Beaver Builder',
|
563 |
+
'doc' => 'https://cartflows.com/docs/beaver-builder-modules-of-cartflows/',
|
564 |
+
),
|
565 |
+
'gutenberg' => array(
|
566 |
+
'name' => 'Gutenebrg',
|
567 |
+
'doc' => 'https://cartflows.com/docs/cartflows-gutenberg-blocks/',
|
568 |
+
),
|
569 |
+
);
|
570 |
+
|
571 |
+
if ( isset( $page_builder_data[ $page_builder ] ) ) {
|
572 |
+
|
573 |
+
$page_builder_name = $page_builder_data[ $page_builder ]['name'];
|
574 |
+
$doc_link = $page_builder_data[ $page_builder ]['doc'];
|
575 |
+
|
576 |
+
$notice = '<div class="wcf-metabox-notice-wrap"><p class="wcf-metabox-notice wcf-pb-modules-notice">';
|
577 |
+
$notice .= '<span class="dashicons dashicons-info"></span> ';
|
578 |
+
/* translators: %1$s page builder name "string" */
|
579 |
+
$notice .= sprintf( __( 'We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can add/change/update design settings directly from the page builder as well.', 'cartflows' ), $page_builder_name );
|
580 |
+
$notice .= ' <a href="' . $doc_link . '" target="_blank">' . __( 'Learn More »', 'cartflows' ) . '</span></a>';
|
581 |
+
$notice .= '</p></div>';
|
582 |
+
}
|
583 |
+
|
584 |
+
return $notice;
|
585 |
+
}
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Get get step object.
|
589 |
+
*
|
590 |
+
* @param int $step_id current step ID.
|
591 |
+
* @since 1.5.9
|
592 |
+
*/
|
593 |
+
function wcf_get_step( $step_id ) {
|
594 |
+
|
595 |
+
if ( ! isset( wcf()->wcf_step_objs[ $step_id ] ) ) {
|
596 |
+
|
597 |
+
wcf()->wcf_step_objs[ $step_id ] = new Cartflows_Step_Factory( $step_id );
|
598 |
+
}
|
599 |
+
|
600 |
+
return wcf()->wcf_step_objs[ $step_id ];
|
601 |
+
}
|
classes/class-cartflows-importer.php
CHANGED
@@ -1,1740 +1,1740 @@
|
|
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 |
-
|
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_import_flow_step', array( $this, 'import_flow' ) );
|
52 |
-
add_action( 'wp_ajax_cartflows_default_flow', array( $this, 'create_default_flow' ) );
|
53 |
-
add_action( 'wp_ajax_cartflows_step_create_blank', array( $this, 'step_create_blank' ) );
|
54 |
-
|
55 |
-
add_action( 'admin_footer', array( $this, 'js_templates' ) );
|
56 |
-
add_action( 'cartflows_import_complete', array( $this, 'clear_cache' ) );
|
57 |
-
|
58 |
-
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
59 |
-
|
60 |
-
add_action( 'wp_ajax_cartflows_activate_plugin', array( $this, 'activate_plugin' ) );
|
61 |
-
|
62 |
-
add_action( 'admin_menu', array( $this, 'add_to_menus' ) );
|
63 |
-
add_action( 'admin_init', array( $this, 'export_json' ) );
|
64 |
-
add_action( 'admin_init', array( $this, 'import_json' ) );
|
65 |
-
add_filter( 'post_row_actions', array( $this, 'export_link' ), 10, 2 );
|
66 |
-
add_action( 'admin_action_cartflows_export_flow', array( $this, 'export_flow' ) );
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Add the export link to action list for flows row actions
|
71 |
-
*
|
72 |
-
* @since 1.1.4
|
73 |
-
*
|
74 |
-
* @param array $actions Actions array.
|
75 |
-
* @param object $post Post object.
|
76 |
-
*
|
77 |
-
* @return array
|
78 |
-
*/
|
79 |
-
public function export_link( $actions, $post ) {
|
80 |
-
if ( current_user_can( 'edit_posts' ) && isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
81 |
-
$actions['export'] = '<a href="' . wp_nonce_url( 'admin.php?action=cartflows_export_flow&post=' . $post->ID, basename( __FILE__ ), 'flow_export_nonce' ) . '" title="' . __( 'Export this flow', 'cartflows' ) . '" rel="permalink">' . __( 'Export', 'cartflows' ) . '</a>';
|
82 |
-
}
|
83 |
-
return $actions;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Add menus
|
88 |
-
*
|
89 |
-
* @since 1.1.4
|
90 |
-
*/
|
91 |
-
public function add_to_menus() {
|
92 |
-
add_submenu_page( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE, __( 'Flow Export', 'cartflows' ), __( 'Flow Export', 'cartflows' ), 'export', 'flow_exporter', array( $this, 'exporter_markup' ) );
|
93 |
-
add_submenu_page( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE, __( 'Flow Import', 'cartflows' ), __( 'Flow Import', 'cartflows' ), 'import', 'flow_importer', array( $this, 'importer_markup' ) );
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Export flow with steps and its meta
|
98 |
-
*
|
99 |
-
* @since 1.1.4
|
100 |
-
*/
|
101 |
-
public function export_flow() {
|
102 |
-
|
103 |
-
if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'cartflows_export_flow' == $_REQUEST['action'] ) ) ) {
|
104 |
-
wp_die( esc_html__( 'No post to export has been supplied!', 'cartflows' ) );
|
105 |
-
}
|
106 |
-
|
107 |
-
if ( ! isset( $_GET['flow_export_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['flow_export_nonce'] ) ), basename( __FILE__ ) ) ) {
|
108 |
-
return;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Get the original post id.
|
112 |
-
$flow_id = ( isset( $_GET['post'] ) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
|
113 |
-
|
114 |
-
$flows = array();
|
115 |
-
$flows[] = $this->get_flow_export_data( $flow_id );
|
116 |
-
$flows = apply_filters( 'cartflows_export_data', $flows );
|
117 |
-
|
118 |
-
nocache_headers();
|
119 |
-
header( 'Content-Type: application/json; charset=utf-8' );
|
120 |
-
header( 'Content-Disposition: attachment; filename=cartflows-flow-' . $flow_id . '-' . gmdate( 'm-d-Y' ) . '.json' );
|
121 |
-
header( 'Expires: 0' );
|
122 |
-
|
123 |
-
echo wp_json_encode( $flows );
|
124 |
-
exit;
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Export flow markup
|
129 |
-
*
|
130 |
-
* @since 1.1.4
|
131 |
-
*/
|
132 |
-
public function exporter_markup() {
|
133 |
-
include_once CARTFLOWS_DIR . 'includes/exporter.php';
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Import flow markup
|
138 |
-
*
|
139 |
-
* @since 1.1.4
|
140 |
-
*/
|
141 |
-
public function importer_markup() {
|
142 |
-
include_once CARTFLOWS_DIR . 'includes/importer.php';
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Export flow
|
147 |
-
*
|
148 |
-
* @since 1.1.4
|
149 |
-
*/
|
150 |
-
public function export_json() {
|
151 |
-
if ( empty( $_POST['cartflows-action'] ) || 'export' != $_POST['cartflows-action'] ) {
|
152 |
-
return;
|
153 |
-
}
|
154 |
-
|
155 |
-
if ( ! isset( $_POST['cartflows-action-nonce'] ) || empty( $_POST['cartflows-action-nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-action-nonce'] ) ), 'cartflows-action-nonce' ) ) {
|
156 |
-
return;
|
157 |
-
}
|
158 |
-
|
159 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
160 |
-
return;
|
161 |
-
}
|
162 |
-
|
163 |
-
$flows = $this->get_all_flow_export_data();
|
164 |
-
$flows = apply_filters( 'cartflows_export_data', $flows );
|
165 |
-
|
166 |
-
nocache_headers();
|
167 |
-
header( 'Content-Type: application/json; charset=utf-8' );
|
168 |
-
header( 'Content-Disposition: attachment; filename=cartflows-flow-export-' . gmdate( 'm-d-Y' ) . '.json' );
|
169 |
-
header( 'Expires: 0' );
|
170 |
-
|
171 |
-
echo wp_json_encode( $flows );
|
172 |
-
exit;
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Get flow export data
|
177 |
-
*
|
178 |
-
* @since 1.1.4
|
179 |
-
*
|
180 |
-
* @param integer $flow_id Flow ID.
|
181 |
-
* @return array
|
182 |
-
*/
|
183 |
-
public function get_flow_export_data( $flow_id ) {
|
184 |
-
|
185 |
-
$export_all = apply_filters( 'cartflows_export_all', true );
|
186 |
-
|
187 |
-
$valid_step_meta_keys = array(
|
188 |
-
'_wp_page_template',
|
189 |
-
'_thumbnail_id',
|
190 |
-
'classic-editor-remember',
|
191 |
-
);
|
192 |
-
|
193 |
-
$new_steps = array();
|
194 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
195 |
-
if ( $steps ) {
|
196 |
-
foreach ( $steps as $key => $step ) {
|
197 |
-
|
198 |
-
// Add step post meta.
|
199 |
-
$new_all_meta = array();
|
200 |
-
$all_meta = get_post_meta( $step['id'] );
|
201 |
-
|
202 |
-
// Add single step.
|
203 |
-
$step_data_arr = array(
|
204 |
-
'title' => get_the_title( $step['id'] ),
|
205 |
-
'type' => $step['type'],
|
206 |
-
'meta' => $all_meta,
|
207 |
-
'post_content' => '',
|
208 |
-
);
|
209 |
-
|
210 |
-
if ( $export_all ) {
|
211 |
-
|
212 |
-
$step_post_obj = get_post( $step['id'] );
|
213 |
-
|
214 |
-
$step_data_arr['post_content'] = $step_post_obj->post_content;
|
215 |
-
}
|
216 |
-
|
217 |
-
$new_steps[] = $step_data_arr;
|
218 |
-
}
|
219 |
-
}
|
220 |
-
|
221 |
-
// Add single flow.
|
222 |
-
return array(
|
223 |
-
'title' => get_the_title( $flow_id ),
|
224 |
-
'steps' => $new_steps,
|
225 |
-
);
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Get all flow export data
|
230 |
-
*
|
231 |
-
* @since 1.1.4
|
232 |
-
*/
|
233 |
-
public function get_all_flow_export_data() {
|
234 |
-
|
235 |
-
$query_args = array(
|
236 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
237 |
-
|
238 |
-
// Query performance optimization.
|
239 |
-
'fields' => 'ids',
|
240 |
-
'no_found_rows' => true,
|
241 |
-
'posts_per_page' => -1,
|
242 |
-
);
|
243 |
-
|
244 |
-
$query = new WP_Query( $query_args );
|
245 |
-
$flows = array();
|
246 |
-
if ( $query->posts ) {
|
247 |
-
foreach ( $query->posts as $key => $post_id ) {
|
248 |
-
$flows[] = $this->get_flow_export_data( $post_id );
|
249 |
-
}
|
250 |
-
}
|
251 |
-
|
252 |
-
return $flows;
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Import our exported file
|
257 |
-
*
|
258 |
-
* @since 1.1.4
|
259 |
-
*/
|
260 |
-
public function import_json() {
|
261 |
-
if ( empty( $_POST['cartflows-action'] ) || 'import' != $_POST['cartflows-action'] ) {
|
262 |
-
return;
|
263 |
-
}
|
264 |
-
|
265 |
-
if ( ! isset( $_POST['cartflows-action-nonce'] ) || empty( $_POST['cartflows-action-nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-action-nonce'] ) ), 'cartflows-action-nonce' ) ) {
|
266 |
-
return;
|
267 |
-
}
|
268 |
-
|
269 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
270 |
-
return;
|
271 |
-
}
|
272 |
-
|
273 |
-
$filename = $_FILES['file']['name']; //phpcs:ignore
|
274 |
-
$file_info = explode( '.', $filename );
|
275 |
-
$extension = end( $file_info );
|
276 |
-
|
277 |
-
if ( 'json' != $extension ) {
|
278 |
-
wp_die( esc_html__( 'Please upload a valid .json file', 'cartflows' ) );
|
279 |
-
}
|
280 |
-
|
281 |
-
$file = $_FILES['file']['tmp_name']; //phpcs:ignore
|
282 |
-
|
283 |
-
if ( empty( $file ) ) {
|
284 |
-
wp_die( esc_html__( 'Please upload a file to import', 'cartflows' ) );
|
285 |
-
}
|
286 |
-
|
287 |
-
// Retrieve the settings from the file and convert the JSON object to an array.
|
288 |
-
$flows = json_decode( file_get_contents( $file ), true );//phpcs:ignore
|
289 |
-
|
290 |
-
$this->import_from_json_data( $flows );
|
291 |
-
|
292 |
-
add_action( 'admin_notices', array( $this, 'imported_successfully' ) );
|
293 |
-
}
|
294 |
-
|
295 |
-
/**
|
296 |
-
* Import flow from the JSON data
|
297 |
-
*
|
298 |
-
* @since x.x.x
|
299 |
-
* @param array $flows JSON array.
|
300 |
-
* @return void
|
301 |
-
*/
|
302 |
-
public function import_from_json_data( $flows ) {
|
303 |
-
if ( $flows ) {
|
304 |
-
|
305 |
-
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
306 |
-
|
307 |
-
foreach ( $flows as $key => $flow ) {
|
308 |
-
|
309 |
-
$flow_title = $flow['title'];
|
310 |
-
if ( post_exists( $flow['title'] ) ) {
|
311 |
-
$flow_title = $flow['title'] . ' Copy';
|
312 |
-
}
|
313 |
-
|
314 |
-
// Create post object.
|
315 |
-
$new_flow_args = apply_filters(
|
316 |
-
'cartflows_flow_importer_args',
|
317 |
-
array(
|
318 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
319 |
-
'post_title' => $flow_title,
|
320 |
-
'post_status' => 'publish',
|
321 |
-
)
|
322 |
-
);
|
323 |
-
|
324 |
-
// Insert the post into the database.
|
325 |
-
$flow_id = wp_insert_post( $new_flow_args );
|
326 |
-
|
327 |
-
/**
|
328 |
-
* Fire after flow import
|
329 |
-
*
|
330 |
-
* @since x.x.x
|
331 |
-
* @param int $flow_id Flow ID.
|
332 |
-
* @param array $new_flow_args Flow post args.
|
333 |
-
* @param array $flows Flow JSON data.
|
334 |
-
*/
|
335 |
-
do_action( 'cartflows_flow_imported', $flow_id, $new_flow_args, $flows );
|
336 |
-
|
337 |
-
if ( $flow['steps'] ) {
|
338 |
-
foreach ( $flow['steps'] as $key => $step ) {
|
339 |
-
|
340 |
-
$new_all_meta = array();
|
341 |
-
if ( is_array( $step['meta'] ) ) {
|
342 |
-
foreach ( $step['meta'] as $meta_key => $mvalue ) {
|
343 |
-
$new_all_meta[ $meta_key ] = maybe_unserialize( $mvalue[0] );
|
344 |
-
}
|
345 |
-
}
|
346 |
-
$new_step_args = apply_filters(
|
347 |
-
'cartflows_step_importer_args',
|
348 |
-
array(
|
349 |
-
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
350 |
-
'post_title' => $step['title'],
|
351 |
-
'post_status' => 'publish',
|
352 |
-
'meta_input' => $new_all_meta,
|
353 |
-
'post_content' => isset( $step['post_content'] ) ? $step['post_content'] : '',
|
354 |
-
)
|
355 |
-
);
|
356 |
-
|
357 |
-
$new_step_id = wp_insert_post( $new_step_args );
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Fire after step import
|
361 |
-
*
|
362 |
-
* @since x.x.x
|
363 |
-
* @param int $new_step_id step ID.
|
364 |
-
* @param int $flow_id flow ID.
|
365 |
-
* @param array $new_step_args Step post args.
|
366 |
-
* @param array $flow_steps Flow steps.
|
367 |
-
* @param array $flows All flows JSON data.
|
368 |
-
*/
|
369 |
-
do_action( 'cartflows_step_imported', $new_step_id, $flow_id, $new_step_args, $flow['steps'], $flows );
|
370 |
-
|
371 |
-
// Insert post meta.
|
372 |
-
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
373 |
-
|
374 |
-
$step_taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
375 |
-
$current_term = term_exists( $step['type'], $step_taxonomy );
|
376 |
-
|
377 |
-
// // Set type object.
|
378 |
-
$data = get_term( $current_term['term_id'], $step_taxonomy );
|
379 |
-
$step_slug = $data->slug;
|
380 |
-
wp_set_object_terms( $new_step_id, $data->slug, $step_taxonomy );
|
381 |
-
|
382 |
-
// Set type.
|
383 |
-
update_post_meta( $new_step_id, 'wcf-step-type', $data->slug );
|
384 |
-
|
385 |
-
// Set flow.
|
386 |
-
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
387 |
-
|
388 |
-
self::get_instance()->set_step_to_flow( $flow_id, $new_step_id, $step['title'], $step_slug );
|
389 |
-
|
390 |
-
if ( isset( $step['post_content'] ) && ! empty( $step['post_content'] ) ) {
|
391 |
-
|
392 |
-
// Download and replace images.
|
393 |
-
$content = $this->get_content( $step['post_content'] );
|
394 |
-
|
395 |
-
// Update post content.
|
396 |
-
wp_update_post(
|
397 |
-
array(
|
398 |
-
'ID' => $new_step_id,
|
399 |
-
'post_content' => $content,
|
400 |
-
)
|
401 |
-
);
|
402 |
-
}
|
403 |
-
|
404 |
-
// Elementor Data.
|
405 |
-
if ( ( 'elementor' === $default_page_builder ) && class_exists( '\Elementor\Plugin' ) ) {
|
406 |
-
// Add "elementor" in import [queue].
|
407 |
-
// @todo Remove required `allow_url_fopen` support.
|
408 |
-
if ( ini_get( 'allow_url_fopen' ) && isset( $step['meta']['_elementor_data'] ) ) {
|
409 |
-
$obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
|
410 |
-
$obj->import_single_template( $new_step_id );
|
411 |
-
}
|
412 |
-
}
|
413 |
-
|
414 |
-
// Beaver Builder.
|
415 |
-
if ( ( 'beaver-builder' === $default_page_builder ) && class_exists( 'FLBuilder' ) ) {
|
416 |
-
if ( isset( $step['meta']['_fl_builder_data'] ) ) {
|
417 |
-
CartFlows_Importer_Beaver_Builder::get_instance()->import_single_post( $new_step_id );
|
418 |
-
}
|
419 |
-
}
|
420 |
-
}
|
421 |
-
}
|
422 |
-
}
|
423 |
-
}
|
424 |
-
}
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Download and Replace hotlink images
|
428 |
-
*
|
429 |
-
* @since x.x.x
|
430 |
-
*
|
431 |
-
* @param string $content Mixed post content.
|
432 |
-
* @return array Hotlink image array.
|
433 |
-
*/
|
434 |
-
public function get_content( $content = '' ) {
|
435 |
-
|
436 |
-
$content = stripslashes( $content );
|
437 |
-
|
438 |
-
// Extract all links.
|
439 |
-
$all_links = wp_extract_urls( $content );
|
440 |
-
|
441 |
-
// Not have any link.
|
442 |
-
if ( empty( $all_links ) ) {
|
443 |
-
return $content;
|
444 |
-
}
|
445 |
-
|
446 |
-
$link_mapping = array();
|
447 |
-
$image_links = array();
|
448 |
-
$other_links = array();
|
449 |
-
|
450 |
-
// Extract normal and image links.
|
451 |
-
foreach ( $all_links as $key => $link ) {
|
452 |
-
if ( preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|gif|jpeg)\/?$/i', $link ) ) {
|
453 |
-
|
454 |
-
// Get all image links.
|
455 |
-
// Avoid *-150x, *-300x and *-1024x images.
|
456 |
-
if (
|
457 |
-
false === strpos( $link, '-150x' ) &&
|
458 |
-
false === strpos( $link, '-300x' ) &&
|
459 |
-
false === strpos( $link, '-1024x' )
|
460 |
-
) {
|
461 |
-
$image_links[] = $link;
|
462 |
-
}
|
463 |
-
} else {
|
464 |
-
|
465 |
-
// Collect other links.
|
466 |
-
$other_links[] = $link;
|
467 |
-
}
|
468 |
-
}
|
469 |
-
|
470 |
-
// Step 1: Download images.
|
471 |
-
if ( ! empty( $image_links ) ) {
|
472 |
-
foreach ( $image_links as $key => $image_url ) {
|
473 |
-
// Download remote image.
|
474 |
-
$image = array(
|
475 |
-
'url' => $image_url,
|
476 |
-
'id' => 0,
|
477 |
-
);
|
478 |
-
$downloaded_image = CartFlows_Import_Image::get_instance()->import( $image );
|
479 |
-
|
480 |
-
// Old and New image mapping links.
|
481 |
-
$link_mapping[ $image_url ] = $downloaded_image['url'];
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
// Step 3: Replace mapping links.
|
486 |
-
foreach ( $link_mapping as $old_url => $new_url ) {
|
487 |
-
$content = str_replace( $old_url, $new_url, $content );
|
488 |
-
|
489 |
-
// Replace the slashed URLs if any exist.
|
490 |
-
$old_url = str_replace( '/', '/\\', $old_url );
|
491 |
-
$new_url = str_replace( '/', '/\\', $new_url );
|
492 |
-
$content = str_replace( $old_url, $new_url, $content );
|
493 |
-
}
|
494 |
-
|
495 |
-
return $content;
|
496 |
-
}
|
497 |
-
|
498 |
-
/**
|
499 |
-
* Imported notice
|
500 |
-
*
|
501 |
-
* @since 1.1.4
|
502 |
-
*/
|
503 |
-
public function imported_successfully() {
|
504 |
-
?>
|
505 |
-
<div class="notice notice-success">
|
506 |
-
<p><?php esc_html_e( 'Successfully imported flows.', 'cartflows' ); ?></p>
|
507 |
-
</div>
|
508 |
-
<?php
|
509 |
-
}
|
510 |
-
|
511 |
-
/**
|
512 |
-
* Clear Cache.
|
513 |
-
*
|
514 |
-
* @since 1.0.0
|
515 |
-
*/
|
516 |
-
public function clear_cache() {
|
517 |
-
// Clear 'Elementor' file cache.
|
518 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
519 |
-
\Elementor\Plugin::$instance->files_manager->clear_cache();
|
520 |
-
}
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* JS Templates
|
525 |
-
*
|
526 |
-
* @since 1.0.0
|
527 |
-
*
|
528 |
-
* @return void
|
529 |
-
*/
|
530 |
-
public function js_templates() {
|
531 |
-
|
532 |
-
// Loading Templates.
|
533 |
-
?>
|
534 |
-
<script type="text/template" id="tmpl-cartflows-step-loading">
|
535 |
-
<div class="template-message-block cartflows-step-loading">
|
536 |
-
<h2>
|
537 |
-
<span class="spinner"></span>
|
538 |
-
<?php esc_html_e( 'Loading Steps', 'cartflows' ); ?>
|
539 |
-
</h2>
|
540 |
-
<p class="description"><?php esc_html_e( 'Getting steps from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
|
541 |
-
</div>
|
542 |
-
</script>
|
543 |
-
|
544 |
-
<?php
|
545 |
-
// Search Templates.
|
546 |
-
?>
|
547 |
-
<script type="text/template" id="tmpl-cartflows-searching-templates">
|
548 |
-
<div class="template-message-block cartflows-searching-templates">
|
549 |
-
<h2>
|
550 |
-
<span class="spinner"></span>
|
551 |
-
<?php esc_html_e( 'Searching Template..', 'cartflows' ); ?>
|
552 |
-
</h2>
|
553 |
-
<p class="description"><?php esc_html_e( 'Getting templates from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
|
554 |
-
</div>
|
555 |
-
</script>
|
556 |
-
|
557 |
-
<?php
|
558 |
-
// CartFlows Importing Template.
|
559 |
-
?>
|
560 |
-
<script type="text/template" id="tmpl-cartflows-step-importing">
|
561 |
-
<div class="template-message-block cartflows-step-importing">
|
562 |
-
<h2><span class="spinner"></span> <?php esc_html_e( 'Importing..', 'cartflows' ); ?></h2>
|
563 |
-
</div>
|
564 |
-
</script>
|
565 |
-
|
566 |
-
<?php
|
567 |
-
// CartFlows Imported.
|
568 |
-
?>
|
569 |
-
<script type="text/template" id="tmpl-cartflows-step-imported">
|
570 |
-
<div class="template-message-block cartflows-step-imported">
|
571 |
-
<h2><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Imported', 'cartflows' ); ?></h2>
|
572 |
-
<p class="description"><?php esc_html_e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span></p></div>
|
573 |
-
</script>
|
574 |
-
|
575 |
-
<?php
|
576 |
-
// No templates.
|
577 |
-
?>
|
578 |
-
<script type="text/template" id="tmpl-cartflows-no-steps">
|
579 |
-
<div class="cartflows-no-steps">
|
580 |
-
<div class="template-message-block">
|
581 |
-
<h2><?php esc_html_e( 'Coming Soon!', 'cartflows' ); ?></h2>
|
582 |
-
<p class="description"></p>
|
583 |
-
</div>
|
584 |
-
</div>
|
585 |
-
</script>
|
586 |
-
|
587 |
-
<?php
|
588 |
-
// No templates.
|
589 |
-
?>
|
590 |
-
<script type="text/template" id="tmpl-cartflows-no-flows">
|
591 |
-
<div class="cartflows-no-flows">
|
592 |
-
<div class="template-message-block">
|
593 |
-
<h2><?php esc_html_e( 'Coming Soon!', 'cartflows' ); ?></h2>
|
594 |
-
<p class="description"></p>
|
595 |
-
</div>
|
596 |
-
</div>
|
597 |
-
</script>
|
598 |
-
|
599 |
-
<?php
|
600 |
-
// Error handling.
|
601 |
-
?>
|
602 |
-
<script type="text/template" id="tmpl-templator-error">
|
603 |
-
<div class="notice notice-error"><p>{{ data }}</p></div>
|
604 |
-
</script>
|
605 |
-
|
606 |
-
<?php
|
607 |
-
// Redirect to Elementor.
|
608 |
-
?>
|
609 |
-
<script type="text/template" id="tmpl-templator-redirect-to-elementor">
|
610 |
-
<div class="template-message-block templator-redirect-to-elementor">
|
611 |
-
<h2><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Imported', 'cartflows' ); ?></h2>
|
612 |
-
<p class="description"><?php esc_html_e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span><br/><br/><?php esc_html_e( 'Redirecting to the Elementor edit window.', 'cartflows' ); ?> </p></div>
|
613 |
-
</script>
|
614 |
-
|
615 |
-
<?php
|
616 |
-
/**
|
617 |
-
* Responsive Buttons
|
618 |
-
*/
|
619 |
-
?>
|
620 |
-
<script type="text/template" id="tmpl-cartflows-responsive-view">
|
621 |
-
<span class="responsive-view">
|
622 |
-
<span class="actions">
|
623 |
-
<a class="desktop" href="#"><span data-view="desktop " class="active dashicons dashicons-desktop"></span></a>
|
624 |
-
<a class="tablet" href="#"><span data-view="tablet" class="dashicons dashicons-tablet"></span></a>
|
625 |
-
<a class="mobile" href="#"><span data-view="mobile" class="dashicons dashicons-smartphone"></span></a>
|
626 |
-
</span>
|
627 |
-
</span>
|
628 |
-
</script>
|
629 |
-
|
630 |
-
<?php
|
631 |
-
// Templates data.
|
632 |
-
?>
|
633 |
-
<script type="text/template" id="tmpl-cartflows-flows-list">
|
634 |
-
|
635 |
-
<# console.log( data.items.length ) #>
|
636 |
-
<# console.log( data.items ) #>
|
637 |
-
<# if ( data.items.length ) { #>
|
638 |
-
<# for ( key in data.items ) { #>
|
639 |
-
<#
|
640 |
-
var flow_steps = [];
|
641 |
-
if( data.items[ key ].flow_steps ) {
|
642 |
-
flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
|
643 |
-
return value['id'];
|
644 |
-
});
|
645 |
-
}
|
646 |
-
#>
|
647 |
-
<div class="inner">
|
648 |
-
<div class="template">
|
649 |
-
<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 }}">
|
650 |
-
<div class="template-screenshot">
|
651 |
-
<# if( data.items[ key ].featured_image_url ) { #>
|
652 |
-
<img src="{{ data.items[ key ].featured_image_url }}" />
|
653 |
-
<# } else { #>
|
654 |
-
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
|
655 |
-
<# } #>
|
656 |
-
</div>
|
657 |
-
<# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
|
658 |
-
<span class="wcf-flow-type pro"><?php esc_html_e( 'Pro', 'cartflows' ); ?></span>
|
659 |
-
<# } #>
|
660 |
-
<# if( data.items[ key ].woo_required ) { #>
|
661 |
-
<div class="notice notice-info" style="width: auto;">
|
662 |
-
<p class="wcf-learn-how">
|
663 |
-
Install/Activate WooCommerce to use this template.
|
664 |
-
<a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank">
|
665 |
-
<strong><?php esc_html_e( 'Learn How', 'cartflows' ); ?></strong>
|
666 |
-
<i class="dashicons dashicons-external"></i>
|
667 |
-
</a>
|
668 |
-
</p>
|
669 |
-
</div>
|
670 |
-
<# } else { #>
|
671 |
-
<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>
|
672 |
-
<# } #>
|
673 |
-
|
674 |
-
</span>
|
675 |
-
<div class="template-id-container">
|
676 |
-
<h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
|
677 |
-
<div class="template-actions">
|
678 |
-
|
679 |
-
<#
|
680 |
-
if( data.items[ key ].page_builder.slug ) {
|
681 |
-
required_plugin_group = data.items[ key ].page_builder.slug;
|
682 |
-
} else {
|
683 |
-
required_plugin_group = '';
|
684 |
-
}
|
685 |
-
|
686 |
-
if( data.items[ key ].page_builder.slug && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug] && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug].button_title ) {
|
687 |
-
import_btn_title = CartFlowsImportVars.required_plugins[ data.items[ key ].page_builder.slug ].button_title;
|
688 |
-
} else {
|
689 |
-
import_btn_title = 'Import';
|
690 |
-
} #>
|
691 |
-
|
692 |
-
<# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
|
693 |
-
<# if( ! data.items[ key ].woo_required ) { #>
|
694 |
-
<a data-flow-steps="{{ flow_steps }}" data-required-plugin-group="{{required_plugin_group}}" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}">{{ import_btn_title }}</a>
|
695 |
-
<# } else { #>
|
696 |
-
<a href='#' class='wcf-activate-wc button-primary'>Install & activate Woo</a>
|
697 |
-
<# } #>
|
698 |
-
<# } else if( CartFlowsImportVars._is_pro_active ) { #>
|
699 |
-
<a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Activate License', 'cartflows' ); ?></a>
|
700 |
-
<# } else { #>
|
701 |
-
<a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php esc_html_e( 'Get Pro', 'cartflows' ); ?></a>
|
702 |
-
<# } #>
|
703 |
-
</div>
|
704 |
-
</div>
|
705 |
-
</div>
|
706 |
-
</div>
|
707 |
-
<# } #>
|
708 |
-
<# } #>
|
709 |
-
</script>
|
710 |
-
|
711 |
-
<?php
|
712 |
-
// Empty Step.
|
713 |
-
?>
|
714 |
-
<script type="text/template" id="tmpl-cartflows-create-blank-step">
|
715 |
-
<div class="inner">
|
716 |
-
<div class="template">
|
717 |
-
<span class="thumbnail site-preview cartflows-flow-preview">
|
718 |
-
<div class="template-screenshot">
|
719 |
-
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/start-scratch.jpg" />
|
720 |
-
</div>
|
721 |
-
<div id="wcf_create_notice" class=""><a href="https://cartflows.com/" target="_blank"></a></div>
|
722 |
-
</span>
|
723 |
-
<div class="template-id-container">
|
724 |
-
<h3 class="template-name"> Blank </h3>
|
725 |
-
<div class="template-actions">
|
726 |
-
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create', 'cartflows' ); ?></a>
|
727 |
-
</div>
|
728 |
-
</div>
|
729 |
-
</div>
|
730 |
-
</div>
|
731 |
-
</script>
|
732 |
-
|
733 |
-
<?php
|
734 |
-
// Templates data.
|
735 |
-
?>
|
736 |
-
<script type="text/template" id="tmpl-cartflows-steps-list">
|
737 |
-
<# if ( data.items.length ) { #>
|
738 |
-
<# for ( key in data.items ) { #>
|
739 |
-
<#
|
740 |
-
var flow_steps = [];
|
741 |
-
if( data.items[ key ].flow_steps ) {
|
742 |
-
flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
|
743 |
-
return value['id'];
|
744 |
-
});
|
745 |
-
}
|
746 |
-
#>
|
747 |
-
<div class="inner">
|
748 |
-
<div class="template">
|
749 |
-
<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 }}">
|
750 |
-
<div class="template-screenshot">
|
751 |
-
<# if( data.items[ key ].featured_image_url ) { #>
|
752 |
-
<img src="{{ data.items[ key ].featured_image_url }}" />
|
753 |
-
<# } else { #>
|
754 |
-
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
|
755 |
-
<# } #>
|
756 |
-
</div>
|
757 |
-
<div id="wcf_create_notice" class=""><a href="https://cartflows.com/" target="_blank"></a></div>
|
758 |
-
|
759 |
-
<# if( data.items[ key ].woo_required ) { #>
|
760 |
-
<div class="notice notice-info" style="width: auto;">
|
761 |
-
<p class="wcf-learn-how">
|
762 |
-
Install/Activate WooCommerce to use this template.
|
763 |
-
<a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank">
|
764 |
-
<strong><?php esc_html_e( 'Learn How', 'cartflows' ); ?></strong>
|
765 |
-
<i class="dashicons dashicons-external"></i>
|
766 |
-
</a>
|
767 |
-
</p>
|
768 |
-
</div>
|
769 |
-
<# } else { #>
|
770 |
-
<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>
|
771 |
-
<# } #>
|
772 |
-
|
773 |
-
<# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
|
774 |
-
<span class="wcf-flow-type pro"><?php esc_html_e( 'Pro', 'cartflows' ); ?></span>
|
775 |
-
<# } #>
|
776 |
-
</span>
|
777 |
-
<div class="template-id-container">
|
778 |
-
<h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
|
779 |
-
<div class="template-actions">
|
780 |
-
|
781 |
-
<#
|
782 |
-
|
783 |
-
var step_slug = data.items[ key ].step_type.slug || '';
|
784 |
-
var step_title = data.items[ key ].step_type.name || '';
|
785 |
-
var import_btn_title = 'Import';
|
786 |
-
|
787 |
-
var required_plugin_group = '';
|
788 |
-
if( data.items[ key ].page_builder ) {
|
789 |
-
required_plugin_group = data.items[ key ].page_builder.slug;
|
790 |
-
|
791 |
-
if( data.items[ key ].page_builder.slug && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug] && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug].button_title ) {
|
792 |
-
import_btn_title = CartFlowsImportVars.required_plugins[ data.items[ key ].page_builder.slug ].button_title;
|
793 |
-
}
|
794 |
-
}
|
795 |
-
#>
|
796 |
-
|
797 |
-
<# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
|
798 |
-
|
799 |
-
<# if( ! data.items[ key ].woo_required ) { #>
|
800 |
-
<a data-slug="{{step_slug}}" data-title="{{step_title}}" data-flow-steps="{{ flow_steps }}" data-required-plugin-group="{{required_plugin_group}}" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}">{{ import_btn_title }}</a>
|
801 |
-
<# } else { #>
|
802 |
-
<a href='#' class='wcf-activate-wc button-primary'>Install & activate Woo</a>
|
803 |
-
<# } #>
|
804 |
-
|
805 |
-
<# } else if( CartFlowsImportVars._is_pro_active ) { #>
|
806 |
-
<a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Activate License', 'cartflows' ); ?></a>
|
807 |
-
<# } else { #>
|
808 |
-
<a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php esc_html_e( 'Get Pro', 'cartflows' ); ?></a>
|
809 |
-
<# } #>
|
810 |
-
</div>
|
811 |
-
</div>
|
812 |
-
</div>
|
813 |
-
</div>
|
814 |
-
<# } #>
|
815 |
-
<# } #>
|
816 |
-
</script>
|
817 |
-
|
818 |
-
<?php
|
819 |
-
/**
|
820 |
-
* TMPL - Website Unreachable
|
821 |
-
*/
|
822 |
-
?>
|
823 |
-
<script type="text/template" id="tmpl-cartflows-website-unreachable">
|
824 |
-
<div class="postbox cartflows-website-unreachable">
|
825 |
-
<h2><?php esc_html_e( 'Under Maintenance..', 'cartflows' ); ?></h2>
|
826 |
-
<p><?php esc_html_e( 'If you are seeing this message, most likely our servers are under routine maintenance and we will be back shortly.', 'cartflows' ); ?></p>
|
827 |
-
<p><?php esc_html_e( 'In rare case, it is possible your website is having trouble connecting with ours. If you need help, please feel free to get in touch with us from our website..', 'cartflows' ); ?></p>
|
828 |
-
</div>
|
829 |
-
</script>
|
830 |
-
|
831 |
-
<?php
|
832 |
-
/**
|
833 |
-
* TMPL - Filters
|
834 |
-
*/
|
835 |
-
?>
|
836 |
-
<script type="text/template" id="tmpl-cartflows-page-builder-notice">
|
837 |
-
<?php
|
838 |
-
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
839 |
-
$page_builder = Cartflows_Helper::get_required_plugins_for_page_builder( Cartflows_Helper::get_common_setting( 'default_page_builder' ) );
|
840 |
-
$title = $page_builder['title'];
|
841 |
-
|
842 |
-
$plugin_string = '<a href="#" data-slug="' . esc_html( $default_page_builder ) . '" class="wcf-install-plugin">Please click here and activate ' . esc_html( $title ) . '</a>';
|
843 |
-
$theme_status = '';
|
844 |
-
if ( 'divi' === $default_page_builder ) {
|
845 |
-
|
846 |
-
$theme_status = $page_builder['theme-status'];
|
847 |
-
$plugin_status = $page_builder['plugin-status'];
|
848 |
-
|
849 |
-
if ( 'deactivate' === $theme_status || 'install' === $plugin_status ) {
|
850 |
-
$plugin_string = 'Please activate ' . esc_html( $title );
|
851 |
-
} elseif ( ( 'deactivate' === $theme_status || 'not-installed' === $theme_status ) && 'install' === $plugin_status ) {
|
852 |
-
$plugin_string = 'Please install and activate ' . esc_html( $title );
|
853 |
-
}
|
854 |
-
}
|
855 |
-
?>
|
856 |
-
<div class="wcf-page-builder-message">
|
857 |
-
<p><?php /* translators: %s: Plugin string */ printf( __( '%1$s to see CartFlows templates. If you prefer another page builder tool, you can <a href="%2$s" target="blank">select it here</a>.', 'cartflows' ), $plugin_string, admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS . '&action=common-settings#form-field-wcf_default_page_builder' ) ); ?></p>
|
858 |
-
<p>If your preferred page builder is not available, feel free to <a href="#" data-slug="canvas" class="wcf-create-from-scratch-link">create your own</a> pages using page builder of your choice as CartFlows works with all major page builders.</p>
|
859 |
-
<p>We plan to add design templates made with more page builder shortly!</p>
|
860 |
-
</div>
|
861 |
-
</script>
|
862 |
-
|
863 |
-
<?php
|
864 |
-
/**
|
865 |
-
* TMPL - Filters
|
866 |
-
*/
|
867 |
-
?>
|
868 |
-
<script type="text/template" id="tmpl-cartflows-term-filters-dropdown">
|
869 |
-
<# if ( data ) { #>
|
870 |
-
<select class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
871 |
-
<# if ( data.args.show_all ) { #>
|
872 |
-
<option value="all"> <?php esc_html_e( 'All', 'cartflows' ); ?> </option>
|
873 |
-
<# } #>
|
874 |
-
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
875 |
-
<option value=""> <?php esc_html_e( 'Select Step Type', 'cartflows' ); ?> </option>
|
876 |
-
<# } #>
|
877 |
-
<# var step_slug_data = []; #>
|
878 |
-
<# for ( key in data.items ) { #>
|
879 |
-
<option value='{{ data.items[ key ].id }}' 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 }}</option>
|
880 |
-
|
881 |
-
<# step_slug_data.push( data.items[ key ].slug ); #>
|
882 |
-
|
883 |
-
<# } #>
|
884 |
-
<# if( step_slug_data.indexOf("optin") === -1){ #>
|
885 |
-
<option value='0' data-group='0' class="Optin (Woo)" data-slug="optin" data-title="Optin (Woo)">Optin (Woo)</option>
|
886 |
-
<# } #>
|
887 |
-
</select>
|
888 |
-
<# } #>
|
889 |
-
</script>
|
890 |
-
|
891 |
-
<script type="text/template" id="tmpl-cartflows-term-filters">
|
892 |
-
|
893 |
-
<# if ( data ) { #>
|
894 |
-
|
895 |
-
<?php /* <# if ( CartFlowsImportVars.flow_page_builder === data.args.remote_slug || CartFlowsImportVars.step_page_builder === data.args.remote_slug ) { #> */ ?>
|
896 |
-
<ul class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
897 |
-
|
898 |
-
<# if ( data.args.show_all ) { #>
|
899 |
-
<li>
|
900 |
-
<a href="#" data-group="all"> All </a>
|
901 |
-
</li>
|
902 |
-
<# } #>
|
903 |
-
|
904 |
-
<# for ( key in data.items ) { #>
|
905 |
-
<li>
|
906 |
-
<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>
|
907 |
-
</li>
|
908 |
-
<# } #>
|
909 |
-
|
910 |
-
</ul>
|
911 |
-
|
912 |
-
<?php
|
913 |
-
|
914 |
-
/**
|
915 |
-
<# } else { #>
|
916 |
-
<select class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
917 |
-
|
918 |
-
<# if ( data.args.show_all ) { #>
|
919 |
-
<option value="all"> <?php _e( 'All', 'cartflows' ); ?> </option>
|
920 |
-
<# } #>
|
921 |
-
|
922 |
-
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
923 |
-
<option value=""> <?php _e( 'Select Step Type', 'cartflows' ); ?> </option>
|
924 |
-
<# } #>
|
925 |
-
|
926 |
-
<# for ( key in data.items ) { #>
|
927 |
-
<option value='{{ data.items[ key ].id }}' 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 }}</option>
|
928 |
-
<# } #>
|
929 |
-
|
930 |
-
</select>
|
931 |
-
*/
|
932 |
-
?>
|
933 |
-
|
934 |
-
<?php /* <# } #> */ ?>
|
935 |
-
|
936 |
-
<# } #>
|
937 |
-
</script>
|
938 |
-
|
939 |
-
<?php
|
940 |
-
// Step Type.
|
941 |
-
?>
|
942 |
-
<script type="text/template" id="tmpl-cartflows-step-types">
|
943 |
-
<ul class="wcf-tab nav-tabs">
|
944 |
-
<# if( data.items_count ) { #>
|
945 |
-
<# for( key in data.items ) { #>
|
946 |
-
<# console.log( data.items[ key ].id ) #>
|
947 |
-
<li data-slug="{{data.items[ key ].slug}}" data-title="{{ data.items[ key ].name }}">
|
948 |
-
<a href="#{{{ data.items[ key ].slug }}}">{{{ data.items[ key ].name }}}</a>
|
949 |
-
</li>
|
950 |
-
<# } #>
|
951 |
-
<# } #>
|
952 |
-
</ul>
|
953 |
-
</script>
|
954 |
-
|
955 |
-
<?php
|
956 |
-
// Add to library button.
|
957 |
-
?>
|
958 |
-
<script type="text/template" id="tmpl-templator-add-to-library">
|
959 |
-
<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>
|
960 |
-
</script>
|
961 |
-
<?php
|
962 |
-
}
|
963 |
-
|
964 |
-
/**
|
965 |
-
* Enqueue scripts
|
966 |
-
*
|
967 |
-
* @since 1.0.0
|
968 |
-
*
|
969 |
-
* @hook admin_enqueue_scripts
|
970 |
-
* @param string $hook Current page hook.
|
971 |
-
*/
|
972 |
-
public function scripts( $hook = '' ) {
|
973 |
-
|
974 |
-
if ( ! self::is_supported_post( get_current_screen()->post_type ) ) {
|
975 |
-
return;
|
976 |
-
}
|
977 |
-
|
978 |
-
wp_enqueue_script( 'cartflows-rest-api', CARTFLOWS_URL . 'assets/js/rest-api.js', array( 'jquery' ), CARTFLOWS_VER, true );
|
979 |
-
wp_enqueue_style( 'cartflows-import', CARTFLOWS_URL . 'assets/css/import.css', null, CARTFLOWS_VER, 'all' );
|
980 |
-
wp_style_add_data( 'cartflows-import', 'rtl', 'replace' );
|
981 |
-
wp_enqueue_script( 'cartflows-import', CARTFLOWS_URL . 'assets/js/import.js', array( 'jquery', 'wp-util', 'cartflows-rest-api', 'updates' ), CARTFLOWS_VER, true );
|
982 |
-
|
983 |
-
$installed_plugins = get_plugins();
|
984 |
-
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? 'yes' : 'no';
|
985 |
-
$is_wc_activated = wcf()->is_woo_active ? 'yes' : 'no';
|
986 |
-
|
987 |
-
$localize_vars = array(
|
988 |
-
'_is_pro_active' => _is_cartflows_pro(),
|
989 |
-
'is_wc_installed' => $is_wc_installed,
|
990 |
-
'is_wc_activated' => $is_wc_activated,
|
991 |
-
|
992 |
-
// Set API headers for the CartFlows API Calls only.
|
993 |
-
'headers' => array(),
|
994 |
-
|
995 |
-
// Flow and its rest fields.
|
996 |
-
'flow' => CARTFLOWS_FLOW_POST_TYPE,
|
997 |
-
'flow_fields' => array(
|
998 |
-
'id',
|
999 |
-
'title',
|
1000 |
-
'flow_type',
|
1001 |
-
'page_builder',
|
1002 |
-
'flow_steps',
|
1003 |
-
'licence_status',
|
1004 |
-
'featured_image_url',
|
1005 |
-
'featured_media', // @required for field `featured_image_url`.
|
1006 |
-
),
|
1007 |
-
|
1008 |
-
// Flow type and rest fields.
|
1009 |
-
'flow_type' => CARTFLOWS_TAXONOMY_FLOW_CATEGORY,
|
1010 |
-
'flow_type_fields' => array(
|
1011 |
-
'id',
|
1012 |
-
'name',
|
1013 |
-
'slug',
|
1014 |
-
),
|
1015 |
-
|
1016 |
-
// Flow page builder and rest fields.
|
1017 |
-
'flow_page_builder' => CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER,
|
1018 |
-
'flow_page_builder_fields' => array(
|
1019 |
-
'id',
|
1020 |
-
'name',
|
1021 |
-
'slug',
|
1022 |
-
),
|
1023 |
-
|
1024 |
-
// Step page builder and rest fields.
|
1025 |
-
'step_page_builder' => CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER,
|
1026 |
-
'step_page_builder_fields' => array(
|
1027 |
-
'id',
|
1028 |
-
'name',
|
1029 |
-
'slug',
|
1030 |
-
),
|
1031 |
-
|
1032 |
-
// Step and its rest fields.
|
1033 |
-
'step' => CARTFLOWS_STEP_POST_TYPE,
|
1034 |
-
'step_fields' => array(
|
1035 |
-
'title',
|
1036 |
-
'featured_image_url',
|
1037 |
-
'featured_media', // @required for field `featured_image_url`.
|
1038 |
-
'id',
|
1039 |
-
'flow_type',
|
1040 |
-
'step_type',
|
1041 |
-
'page_builder',
|
1042 |
-
'licence_status',
|
1043 |
-
),
|
1044 |
-
|
1045 |
-
// Step type and its rest fields.
|
1046 |
-
'step_type' => CARTFLOWS_TAXONOMY_STEP_TYPE,
|
1047 |
-
'step_type_fields' => array(
|
1048 |
-
'id',
|
1049 |
-
'name',
|
1050 |
-
'slug',
|
1051 |
-
),
|
1052 |
-
|
1053 |
-
'domain_url' => CARTFLOWS_DOMAIN_URL,
|
1054 |
-
'server_url' => CARTFLOWS_TEMPLATES_URL,
|
1055 |
-
'server_rest_url' => CARTFLOWS_TEMPLATES_URL . 'wp-json/wp/v2/',
|
1056 |
-
'site_url' => site_url(),
|
1057 |
-
'import_url' => admin_url( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE . '&page=flow_importer' ),
|
1058 |
-
'export_url' => admin_url( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE . '&page=flow_exporter' ),
|
1059 |
-
'admin_url' => admin_url(),
|
1060 |
-
'licence_args' => CartFlows_API::get_instance()->get_licence_args(),
|
1061 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
1062 |
-
'debug' => ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || isset( $_GET['debug'] ) ) ? true : false, //phpcs:ignore
|
1063 |
-
|
1064 |
-
'required_plugins' => Cartflows_Helper::get_plugins_groupby_page_builders(),
|
1065 |
-
|
1066 |
-
'default_page_builder' => Cartflows_Helper::get_common_setting( 'default_page_builder' ),
|
1067 |
-
);
|
1068 |
-
|
1069 |
-
$localize_vars['cartflows_activate_plugin_nonce'] = wp_create_nonce( 'cartflows_activate_plugin' );
|
1070 |
-
|
1071 |
-
// Add thickbox.
|
1072 |
-
add_thickbox();
|
1073 |
-
|
1074 |
-
wp_localize_script( 'cartflows-import', 'CartFlowsImportVars', $localize_vars );
|
1075 |
-
wp_localize_script( 'cartflows-rest-api', 'CartFlowsImportVars', $localize_vars );
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
/**
|
1079 |
-
* Import.
|
1080 |
-
*
|
1081 |
-
* @since 1.0.0
|
1082 |
-
*
|
1083 |
-
* @hook wp_ajax_cartflows_import_flow_step
|
1084 |
-
* @return void
|
1085 |
-
*/
|
1086 |
-
public function import_flow() {
|
1087 |
-
|
1088 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1089 |
-
return;
|
1090 |
-
}
|
1091 |
-
|
1092 |
-
check_ajax_referer( 'cf-import-flow-step', 'security' );
|
1093 |
-
|
1094 |
-
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1095 |
-
$template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
|
1096 |
-
|
1097 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1098 |
-
wcf()->logger->import_log( 'STARTED! Importing FLOW' );
|
1099 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1100 |
-
wcf()->logger->import_log( '(✓) Creating new step from remote step [' . $template_id . '] for FLOW ' . get_the_title( $flow_id ) . ' [' . $flow_id . ']' );
|
1101 |
-
|
1102 |
-
$response = CartFlows_API::get_instance()->get_template( $template_id );
|
1103 |
-
|
1104 |
-
$post_content = isset( $response['data']['content']->rendered ) ? $response['data']['content']->rendered : '';
|
1105 |
-
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1106 |
-
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1107 |
-
$post_content = $response['data']['divi_content'];
|
1108 |
-
}
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
if ( 'gutenberg' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1112 |
-
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1113 |
-
$post_content = $response['data']['divi_content'];
|
1114 |
-
}
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
if ( false === $response['success'] ) {
|
1118 |
-
wcf()->logger->import_log( '(✕) Failed to fetch remote data.' );
|
1119 |
-
wp_send_json_error( $response );
|
1120 |
-
}
|
1121 |
-
|
1122 |
-
wcf()->logger->import_log( '(✓) Successfully getting remote step response ' . wp_json_encode( $response ) );
|
1123 |
-
|
1124 |
-
$new_step_id = wp_insert_post(
|
1125 |
-
array(
|
1126 |
-
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1127 |
-
'post_title' => $response['title'],
|
1128 |
-
'post_content' => $post_content,
|
1129 |
-
'post_status' => 'publish',
|
1130 |
-
)
|
1131 |
-
);
|
1132 |
-
|
1133 |
-
if ( is_wp_error( $new_step_id ) ) {
|
1134 |
-
wcf()->logger->import_log( '(✕) Failed to create new step for flow ' . $flow_id );
|
1135 |
-
wp_send_json_error( $new_step_id );
|
1136 |
-
}
|
1137 |
-
|
1138 |
-
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1139 |
-
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1140 |
-
update_post_meta( $new_step_id, 'divi_content', $response['data']['divi_content'] );
|
1141 |
-
}
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
/* Imported Step */
|
1145 |
-
update_post_meta( $new_step_id, 'cartflows_imported_step', 'yes' );
|
1146 |
-
|
1147 |
-
wcf()->logger->import_log( '(✓) Created new step ' . '"' . $response['title'] . '" id ' . $new_step_id );//phpcs:ignore
|
1148 |
-
// insert post meta.
|
1149 |
-
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
1150 |
-
wcf()->logger->import_log( '(✓) Added flow ID ' . $flow_id . ' in post meta key wcf-flow-id.' );
|
1151 |
-
|
1152 |
-
/**
|
1153 |
-
* Import & Set type.
|
1154 |
-
*/
|
1155 |
-
$term = isset( $response['data']['step_type'] ) ? $response['data']['step_type'] : '';
|
1156 |
-
|
1157 |
-
$term_slug = '';
|
1158 |
-
if ( $term ) {
|
1159 |
-
|
1160 |
-
$taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
1161 |
-
$term_exist = term_exists( $term->slug, $taxonomy );
|
1162 |
-
|
1163 |
-
if ( empty( $term_exist ) ) {
|
1164 |
-
$terms = array(
|
1165 |
-
array(
|
1166 |
-
'name' => $term->name,
|
1167 |
-
'slug' => $term->slug,
|
1168 |
-
),
|
1169 |
-
);
|
1170 |
-
|
1171 |
-
Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
|
1172 |
-
wcf()->logger->import_log( '(✓) Created new term name ' . $term->name . ' | term slug ' . $term->slug );
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
$current_term = term_exists( $term->slug, $taxonomy );
|
1176 |
-
|
1177 |
-
// Set type object.
|
1178 |
-
$data = get_term( $current_term['term_id'], $taxonomy );
|
1179 |
-
$term_slug = $data->slug;
|
1180 |
-
$term_name = $data->name;
|
1181 |
-
wp_set_object_terms( $new_step_id, $term_slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1182 |
-
wcf()->logger->import_log( '(✓) Assigned existing term ' . $term_name . ' to the template ' . $new_step_id );
|
1183 |
-
|
1184 |
-
// Set type.
|
1185 |
-
update_post_meta( $new_step_id, 'wcf-step-type', $term_slug );
|
1186 |
-
wcf()->logger->import_log( '(✓) Updated term ' . $term_name . ' to the post meta wcf-step-type.' );
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
// Set flow.
|
1190 |
-
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1191 |
-
wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
|
1192 |
-
|
1193 |
-
/**
|
1194 |
-
* Update steps for the current flow.
|
1195 |
-
*/
|
1196 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
1197 |
-
|
1198 |
-
if ( ! is_array( $flow_steps ) ) {
|
1199 |
-
$flow_steps = array();
|
1200 |
-
}
|
1201 |
-
|
1202 |
-
$flow_steps[] = array(
|
1203 |
-
'id' => $new_step_id,
|
1204 |
-
'title' => $response['title'],
|
1205 |
-
'type' => $term_slug,
|
1206 |
-
);
|
1207 |
-
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1208 |
-
wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . wp_json_encode( $flow_steps ) );
|
1209 |
-
|
1210 |
-
// Import Post Meta.
|
1211 |
-
self::import_post_meta( $new_step_id, $response );
|
1212 |
-
|
1213 |
-
wcf()->logger->import_log( '(✓) Importing step "' . get_the_title( $new_step_id ) . '" [' . $new_step_id . '] for FLOW "' . get_the_title( $flow_id ) . '" [' . $flow_id . ']' );
|
1214 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1215 |
-
wcf()->logger->import_log( 'COMPLETE! Importing FLOW' );
|
1216 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1217 |
-
|
1218 |
-
do_action( 'cartflows_import_complete' );
|
1219 |
-
wcf()->logger->import_log( '(✓) BATCH STARTED for step ' . $new_step_id . ' for Blog name \'' . get_bloginfo( 'name' ) . '\' (' . get_current_blog_id() . ')' );
|
1220 |
-
|
1221 |
-
// Batch Process.
|
1222 |
-
do_action( 'cartflows_after_template_import', $new_step_id, $response );
|
1223 |
-
|
1224 |
-
/**
|
1225 |
-
* End
|
1226 |
-
*/
|
1227 |
-
wp_send_json_success( $new_step_id );
|
1228 |
-
}
|
1229 |
-
|
1230 |
-
/**
|
1231 |
-
* Import Step.
|
1232 |
-
*
|
1233 |
-
* @since 1.0.0
|
1234 |
-
* @hook wp_ajax_cartflows_step_import
|
1235 |
-
*
|
1236 |
-
* @return void
|
1237 |
-
*/
|
1238 |
-
public function create_default_flow() {
|
1239 |
-
|
1240 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1241 |
-
return;
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
check_ajax_referer( 'cf-default-flow', 'security' );
|
1245 |
-
|
1246 |
-
// Create post object.
|
1247 |
-
$new_flow_post = array(
|
1248 |
-
'post_content' => '',
|
1249 |
-
'post_status' => 'publish',
|
1250 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
1251 |
-
);
|
1252 |
-
|
1253 |
-
// Insert the post into the database.
|
1254 |
-
$flow_id = wp_insert_post( $new_flow_post );
|
1255 |
-
|
1256 |
-
if ( is_wp_error( $flow_id ) ) {
|
1257 |
-
wp_send_json_error( $flow_id->get_error_message() );
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
$flow_steps = array();
|
1261 |
-
|
1262 |
-
if ( wcf()->is_woo_active ) {
|
1263 |
-
$steps_data = array(
|
1264 |
-
'sales' => array(
|
1265 |
-
'title' => __( 'Sales Landing', 'cartflows' ),
|
1266 |
-
'type' => 'landing',
|
1267 |
-
),
|
1268 |
-
'order-form' => array(
|
1269 |
-
'title' => __( 'Checkout (Woo)', 'cartflows' ),
|
1270 |
-
'type' => 'checkout',
|
1271 |
-
),
|
1272 |
-
'order-confirmation' => array(
|
1273 |
-
'title' => __( 'Thank You (Woo)', 'cartflows' ),
|
1274 |
-
'type' => 'thankyou',
|
1275 |
-
),
|
1276 |
-
);
|
1277 |
-
|
1278 |
-
} else {
|
1279 |
-
$steps_data = array(
|
1280 |
-
'landing' => array(
|
1281 |
-
'title' => __( 'Landing', 'cartflows' ),
|
1282 |
-
'type' => 'landing',
|
1283 |
-
),
|
1284 |
-
'thankyou' => array(
|
1285 |
-
'title' => __( 'Thank You', 'cartflows' ),
|
1286 |
-
'type' => 'landing',
|
1287 |
-
),
|
1288 |
-
);
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
foreach ( $steps_data as $slug => $data ) {
|
1292 |
-
|
1293 |
-
$post_content = '';
|
1294 |
-
$step_type = trim( $data['type'] );
|
1295 |
-
|
1296 |
-
$step_id = wp_insert_post(
|
1297 |
-
array(
|
1298 |
-
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1299 |
-
'post_title' => $data['title'],
|
1300 |
-
'post_content' => $post_content,
|
1301 |
-
'post_status' => 'publish',
|
1302 |
-
)
|
1303 |
-
);
|
1304 |
-
|
1305 |
-
if ( is_wp_error( $step_id ) ) {
|
1306 |
-
wp_send_json_error( $step_id->get_error_message() );
|
1307 |
-
}
|
1308 |
-
|
1309 |
-
if ( $step_id ) {
|
1310 |
-
|
1311 |
-
$flow_steps[] = array(
|
1312 |
-
'id' => $step_id,
|
1313 |
-
'title' => $data['title'],
|
1314 |
-
'type' => $step_type,
|
1315 |
-
);
|
1316 |
-
|
1317 |
-
// insert post meta.
|
1318 |
-
update_post_meta( $step_id, 'wcf-flow-id', $flow_id );
|
1319 |
-
update_post_meta( $step_id, 'wcf-step-type', $step_type );
|
1320 |
-
|
1321 |
-
wp_set_object_terms( $step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1322 |
-
wp_set_object_terms( $step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1323 |
-
|
1324 |
-
update_post_meta( $step_id, '_wp_page_template', 'cartflows-default' );
|
1325 |
-
}
|
1326 |
-
}
|
1327 |
-
|
1328 |
-
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1329 |
-
|
1330 |
-
wp_send_json_success( $flow_id );
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
/**
|
1334 |
-
* Create Flow
|
1335 |
-
*
|
1336 |
-
* @return void
|
1337 |
-
*/
|
1338 |
-
public function create_flow() {
|
1339 |
-
|
1340 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1341 |
-
return;
|
1342 |
-
}
|
1343 |
-
|
1344 |
-
check_ajax_referer( 'cf-create-flow', 'security' );
|
1345 |
-
|
1346 |
-
// Create post object.
|
1347 |
-
$new_flow_post = array(
|
1348 |
-
'post_content' => '',
|
1349 |
-
'post_status' => 'publish',
|
1350 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
1351 |
-
);
|
1352 |
-
|
1353 |
-
// Insert the post into the database.
|
1354 |
-
$flow_id = wp_insert_post( $new_flow_post );
|
1355 |
-
|
1356 |
-
if ( is_wp_error( $flow_id ) ) {
|
1357 |
-
wp_send_json_error( $flow_id->get_error_message() );
|
1358 |
-
}
|
1359 |
-
|
1360 |
-
/* Imported Flow */
|
1361 |
-
update_post_meta( $flow_id, 'cartflows_imported_flow', 'yes' );
|
1362 |
-
|
1363 |
-
wp_send_json_success( $flow_id );
|
1364 |
-
}
|
1365 |
-
|
1366 |
-
/**
|
1367 |
-
* Create Step
|
1368 |
-
*
|
1369 |
-
* @return void
|
1370 |
-
*/
|
1371 |
-
public function import_step() {
|
1372 |
-
|
1373 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1374 |
-
return;
|
1375 |
-
}
|
1376 |
-
|
1377 |
-
check_ajax_referer( 'cf-step-import', 'security' );
|
1378 |
-
|
1379 |
-
$template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
|
1380 |
-
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1381 |
-
$step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( wp_unslash( $_POST['step_title'] ) ) : '';
|
1382 |
-
$step_type = isset( $_POST['step_type'] ) ? sanitize_title( wp_unslash( $_POST['step_type'] ) ) : '';
|
1383 |
-
$step_custom_title = isset( $_POST['step_custom_title'] ) ? sanitize_title( wp_unslash( $_POST['step_custom_title'] ) ) : $step_title;
|
1384 |
-
|
1385 |
-
$cartflow_meta = Cartflows_Flow_Meta::get_instance();
|
1386 |
-
|
1387 |
-
$post_id = $cartflow_meta->create_step( $flow_id, $step_type, $step_custom_title );
|
1388 |
-
|
1389 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1390 |
-
wcf()->logger->import_log( 'STARTED! Importing STEP' );
|
1391 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1392 |
-
|
1393 |
-
if ( empty( $template_id ) || empty( $post_id ) ) {
|
1394 |
-
/* translators: %s: template ID */
|
1395 |
-
$data = sprintf( __( 'Invalid template id %1$s or post id %2$s.', 'cartflows' ), $template_id, $post_id );
|
1396 |
-
wcf()->logger->import_log( $data );
|
1397 |
-
wp_send_json_error( $data );
|
1398 |
-
}
|
1399 |
-
|
1400 |
-
wcf()->logger->import_log( 'Remote Step ' . $template_id . ' for local flow "' . get_the_title( $post_id ) . '" [' . $post_id . ']' );
|
1401 |
-
|
1402 |
-
$response = CartFlows_API::get_instance()->get_template( $template_id );
|
1403 |
-
|
1404 |
-
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1405 |
-
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1406 |
-
|
1407 |
-
update_post_meta( $post_id, 'divi_content', $response['data']['divi_content'] );
|
1408 |
-
|
1409 |
-
wp_update_post(
|
1410 |
-
array(
|
1411 |
-
'ID' => $post_id,
|
1412 |
-
'post_content' => $response['data']['divi_content'],
|
1413 |
-
)
|
1414 |
-
);
|
1415 |
-
}
|
1416 |
-
}
|
1417 |
-
|
1418 |
-
if ( 'gutenberg' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1419 |
-
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1420 |
-
|
1421 |
-
wp_update_post(
|
1422 |
-
array(
|
1423 |
-
'ID' => $post_id,
|
1424 |
-
'post_content' => $response['data']['divi_content'],
|
1425 |
-
)
|
1426 |
-
);
|
1427 |
-
}
|
1428 |
-
}
|
1429 |
-
|
1430 |
-
/* Imported Step */
|
1431 |
-
update_post_meta( $post_id, 'cartflows_imported_step', 'yes' );
|
1432 |
-
|
1433 |
-
// Import Post Meta.
|
1434 |
-
self::import_post_meta( $post_id, $response );
|
1435 |
-
|
1436 |
-
do_action( 'cartflows_import_complete' );
|
1437 |
-
|
1438 |
-
// Batch Process.
|
1439 |
-
do_action( 'cartflows_after_template_import', $post_id, $response );
|
1440 |
-
|
1441 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1442 |
-
wcf()->logger->import_log( 'COMPLETE! Importing Step' );
|
1443 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1444 |
-
|
1445 |
-
wp_send_json_success( $post_id );
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
/**
|
1449 |
-
* Import Step.
|
1450 |
-
*
|
1451 |
-
* @since 1.0.0
|
1452 |
-
* @hook wp_ajax_cartflows_step_create_blank
|
1453 |
-
*
|
1454 |
-
* @return void
|
1455 |
-
*/
|
1456 |
-
public function step_create_blank() {
|
1457 |
-
|
1458 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1459 |
-
return;
|
1460 |
-
}
|
1461 |
-
|
1462 |
-
check_ajax_referer( 'cf-step-create-blank', 'security' );
|
1463 |
-
|
1464 |
-
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1465 |
-
$step_type = isset( $_POST['step_type'] ) ? sanitize_text_field( wp_unslash( $_POST['step_type'] ) ) : '';
|
1466 |
-
$step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( wp_unslash( $_POST['step_title'] ) ) : '';
|
1467 |
-
|
1468 |
-
if ( empty( $flow_id ) || empty( $step_type ) ) {
|
1469 |
-
/* translators: %s: flow ID */
|
1470 |
-
$data = sprintf( __( 'Invalid flow id %1$s OR step type %2$s.', 'cartflows' ), $flow_id, $step_type );
|
1471 |
-
wcf()->logger->import_log( $data );
|
1472 |
-
wp_send_json_error( $data );
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1476 |
-
wcf()->logger->import_log( 'STARTED! Creating Blank STEP for Flow ' . $flow_id );
|
1477 |
-
|
1478 |
-
$step_type_title = str_replace( '-', ' ', $step_type );
|
1479 |
-
$step_type_slug = strtolower( str_replace( '-', ' ', $step_type ) );
|
1480 |
-
|
1481 |
-
$new_step_id = wp_insert_post(
|
1482 |
-
array(
|
1483 |
-
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1484 |
-
'post_title' => $step_title,
|
1485 |
-
'post_content' => '',
|
1486 |
-
'post_status' => 'publish',
|
1487 |
-
)
|
1488 |
-
);
|
1489 |
-
|
1490 |
-
// insert post meta.
|
1491 |
-
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
1492 |
-
|
1493 |
-
$taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
1494 |
-
$term_exist = term_exists( $step_type_slug, $taxonomy );
|
1495 |
-
|
1496 |
-
if ( empty( $term_exist ) ) {
|
1497 |
-
$terms = array(
|
1498 |
-
array(
|
1499 |
-
'name' => $step_type_title,
|
1500 |
-
'slug' => $step_type_slug,
|
1501 |
-
),
|
1502 |
-
);
|
1503 |
-
|
1504 |
-
Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
|
1505 |
-
wcf()->logger->import_log( '(✓) Created new term name ' . $step_type_title . ' | term slug ' . $step_type_slug );
|
1506 |
-
}
|
1507 |
-
|
1508 |
-
$current_term = term_exists( $step_type_slug, $taxonomy );
|
1509 |
-
|
1510 |
-
// Set type object.
|
1511 |
-
$data = get_term( $current_term['term_id'], $taxonomy );
|
1512 |
-
$step_slug = $data->slug;
|
1513 |
-
wp_set_object_terms( $new_step_id, $data->slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1514 |
-
wcf()->logger->import_log( '(✓) Assigned existing term ' . $step_type_title . ' to the template ' . $new_step_id );
|
1515 |
-
|
1516 |
-
// Set Default page Layout.
|
1517 |
-
update_post_meta( $new_step_id, '_wp_page_template', 'cartflows-default' );
|
1518 |
-
|
1519 |
-
// Set type.
|
1520 |
-
update_post_meta( $new_step_id, 'wcf-step-type', $data->slug );
|
1521 |
-
wcf()->logger->import_log( '(✓) Updated term ' . $data->name . ' to the post meta wcf-step-type.' );
|
1522 |
-
|
1523 |
-
// Set flow.
|
1524 |
-
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1525 |
-
wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
|
1526 |
-
|
1527 |
-
self::get_instance()->set_step_to_flow( $flow_id, $new_step_id, $step_type_title, $step_slug );
|
1528 |
-
|
1529 |
-
wcf()->logger->import_log( 'COMPLETE! Creating Blank STEP for Flow ' . $flow_id );
|
1530 |
-
wcf()->logger->import_log( '------------------------------------' );
|
1531 |
-
|
1532 |
-
wp_send_json_success( $new_step_id );
|
1533 |
-
}
|
1534 |
-
|
1535 |
-
/**
|
1536 |
-
* Import Post Meta
|
1537 |
-
*
|
1538 |
-
* @since 1.0.0
|
1539 |
-
*
|
1540 |
-
* @param integer $post_id Post ID.
|
1541 |
-
* @param array $response Post meta.
|
1542 |
-
* @return void
|
1543 |
-
*/
|
1544 |
-
public static function import_post_meta( $post_id, $response ) {
|
1545 |
-
|
1546 |
-
$metadata = (array) $response['post_meta'];
|
1547 |
-
|
1548 |
-
foreach ( $metadata as $meta_key => $meta_value ) {
|
1549 |
-
$meta_value = isset( $meta_value[0] ) ? $meta_value[0] : '';
|
1550 |
-
|
1551 |
-
if ( $meta_value ) {
|
1552 |
-
|
1553 |
-
if ( is_serialized( $meta_value, true ) ) {
|
1554 |
-
$raw_data = maybe_unserialize( stripslashes( $meta_value ) );
|
1555 |
-
} elseif ( is_array( $meta_value ) ) {
|
1556 |
-
$raw_data = json_decode( stripslashes( $meta_value ), true );
|
1557 |
-
} else {
|
1558 |
-
$raw_data = $meta_value;
|
1559 |
-
}
|
1560 |
-
|
1561 |
-
if ( '_elementor_data' === $meta_key ) {
|
1562 |
-
if ( is_array( $raw_data ) ) {
|
1563 |
-
$raw_data = wp_slash( wp_json_encode( $raw_data ) );
|
1564 |
-
} else {
|
1565 |
-
$raw_data = wp_slash( $raw_data );
|
1566 |
-
}
|
1567 |
-
}
|
1568 |
-
if ( '_elementor_data' !== $meta_key && '_elementor_draft' !== $meta_key && '_fl_builder_data' !== $meta_key && '_fl_builder_draft' !== $meta_key ) {
|
1569 |
-
if ( is_array( $raw_data ) ) {
|
1570 |
-
wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . wp_json_encode( $raw_data ) );
|
1571 |
-
} else {
|
1572 |
-
if ( ! is_object( $raw_data ) ) {
|
1573 |
-
wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . $raw_data );
|
1574 |
-
}
|
1575 |
-
}
|
1576 |
-
}
|
1577 |
-
|
1578 |
-
update_post_meta( $post_id, $meta_key, $raw_data );
|
1579 |
-
}
|
1580 |
-
}
|
1581 |
-
}
|
1582 |
-
|
1583 |
-
/**
|
1584 |
-
* Import Template for Elementor
|
1585 |
-
*
|
1586 |
-
* @since 1.0.0
|
1587 |
-
*
|
1588 |
-
* @param integer $post_id Post ID.
|
1589 |
-
* @param array $response Post meta.
|
1590 |
-
* @param array $page_build_data Page build data.
|
1591 |
-
* @return void
|
1592 |
-
*/
|
1593 |
-
public static function import_template_elementor( $post_id, $response, $page_build_data ) {
|
1594 |
-
if ( ! is_plugin_active( 'elementor/elementor.php' ) ) {
|
1595 |
-
$data = __( 'Elementor is not activated. Please activate plugin Elementor Page Builder to import the step.', 'cartflows' );
|
1596 |
-
wcf()->logger->import_log( $data );
|
1597 |
-
wp_send_json_error( $data );
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
require_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-importer-elementor.php';
|
1601 |
-
|
1602 |
-
wcf()->logger->import_log( '# Started "importing page builder data" for step ' . $post_id );
|
1603 |
-
|
1604 |
-
$obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
|
1605 |
-
$obj->import_single_template( $post_id );
|
1606 |
-
|
1607 |
-
wcf()->logger->import_log( '# Complete "importing page builder data" for step ' . $post_id );
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
/**
|
1611 |
-
* Supported post types
|
1612 |
-
*
|
1613 |
-
* @since 1.0.0
|
1614 |
-
*
|
1615 |
-
* @return array Supported post types.
|
1616 |
-
*/
|
1617 |
-
public static function supported_post_types() {
|
1618 |
-
return apply_filters(
|
1619 |
-
'cartflows_supported_post_types',
|
1620 |
-
array(
|
1621 |
-
CARTFLOWS_FLOW_POST_TYPE,
|
1622 |
-
)
|
1623 |
-
);
|
1624 |
-
}
|
1625 |
-
|
1626 |
-
/**
|
1627 |
-
* Check supported post type
|
1628 |
-
*
|
1629 |
-
* @since 1.0.0
|
1630 |
-
*
|
1631 |
-
* @param string $post_type Post type.
|
1632 |
-
* @return boolean Supported post type status.
|
1633 |
-
*/
|
1634 |
-
public static function is_supported_post( $post_type = '' ) {
|
1635 |
-
|
1636 |
-
if ( in_array( $post_type, self::supported_post_types(), true ) ) {
|
1637 |
-
return true;
|
1638 |
-
}
|
1639 |
-
|
1640 |
-
return false;
|
1641 |
-
}
|
1642 |
-
|
1643 |
-
/**
|
1644 |
-
* Set steps to the flow
|
1645 |
-
*
|
1646 |
-
* @param integer $flow_id Flow ID.
|
1647 |
-
* @param integer $new_step_id New step ID.
|
1648 |
-
* @param string $step_title Flow Type.
|
1649 |
-
* @param string $step_slug Flow Type.
|
1650 |
-
*/
|
1651 |
-
public function set_step_to_flow( $flow_id, $new_step_id, $step_title, $step_slug ) {
|
1652 |
-
// Update steps for the current flow.
|
1653 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
1654 |
-
|
1655 |
-
if ( ! is_array( $flow_steps ) ) {
|
1656 |
-
$flow_steps = array();
|
1657 |
-
}
|
1658 |
-
|
1659 |
-
$flow_steps[] = array(
|
1660 |
-
'id' => $new_step_id,
|
1661 |
-
'title' => $step_title,
|
1662 |
-
'type' => $step_slug,
|
1663 |
-
);
|
1664 |
-
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1665 |
-
wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . wp_json_encode( $flow_steps ) );
|
1666 |
-
}
|
1667 |
-
|
1668 |
-
/**
|
1669 |
-
* Localize variables in admin
|
1670 |
-
*
|
1671 |
-
* @param array $vars variables.
|
1672 |
-
*/
|
1673 |
-
public function localize_vars( $vars ) {
|
1674 |
-
|
1675 |
-
$ajax_actions = array(
|
1676 |
-
'cf_step_import',
|
1677 |
-
'cf_load_steps',
|
1678 |
-
'cf_create_flow',
|
1679 |
-
'cf_default_flow',
|
1680 |
-
'cf_step_create_blank',
|
1681 |
-
'cf_import_flow_step',
|
1682 |
-
);
|
1683 |
-
|
1684 |
-
foreach ( $ajax_actions as $action ) {
|
1685 |
-
|
1686 |
-
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
1687 |
-
}
|
1688 |
-
|
1689 |
-
return $vars;
|
1690 |
-
}
|
1691 |
-
|
1692 |
-
/**
|
1693 |
-
* Ajax action to activate plugin
|
1694 |
-
*/
|
1695 |
-
public function activate_plugin() {
|
1696 |
-
|
1697 |
-
if ( ! check_ajax_referer( 'cartflows_activate_plugin', 'security', false ) ) {
|
1698 |
-
wp_send_json_error( esc_html__( 'Action failed. Invalid Security Nonce.', 'cartflows' ) );
|
1699 |
-
}
|
1700 |
-
|
1701 |
-
if ( ! current_user_can( 'activate_plugins' ) ) {
|
1702 |
-
wp_send_json_error(
|
1703 |
-
array(
|
1704 |
-
'success' => false,
|
1705 |
-
'message' => __( 'User have not plugin install permissions.', 'cartflows' ),
|
1706 |
-
)
|
1707 |
-
);
|
1708 |
-
}
|
1709 |
-
|
1710 |
-
$plugin_init = isset( $_POST['plugin_init'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_init'] ) ) : '';
|
1711 |
-
|
1712 |
-
$activate = activate_plugin( $plugin_init, '', false, true );
|
1713 |
-
|
1714 |
-
if ( is_wp_error( $activate ) ) {
|
1715 |
-
wp_send_json_error(
|
1716 |
-
array(
|
1717 |
-
'success' => false,
|
1718 |
-
'message' => $activate->get_error_message(),
|
1719 |
-
'init' => $plugin_init,
|
1720 |
-
)
|
1721 |
-
);
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
wp_send_json_success(
|
1725 |
-
array(
|
1726 |
-
'success' => true,
|
1727 |
-
'message' => __( 'Plugin Successfully Activated', 'cartflows' ),
|
1728 |
-
'init' => $plugin_init,
|
1729 |
-
)
|
1730 |
-
);
|
1731 |
-
}
|
1732 |
-
|
1733 |
-
}
|
1734 |
-
|
1735 |
-
/**
|
1736 |
-
* Initialize class object with 'get_instance()' method
|
1737 |
-
*/
|
1738 |
-
CartFlows_Importer::get_instance();
|
1739 |
-
|
1740 |
-
endif;
|
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 |
+
|
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_import_flow_step', array( $this, 'import_flow' ) );
|
52 |
+
add_action( 'wp_ajax_cartflows_default_flow', array( $this, 'create_default_flow' ) );
|
53 |
+
add_action( 'wp_ajax_cartflows_step_create_blank', array( $this, 'step_create_blank' ) );
|
54 |
+
|
55 |
+
add_action( 'admin_footer', array( $this, 'js_templates' ) );
|
56 |
+
add_action( 'cartflows_import_complete', array( $this, 'clear_cache' ) );
|
57 |
+
|
58 |
+
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
59 |
+
|
60 |
+
add_action( 'wp_ajax_cartflows_activate_plugin', array( $this, 'activate_plugin' ) );
|
61 |
+
|
62 |
+
add_action( 'admin_menu', array( $this, 'add_to_menus' ) );
|
63 |
+
add_action( 'admin_init', array( $this, 'export_json' ) );
|
64 |
+
add_action( 'admin_init', array( $this, 'import_json' ) );
|
65 |
+
add_filter( 'post_row_actions', array( $this, 'export_link' ), 10, 2 );
|
66 |
+
add_action( 'admin_action_cartflows_export_flow', array( $this, 'export_flow' ) );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Add the export link to action list for flows row actions
|
71 |
+
*
|
72 |
+
* @since 1.1.4
|
73 |
+
*
|
74 |
+
* @param array $actions Actions array.
|
75 |
+
* @param object $post Post object.
|
76 |
+
*
|
77 |
+
* @return array
|
78 |
+
*/
|
79 |
+
public function export_link( $actions, $post ) {
|
80 |
+
if ( current_user_can( 'edit_posts' ) && isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
81 |
+
$actions['export'] = '<a href="' . wp_nonce_url( 'admin.php?action=cartflows_export_flow&post=' . $post->ID, basename( __FILE__ ), 'flow_export_nonce' ) . '" title="' . __( 'Export this flow', 'cartflows' ) . '" rel="permalink">' . __( 'Export', 'cartflows' ) . '</a>';
|
82 |
+
}
|
83 |
+
return $actions;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Add menus
|
88 |
+
*
|
89 |
+
* @since 1.1.4
|
90 |
+
*/
|
91 |
+
public function add_to_menus() {
|
92 |
+
add_submenu_page( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE, __( 'Flow Export', 'cartflows' ), __( 'Flow Export', 'cartflows' ), 'export', 'flow_exporter', array( $this, 'exporter_markup' ) );
|
93 |
+
add_submenu_page( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE, __( 'Flow Import', 'cartflows' ), __( 'Flow Import', 'cartflows' ), 'import', 'flow_importer', array( $this, 'importer_markup' ) );
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Export flow with steps and its meta
|
98 |
+
*
|
99 |
+
* @since 1.1.4
|
100 |
+
*/
|
101 |
+
public function export_flow() {
|
102 |
+
|
103 |
+
if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'cartflows_export_flow' == $_REQUEST['action'] ) ) ) {
|
104 |
+
wp_die( esc_html__( 'No post to export has been supplied!', 'cartflows' ) );
|
105 |
+
}
|
106 |
+
|
107 |
+
if ( ! isset( $_GET['flow_export_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['flow_export_nonce'] ) ), basename( __FILE__ ) ) ) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Get the original post id.
|
112 |
+
$flow_id = ( isset( $_GET['post'] ) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
|
113 |
+
|
114 |
+
$flows = array();
|
115 |
+
$flows[] = $this->get_flow_export_data( $flow_id );
|
116 |
+
$flows = apply_filters( 'cartflows_export_data', $flows );
|
117 |
+
|
118 |
+
nocache_headers();
|
119 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
120 |
+
header( 'Content-Disposition: attachment; filename=cartflows-flow-' . $flow_id . '-' . gmdate( 'm-d-Y' ) . '.json' );
|
121 |
+
header( 'Expires: 0' );
|
122 |
+
|
123 |
+
echo wp_json_encode( $flows );
|
124 |
+
exit;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Export flow markup
|
129 |
+
*
|
130 |
+
* @since 1.1.4
|
131 |
+
*/
|
132 |
+
public function exporter_markup() {
|
133 |
+
include_once CARTFLOWS_DIR . 'includes/exporter.php';
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Import flow markup
|
138 |
+
*
|
139 |
+
* @since 1.1.4
|
140 |
+
*/
|
141 |
+
public function importer_markup() {
|
142 |
+
include_once CARTFLOWS_DIR . 'includes/importer.php';
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Export flow
|
147 |
+
*
|
148 |
+
* @since 1.1.4
|
149 |
+
*/
|
150 |
+
public function export_json() {
|
151 |
+
if ( empty( $_POST['cartflows-action'] ) || 'export' != $_POST['cartflows-action'] ) {
|
152 |
+
return;
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( ! isset( $_POST['cartflows-action-nonce'] ) || empty( $_POST['cartflows-action-nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-action-nonce'] ) ), 'cartflows-action-nonce' ) ) {
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
160 |
+
return;
|
161 |
+
}
|
162 |
+
|
163 |
+
$flows = $this->get_all_flow_export_data();
|
164 |
+
$flows = apply_filters( 'cartflows_export_data', $flows );
|
165 |
+
|
166 |
+
nocache_headers();
|
167 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
168 |
+
header( 'Content-Disposition: attachment; filename=cartflows-flow-export-' . gmdate( 'm-d-Y' ) . '.json' );
|
169 |
+
header( 'Expires: 0' );
|
170 |
+
|
171 |
+
echo wp_json_encode( $flows );
|
172 |
+
exit;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Get flow export data
|
177 |
+
*
|
178 |
+
* @since 1.1.4
|
179 |
+
*
|
180 |
+
* @param integer $flow_id Flow ID.
|
181 |
+
* @return array
|
182 |
+
*/
|
183 |
+
public function get_flow_export_data( $flow_id ) {
|
184 |
+
|
185 |
+
$export_all = apply_filters( 'cartflows_export_all', true );
|
186 |
+
|
187 |
+
$valid_step_meta_keys = array(
|
188 |
+
'_wp_page_template',
|
189 |
+
'_thumbnail_id',
|
190 |
+
'classic-editor-remember',
|
191 |
+
);
|
192 |
+
|
193 |
+
$new_steps = array();
|
194 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
195 |
+
if ( $steps ) {
|
196 |
+
foreach ( $steps as $key => $step ) {
|
197 |
+
|
198 |
+
// Add step post meta.
|
199 |
+
$new_all_meta = array();
|
200 |
+
$all_meta = get_post_meta( $step['id'] );
|
201 |
+
|
202 |
+
// Add single step.
|
203 |
+
$step_data_arr = array(
|
204 |
+
'title' => get_the_title( $step['id'] ),
|
205 |
+
'type' => $step['type'],
|
206 |
+
'meta' => $all_meta,
|
207 |
+
'post_content' => '',
|
208 |
+
);
|
209 |
+
|
210 |
+
if ( $export_all ) {
|
211 |
+
|
212 |
+
$step_post_obj = get_post( $step['id'] );
|
213 |
+
|
214 |
+
$step_data_arr['post_content'] = $step_post_obj->post_content;
|
215 |
+
}
|
216 |
+
|
217 |
+
$new_steps[] = $step_data_arr;
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
// Add single flow.
|
222 |
+
return array(
|
223 |
+
'title' => get_the_title( $flow_id ),
|
224 |
+
'steps' => $new_steps,
|
225 |
+
);
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Get all flow export data
|
230 |
+
*
|
231 |
+
* @since 1.1.4
|
232 |
+
*/
|
233 |
+
public function get_all_flow_export_data() {
|
234 |
+
|
235 |
+
$query_args = array(
|
236 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
237 |
+
|
238 |
+
// Query performance optimization.
|
239 |
+
'fields' => 'ids',
|
240 |
+
'no_found_rows' => true,
|
241 |
+
'posts_per_page' => -1,
|
242 |
+
);
|
243 |
+
|
244 |
+
$query = new WP_Query( $query_args );
|
245 |
+
$flows = array();
|
246 |
+
if ( $query->posts ) {
|
247 |
+
foreach ( $query->posts as $key => $post_id ) {
|
248 |
+
$flows[] = $this->get_flow_export_data( $post_id );
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
return $flows;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Import our exported file
|
257 |
+
*
|
258 |
+
* @since 1.1.4
|
259 |
+
*/
|
260 |
+
public function import_json() {
|
261 |
+
if ( empty( $_POST['cartflows-action'] ) || 'import' != $_POST['cartflows-action'] ) {
|
262 |
+
return;
|
263 |
+
}
|
264 |
+
|
265 |
+
if ( ! isset( $_POST['cartflows-action-nonce'] ) || empty( $_POST['cartflows-action-nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-action-nonce'] ) ), 'cartflows-action-nonce' ) ) {
|
266 |
+
return;
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
270 |
+
return;
|
271 |
+
}
|
272 |
+
|
273 |
+
$filename = $_FILES['file']['name']; //phpcs:ignore
|
274 |
+
$file_info = explode( '.', $filename );
|
275 |
+
$extension = end( $file_info );
|
276 |
+
|
277 |
+
if ( 'json' != $extension ) {
|
278 |
+
wp_die( esc_html__( 'Please upload a valid .json file', 'cartflows' ) );
|
279 |
+
}
|
280 |
+
|
281 |
+
$file = $_FILES['file']['tmp_name']; //phpcs:ignore
|
282 |
+
|
283 |
+
if ( empty( $file ) ) {
|
284 |
+
wp_die( esc_html__( 'Please upload a file to import', 'cartflows' ) );
|
285 |
+
}
|
286 |
+
|
287 |
+
// Retrieve the settings from the file and convert the JSON object to an array.
|
288 |
+
$flows = json_decode( file_get_contents( $file ), true );//phpcs:ignore
|
289 |
+
|
290 |
+
$this->import_from_json_data( $flows );
|
291 |
+
|
292 |
+
add_action( 'admin_notices', array( $this, 'imported_successfully' ) );
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Import flow from the JSON data
|
297 |
+
*
|
298 |
+
* @since x.x.x
|
299 |
+
* @param array $flows JSON array.
|
300 |
+
* @return void
|
301 |
+
*/
|
302 |
+
public function import_from_json_data( $flows ) {
|
303 |
+
if ( $flows ) {
|
304 |
+
|
305 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
306 |
+
|
307 |
+
foreach ( $flows as $key => $flow ) {
|
308 |
+
|
309 |
+
$flow_title = $flow['title'];
|
310 |
+
if ( post_exists( $flow['title'] ) ) {
|
311 |
+
$flow_title = $flow['title'] . ' Copy';
|
312 |
+
}
|
313 |
+
|
314 |
+
// Create post object.
|
315 |
+
$new_flow_args = apply_filters(
|
316 |
+
'cartflows_flow_importer_args',
|
317 |
+
array(
|
318 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
319 |
+
'post_title' => $flow_title,
|
320 |
+
'post_status' => 'publish',
|
321 |
+
)
|
322 |
+
);
|
323 |
+
|
324 |
+
// Insert the post into the database.
|
325 |
+
$flow_id = wp_insert_post( $new_flow_args );
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Fire after flow import
|
329 |
+
*
|
330 |
+
* @since x.x.x
|
331 |
+
* @param int $flow_id Flow ID.
|
332 |
+
* @param array $new_flow_args Flow post args.
|
333 |
+
* @param array $flows Flow JSON data.
|
334 |
+
*/
|
335 |
+
do_action( 'cartflows_flow_imported', $flow_id, $new_flow_args, $flows );
|
336 |
+
|
337 |
+
if ( $flow['steps'] ) {
|
338 |
+
foreach ( $flow['steps'] as $key => $step ) {
|
339 |
+
|
340 |
+
$new_all_meta = array();
|
341 |
+
if ( is_array( $step['meta'] ) ) {
|
342 |
+
foreach ( $step['meta'] as $meta_key => $mvalue ) {
|
343 |
+
$new_all_meta[ $meta_key ] = maybe_unserialize( $mvalue[0] );
|
344 |
+
}
|
345 |
+
}
|
346 |
+
$new_step_args = apply_filters(
|
347 |
+
'cartflows_step_importer_args',
|
348 |
+
array(
|
349 |
+
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
350 |
+
'post_title' => $step['title'],
|
351 |
+
'post_status' => 'publish',
|
352 |
+
'meta_input' => $new_all_meta,
|
353 |
+
'post_content' => isset( $step['post_content'] ) ? $step['post_content'] : '',
|
354 |
+
)
|
355 |
+
);
|
356 |
+
|
357 |
+
$new_step_id = wp_insert_post( $new_step_args );
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Fire after step import
|
361 |
+
*
|
362 |
+
* @since x.x.x
|
363 |
+
* @param int $new_step_id step ID.
|
364 |
+
* @param int $flow_id flow ID.
|
365 |
+
* @param array $new_step_args Step post args.
|
366 |
+
* @param array $flow_steps Flow steps.
|
367 |
+
* @param array $flows All flows JSON data.
|
368 |
+
*/
|
369 |
+
do_action( 'cartflows_step_imported', $new_step_id, $flow_id, $new_step_args, $flow['steps'], $flows );
|
370 |
+
|
371 |
+
// Insert post meta.
|
372 |
+
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
373 |
+
|
374 |
+
$step_taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
375 |
+
$current_term = term_exists( $step['type'], $step_taxonomy );
|
376 |
+
|
377 |
+
// // Set type object.
|
378 |
+
$data = get_term( $current_term['term_id'], $step_taxonomy );
|
379 |
+
$step_slug = $data->slug;
|
380 |
+
wp_set_object_terms( $new_step_id, $data->slug, $step_taxonomy );
|
381 |
+
|
382 |
+
// Set type.
|
383 |
+
update_post_meta( $new_step_id, 'wcf-step-type', $data->slug );
|
384 |
+
|
385 |
+
// Set flow.
|
386 |
+
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
387 |
+
|
388 |
+
self::get_instance()->set_step_to_flow( $flow_id, $new_step_id, $step['title'], $step_slug );
|
389 |
+
|
390 |
+
if ( isset( $step['post_content'] ) && ! empty( $step['post_content'] ) ) {
|
391 |
+
|
392 |
+
// Download and replace images.
|
393 |
+
$content = $this->get_content( $step['post_content'] );
|
394 |
+
|
395 |
+
// Update post content.
|
396 |
+
wp_update_post(
|
397 |
+
array(
|
398 |
+
'ID' => $new_step_id,
|
399 |
+
'post_content' => $content,
|
400 |
+
)
|
401 |
+
);
|
402 |
+
}
|
403 |
+
|
404 |
+
// Elementor Data.
|
405 |
+
if ( ( 'elementor' === $default_page_builder ) && class_exists( '\Elementor\Plugin' ) ) {
|
406 |
+
// Add "elementor" in import [queue].
|
407 |
+
// @todo Remove required `allow_url_fopen` support.
|
408 |
+
if ( ini_get( 'allow_url_fopen' ) && isset( $step['meta']['_elementor_data'] ) ) {
|
409 |
+
$obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
|
410 |
+
$obj->import_single_template( $new_step_id );
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
// Beaver Builder.
|
415 |
+
if ( ( 'beaver-builder' === $default_page_builder ) && class_exists( 'FLBuilder' ) ) {
|
416 |
+
if ( isset( $step['meta']['_fl_builder_data'] ) ) {
|
417 |
+
CartFlows_Importer_Beaver_Builder::get_instance()->import_single_post( $new_step_id );
|
418 |
+
}
|
419 |
+
}
|
420 |
+
}
|
421 |
+
}
|
422 |
+
}
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Download and Replace hotlink images
|
428 |
+
*
|
429 |
+
* @since x.x.x
|
430 |
+
*
|
431 |
+
* @param string $content Mixed post content.
|
432 |
+
* @return array Hotlink image array.
|
433 |
+
*/
|
434 |
+
public function get_content( $content = '' ) {
|
435 |
+
|
436 |
+
$content = stripslashes( $content );
|
437 |
+
|
438 |
+
// Extract all links.
|
439 |
+
$all_links = wp_extract_urls( $content );
|
440 |
+
|
441 |
+
// Not have any link.
|
442 |
+
if ( empty( $all_links ) ) {
|
443 |
+
return $content;
|
444 |
+
}
|
445 |
+
|
446 |
+
$link_mapping = array();
|
447 |
+
$image_links = array();
|
448 |
+
$other_links = array();
|
449 |
+
|
450 |
+
// Extract normal and image links.
|
451 |
+
foreach ( $all_links as $key => $link ) {
|
452 |
+
if ( preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|gif|jpeg)\/?$/i', $link ) ) {
|
453 |
+
|
454 |
+
// Get all image links.
|
455 |
+
// Avoid *-150x, *-300x and *-1024x images.
|
456 |
+
if (
|
457 |
+
false === strpos( $link, '-150x' ) &&
|
458 |
+
false === strpos( $link, '-300x' ) &&
|
459 |
+
false === strpos( $link, '-1024x' )
|
460 |
+
) {
|
461 |
+
$image_links[] = $link;
|
462 |
+
}
|
463 |
+
} else {
|
464 |
+
|
465 |
+
// Collect other links.
|
466 |
+
$other_links[] = $link;
|
467 |
+
}
|
468 |
+
}
|
469 |
+
|
470 |
+
// Step 1: Download images.
|
471 |
+
if ( ! empty( $image_links ) ) {
|
472 |
+
foreach ( $image_links as $key => $image_url ) {
|
473 |
+
// Download remote image.
|
474 |
+
$image = array(
|
475 |
+
'url' => $image_url,
|
476 |
+
'id' => 0,
|
477 |
+
);
|
478 |
+
$downloaded_image = CartFlows_Import_Image::get_instance()->import( $image );
|
479 |
+
|
480 |
+
// Old and New image mapping links.
|
481 |
+
$link_mapping[ $image_url ] = $downloaded_image['url'];
|
482 |
+
}
|
483 |
+
}
|
484 |
+
|
485 |
+
// Step 3: Replace mapping links.
|
486 |
+
foreach ( $link_mapping as $old_url => $new_url ) {
|
487 |
+
$content = str_replace( $old_url, $new_url, $content );
|
488 |
+
|
489 |
+
// Replace the slashed URLs if any exist.
|
490 |
+
$old_url = str_replace( '/', '/\\', $old_url );
|
491 |
+
$new_url = str_replace( '/', '/\\', $new_url );
|
492 |
+
$content = str_replace( $old_url, $new_url, $content );
|
493 |
+
}
|
494 |
+
|
495 |
+
return $content;
|
496 |
+
}
|
497 |
+
|
498 |
+
/**
|
499 |
+
* Imported notice
|
500 |
+
*
|
501 |
+
* @since 1.1.4
|
502 |
+
*/
|
503 |
+
public function imported_successfully() {
|
504 |
+
?>
|
505 |
+
<div class="notice notice-success">
|
506 |
+
<p><?php esc_html_e( 'Successfully imported flows.', 'cartflows' ); ?></p>
|
507 |
+
</div>
|
508 |
+
<?php
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Clear Cache.
|
513 |
+
*
|
514 |
+
* @since 1.0.0
|
515 |
+
*/
|
516 |
+
public function clear_cache() {
|
517 |
+
// Clear 'Elementor' file cache.
|
518 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
519 |
+
\Elementor\Plugin::$instance->files_manager->clear_cache();
|
520 |
+
}
|
521 |
+
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* JS Templates
|
525 |
+
*
|
526 |
+
* @since 1.0.0
|
527 |
+
*
|
528 |
+
* @return void
|
529 |
+
*/
|
530 |
+
public function js_templates() {
|
531 |
+
|
532 |
+
// Loading Templates.
|
533 |
+
?>
|
534 |
+
<script type="text/template" id="tmpl-cartflows-step-loading">
|
535 |
+
<div class="template-message-block cartflows-step-loading">
|
536 |
+
<h2>
|
537 |
+
<span class="spinner"></span>
|
538 |
+
<?php esc_html_e( 'Loading Steps', 'cartflows' ); ?>
|
539 |
+
</h2>
|
540 |
+
<p class="description"><?php esc_html_e( 'Getting steps from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
|
541 |
+
</div>
|
542 |
+
</script>
|
543 |
+
|
544 |
+
<?php
|
545 |
+
// Search Templates.
|
546 |
+
?>
|
547 |
+
<script type="text/template" id="tmpl-cartflows-searching-templates">
|
548 |
+
<div class="template-message-block cartflows-searching-templates">
|
549 |
+
<h2>
|
550 |
+
<span class="spinner"></span>
|
551 |
+
<?php esc_html_e( 'Searching Template..', 'cartflows' ); ?>
|
552 |
+
</h2>
|
553 |
+
<p class="description"><?php esc_html_e( 'Getting templates from the cloud. Please wait for the moment.', 'cartflows' ); ?></p>
|
554 |
+
</div>
|
555 |
+
</script>
|
556 |
+
|
557 |
+
<?php
|
558 |
+
// CartFlows Importing Template.
|
559 |
+
?>
|
560 |
+
<script type="text/template" id="tmpl-cartflows-step-importing">
|
561 |
+
<div class="template-message-block cartflows-step-importing">
|
562 |
+
<h2><span class="spinner"></span> <?php esc_html_e( 'Importing..', 'cartflows' ); ?></h2>
|
563 |
+
</div>
|
564 |
+
</script>
|
565 |
+
|
566 |
+
<?php
|
567 |
+
// CartFlows Imported.
|
568 |
+
?>
|
569 |
+
<script type="text/template" id="tmpl-cartflows-step-imported">
|
570 |
+
<div class="template-message-block cartflows-step-imported">
|
571 |
+
<h2><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Imported', 'cartflows' ); ?></h2>
|
572 |
+
<p class="description"><?php esc_html_e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span></p></div>
|
573 |
+
</script>
|
574 |
+
|
575 |
+
<?php
|
576 |
+
// No templates.
|
577 |
+
?>
|
578 |
+
<script type="text/template" id="tmpl-cartflows-no-steps">
|
579 |
+
<div class="cartflows-no-steps">
|
580 |
+
<div class="template-message-block">
|
581 |
+
<h2><?php esc_html_e( 'Coming Soon!', 'cartflows' ); ?></h2>
|
582 |
+
<p class="description"></p>
|
583 |
+
</div>
|
584 |
+
</div>
|
585 |
+
</script>
|
586 |
+
|
587 |
+
<?php
|
588 |
+
// No templates.
|
589 |
+
?>
|
590 |
+
<script type="text/template" id="tmpl-cartflows-no-flows">
|
591 |
+
<div class="cartflows-no-flows">
|
592 |
+
<div class="template-message-block">
|
593 |
+
<h2><?php esc_html_e( 'Coming Soon!', 'cartflows' ); ?></h2>
|
594 |
+
<p class="description"></p>
|
595 |
+
</div>
|
596 |
+
</div>
|
597 |
+
</script>
|
598 |
+
|
599 |
+
<?php
|
600 |
+
// Error handling.
|
601 |
+
?>
|
602 |
+
<script type="text/template" id="tmpl-templator-error">
|
603 |
+
<div class="notice notice-error"><p>{{ data }}</p></div>
|
604 |
+
</script>
|
605 |
+
|
606 |
+
<?php
|
607 |
+
// Redirect to Elementor.
|
608 |
+
?>
|
609 |
+
<script type="text/template" id="tmpl-templator-redirect-to-elementor">
|
610 |
+
<div class="template-message-block templator-redirect-to-elementor">
|
611 |
+
<h2><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Imported', 'cartflows' ); ?></h2>
|
612 |
+
<p class="description"><?php esc_html_e( 'Thanks for patience', 'cartflows' ); ?> <span class="dashicons dashicons-smiley"></span><br/><br/><?php esc_html_e( 'Redirecting to the Elementor edit window.', 'cartflows' ); ?> </p></div>
|
613 |
+
</script>
|
614 |
+
|
615 |
+
<?php
|
616 |
+
/**
|
617 |
+
* Responsive Buttons
|
618 |
+
*/
|
619 |
+
?>
|
620 |
+
<script type="text/template" id="tmpl-cartflows-responsive-view">
|
621 |
+
<span class="responsive-view">
|
622 |
+
<span class="actions">
|
623 |
+
<a class="desktop" href="#"><span data-view="desktop " class="active dashicons dashicons-desktop"></span></a>
|
624 |
+
<a class="tablet" href="#"><span data-view="tablet" class="dashicons dashicons-tablet"></span></a>
|
625 |
+
<a class="mobile" href="#"><span data-view="mobile" class="dashicons dashicons-smartphone"></span></a>
|
626 |
+
</span>
|
627 |
+
</span>
|
628 |
+
</script>
|
629 |
+
|
630 |
+
<?php
|
631 |
+
// Templates data.
|
632 |
+
?>
|
633 |
+
<script type="text/template" id="tmpl-cartflows-flows-list">
|
634 |
+
|
635 |
+
<# console.log( data.items.length ) #>
|
636 |
+
<# console.log( data.items ) #>
|
637 |
+
<# if ( data.items.length ) { #>
|
638 |
+
<# for ( key in data.items ) { #>
|
639 |
+
<#
|
640 |
+
var flow_steps = [];
|
641 |
+
if( data.items[ key ].flow_steps ) {
|
642 |
+
flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
|
643 |
+
return value['id'];
|
644 |
+
});
|
645 |
+
}
|
646 |
+
#>
|
647 |
+
<div class="inner">
|
648 |
+
<div class="template">
|
649 |
+
<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 }}">
|
650 |
+
<div class="template-screenshot">
|
651 |
+
<# if( data.items[ key ].featured_image_url ) { #>
|
652 |
+
<img src="{{ data.items[ key ].featured_image_url }}" />
|
653 |
+
<# } else { #>
|
654 |
+
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
|
655 |
+
<# } #>
|
656 |
+
</div>
|
657 |
+
<# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
|
658 |
+
<span class="wcf-flow-type pro"><?php esc_html_e( 'Pro', 'cartflows' ); ?></span>
|
659 |
+
<# } #>
|
660 |
+
<# if( data.items[ key ].woo_required ) { #>
|
661 |
+
<div class="notice notice-info" style="width: auto;">
|
662 |
+
<p class="wcf-learn-how">
|
663 |
+
Install/Activate WooCommerce to use this template.
|
664 |
+
<a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank">
|
665 |
+
<strong><?php esc_html_e( 'Learn How', 'cartflows' ); ?></strong>
|
666 |
+
<i class="dashicons dashicons-external"></i>
|
667 |
+
</a>
|
668 |
+
</p>
|
669 |
+
</div>
|
670 |
+
<# } else { #>
|
671 |
+
<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>
|
672 |
+
<# } #>
|
673 |
+
|
674 |
+
</span>
|
675 |
+
<div class="template-id-container">
|
676 |
+
<h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
|
677 |
+
<div class="template-actions">
|
678 |
+
|
679 |
+
<#
|
680 |
+
if( data.items[ key ].page_builder.slug ) {
|
681 |
+
required_plugin_group = data.items[ key ].page_builder.slug;
|
682 |
+
} else {
|
683 |
+
required_plugin_group = '';
|
684 |
+
}
|
685 |
+
|
686 |
+
if( data.items[ key ].page_builder.slug && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug] && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug].button_title ) {
|
687 |
+
import_btn_title = CartFlowsImportVars.required_plugins[ data.items[ key ].page_builder.slug ].button_title;
|
688 |
+
} else {
|
689 |
+
import_btn_title = 'Import';
|
690 |
+
} #>
|
691 |
+
|
692 |
+
<# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
|
693 |
+
<# if( ! data.items[ key ].woo_required ) { #>
|
694 |
+
<a data-flow-steps="{{ flow_steps }}" data-required-plugin-group="{{required_plugin_group}}" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}">{{ import_btn_title }}</a>
|
695 |
+
<# } else { #>
|
696 |
+
<a href='#' class='wcf-activate-wc button-primary'>Install & activate Woo</a>
|
697 |
+
<# } #>
|
698 |
+
<# } else if( CartFlowsImportVars._is_pro_active ) { #>
|
699 |
+
<a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Activate License', 'cartflows' ); ?></a>
|
700 |
+
<# } else { #>
|
701 |
+
<a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php esc_html_e( 'Get Pro', 'cartflows' ); ?></a>
|
702 |
+
<# } #>
|
703 |
+
</div>
|
704 |
+
</div>
|
705 |
+
</div>
|
706 |
+
</div>
|
707 |
+
<# } #>
|
708 |
+
<# } #>
|
709 |
+
</script>
|
710 |
+
|
711 |
+
<?php
|
712 |
+
// Empty Step.
|
713 |
+
?>
|
714 |
+
<script type="text/template" id="tmpl-cartflows-create-blank-step">
|
715 |
+
<div class="inner">
|
716 |
+
<div class="template">
|
717 |
+
<span class="thumbnail site-preview cartflows-flow-preview">
|
718 |
+
<div class="template-screenshot">
|
719 |
+
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/start-scratch.jpg" />
|
720 |
+
</div>
|
721 |
+
<div id="wcf_create_notice" class=""><a href="https://cartflows.com/" target="_blank"></a></div>
|
722 |
+
</span>
|
723 |
+
<div class="template-id-container">
|
724 |
+
<h3 class="template-name"> Blank </h3>
|
725 |
+
<div class="template-actions">
|
726 |
+
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create', 'cartflows' ); ?></a>
|
727 |
+
</div>
|
728 |
+
</div>
|
729 |
+
</div>
|
730 |
+
</div>
|
731 |
+
</script>
|
732 |
+
|
733 |
+
<?php
|
734 |
+
// Templates data.
|
735 |
+
?>
|
736 |
+
<script type="text/template" id="tmpl-cartflows-steps-list">
|
737 |
+
<# if ( data.items.length ) { #>
|
738 |
+
<# for ( key in data.items ) { #>
|
739 |
+
<#
|
740 |
+
var flow_steps = [];
|
741 |
+
if( data.items[ key ].flow_steps ) {
|
742 |
+
flow_steps = data.items[ key ].flow_steps.map(function(value,index) {
|
743 |
+
return value['id'];
|
744 |
+
});
|
745 |
+
}
|
746 |
+
#>
|
747 |
+
<div class="inner">
|
748 |
+
<div class="template">
|
749 |
+
<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 }}">
|
750 |
+
<div class="template-screenshot">
|
751 |
+
<# if( data.items[ key ].featured_image_url ) { #>
|
752 |
+
<img src="{{ data.items[ key ].featured_image_url }}" />
|
753 |
+
<# } else { #>
|
754 |
+
<img src="<?php echo esc_attr( CARTFLOWS_URL ); ?>assets/images/400x400.jpg" />
|
755 |
+
<# } #>
|
756 |
+
</div>
|
757 |
+
<div id="wcf_create_notice" class=""><a href="https://cartflows.com/" target="_blank"></a></div>
|
758 |
+
|
759 |
+
<# if( data.items[ key ].woo_required ) { #>
|
760 |
+
<div class="notice notice-info" style="width: auto;">
|
761 |
+
<p class="wcf-learn-how">
|
762 |
+
Install/Activate WooCommerce to use this template.
|
763 |
+
<a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank">
|
764 |
+
<strong><?php esc_html_e( 'Learn How', 'cartflows' ); ?></strong>
|
765 |
+
<i class="dashicons dashicons-external"></i>
|
766 |
+
</a>
|
767 |
+
</p>
|
768 |
+
</div>
|
769 |
+
<# } else { #>
|
770 |
+
<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>
|
771 |
+
<# } #>
|
772 |
+
|
773 |
+
<# if( data.items[ key ].flow_type && 'pro' === data.items[ key ].flow_type.slug ) { #>
|
774 |
+
<span class="wcf-flow-type pro"><?php esc_html_e( 'Pro', 'cartflows' ); ?></span>
|
775 |
+
<# } #>
|
776 |
+
</span>
|
777 |
+
<div class="template-id-container">
|
778 |
+
<h3 class="template-name"> {{{ data.items[ key ].title.rendered }}} </h3>
|
779 |
+
<div class="template-actions">
|
780 |
+
|
781 |
+
<#
|
782 |
+
|
783 |
+
var step_slug = data.items[ key ].step_type.slug || '';
|
784 |
+
var step_title = data.items[ key ].step_type.name || '';
|
785 |
+
var import_btn_title = 'Import';
|
786 |
+
|
787 |
+
var required_plugin_group = '';
|
788 |
+
if( data.items[ key ].page_builder ) {
|
789 |
+
required_plugin_group = data.items[ key ].page_builder.slug;
|
790 |
+
|
791 |
+
if( data.items[ key ].page_builder.slug && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug] && CartFlowsImportVars.required_plugins[data.items[ key ].page_builder.slug].button_title ) {
|
792 |
+
import_btn_title = CartFlowsImportVars.required_plugins[ data.items[ key ].page_builder.slug ].button_title;
|
793 |
+
}
|
794 |
+
}
|
795 |
+
#>
|
796 |
+
|
797 |
+
<# if( data.items[ key ].licence_status && 'valid' === data.items[ key ].licence_status ) { #>
|
798 |
+
|
799 |
+
<# if( ! data.items[ key ].woo_required ) { #>
|
800 |
+
<a data-slug="{{step_slug}}" data-title="{{step_title}}" data-flow-steps="{{ flow_steps }}" data-required-plugin-group="{{required_plugin_group}}" href="#" class="button button-primary cartflows-step-import" data-template-id="{{ data.items[ key ].id }}">{{ import_btn_title }}</a>
|
801 |
+
<# } else { #>
|
802 |
+
<a href='#' class='wcf-activate-wc button-primary'>Install & activate Woo</a>
|
803 |
+
<# } #>
|
804 |
+
|
805 |
+
<# } else if( CartFlowsImportVars._is_pro_active ) { #>
|
806 |
+
<a target="_blank" href="<?php echo esc_url( admin_url( 'plugins.php?cartflows-license-popup' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Activate License', 'cartflows' ); ?></a>
|
807 |
+
<# } else { #>
|
808 |
+
<a target="_blank" href="<?php echo esc_url( CARTFLOWS_DOMAIN_URL ); ?>" class="button button-primary"><?php esc_html_e( 'Get Pro', 'cartflows' ); ?></a>
|
809 |
+
<# } #>
|
810 |
+
</div>
|
811 |
+
</div>
|
812 |
+
</div>
|
813 |
+
</div>
|
814 |
+
<# } #>
|
815 |
+
<# } #>
|
816 |
+
</script>
|
817 |
+
|
818 |
+
<?php
|
819 |
+
/**
|
820 |
+
* TMPL - Website Unreachable
|
821 |
+
*/
|
822 |
+
?>
|
823 |
+
<script type="text/template" id="tmpl-cartflows-website-unreachable">
|
824 |
+
<div class="postbox cartflows-website-unreachable">
|
825 |
+
<h2><?php esc_html_e( 'Under Maintenance..', 'cartflows' ); ?></h2>
|
826 |
+
<p><?php esc_html_e( 'If you are seeing this message, most likely our servers are under routine maintenance and we will be back shortly.', 'cartflows' ); ?></p>
|
827 |
+
<p><?php esc_html_e( 'In rare case, it is possible your website is having trouble connecting with ours. If you need help, please feel free to get in touch with us from our website..', 'cartflows' ); ?></p>
|
828 |
+
</div>
|
829 |
+
</script>
|
830 |
+
|
831 |
+
<?php
|
832 |
+
/**
|
833 |
+
* TMPL - Filters
|
834 |
+
*/
|
835 |
+
?>
|
836 |
+
<script type="text/template" id="tmpl-cartflows-page-builder-notice">
|
837 |
+
<?php
|
838 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
839 |
+
$page_builder = Cartflows_Helper::get_required_plugins_for_page_builder( Cartflows_Helper::get_common_setting( 'default_page_builder' ) );
|
840 |
+
$title = $page_builder['title'];
|
841 |
+
|
842 |
+
$plugin_string = '<a href="#" data-slug="' . esc_html( $default_page_builder ) . '" class="wcf-install-plugin">Please click here and activate ' . esc_html( $title ) . '</a>';
|
843 |
+
$theme_status = '';
|
844 |
+
if ( 'divi' === $default_page_builder ) {
|
845 |
+
|
846 |
+
$theme_status = $page_builder['theme-status'];
|
847 |
+
$plugin_status = $page_builder['plugin-status'];
|
848 |
+
|
849 |
+
if ( 'deactivate' === $theme_status || 'install' === $plugin_status ) {
|
850 |
+
$plugin_string = 'Please activate ' . esc_html( $title );
|
851 |
+
} elseif ( ( 'deactivate' === $theme_status || 'not-installed' === $theme_status ) && 'install' === $plugin_status ) {
|
852 |
+
$plugin_string = 'Please install and activate ' . esc_html( $title );
|
853 |
+
}
|
854 |
+
}
|
855 |
+
?>
|
856 |
+
<div class="wcf-page-builder-message">
|
857 |
+
<p><?php /* translators: %s: Plugin string */ printf( __( '%1$s to see CartFlows templates. If you prefer another page builder tool, you can <a href="%2$s" target="blank">select it here</a>.', 'cartflows' ), $plugin_string, admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS . '&action=common-settings#form-field-wcf_default_page_builder' ) ); ?></p>
|
858 |
+
<p>If your preferred page builder is not available, feel free to <a href="#" data-slug="canvas" class="wcf-create-from-scratch-link">create your own</a> pages using page builder of your choice as CartFlows works with all major page builders.</p>
|
859 |
+
<p>We plan to add design templates made with more page builder shortly!</p>
|
860 |
+
</div>
|
861 |
+
</script>
|
862 |
+
|
863 |
+
<?php
|
864 |
+
/**
|
865 |
+
* TMPL - Filters
|
866 |
+
*/
|
867 |
+
?>
|
868 |
+
<script type="text/template" id="tmpl-cartflows-term-filters-dropdown">
|
869 |
+
<# if ( data ) { #>
|
870 |
+
<select class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
871 |
+
<# if ( data.args.show_all ) { #>
|
872 |
+
<option value="all"> <?php esc_html_e( 'All', 'cartflows' ); ?> </option>
|
873 |
+
<# } #>
|
874 |
+
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
875 |
+
<option value=""> <?php esc_html_e( 'Select Step Type', 'cartflows' ); ?> </option>
|
876 |
+
<# } #>
|
877 |
+
<# var step_slug_data = []; #>
|
878 |
+
<# for ( key in data.items ) { #>
|
879 |
+
<option value='{{ data.items[ key ].id }}' 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 }}</option>
|
880 |
+
|
881 |
+
<# step_slug_data.push( data.items[ key ].slug ); #>
|
882 |
+
|
883 |
+
<# } #>
|
884 |
+
<# if( step_slug_data.indexOf("optin") === -1){ #>
|
885 |
+
<option value='0' data-group='0' class="Optin (Woo)" data-slug="optin" data-title="Optin (Woo)">Optin (Woo)</option>
|
886 |
+
<# } #>
|
887 |
+
</select>
|
888 |
+
<# } #>
|
889 |
+
</script>
|
890 |
+
|
891 |
+
<script type="text/template" id="tmpl-cartflows-term-filters">
|
892 |
+
|
893 |
+
<# if ( data ) { #>
|
894 |
+
|
895 |
+
<?php /* <# if ( CartFlowsImportVars.flow_page_builder === data.args.remote_slug || CartFlowsImportVars.step_page_builder === data.args.remote_slug ) { #> */ ?>
|
896 |
+
<ul class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
897 |
+
|
898 |
+
<# if ( data.args.show_all ) { #>
|
899 |
+
<li>
|
900 |
+
<a href="#" data-group="all"> All </a>
|
901 |
+
</li>
|
902 |
+
<# } #>
|
903 |
+
|
904 |
+
<# for ( key in data.items ) { #>
|
905 |
+
<li>
|
906 |
+
<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>
|
907 |
+
</li>
|
908 |
+
<# } #>
|
909 |
+
|
910 |
+
</ul>
|
911 |
+
|
912 |
+
<?php
|
913 |
+
|
914 |
+
/**
|
915 |
+
<# } else { #>
|
916 |
+
<select class="{{ data.args.wrapper_class }} {{ data.args.class }}">
|
917 |
+
|
918 |
+
<# if ( data.args.show_all ) { #>
|
919 |
+
<option value="all"> <?php _e( 'All', 'cartflows' ); ?> </option>
|
920 |
+
<# } #>
|
921 |
+
|
922 |
+
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
923 |
+
<option value=""> <?php _e( 'Select Step Type', 'cartflows' ); ?> </option>
|
924 |
+
<# } #>
|
925 |
+
|
926 |
+
<# for ( key in data.items ) { #>
|
927 |
+
<option value='{{ data.items[ key ].id }}' 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 }}</option>
|
928 |
+
<# } #>
|
929 |
+
|
930 |
+
</select>
|
931 |
+
*/
|
932 |
+
?>
|
933 |
+
|
934 |
+
<?php /* <# } #> */ ?>
|
935 |
+
|
936 |
+
<# } #>
|
937 |
+
</script>
|
938 |
+
|
939 |
+
<?php
|
940 |
+
// Step Type.
|
941 |
+
?>
|
942 |
+
<script type="text/template" id="tmpl-cartflows-step-types">
|
943 |
+
<ul class="wcf-tab nav-tabs">
|
944 |
+
<# if( data.items_count ) { #>
|
945 |
+
<# for( key in data.items ) { #>
|
946 |
+
<# console.log( data.items[ key ].id ) #>
|
947 |
+
<li data-slug="{{data.items[ key ].slug}}" data-title="{{ data.items[ key ].name }}">
|
948 |
+
<a href="#{{{ data.items[ key ].slug }}}">{{{ data.items[ key ].name }}}</a>
|
949 |
+
</li>
|
950 |
+
<# } #>
|
951 |
+
<# } #>
|
952 |
+
</ul>
|
953 |
+
</script>
|
954 |
+
|
955 |
+
<?php
|
956 |
+
// Add to library button.
|
957 |
+
?>
|
958 |
+
<script type="text/template" id="tmpl-templator-add-to-library">
|
959 |
+
<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>
|
960 |
+
</script>
|
961 |
+
<?php
|
962 |
+
}
|
963 |
+
|
964 |
+
/**
|
965 |
+
* Enqueue scripts
|
966 |
+
*
|
967 |
+
* @since 1.0.0
|
968 |
+
*
|
969 |
+
* @hook admin_enqueue_scripts
|
970 |
+
* @param string $hook Current page hook.
|
971 |
+
*/
|
972 |
+
public function scripts( $hook = '' ) {
|
973 |
+
|
974 |
+
if ( ! self::is_supported_post( get_current_screen()->post_type ) ) {
|
975 |
+
return;
|
976 |
+
}
|
977 |
+
|
978 |
+
wp_enqueue_script( 'cartflows-rest-api', CARTFLOWS_URL . 'assets/js/rest-api.js', array( 'jquery' ), CARTFLOWS_VER, true );
|
979 |
+
wp_enqueue_style( 'cartflows-import', CARTFLOWS_URL . 'assets/css/import.css', null, CARTFLOWS_VER, 'all' );
|
980 |
+
wp_style_add_data( 'cartflows-import', 'rtl', 'replace' );
|
981 |
+
wp_enqueue_script( 'cartflows-import', CARTFLOWS_URL . 'assets/js/import.js', array( 'jquery', 'wp-util', 'cartflows-rest-api', 'updates' ), CARTFLOWS_VER, true );
|
982 |
+
|
983 |
+
$installed_plugins = get_plugins();
|
984 |
+
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? 'yes' : 'no';
|
985 |
+
$is_wc_activated = wcf()->is_woo_active ? 'yes' : 'no';
|
986 |
+
|
987 |
+
$localize_vars = array(
|
988 |
+
'_is_pro_active' => _is_cartflows_pro(),
|
989 |
+
'is_wc_installed' => $is_wc_installed,
|
990 |
+
'is_wc_activated' => $is_wc_activated,
|
991 |
+
|
992 |
+
// Set API headers for the CartFlows API Calls only.
|
993 |
+
'headers' => array(),
|
994 |
+
|
995 |
+
// Flow and its rest fields.
|
996 |
+
'flow' => CARTFLOWS_FLOW_POST_TYPE,
|
997 |
+
'flow_fields' => array(
|
998 |
+
'id',
|
999 |
+
'title',
|
1000 |
+
'flow_type',
|
1001 |
+
'page_builder',
|
1002 |
+
'flow_steps',
|
1003 |
+
'licence_status',
|
1004 |
+
'featured_image_url',
|
1005 |
+
'featured_media', // @required for field `featured_image_url`.
|
1006 |
+
),
|
1007 |
+
|
1008 |
+
// Flow type and rest fields.
|
1009 |
+
'flow_type' => CARTFLOWS_TAXONOMY_FLOW_CATEGORY,
|
1010 |
+
'flow_type_fields' => array(
|
1011 |
+
'id',
|
1012 |
+
'name',
|
1013 |
+
'slug',
|
1014 |
+
),
|
1015 |
+
|
1016 |
+
// Flow page builder and rest fields.
|
1017 |
+
'flow_page_builder' => CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER,
|
1018 |
+
'flow_page_builder_fields' => array(
|
1019 |
+
'id',
|
1020 |
+
'name',
|
1021 |
+
'slug',
|
1022 |
+
),
|
1023 |
+
|
1024 |
+
// Step page builder and rest fields.
|
1025 |
+
'step_page_builder' => CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER,
|
1026 |
+
'step_page_builder_fields' => array(
|
1027 |
+
'id',
|
1028 |
+
'name',
|
1029 |
+
'slug',
|
1030 |
+
),
|
1031 |
+
|
1032 |
+
// Step and its rest fields.
|
1033 |
+
'step' => CARTFLOWS_STEP_POST_TYPE,
|
1034 |
+
'step_fields' => array(
|
1035 |
+
'title',
|
1036 |
+
'featured_image_url',
|
1037 |
+
'featured_media', // @required for field `featured_image_url`.
|
1038 |
+
'id',
|
1039 |
+
'flow_type',
|
1040 |
+
'step_type',
|
1041 |
+
'page_builder',
|
1042 |
+
'licence_status',
|
1043 |
+
),
|
1044 |
+
|
1045 |
+
// Step type and its rest fields.
|
1046 |
+
'step_type' => CARTFLOWS_TAXONOMY_STEP_TYPE,
|
1047 |
+
'step_type_fields' => array(
|
1048 |
+
'id',
|
1049 |
+
'name',
|
1050 |
+
'slug',
|
1051 |
+
),
|
1052 |
+
|
1053 |
+
'domain_url' => CARTFLOWS_DOMAIN_URL,
|
1054 |
+
'server_url' => CARTFLOWS_TEMPLATES_URL,
|
1055 |
+
'server_rest_url' => CARTFLOWS_TEMPLATES_URL . 'wp-json/wp/v2/',
|
1056 |
+
'site_url' => site_url(),
|
1057 |
+
'import_url' => admin_url( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE . '&page=flow_importer' ),
|
1058 |
+
'export_url' => admin_url( 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE . '&page=flow_exporter' ),
|
1059 |
+
'admin_url' => admin_url(),
|
1060 |
+
'licence_args' => CartFlows_API::get_instance()->get_licence_args(),
|
1061 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
1062 |
+
'debug' => ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || isset( $_GET['debug'] ) ) ? true : false, //phpcs:ignore
|
1063 |
+
|
1064 |
+
'required_plugins' => Cartflows_Helper::get_plugins_groupby_page_builders(),
|
1065 |
+
|
1066 |
+
'default_page_builder' => Cartflows_Helper::get_common_setting( 'default_page_builder' ),
|
1067 |
+
);
|
1068 |
+
|
1069 |
+
$localize_vars['cartflows_activate_plugin_nonce'] = wp_create_nonce( 'cartflows_activate_plugin' );
|
1070 |
+
|
1071 |
+
// Add thickbox.
|
1072 |
+
add_thickbox();
|
1073 |
+
|
1074 |
+
wp_localize_script( 'cartflows-import', 'CartFlowsImportVars', $localize_vars );
|
1075 |
+
wp_localize_script( 'cartflows-rest-api', 'CartFlowsImportVars', $localize_vars );
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
/**
|
1079 |
+
* Import.
|
1080 |
+
*
|
1081 |
+
* @since 1.0.0
|
1082 |
+
*
|
1083 |
+
* @hook wp_ajax_cartflows_import_flow_step
|
1084 |
+
* @return void
|
1085 |
+
*/
|
1086 |
+
public function import_flow() {
|
1087 |
+
|
1088 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1089 |
+
return;
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
check_ajax_referer( 'cf-import-flow-step', 'security' );
|
1093 |
+
|
1094 |
+
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1095 |
+
$template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
|
1096 |
+
|
1097 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1098 |
+
wcf()->logger->import_log( 'STARTED! Importing FLOW' );
|
1099 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1100 |
+
wcf()->logger->import_log( '(✓) Creating new step from remote step [' . $template_id . '] for FLOW ' . get_the_title( $flow_id ) . ' [' . $flow_id . ']' );
|
1101 |
+
|
1102 |
+
$response = CartFlows_API::get_instance()->get_template( $template_id );
|
1103 |
+
|
1104 |
+
$post_content = isset( $response['data']['content']->rendered ) ? $response['data']['content']->rendered : '';
|
1105 |
+
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1106 |
+
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1107 |
+
$post_content = $response['data']['divi_content'];
|
1108 |
+
}
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
if ( 'gutenberg' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1112 |
+
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1113 |
+
$post_content = $response['data']['divi_content'];
|
1114 |
+
}
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
if ( false === $response['success'] ) {
|
1118 |
+
wcf()->logger->import_log( '(✕) Failed to fetch remote data.' );
|
1119 |
+
wp_send_json_error( $response );
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
wcf()->logger->import_log( '(✓) Successfully getting remote step response ' . wp_json_encode( $response ) );
|
1123 |
+
|
1124 |
+
$new_step_id = wp_insert_post(
|
1125 |
+
array(
|
1126 |
+
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1127 |
+
'post_title' => $response['title'],
|
1128 |
+
'post_content' => $post_content,
|
1129 |
+
'post_status' => 'publish',
|
1130 |
+
)
|
1131 |
+
);
|
1132 |
+
|
1133 |
+
if ( is_wp_error( $new_step_id ) ) {
|
1134 |
+
wcf()->logger->import_log( '(✕) Failed to create new step for flow ' . $flow_id );
|
1135 |
+
wp_send_json_error( $new_step_id );
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1139 |
+
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1140 |
+
update_post_meta( $new_step_id, 'divi_content', $response['data']['divi_content'] );
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
/* Imported Step */
|
1145 |
+
update_post_meta( $new_step_id, 'cartflows_imported_step', 'yes' );
|
1146 |
+
|
1147 |
+
wcf()->logger->import_log( '(✓) Created new step ' . '"' . $response['title'] . '" id ' . $new_step_id );//phpcs:ignore
|
1148 |
+
// insert post meta.
|
1149 |
+
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
1150 |
+
wcf()->logger->import_log( '(✓) Added flow ID ' . $flow_id . ' in post meta key wcf-flow-id.' );
|
1151 |
+
|
1152 |
+
/**
|
1153 |
+
* Import & Set type.
|
1154 |
+
*/
|
1155 |
+
$term = isset( $response['data']['step_type'] ) ? $response['data']['step_type'] : '';
|
1156 |
+
|
1157 |
+
$term_slug = '';
|
1158 |
+
if ( $term ) {
|
1159 |
+
|
1160 |
+
$taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
1161 |
+
$term_exist = term_exists( $term->slug, $taxonomy );
|
1162 |
+
|
1163 |
+
if ( empty( $term_exist ) ) {
|
1164 |
+
$terms = array(
|
1165 |
+
array(
|
1166 |
+
'name' => $term->name,
|
1167 |
+
'slug' => $term->slug,
|
1168 |
+
),
|
1169 |
+
);
|
1170 |
+
|
1171 |
+
Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
|
1172 |
+
wcf()->logger->import_log( '(✓) Created new term name ' . $term->name . ' | term slug ' . $term->slug );
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
$current_term = term_exists( $term->slug, $taxonomy );
|
1176 |
+
|
1177 |
+
// Set type object.
|
1178 |
+
$data = get_term( $current_term['term_id'], $taxonomy );
|
1179 |
+
$term_slug = $data->slug;
|
1180 |
+
$term_name = $data->name;
|
1181 |
+
wp_set_object_terms( $new_step_id, $term_slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1182 |
+
wcf()->logger->import_log( '(✓) Assigned existing term ' . $term_name . ' to the template ' . $new_step_id );
|
1183 |
+
|
1184 |
+
// Set type.
|
1185 |
+
update_post_meta( $new_step_id, 'wcf-step-type', $term_slug );
|
1186 |
+
wcf()->logger->import_log( '(✓) Updated term ' . $term_name . ' to the post meta wcf-step-type.' );
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
// Set flow.
|
1190 |
+
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1191 |
+
wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
|
1192 |
+
|
1193 |
+
/**
|
1194 |
+
* Update steps for the current flow.
|
1195 |
+
*/
|
1196 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
1197 |
+
|
1198 |
+
if ( ! is_array( $flow_steps ) ) {
|
1199 |
+
$flow_steps = array();
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
$flow_steps[] = array(
|
1203 |
+
'id' => $new_step_id,
|
1204 |
+
'title' => $response['title'],
|
1205 |
+
'type' => $term_slug,
|
1206 |
+
);
|
1207 |
+
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1208 |
+
wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . wp_json_encode( $flow_steps ) );
|
1209 |
+
|
1210 |
+
// Import Post Meta.
|
1211 |
+
self::import_post_meta( $new_step_id, $response );
|
1212 |
+
|
1213 |
+
wcf()->logger->import_log( '(✓) Importing step "' . get_the_title( $new_step_id ) . '" [' . $new_step_id . '] for FLOW "' . get_the_title( $flow_id ) . '" [' . $flow_id . ']' );
|
1214 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1215 |
+
wcf()->logger->import_log( 'COMPLETE! Importing FLOW' );
|
1216 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1217 |
+
|
1218 |
+
do_action( 'cartflows_import_complete' );
|
1219 |
+
wcf()->logger->import_log( '(✓) BATCH STARTED for step ' . $new_step_id . ' for Blog name \'' . get_bloginfo( 'name' ) . '\' (' . get_current_blog_id() . ')' );
|
1220 |
+
|
1221 |
+
// Batch Process.
|
1222 |
+
do_action( 'cartflows_after_template_import', $new_step_id, $response );
|
1223 |
+
|
1224 |
+
/**
|
1225 |
+
* End
|
1226 |
+
*/
|
1227 |
+
wp_send_json_success( $new_step_id );
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
/**
|
1231 |
+
* Import Step.
|
1232 |
+
*
|
1233 |
+
* @since 1.0.0
|
1234 |
+
* @hook wp_ajax_cartflows_step_import
|
1235 |
+
*
|
1236 |
+
* @return void
|
1237 |
+
*/
|
1238 |
+
public function create_default_flow() {
|
1239 |
+
|
1240 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1241 |
+
return;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
check_ajax_referer( 'cf-default-flow', 'security' );
|
1245 |
+
|
1246 |
+
// Create post object.
|
1247 |
+
$new_flow_post = array(
|
1248 |
+
'post_content' => '',
|
1249 |
+
'post_status' => 'publish',
|
1250 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
1251 |
+
);
|
1252 |
+
|
1253 |
+
// Insert the post into the database.
|
1254 |
+
$flow_id = wp_insert_post( $new_flow_post );
|
1255 |
+
|
1256 |
+
if ( is_wp_error( $flow_id ) ) {
|
1257 |
+
wp_send_json_error( $flow_id->get_error_message() );
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
$flow_steps = array();
|
1261 |
+
|
1262 |
+
if ( wcf()->is_woo_active ) {
|
1263 |
+
$steps_data = array(
|
1264 |
+
'sales' => array(
|
1265 |
+
'title' => __( 'Sales Landing', 'cartflows' ),
|
1266 |
+
'type' => 'landing',
|
1267 |
+
),
|
1268 |
+
'order-form' => array(
|
1269 |
+
'title' => __( 'Checkout (Woo)', 'cartflows' ),
|
1270 |
+
'type' => 'checkout',
|
1271 |
+
),
|
1272 |
+
'order-confirmation' => array(
|
1273 |
+
'title' => __( 'Thank You (Woo)', 'cartflows' ),
|
1274 |
+
'type' => 'thankyou',
|
1275 |
+
),
|
1276 |
+
);
|
1277 |
+
|
1278 |
+
} else {
|
1279 |
+
$steps_data = array(
|
1280 |
+
'landing' => array(
|
1281 |
+
'title' => __( 'Landing', 'cartflows' ),
|
1282 |
+
'type' => 'landing',
|
1283 |
+
),
|
1284 |
+
'thankyou' => array(
|
1285 |
+
'title' => __( 'Thank You', 'cartflows' ),
|
1286 |
+
'type' => 'landing',
|
1287 |
+
),
|
1288 |
+
);
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
foreach ( $steps_data as $slug => $data ) {
|
1292 |
+
|
1293 |
+
$post_content = '';
|
1294 |
+
$step_type = trim( $data['type'] );
|
1295 |
+
|
1296 |
+
$step_id = wp_insert_post(
|
1297 |
+
array(
|
1298 |
+
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1299 |
+
'post_title' => $data['title'],
|
1300 |
+
'post_content' => $post_content,
|
1301 |
+
'post_status' => 'publish',
|
1302 |
+
)
|
1303 |
+
);
|
1304 |
+
|
1305 |
+
if ( is_wp_error( $step_id ) ) {
|
1306 |
+
wp_send_json_error( $step_id->get_error_message() );
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
if ( $step_id ) {
|
1310 |
+
|
1311 |
+
$flow_steps[] = array(
|
1312 |
+
'id' => $step_id,
|
1313 |
+
'title' => $data['title'],
|
1314 |
+
'type' => $step_type,
|
1315 |
+
);
|
1316 |
+
|
1317 |
+
// insert post meta.
|
1318 |
+
update_post_meta( $step_id, 'wcf-flow-id', $flow_id );
|
1319 |
+
update_post_meta( $step_id, 'wcf-step-type', $step_type );
|
1320 |
+
|
1321 |
+
wp_set_object_terms( $step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1322 |
+
wp_set_object_terms( $step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1323 |
+
|
1324 |
+
update_post_meta( $step_id, '_wp_page_template', 'cartflows-default' );
|
1325 |
+
}
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1329 |
+
|
1330 |
+
wp_send_json_success( $flow_id );
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
/**
|
1334 |
+
* Create Flow
|
1335 |
+
*
|
1336 |
+
* @return void
|
1337 |
+
*/
|
1338 |
+
public function create_flow() {
|
1339 |
+
|
1340 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1341 |
+
return;
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
check_ajax_referer( 'cf-create-flow', 'security' );
|
1345 |
+
|
1346 |
+
// Create post object.
|
1347 |
+
$new_flow_post = array(
|
1348 |
+
'post_content' => '',
|
1349 |
+
'post_status' => 'publish',
|
1350 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
1351 |
+
);
|
1352 |
+
|
1353 |
+
// Insert the post into the database.
|
1354 |
+
$flow_id = wp_insert_post( $new_flow_post );
|
1355 |
+
|
1356 |
+
if ( is_wp_error( $flow_id ) ) {
|
1357 |
+
wp_send_json_error( $flow_id->get_error_message() );
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
/* Imported Flow */
|
1361 |
+
update_post_meta( $flow_id, 'cartflows_imported_flow', 'yes' );
|
1362 |
+
|
1363 |
+
wp_send_json_success( $flow_id );
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
/**
|
1367 |
+
* Create Step
|
1368 |
+
*
|
1369 |
+
* @return void
|
1370 |
+
*/
|
1371 |
+
public function import_step() {
|
1372 |
+
|
1373 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1374 |
+
return;
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
check_ajax_referer( 'cf-step-import', 'security' );
|
1378 |
+
|
1379 |
+
$template_id = isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : '';
|
1380 |
+
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1381 |
+
$step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( wp_unslash( $_POST['step_title'] ) ) : '';
|
1382 |
+
$step_type = isset( $_POST['step_type'] ) ? sanitize_title( wp_unslash( $_POST['step_type'] ) ) : '';
|
1383 |
+
$step_custom_title = isset( $_POST['step_custom_title'] ) ? sanitize_title( wp_unslash( $_POST['step_custom_title'] ) ) : $step_title;
|
1384 |
+
|
1385 |
+
$cartflow_meta = Cartflows_Flow_Meta::get_instance();
|
1386 |
+
|
1387 |
+
$post_id = $cartflow_meta->create_step( $flow_id, $step_type, $step_custom_title );
|
1388 |
+
|
1389 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1390 |
+
wcf()->logger->import_log( 'STARTED! Importing STEP' );
|
1391 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1392 |
+
|
1393 |
+
if ( empty( $template_id ) || empty( $post_id ) ) {
|
1394 |
+
/* translators: %s: template ID */
|
1395 |
+
$data = sprintf( __( 'Invalid template id %1$s or post id %2$s.', 'cartflows' ), $template_id, $post_id );
|
1396 |
+
wcf()->logger->import_log( $data );
|
1397 |
+
wp_send_json_error( $data );
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
wcf()->logger->import_log( 'Remote Step ' . $template_id . ' for local flow "' . get_the_title( $post_id ) . '" [' . $post_id . ']' );
|
1401 |
+
|
1402 |
+
$response = CartFlows_API::get_instance()->get_template( $template_id );
|
1403 |
+
|
1404 |
+
if ( 'divi' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1405 |
+
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1406 |
+
|
1407 |
+
update_post_meta( $post_id, 'divi_content', $response['data']['divi_content'] );
|
1408 |
+
|
1409 |
+
wp_update_post(
|
1410 |
+
array(
|
1411 |
+
'ID' => $post_id,
|
1412 |
+
'post_content' => $response['data']['divi_content'],
|
1413 |
+
)
|
1414 |
+
);
|
1415 |
+
}
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
if ( 'gutenberg' === Cartflows_Helper::get_common_setting( 'default_page_builder' ) ) {
|
1419 |
+
if ( isset( $response['data']['divi_content'] ) && ! empty( $response['data']['divi_content'] ) ) {
|
1420 |
+
|
1421 |
+
wp_update_post(
|
1422 |
+
array(
|
1423 |
+
'ID' => $post_id,
|
1424 |
+
'post_content' => $response['data']['divi_content'],
|
1425 |
+
)
|
1426 |
+
);
|
1427 |
+
}
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
/* Imported Step */
|
1431 |
+
update_post_meta( $post_id, 'cartflows_imported_step', 'yes' );
|
1432 |
+
|
1433 |
+
// Import Post Meta.
|
1434 |
+
self::import_post_meta( $post_id, $response );
|
1435 |
+
|
1436 |
+
do_action( 'cartflows_import_complete' );
|
1437 |
+
|
1438 |
+
// Batch Process.
|
1439 |
+
do_action( 'cartflows_after_template_import', $post_id, $response );
|
1440 |
+
|
1441 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1442 |
+
wcf()->logger->import_log( 'COMPLETE! Importing Step' );
|
1443 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1444 |
+
|
1445 |
+
wp_send_json_success( $post_id );
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
/**
|
1449 |
+
* Import Step.
|
1450 |
+
*
|
1451 |
+
* @since 1.0.0
|
1452 |
+
* @hook wp_ajax_cartflows_step_create_blank
|
1453 |
+
*
|
1454 |
+
* @return void
|
1455 |
+
*/
|
1456 |
+
public function step_create_blank() {
|
1457 |
+
|
1458 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1459 |
+
return;
|
1460 |
+
}
|
1461 |
+
|
1462 |
+
check_ajax_referer( 'cf-step-create-blank', 'security' );
|
1463 |
+
|
1464 |
+
$flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : '';
|
1465 |
+
$step_type = isset( $_POST['step_type'] ) ? sanitize_text_field( wp_unslash( $_POST['step_type'] ) ) : '';
|
1466 |
+
$step_title = isset( $_POST['step_title'] ) ? sanitize_text_field( wp_unslash( $_POST['step_title'] ) ) : '';
|
1467 |
+
|
1468 |
+
if ( empty( $flow_id ) || empty( $step_type ) ) {
|
1469 |
+
/* translators: %s: flow ID */
|
1470 |
+
$data = sprintf( __( 'Invalid flow id %1$s OR step type %2$s.', 'cartflows' ), $flow_id, $step_type );
|
1471 |
+
wcf()->logger->import_log( $data );
|
1472 |
+
wp_send_json_error( $data );
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1476 |
+
wcf()->logger->import_log( 'STARTED! Creating Blank STEP for Flow ' . $flow_id );
|
1477 |
+
|
1478 |
+
$step_type_title = str_replace( '-', ' ', $step_type );
|
1479 |
+
$step_type_slug = strtolower( str_replace( '-', ' ', $step_type ) );
|
1480 |
+
|
1481 |
+
$new_step_id = wp_insert_post(
|
1482 |
+
array(
|
1483 |
+
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
1484 |
+
'post_title' => $step_title,
|
1485 |
+
'post_content' => '',
|
1486 |
+
'post_status' => 'publish',
|
1487 |
+
)
|
1488 |
+
);
|
1489 |
+
|
1490 |
+
// insert post meta.
|
1491 |
+
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
1492 |
+
|
1493 |
+
$taxonomy = CARTFLOWS_TAXONOMY_STEP_TYPE;
|
1494 |
+
$term_exist = term_exists( $step_type_slug, $taxonomy );
|
1495 |
+
|
1496 |
+
if ( empty( $term_exist ) ) {
|
1497 |
+
$terms = array(
|
1498 |
+
array(
|
1499 |
+
'name' => $step_type_title,
|
1500 |
+
'slug' => $step_type_slug,
|
1501 |
+
),
|
1502 |
+
);
|
1503 |
+
|
1504 |
+
Cartflows_Step_Post_Type::get_instance()->add_terms( $taxonomy, $terms );
|
1505 |
+
wcf()->logger->import_log( '(✓) Created new term name ' . $step_type_title . ' | term slug ' . $step_type_slug );
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
$current_term = term_exists( $step_type_slug, $taxonomy );
|
1509 |
+
|
1510 |
+
// Set type object.
|
1511 |
+
$data = get_term( $current_term['term_id'], $taxonomy );
|
1512 |
+
$step_slug = $data->slug;
|
1513 |
+
wp_set_object_terms( $new_step_id, $data->slug, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
1514 |
+
wcf()->logger->import_log( '(✓) Assigned existing term ' . $step_type_title . ' to the template ' . $new_step_id );
|
1515 |
+
|
1516 |
+
// Set Default page Layout.
|
1517 |
+
update_post_meta( $new_step_id, '_wp_page_template', 'cartflows-default' );
|
1518 |
+
|
1519 |
+
// Set type.
|
1520 |
+
update_post_meta( $new_step_id, 'wcf-step-type', $data->slug );
|
1521 |
+
wcf()->logger->import_log( '(✓) Updated term ' . $data->name . ' to the post meta wcf-step-type.' );
|
1522 |
+
|
1523 |
+
// Set flow.
|
1524 |
+
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
1525 |
+
wcf()->logger->import_log( '(✓) Assigned flow step flow-' . $flow_id );
|
1526 |
+
|
1527 |
+
self::get_instance()->set_step_to_flow( $flow_id, $new_step_id, $step_type_title, $step_slug );
|
1528 |
+
|
1529 |
+
wcf()->logger->import_log( 'COMPLETE! Creating Blank STEP for Flow ' . $flow_id );
|
1530 |
+
wcf()->logger->import_log( '------------------------------------' );
|
1531 |
+
|
1532 |
+
wp_send_json_success( $new_step_id );
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
/**
|
1536 |
+
* Import Post Meta
|
1537 |
+
*
|
1538 |
+
* @since 1.0.0
|
1539 |
+
*
|
1540 |
+
* @param integer $post_id Post ID.
|
1541 |
+
* @param array $response Post meta.
|
1542 |
+
* @return void
|
1543 |
+
*/
|
1544 |
+
public static function import_post_meta( $post_id, $response ) {
|
1545 |
+
|
1546 |
+
$metadata = (array) $response['post_meta'];
|
1547 |
+
|
1548 |
+
foreach ( $metadata as $meta_key => $meta_value ) {
|
1549 |
+
$meta_value = isset( $meta_value[0] ) ? $meta_value[0] : '';
|
1550 |
+
|
1551 |
+
if ( $meta_value ) {
|
1552 |
+
|
1553 |
+
if ( is_serialized( $meta_value, true ) ) {
|
1554 |
+
$raw_data = maybe_unserialize( stripslashes( $meta_value ) );
|
1555 |
+
} elseif ( is_array( $meta_value ) ) {
|
1556 |
+
$raw_data = json_decode( stripslashes( $meta_value ), true );
|
1557 |
+
} else {
|
1558 |
+
$raw_data = $meta_value;
|
1559 |
+
}
|
1560 |
+
|
1561 |
+
if ( '_elementor_data' === $meta_key ) {
|
1562 |
+
if ( is_array( $raw_data ) ) {
|
1563 |
+
$raw_data = wp_slash( wp_json_encode( $raw_data ) );
|
1564 |
+
} else {
|
1565 |
+
$raw_data = wp_slash( $raw_data );
|
1566 |
+
}
|
1567 |
+
}
|
1568 |
+
if ( '_elementor_data' !== $meta_key && '_elementor_draft' !== $meta_key && '_fl_builder_data' !== $meta_key && '_fl_builder_draft' !== $meta_key ) {
|
1569 |
+
if ( is_array( $raw_data ) ) {
|
1570 |
+
wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . wp_json_encode( $raw_data ) );
|
1571 |
+
} else {
|
1572 |
+
if ( ! is_object( $raw_data ) ) {
|
1573 |
+
wcf()->logger->import_log( '(✓) Added post meta ' . $meta_key . ' | ' . $raw_data );
|
1574 |
+
}
|
1575 |
+
}
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
update_post_meta( $post_id, $meta_key, $raw_data );
|
1579 |
+
}
|
1580 |
+
}
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
/**
|
1584 |
+
* Import Template for Elementor
|
1585 |
+
*
|
1586 |
+
* @since 1.0.0
|
1587 |
+
*
|
1588 |
+
* @param integer $post_id Post ID.
|
1589 |
+
* @param array $response Post meta.
|
1590 |
+
* @param array $page_build_data Page build data.
|
1591 |
+
* @return void
|
1592 |
+
*/
|
1593 |
+
public static function import_template_elementor( $post_id, $response, $page_build_data ) {
|
1594 |
+
if ( ! is_plugin_active( 'elementor/elementor.php' ) ) {
|
1595 |
+
$data = __( 'Elementor is not activated. Please activate plugin Elementor Page Builder to import the step.', 'cartflows' );
|
1596 |
+
wcf()->logger->import_log( $data );
|
1597 |
+
wp_send_json_error( $data );
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
require_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-importer-elementor.php';
|
1601 |
+
|
1602 |
+
wcf()->logger->import_log( '# Started "importing page builder data" for step ' . $post_id );
|
1603 |
+
|
1604 |
+
$obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
|
1605 |
+
$obj->import_single_template( $post_id );
|
1606 |
+
|
1607 |
+
wcf()->logger->import_log( '# Complete "importing page builder data" for step ' . $post_id );
|
1608 |
+
}
|
1609 |
+
|
1610 |
+
/**
|
1611 |
+
* Supported post types
|
1612 |
+
*
|
1613 |
+
* @since 1.0.0
|
1614 |
+
*
|
1615 |
+
* @return array Supported post types.
|
1616 |
+
*/
|
1617 |
+
public static function supported_post_types() {
|
1618 |
+
return apply_filters(
|
1619 |
+
'cartflows_supported_post_types',
|
1620 |
+
array(
|
1621 |
+
CARTFLOWS_FLOW_POST_TYPE,
|
1622 |
+
)
|
1623 |
+
);
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
/**
|
1627 |
+
* Check supported post type
|
1628 |
+
*
|
1629 |
+
* @since 1.0.0
|
1630 |
+
*
|
1631 |
+
* @param string $post_type Post type.
|
1632 |
+
* @return boolean Supported post type status.
|
1633 |
+
*/
|
1634 |
+
public static function is_supported_post( $post_type = '' ) {
|
1635 |
+
|
1636 |
+
if ( in_array( $post_type, self::supported_post_types(), true ) ) {
|
1637 |
+
return true;
|
1638 |
+
}
|
1639 |
+
|
1640 |
+
return false;
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
/**
|
1644 |
+
* Set steps to the flow
|
1645 |
+
*
|
1646 |
+
* @param integer $flow_id Flow ID.
|
1647 |
+
* @param integer $new_step_id New step ID.
|
1648 |
+
* @param string $step_title Flow Type.
|
1649 |
+
* @param string $step_slug Flow Type.
|
1650 |
+
*/
|
1651 |
+
public function set_step_to_flow( $flow_id, $new_step_id, $step_title, $step_slug ) {
|
1652 |
+
// Update steps for the current flow.
|
1653 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
1654 |
+
|
1655 |
+
if ( ! is_array( $flow_steps ) ) {
|
1656 |
+
$flow_steps = array();
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
$flow_steps[] = array(
|
1660 |
+
'id' => $new_step_id,
|
1661 |
+
'title' => $step_title,
|
1662 |
+
'type' => $step_slug,
|
1663 |
+
);
|
1664 |
+
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
1665 |
+
wcf()->logger->import_log( '(✓) Updated flow steps post meta key \'wcf-steps\' ' . wp_json_encode( $flow_steps ) );
|
1666 |
+
}
|
1667 |
+
|
1668 |
+
/**
|
1669 |
+
* Localize variables in admin
|
1670 |
+
*
|
1671 |
+
* @param array $vars variables.
|
1672 |
+
*/
|
1673 |
+
public function localize_vars( $vars ) {
|
1674 |
+
|
1675 |
+
$ajax_actions = array(
|
1676 |
+
'cf_step_import',
|
1677 |
+
'cf_load_steps',
|
1678 |
+
'cf_create_flow',
|
1679 |
+
'cf_default_flow',
|
1680 |
+
'cf_step_create_blank',
|
1681 |
+
'cf_import_flow_step',
|
1682 |
+
);
|
1683 |
+
|
1684 |
+
foreach ( $ajax_actions as $action ) {
|
1685 |
+
|
1686 |
+
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
return $vars;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
/**
|
1693 |
+
* Ajax action to activate plugin
|
1694 |
+
*/
|
1695 |
+
public function activate_plugin() {
|
1696 |
+
|
1697 |
+
if ( ! check_ajax_referer( 'cartflows_activate_plugin', 'security', false ) ) {
|
1698 |
+
wp_send_json_error( esc_html__( 'Action failed. Invalid Security Nonce.', 'cartflows' ) );
|
1699 |
+
}
|
1700 |
+
|
1701 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
1702 |
+
wp_send_json_error(
|
1703 |
+
array(
|
1704 |
+
'success' => false,
|
1705 |
+
'message' => __( 'User have not plugin install permissions.', 'cartflows' ),
|
1706 |
+
)
|
1707 |
+
);
|
1708 |
+
}
|
1709 |
+
|
1710 |
+
$plugin_init = isset( $_POST['plugin_init'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_init'] ) ) : '';
|
1711 |
+
|
1712 |
+
$activate = activate_plugin( $plugin_init, '', false, true );
|
1713 |
+
|
1714 |
+
if ( is_wp_error( $activate ) ) {
|
1715 |
+
wp_send_json_error(
|
1716 |
+
array(
|
1717 |
+
'success' => false,
|
1718 |
+
'message' => $activate->get_error_message(),
|
1719 |
+
'init' => $plugin_init,
|
1720 |
+
)
|
1721 |
+
);
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
wp_send_json_success(
|
1725 |
+
array(
|
1726 |
+
'success' => true,
|
1727 |
+
'message' => __( 'Plugin Successfully Activated', 'cartflows' ),
|
1728 |
+
'init' => $plugin_init,
|
1729 |
+
)
|
1730 |
+
);
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
}
|
1734 |
+
|
1735 |
+
/**
|
1736 |
+
* Initialize class object with 'get_instance()' method
|
1737 |
+
*/
|
1738 |
+
CartFlows_Importer::get_instance();
|
1739 |
+
|
1740 |
+
endif;
|
classes/class-cartflows-loader.php
CHANGED
@@ -1,612 +1,612 @@
|
|
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 options
|
40 |
-
*/
|
41 |
-
public $options = null;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Member Variable
|
45 |
-
*
|
46 |
-
* @var meta
|
47 |
-
*/
|
48 |
-
public $meta = null;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Member Variable
|
52 |
-
*
|
53 |
-
* @var Tracking_Data
|
54 |
-
*/
|
55 |
-
public $alldata;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Member Variable
|
59 |
-
*
|
60 |
-
* @var flow
|
61 |
-
*/
|
62 |
-
public $flow = null;
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Member Variable
|
66 |
-
*
|
67 |
-
* @var wcf_step_objs
|
68 |
-
*/
|
69 |
-
|
70 |
-
public $wcf_step_objs = array();
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Member Variable
|
74 |
-
*
|
75 |
-
* @var assets_vars
|
76 |
-
*/
|
77 |
-
public $assets_vars = null;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Member Variable
|
81 |
-
*
|
82 |
-
* @var assets_vars
|
83 |
-
*/
|
84 |
-
|
85 |
-
public $is_woo_active = true;
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Initiator
|
89 |
-
*/
|
90 |
-
public static function get_instance() {
|
91 |
-
|
92 |
-
if ( is_null( self::$instance ) ) {
|
93 |
-
|
94 |
-
self::$instance = new self();
|
95 |
-
|
96 |
-
/**
|
97 |
-
* CartFlows loaded.
|
98 |
-
*
|
99 |
-
* Fires when Cartflows was fully loaded and instantiated.
|
100 |
-
*
|
101 |
-
* @since 1.0.0
|
102 |
-
*/
|
103 |
-
do_action( 'cartflows_loaded' );
|
104 |
-
}
|
105 |
-
|
106 |
-
return self::$instance;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Constructor
|
111 |
-
*/
|
112 |
-
public function __construct() {
|
113 |
-
|
114 |
-
$this->define_constants();
|
115 |
-
|
116 |
-
// Activation hook.
|
117 |
-
register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
|
118 |
-
|
119 |
-
// deActivation hook.
|
120 |
-
register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
|
121 |
-
|
122 |
-
add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
|
123 |
-
add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
|
124 |
-
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Defines all constants
|
129 |
-
*
|
130 |
-
* @since 1.0.0
|
131 |
-
*/
|
132 |
-
public function define_constants() {
|
133 |
-
|
134 |
-
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
135 |
-
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
136 |
-
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
137 |
-
define( 'CARTFLOWS_VER', '1.5.
|
138 |
-
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
139 |
-
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
140 |
-
|
141 |
-
define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
|
142 |
-
define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
|
143 |
-
|
144 |
-
if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
|
145 |
-
define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
|
146 |
-
}
|
147 |
-
define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
|
148 |
-
define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
|
149 |
-
define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
|
150 |
-
define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
|
151 |
-
|
152 |
-
if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
|
153 |
-
define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
|
154 |
-
}
|
155 |
-
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
|
156 |
-
define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
|
157 |
-
}
|
158 |
-
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
|
159 |
-
define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
|
160 |
-
}
|
161 |
-
|
162 |
-
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
163 |
-
|
164 |
-
$upload_dir = wp_upload_dir( null, false );
|
165 |
-
|
166 |
-
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
167 |
-
}
|
168 |
-
|
169 |
-
$GLOBALS['wcf_step'] = null;
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Loads plugin files.
|
174 |
-
*
|
175 |
-
* @since 1.0.0
|
176 |
-
*
|
177 |
-
* @return void
|
178 |
-
*/
|
179 |
-
public function load_plugin() {
|
180 |
-
|
181 |
-
$this->load_helper_files_components();
|
182 |
-
$this->load_core_files();
|
183 |
-
$this->load_core_components();
|
184 |
-
|
185 |
-
add_action( 'wp_loaded', array( $this, 'initialize' ) );
|
186 |
-
add_action( 'cartflows_pro_init', array( $this, 'after_cartflows_pro_init' ) );
|
187 |
-
|
188 |
-
if ( ! $this->is_woo_active ) {
|
189 |
-
add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
* CartFlows Init.
|
194 |
-
*
|
195 |
-
* Fires when Cartflows is instantiated.
|
196 |
-
*
|
197 |
-
* @since 1.0.0
|
198 |
-
*/
|
199 |
-
do_action( 'cartflows_init' );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* After CartFlows Pro init.
|
204 |
-
*
|
205 |
-
* @since 1.1.19
|
206 |
-
*
|
207 |
-
* @return void
|
208 |
-
*/
|
209 |
-
public function after_cartflows_pro_init() {
|
210 |
-
|
211 |
-
if ( ! is_admin() ) {
|
212 |
-
return;
|
213 |
-
}
|
214 |
-
|
215 |
-
if ( version_compare( CARTFLOWS_PRO_VER, '1.5.8', '<' ) ) {
|
216 |
-
add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Required CartFlows Pro Notice.
|
222 |
-
*
|
223 |
-
* @since 1.1.19
|
224 |
-
*
|
225 |
-
* @return void
|
226 |
-
*/
|
227 |
-
public function required_cartflows_pro_notice() {
|
228 |
-
|
229 |
-
$required_pro_version = '1.5.8';
|
230 |
-
|
231 |
-
$class = 'notice notice-warning';
|
232 |
-
/* translators: %s: html tags */
|
233 |
-
$message = sprintf( __( 'You are using an older version of %1$sCartFlows Pro%2$s. Please update %1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher.', 'cartflows' ), '<strong>', '</strong>', $required_pro_version );
|
234 |
-
|
235 |
-
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Load Helper Files and Components.
|
240 |
-
*
|
241 |
-
* @since 1.0.0
|
242 |
-
*
|
243 |
-
* @return void
|
244 |
-
*/
|
245 |
-
public function load_helper_files_components() {
|
246 |
-
|
247 |
-
$this->is_woo_active = function_exists( 'WC' );
|
248 |
-
|
249 |
-
/* Public Utils */
|
250 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
|
251 |
-
|
252 |
-
/* Public Global Namespace Function */
|
253 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
254 |
-
|
255 |
-
/* Admin Helper */
|
256 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
257 |
-
|
258 |
-
/* Factory objects */
|
259 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-step-factory.php';
|
260 |
-
|
261 |
-
/* Meta Default Values */
|
262 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
263 |
-
|
264 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
|
265 |
-
|
266 |
-
if ( is_admin() ) {
|
267 |
-
require_once CARTFLOWS_DIR . 'classes/lib/notices/class-astra-notices.php';
|
268 |
-
}
|
269 |
-
|
270 |
-
if ( ! class_exists( 'BSF_Analytics_Loader' ) ) {
|
271 |
-
require_once CARTFLOWS_DIR . '/admin/bsf-analytics/class-bsf-analytics-loader.php';
|
272 |
-
}
|
273 |
-
|
274 |
-
$bsf_analytics = BSF_Analytics_Loader::get_instance();
|
275 |
-
|
276 |
-
$bsf_analytics->set_entity(
|
277 |
-
array(
|
278 |
-
'cf' => array(
|
279 |
-
'product_name' => 'CartFlows',
|
280 |
-
'usage_doc_link' => 'https://my.cartflows.com/usage-tracking/',
|
281 |
-
'path' => CARTFLOWS_DIR . 'admin/bsf-analytics',
|
282 |
-
'author' => 'CartFlows Inc',
|
283 |
-
),
|
284 |
-
)
|
285 |
-
);
|
286 |
-
|
287 |
-
$this->utils = Cartflows_Utils::get_instance();
|
288 |
-
$this->options = Cartflows_Default_Meta::get_instance();
|
289 |
-
$this->alldata = Cartflows_Tracking::get_instance();
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Init hooked function.
|
294 |
-
*
|
295 |
-
* @since 1.0.0
|
296 |
-
*
|
297 |
-
* @return void
|
298 |
-
*/
|
299 |
-
public function initialize() {
|
300 |
-
$this->assets_vars = $this->utils->get_assets_path();
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Load Core Files.
|
305 |
-
*
|
306 |
-
* @since 1.0.0
|
307 |
-
*
|
308 |
-
* @return void
|
309 |
-
*/
|
310 |
-
public function load_core_files() {
|
311 |
-
|
312 |
-
/* Update compatibility. */
|
313 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
|
314 |
-
|
315 |
-
/* Page builder compatibilty class */
|
316 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
|
317 |
-
|
318 |
-
/* Theme support */
|
319 |
-
if ( $this->is_woo_active ) {
|
320 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
|
321 |
-
|
322 |
-
/* Woo hooks */
|
323 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-woo-hooks.php';
|
324 |
-
}
|
325 |
-
|
326 |
-
/* Admin Meta Fields*/
|
327 |
-
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
328 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
|
329 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
|
330 |
-
|
331 |
-
if ( is_admin() ) {
|
332 |
-
/* Cloning */
|
333 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
|
334 |
-
|
335 |
-
/* Admin Settings */
|
336 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
337 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-stats.php';
|
338 |
-
}
|
339 |
-
|
340 |
-
/* Logger */
|
341 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-interface.php';
|
342 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler.php';
|
343 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-file.php';
|
344 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-levels.php';
|
345 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-logger-interface.php';
|
346 |
-
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-wc-logger.php';
|
347 |
-
|
348 |
-
/* Core Modules */
|
349 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
|
350 |
-
|
351 |
-
/* Frontend Global */
|
352 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
|
353 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
|
354 |
-
|
355 |
-
/* Modules */
|
356 |
-
include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
|
357 |
-
include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
|
358 |
-
|
359 |
-
if ( $this->is_woo_active ) {
|
360 |
-
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
361 |
-
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
362 |
-
include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
|
363 |
-
}
|
364 |
-
|
365 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
366 |
-
// Load the widgets.
|
367 |
-
include_once CARTFLOWS_DIR . 'modules/elementor/class-cartflows-el-widgets-loader.php';
|
368 |
-
}
|
369 |
-
|
370 |
-
if ( class_exists( 'FLBuilder' ) ) {
|
371 |
-
|
372 |
-
include_once CARTFLOWS_DIR . 'modules/beaver-builder/class-cartflows-bb-modules-loader.php';
|
373 |
-
}
|
374 |
-
|
375 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
376 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
|
377 |
-
|
378 |
-
include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
|
379 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
|
380 |
-
|
381 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-wizard.php';
|
382 |
-
|
383 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
|
384 |
-
|
385 |
-
include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
|
386 |
-
|
387 |
-
include_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-loader.php';
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Load Core Components.
|
392 |
-
*
|
393 |
-
* @since 1.0.0
|
394 |
-
*
|
395 |
-
* @return void
|
396 |
-
*/
|
397 |
-
public function load_core_components() {
|
398 |
-
|
399 |
-
$this->meta = Cartflows_Meta_Fields::get_instance();
|
400 |
-
$this->logger = Cartflows_Logger::get_instance();
|
401 |
-
$this->flow = Cartflows_Flow_Frontend::get_instance();
|
402 |
-
}
|
403 |
-
|
404 |
-
/**
|
405 |
-
* Create files/directories.
|
406 |
-
*/
|
407 |
-
public function create_files() {
|
408 |
-
|
409 |
-
// Install files and folders for uploading files and prevent hotlinking.
|
410 |
-
$upload_dir = wp_upload_dir();
|
411 |
-
|
412 |
-
$files = array(
|
413 |
-
array(
|
414 |
-
'base' => CARTFLOWS_LOG_DIR,
|
415 |
-
'file' => '.htaccess',
|
416 |
-
'content' => 'deny from all',
|
417 |
-
),
|
418 |
-
array(
|
419 |
-
'base' => CARTFLOWS_LOG_DIR,
|
420 |
-
'file' => 'index.html',
|
421 |
-
'content' => '',
|
422 |
-
),
|
423 |
-
);
|
424 |
-
|
425 |
-
foreach ( $files as $file ) {
|
426 |
-
if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
|
427 |
-
$file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore
|
428 |
-
if ( $file_handle ) {
|
429 |
-
fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
|
430 |
-
fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
|
431 |
-
}
|
432 |
-
}
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Load CartFlows Pro Text Domain.
|
438 |
-
* This will load the translation textdomain depending on the file priorities.
|
439 |
-
* 1. Global Languages /wp-content/languages/cartflows/ folder
|
440 |
-
* 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
|
441 |
-
*
|
442 |
-
* @since 1.0.3
|
443 |
-
* @return void
|
444 |
-
*/
|
445 |
-
public function load_cf_textdomain() {
|
446 |
-
|
447 |
-
// Default languages directory for CartFlows Pro.
|
448 |
-
$lang_dir = CARTFLOWS_DIR . 'languages/';
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Filters the languages directory path to use for CartFlows Pro.
|
452 |
-
*
|
453 |
-
* @param string $lang_dir The languages directory path.
|
454 |
-
*/
|
455 |
-
$lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
|
456 |
-
|
457 |
-
// Traditional WordPress plugin locale filter.
|
458 |
-
global $wp_version;
|
459 |
-
|
460 |
-
$get_locale = get_locale();
|
461 |
-
|
462 |
-
if ( $wp_version >= 4.7 ) {
|
463 |
-
$get_locale = get_user_locale();
|
464 |
-
}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* Language Locale for CartFlows Pro
|
468 |
-
*
|
469 |
-
* @var $get_locale The locale to use.
|
470 |
-
* Uses get_user_locale()` in WordPress 4.7 or greater,
|
471 |
-
* otherwise uses `get_locale()`.
|
472 |
-
*/
|
473 |
-
$locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
|
474 |
-
$mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
|
475 |
-
|
476 |
-
// Setup paths to current locale file.
|
477 |
-
$mofile_local = $lang_dir . $mofile;
|
478 |
-
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
|
479 |
-
|
480 |
-
if ( file_exists( $mofile_global ) ) {
|
481 |
-
// Look in global /wp-content/languages/cartflows/ folder.
|
482 |
-
load_textdomain( 'cartflows', $mofile_global );
|
483 |
-
} elseif ( file_exists( $mofile_local ) ) {
|
484 |
-
// Look in local /wp-content/plugins/cartflows/languages/ folder.
|
485 |
-
load_textdomain( 'cartflows', $mofile_local );
|
486 |
-
} else {
|
487 |
-
// Load the default language files.
|
488 |
-
load_plugin_textdomain( 'cartflows', false, $lang_dir );
|
489 |
-
}
|
490 |
-
}
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Fires admin notice when Elementor is not installed and activated.
|
494 |
-
*
|
495 |
-
* @since 1.0.0
|
496 |
-
*
|
497 |
-
* @return void
|
498 |
-
*/
|
499 |
-
public function fails_to_load() {
|
500 |
-
|
501 |
-
$screen = get_current_screen();
|
502 |
-
|
503 |
-
if ( ! wcf()->utils->is_step_post_type() ) {
|
504 |
-
return;
|
505 |
-
}
|
506 |
-
|
507 |
-
if ( ! wcf()->utils->check_is_woo_required_page() ) {
|
508 |
-
return;
|
509 |
-
}
|
510 |
-
|
511 |
-
$skip_notice = false;
|
512 |
-
|
513 |
-
wp_localize_script( 'wcf-global-admin', 'cartflows_woo', array( 'show_update_post' => $skip_notice ) );
|
514 |
-
|
515 |
-
$class = 'notice notice-warning';
|
516 |
-
/* translators: %s: html tags */
|
517 |
-
$message = sprintf( __( 'This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
|
518 |
-
|
519 |
-
$plugin = 'woocommerce/woocommerce.php';
|
520 |
-
|
521 |
-
if ( _is_woo_installed() ) {
|
522 |
-
if ( ! current_user_can( 'activate_plugins' ) ) {
|
523 |
-
return;
|
524 |
-
}
|
525 |
-
|
526 |
-
$action_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
527 |
-
$button_label = __( 'Activate WooCommerce', 'cartflows' );
|
528 |
-
|
529 |
-
} else {
|
530 |
-
if ( ! current_user_can( 'install_plugins' ) ) {
|
531 |
-
return;
|
532 |
-
}
|
533 |
-
|
534 |
-
$action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
|
535 |
-
$button_label = __( 'Install WooCommerce', 'cartflows' );
|
536 |
-
}
|
537 |
-
|
538 |
-
$button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
|
539 |
-
|
540 |
-
printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
|
541 |
-
}
|
542 |
-
|
543 |
-
/**
|
544 |
-
* Activation Reset
|
545 |
-
*/
|
546 |
-
public function activation_reset() {
|
547 |
-
|
548 |
-
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
549 |
-
|
550 |
-
$upload_dir = wp_upload_dir( null, false );
|
551 |
-
|
552 |
-
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
553 |
-
}
|
554 |
-
|
555 |
-
$this->create_files();
|
556 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
557 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
558 |
-
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
|
559 |
-
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
|
560 |
-
|
561 |
-
Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
|
562 |
-
Cartflows_Step_Post_Type::get_instance()->step_post_type();
|
563 |
-
flush_rewrite_rules();
|
564 |
-
}
|
565 |
-
|
566 |
-
/**
|
567 |
-
* Deactivation Reset
|
568 |
-
*/
|
569 |
-
public function deactivation_reset() {
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* Logger Class Instance
|
574 |
-
*/
|
575 |
-
public function logger() {
|
576 |
-
return Cartflows_Logger::get_instance();
|
577 |
-
}
|
578 |
-
}
|
579 |
-
|
580 |
-
/**
|
581 |
-
* Prepare if class 'Cartflows_Loader' exist.
|
582 |
-
* Kicking this off by calling 'get_instance()' method
|
583 |
-
*/
|
584 |
-
Cartflows_Loader::get_instance();
|
585 |
-
}
|
586 |
-
|
587 |
-
/**
|
588 |
-
* Get global class.
|
589 |
-
*
|
590 |
-
* @return object
|
591 |
-
*/
|
592 |
-
function wcf() {
|
593 |
-
return Cartflows_Loader::get_instance();
|
594 |
-
}
|
595 |
-
|
596 |
-
if ( ! function_exists( '_is_woo_installed' ) ) {
|
597 |
-
|
598 |
-
/**
|
599 |
-
* Is woocommerce plugin installed.
|
600 |
-
*
|
601 |
-
* @since 1.0.0
|
602 |
-
*
|
603 |
-
* @access public
|
604 |
-
*/
|
605 |
-
function _is_woo_installed() {
|
606 |
-
|
607 |
-
$path = 'woocommerce/woocommerce.php';
|
608 |
-
$plugins = get_plugins();
|
609 |
-
|
610 |
-
return isset( $plugins[ $path ] );
|
611 |
-
}
|
612 |
-
}
|
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 options
|
40 |
+
*/
|
41 |
+
public $options = null;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Member Variable
|
45 |
+
*
|
46 |
+
* @var meta
|
47 |
+
*/
|
48 |
+
public $meta = null;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Member Variable
|
52 |
+
*
|
53 |
+
* @var Tracking_Data
|
54 |
+
*/
|
55 |
+
public $alldata;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Member Variable
|
59 |
+
*
|
60 |
+
* @var flow
|
61 |
+
*/
|
62 |
+
public $flow = null;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Member Variable
|
66 |
+
*
|
67 |
+
* @var wcf_step_objs
|
68 |
+
*/
|
69 |
+
|
70 |
+
public $wcf_step_objs = array();
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Member Variable
|
74 |
+
*
|
75 |
+
* @var assets_vars
|
76 |
+
*/
|
77 |
+
public $assets_vars = null;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Member Variable
|
81 |
+
*
|
82 |
+
* @var assets_vars
|
83 |
+
*/
|
84 |
+
|
85 |
+
public $is_woo_active = true;
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Initiator
|
89 |
+
*/
|
90 |
+
public static function get_instance() {
|
91 |
+
|
92 |
+
if ( is_null( self::$instance ) ) {
|
93 |
+
|
94 |
+
self::$instance = new self();
|
95 |
+
|
96 |
+
/**
|
97 |
+
* CartFlows loaded.
|
98 |
+
*
|
99 |
+
* Fires when Cartflows was fully loaded and instantiated.
|
100 |
+
*
|
101 |
+
* @since 1.0.0
|
102 |
+
*/
|
103 |
+
do_action( 'cartflows_loaded' );
|
104 |
+
}
|
105 |
+
|
106 |
+
return self::$instance;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Constructor
|
111 |
+
*/
|
112 |
+
public function __construct() {
|
113 |
+
|
114 |
+
$this->define_constants();
|
115 |
+
|
116 |
+
// Activation hook.
|
117 |
+
register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
|
118 |
+
|
119 |
+
// deActivation hook.
|
120 |
+
register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
|
121 |
+
|
122 |
+
add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
|
123 |
+
add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Defines all constants
|
129 |
+
*
|
130 |
+
* @since 1.0.0
|
131 |
+
*/
|
132 |
+
public function define_constants() {
|
133 |
+
|
134 |
+
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
135 |
+
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
136 |
+
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
137 |
+
define( 'CARTFLOWS_VER', '1.5.21' );
|
138 |
+
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
139 |
+
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
140 |
+
|
141 |
+
define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
|
142 |
+
define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
|
143 |
+
|
144 |
+
if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
|
145 |
+
define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
|
146 |
+
}
|
147 |
+
define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
|
148 |
+
define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
|
149 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
|
150 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
|
151 |
+
|
152 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
|
153 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
|
154 |
+
}
|
155 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
|
156 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
|
157 |
+
}
|
158 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
|
159 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
|
160 |
+
}
|
161 |
+
|
162 |
+
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
163 |
+
|
164 |
+
$upload_dir = wp_upload_dir( null, false );
|
165 |
+
|
166 |
+
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
167 |
+
}
|
168 |
+
|
169 |
+
$GLOBALS['wcf_step'] = null;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Loads plugin files.
|
174 |
+
*
|
175 |
+
* @since 1.0.0
|
176 |
+
*
|
177 |
+
* @return void
|
178 |
+
*/
|
179 |
+
public function load_plugin() {
|
180 |
+
|
181 |
+
$this->load_helper_files_components();
|
182 |
+
$this->load_core_files();
|
183 |
+
$this->load_core_components();
|
184 |
+
|
185 |
+
add_action( 'wp_loaded', array( $this, 'initialize' ) );
|
186 |
+
add_action( 'cartflows_pro_init', array( $this, 'after_cartflows_pro_init' ) );
|
187 |
+
|
188 |
+
if ( ! $this->is_woo_active ) {
|
189 |
+
add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* CartFlows Init.
|
194 |
+
*
|
195 |
+
* Fires when Cartflows is instantiated.
|
196 |
+
*
|
197 |
+
* @since 1.0.0
|
198 |
+
*/
|
199 |
+
do_action( 'cartflows_init' );
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* After CartFlows Pro init.
|
204 |
+
*
|
205 |
+
* @since 1.1.19
|
206 |
+
*
|
207 |
+
* @return void
|
208 |
+
*/
|
209 |
+
public function after_cartflows_pro_init() {
|
210 |
+
|
211 |
+
if ( ! is_admin() ) {
|
212 |
+
return;
|
213 |
+
}
|
214 |
+
|
215 |
+
if ( version_compare( CARTFLOWS_PRO_VER, '1.5.8', '<' ) ) {
|
216 |
+
add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Required CartFlows Pro Notice.
|
222 |
+
*
|
223 |
+
* @since 1.1.19
|
224 |
+
*
|
225 |
+
* @return void
|
226 |
+
*/
|
227 |
+
public function required_cartflows_pro_notice() {
|
228 |
+
|
229 |
+
$required_pro_version = '1.5.8';
|
230 |
+
|
231 |
+
$class = 'notice notice-warning';
|
232 |
+
/* translators: %s: html tags */
|
233 |
+
$message = sprintf( __( 'You are using an older version of %1$sCartFlows Pro%2$s. Please update %1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher.', 'cartflows' ), '<strong>', '</strong>', $required_pro_version );
|
234 |
+
|
235 |
+
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Load Helper Files and Components.
|
240 |
+
*
|
241 |
+
* @since 1.0.0
|
242 |
+
*
|
243 |
+
* @return void
|
244 |
+
*/
|
245 |
+
public function load_helper_files_components() {
|
246 |
+
|
247 |
+
$this->is_woo_active = function_exists( 'WC' );
|
248 |
+
|
249 |
+
/* Public Utils */
|
250 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
|
251 |
+
|
252 |
+
/* Public Global Namespace Function */
|
253 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
254 |
+
|
255 |
+
/* Admin Helper */
|
256 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
257 |
+
|
258 |
+
/* Factory objects */
|
259 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-step-factory.php';
|
260 |
+
|
261 |
+
/* Meta Default Values */
|
262 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
263 |
+
|
264 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
|
265 |
+
|
266 |
+
if ( is_admin() ) {
|
267 |
+
require_once CARTFLOWS_DIR . 'classes/lib/notices/class-astra-notices.php';
|
268 |
+
}
|
269 |
+
|
270 |
+
if ( ! class_exists( 'BSF_Analytics_Loader' ) ) {
|
271 |
+
require_once CARTFLOWS_DIR . '/admin/bsf-analytics/class-bsf-analytics-loader.php';
|
272 |
+
}
|
273 |
+
|
274 |
+
$bsf_analytics = BSF_Analytics_Loader::get_instance();
|
275 |
+
|
276 |
+
$bsf_analytics->set_entity(
|
277 |
+
array(
|
278 |
+
'cf' => array(
|
279 |
+
'product_name' => 'CartFlows',
|
280 |
+
'usage_doc_link' => 'https://my.cartflows.com/usage-tracking/',
|
281 |
+
'path' => CARTFLOWS_DIR . 'admin/bsf-analytics',
|
282 |
+
'author' => 'CartFlows Inc',
|
283 |
+
),
|
284 |
+
)
|
285 |
+
);
|
286 |
+
|
287 |
+
$this->utils = Cartflows_Utils::get_instance();
|
288 |
+
$this->options = Cartflows_Default_Meta::get_instance();
|
289 |
+
$this->alldata = Cartflows_Tracking::get_instance();
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Init hooked function.
|
294 |
+
*
|
295 |
+
* @since 1.0.0
|
296 |
+
*
|
297 |
+
* @return void
|
298 |
+
*/
|
299 |
+
public function initialize() {
|
300 |
+
$this->assets_vars = $this->utils->get_assets_path();
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Load Core Files.
|
305 |
+
*
|
306 |
+
* @since 1.0.0
|
307 |
+
*
|
308 |
+
* @return void
|
309 |
+
*/
|
310 |
+
public function load_core_files() {
|
311 |
+
|
312 |
+
/* Update compatibility. */
|
313 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
|
314 |
+
|
315 |
+
/* Page builder compatibilty class */
|
316 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
|
317 |
+
|
318 |
+
/* Theme support */
|
319 |
+
if ( $this->is_woo_active ) {
|
320 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
|
321 |
+
|
322 |
+
/* Woo hooks */
|
323 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-woo-hooks.php';
|
324 |
+
}
|
325 |
+
|
326 |
+
/* Admin Meta Fields*/
|
327 |
+
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
328 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
|
329 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
|
330 |
+
|
331 |
+
if ( is_admin() ) {
|
332 |
+
/* Cloning */
|
333 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
|
334 |
+
|
335 |
+
/* Admin Settings */
|
336 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
337 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-stats.php';
|
338 |
+
}
|
339 |
+
|
340 |
+
/* Logger */
|
341 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-interface.php';
|
342 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler.php';
|
343 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-file.php';
|
344 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-levels.php';
|
345 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-logger-interface.php';
|
346 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-wc-logger.php';
|
347 |
+
|
348 |
+
/* Core Modules */
|
349 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
|
350 |
+
|
351 |
+
/* Frontend Global */
|
352 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
|
353 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
|
354 |
+
|
355 |
+
/* Modules */
|
356 |
+
include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
|
357 |
+
include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
|
358 |
+
|
359 |
+
if ( $this->is_woo_active ) {
|
360 |
+
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
361 |
+
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
362 |
+
include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
|
363 |
+
}
|
364 |
+
|
365 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
366 |
+
// Load the widgets.
|
367 |
+
include_once CARTFLOWS_DIR . 'modules/elementor/class-cartflows-el-widgets-loader.php';
|
368 |
+
}
|
369 |
+
|
370 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
371 |
+
|
372 |
+
include_once CARTFLOWS_DIR . 'modules/beaver-builder/class-cartflows-bb-modules-loader.php';
|
373 |
+
}
|
374 |
+
|
375 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
376 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
|
377 |
+
|
378 |
+
include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
|
379 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
|
380 |
+
|
381 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-wizard.php';
|
382 |
+
|
383 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
|
384 |
+
|
385 |
+
include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
|
386 |
+
|
387 |
+
include_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-loader.php';
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Load Core Components.
|
392 |
+
*
|
393 |
+
* @since 1.0.0
|
394 |
+
*
|
395 |
+
* @return void
|
396 |
+
*/
|
397 |
+
public function load_core_components() {
|
398 |
+
|
399 |
+
$this->meta = Cartflows_Meta_Fields::get_instance();
|
400 |
+
$this->logger = Cartflows_Logger::get_instance();
|
401 |
+
$this->flow = Cartflows_Flow_Frontend::get_instance();
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Create files/directories.
|
406 |
+
*/
|
407 |
+
public function create_files() {
|
408 |
+
|
409 |
+
// Install files and folders for uploading files and prevent hotlinking.
|
410 |
+
$upload_dir = wp_upload_dir();
|
411 |
+
|
412 |
+
$files = array(
|
413 |
+
array(
|
414 |
+
'base' => CARTFLOWS_LOG_DIR,
|
415 |
+
'file' => '.htaccess',
|
416 |
+
'content' => 'deny from all',
|
417 |
+
),
|
418 |
+
array(
|
419 |
+
'base' => CARTFLOWS_LOG_DIR,
|
420 |
+
'file' => 'index.html',
|
421 |
+
'content' => '',
|
422 |
+
),
|
423 |
+
);
|
424 |
+
|
425 |
+
foreach ( $files as $file ) {
|
426 |
+
if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
|
427 |
+
$file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore
|
428 |
+
if ( $file_handle ) {
|
429 |
+
fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
|
430 |
+
fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
|
431 |
+
}
|
432 |
+
}
|
433 |
+
}
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Load CartFlows Pro Text Domain.
|
438 |
+
* This will load the translation textdomain depending on the file priorities.
|
439 |
+
* 1. Global Languages /wp-content/languages/cartflows/ folder
|
440 |
+
* 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
|
441 |
+
*
|
442 |
+
* @since 1.0.3
|
443 |
+
* @return void
|
444 |
+
*/
|
445 |
+
public function load_cf_textdomain() {
|
446 |
+
|
447 |
+
// Default languages directory for CartFlows Pro.
|
448 |
+
$lang_dir = CARTFLOWS_DIR . 'languages/';
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Filters the languages directory path to use for CartFlows Pro.
|
452 |
+
*
|
453 |
+
* @param string $lang_dir The languages directory path.
|
454 |
+
*/
|
455 |
+
$lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
|
456 |
+
|
457 |
+
// Traditional WordPress plugin locale filter.
|
458 |
+
global $wp_version;
|
459 |
+
|
460 |
+
$get_locale = get_locale();
|
461 |
+
|
462 |
+
if ( $wp_version >= 4.7 ) {
|
463 |
+
$get_locale = get_user_locale();
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Language Locale for CartFlows Pro
|
468 |
+
*
|
469 |
+
* @var $get_locale The locale to use.
|
470 |
+
* Uses get_user_locale()` in WordPress 4.7 or greater,
|
471 |
+
* otherwise uses `get_locale()`.
|
472 |
+
*/
|
473 |
+
$locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
|
474 |
+
$mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
|
475 |
+
|
476 |
+
// Setup paths to current locale file.
|
477 |
+
$mofile_local = $lang_dir . $mofile;
|
478 |
+
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
|
479 |
+
|
480 |
+
if ( file_exists( $mofile_global ) ) {
|
481 |
+
// Look in global /wp-content/languages/cartflows/ folder.
|
482 |
+
load_textdomain( 'cartflows', $mofile_global );
|
483 |
+
} elseif ( file_exists( $mofile_local ) ) {
|
484 |
+
// Look in local /wp-content/plugins/cartflows/languages/ folder.
|
485 |
+
load_textdomain( 'cartflows', $mofile_local );
|
486 |
+
} else {
|
487 |
+
// Load the default language files.
|
488 |
+
load_plugin_textdomain( 'cartflows', false, $lang_dir );
|
489 |
+
}
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Fires admin notice when Elementor is not installed and activated.
|
494 |
+
*
|
495 |
+
* @since 1.0.0
|
496 |
+
*
|
497 |
+
* @return void
|
498 |
+
*/
|
499 |
+
public function fails_to_load() {
|
500 |
+
|
501 |
+
$screen = get_current_screen();
|
502 |
+
|
503 |
+
if ( ! wcf()->utils->is_step_post_type() ) {
|
504 |
+
return;
|
505 |
+
}
|
506 |
+
|
507 |
+
if ( ! wcf()->utils->check_is_woo_required_page() ) {
|
508 |
+
return;
|
509 |
+
}
|
510 |
+
|
511 |
+
$skip_notice = false;
|
512 |
+
|
513 |
+
wp_localize_script( 'wcf-global-admin', 'cartflows_woo', array( 'show_update_post' => $skip_notice ) );
|
514 |
+
|
515 |
+
$class = 'notice notice-warning';
|
516 |
+
/* translators: %s: html tags */
|
517 |
+
$message = sprintf( __( 'This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
|
518 |
+
|
519 |
+
$plugin = 'woocommerce/woocommerce.php';
|
520 |
+
|
521 |
+
if ( _is_woo_installed() ) {
|
522 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
523 |
+
return;
|
524 |
+
}
|
525 |
+
|
526 |
+
$action_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
527 |
+
$button_label = __( 'Activate WooCommerce', 'cartflows' );
|
528 |
+
|
529 |
+
} else {
|
530 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
531 |
+
return;
|
532 |
+
}
|
533 |
+
|
534 |
+
$action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
|
535 |
+
$button_label = __( 'Install WooCommerce', 'cartflows' );
|
536 |
+
}
|
537 |
+
|
538 |
+
$button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
|
539 |
+
|
540 |
+
printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Activation Reset
|
545 |
+
*/
|
546 |
+
public function activation_reset() {
|
547 |
+
|
548 |
+
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
549 |
+
|
550 |
+
$upload_dir = wp_upload_dir( null, false );
|
551 |
+
|
552 |
+
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
553 |
+
}
|
554 |
+
|
555 |
+
$this->create_files();
|
556 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
557 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
558 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
|
559 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
|
560 |
+
|
561 |
+
Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
|
562 |
+
Cartflows_Step_Post_Type::get_instance()->step_post_type();
|
563 |
+
flush_rewrite_rules();
|
564 |
+
}
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Deactivation Reset
|
568 |
+
*/
|
569 |
+
public function deactivation_reset() {
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Logger Class Instance
|
574 |
+
*/
|
575 |
+
public function logger() {
|
576 |
+
return Cartflows_Logger::get_instance();
|
577 |
+
}
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Prepare if class 'Cartflows_Loader' exist.
|
582 |
+
* Kicking this off by calling 'get_instance()' method
|
583 |
+
*/
|
584 |
+
Cartflows_Loader::get_instance();
|
585 |
+
}
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Get global class.
|
589 |
+
*
|
590 |
+
* @return object
|
591 |
+
*/
|
592 |
+
function wcf() {
|
593 |
+
return Cartflows_Loader::get_instance();
|
594 |
+
}
|
595 |
+
|
596 |
+
if ( ! function_exists( '_is_woo_installed' ) ) {
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Is woocommerce plugin installed.
|
600 |
+
*
|
601 |
+
* @since 1.0.0
|
602 |
+
*
|
603 |
+
* @access public
|
604 |
+
*/
|
605 |
+
function _is_woo_installed() {
|
606 |
+
|
607 |
+
$path = 'woocommerce/woocommerce.php';
|
608 |
+
$plugins = get_plugins();
|
609 |
+
|
610 |
+
return isset( $plugins[ $path ] );
|
611 |
+
}
|
612 |
+
}
|
classes/class-cartflows-utils.php
CHANGED
@@ -1,606 +1,606 @@
|
|
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 |
-
* Member Variable
|
26 |
-
*
|
27 |
-
* @var checkout_products
|
28 |
-
*/
|
29 |
-
public $checkout_products = array();
|
30 |
-
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Initiator
|
34 |
-
*/
|
35 |
-
public static function get_instance() {
|
36 |
-
if ( ! isset( self::$instance ) ) {
|
37 |
-
self::$instance = new self();
|
38 |
-
}
|
39 |
-
return self::$instance;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Constructor
|
44 |
-
*/
|
45 |
-
public function __construct() {
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Get current post type
|
50 |
-
*
|
51 |
-
* @param string $post_type post type.
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public function current_post_type( $post_type = '' ) {
|
55 |
-
|
56 |
-
if ( '' === $post_type ) {
|
57 |
-
$post_type = get_post_type();
|
58 |
-
}
|
59 |
-
|
60 |
-
return $post_type;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Check if post type is of step.
|
65 |
-
*
|
66 |
-
* @param string $post_type post type.
|
67 |
-
* @return bool
|
68 |
-
*/
|
69 |
-
public function is_step_post_type( $post_type = '' ) {
|
70 |
-
|
71 |
-
if ( $this->get_step_post_type() === $this->current_post_type( $post_type ) ) {
|
72 |
-
|
73 |
-
return true;
|
74 |
-
}
|
75 |
-
|
76 |
-
return false;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Check if post type is of flow.
|
81 |
-
*
|
82 |
-
* @param string $post_type post type.
|
83 |
-
* @return bool
|
84 |
-
*/
|
85 |
-
public function is_flow_post_type( $post_type = '' ) {
|
86 |
-
|
87 |
-
if ( $this->get_flow_post_type() === $this->current_post_type( $post_type ) ) {
|
88 |
-
|
89 |
-
return true;
|
90 |
-
}
|
91 |
-
|
92 |
-
return false;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get post type of step.
|
97 |
-
*
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function get_step_post_type() {
|
101 |
-
|
102 |
-
return CARTFLOWS_STEP_POST_TYPE;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get post type of flow.
|
107 |
-
*
|
108 |
-
* @return string
|
109 |
-
*/
|
110 |
-
public function get_flow_post_type() {
|
111 |
-
|
112 |
-
return CARTFLOWS_FLOW_POST_TYPE;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Get flow id
|
117 |
-
*
|
118 |
-
* @return int
|
119 |
-
*/
|
120 |
-
public function get_flow_id() {
|
121 |
-
|
122 |
-
global $post;
|
123 |
-
|
124 |
-
$post_meta = false;
|
125 |
-
|
126 |
-
if ( $post ) {
|
127 |
-
$post_meta = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
128 |
-
}
|
129 |
-
|
130 |
-
return $post_meta;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Get flow id by step
|
135 |
-
*
|
136 |
-
* @param int $step_id step ID.
|
137 |
-
* @return int
|
138 |
-
*/
|
139 |
-
public function get_flow_id_from_step_id( $step_id ) {
|
140 |
-
|
141 |
-
return get_post_meta( $step_id, 'wcf-flow-id', true );
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Get flow steps by id
|
146 |
-
*
|
147 |
-
* @param int $flow_id flow ID.
|
148 |
-
* @return int
|
149 |
-
*/
|
150 |
-
public function get_flow_steps( $flow_id ) {
|
151 |
-
|
152 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
153 |
-
|
154 |
-
if ( is_array( $steps ) && ! empty( $steps ) ) {
|
155 |
-
return $steps;
|
156 |
-
}
|
157 |
-
|
158 |
-
return false;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Get template type of step
|
163 |
-
*
|
164 |
-
* @param int $step_id step ID.
|
165 |
-
* @return int
|
166 |
-
*/
|
167 |
-
public function get_step_type( $step_id ) {
|
168 |
-
|
169 |
-
return get_post_meta( $step_id, 'wcf-step-type', true );
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Get next id for step
|
174 |
-
*
|
175 |
-
* @param int $flow_id flow ID.
|
176 |
-
* @param int $step_id step ID.
|
177 |
-
* @return bool
|
178 |
-
*/
|
179 |
-
public function get_next_step_id( $flow_id, $step_id ) {
|
180 |
-
|
181 |
-
$wcf_step_obj = wcf_get_step( $step_id );
|
182 |
-
$next_step_id = $wcf_step_obj->get_direct_next_step_id();
|
183 |
-
|
184 |
-
return $next_step_id;
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Get next id for step
|
189 |
-
*
|
190 |
-
* @param int $order_id order ID.
|
191 |
-
* @return int
|
192 |
-
*/
|
193 |
-
public function get_flow_id_from_order( $order_id ) {
|
194 |
-
|
195 |
-
$flow_id = get_post_meta( $order_id, '_wcf_flow_id', true );
|
196 |
-
|
197 |
-
return intval( $flow_id );
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Get checkout id for order
|
202 |
-
*
|
203 |
-
* @param int $order_id order ID.
|
204 |
-
* @return int
|
205 |
-
*/
|
206 |
-
public function get_checkout_id_from_order( $order_id ) {
|
207 |
-
|
208 |
-
$checkout_id = get_post_meta( $order_id, '_wcf_checkout_id', true );
|
209 |
-
|
210 |
-
return intval( $checkout_id );
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* We are using this function mostly in ajax on checkout page
|
215 |
-
*
|
216 |
-
* @return bool
|
217 |
-
*/
|
218 |
-
public function get_checkout_id_from_post_data() {
|
219 |
-
|
220 |
-
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
221 |
-
|
222 |
-
$checkout_id = filter_var( wp_unslash( $_POST['_wcf_checkout_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
223 |
-
|
224 |
-
return intval( $checkout_id );
|
225 |
-
}
|
226 |
-
|
227 |
-
return false;
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* We are using this function mostly in ajax on checkout page
|
232 |
-
*
|
233 |
-
* @return bool
|
234 |
-
*/
|
235 |
-
public function get_flow_id_from_post_data() {
|
236 |
-
|
237 |
-
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
238 |
-
|
239 |
-
$flow_id = filter_var( wp_unslash( $_POST['_wcf_flow_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
240 |
-
|
241 |
-
return intval( $flow_id );
|
242 |
-
}
|
243 |
-
|
244 |
-
return false;
|
245 |
-
}
|
246 |
-
|
247 |
-
/**
|
248 |
-
* Get optin id for order
|
249 |
-
*
|
250 |
-
* @param int $order_id order ID.
|
251 |
-
* @return int
|
252 |
-
*/
|
253 |
-
public function get_optin_id_from_order( $order_id ) {
|
254 |
-
|
255 |
-
$optin_id = get_post_meta( $order_id, '_wcf_optin_id', true );
|
256 |
-
|
257 |
-
return intval( $optin_id );
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* We are using this function mostly in ajax on checkout page
|
262 |
-
*
|
263 |
-
* @return bool
|
264 |
-
*/
|
265 |
-
public function get_optin_id_from_post_data() {
|
266 |
-
|
267 |
-
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
268 |
-
|
269 |
-
$optin_id = filter_var( wp_unslash( $_POST['_wcf_optin_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
270 |
-
|
271 |
-
return intval( $optin_id );
|
272 |
-
}
|
273 |
-
|
274 |
-
return false;
|
275 |
-
}
|
276 |
-
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Check for checkout page
|
280 |
-
*
|
281 |
-
* @param int $step_id step ID.
|
282 |
-
* @return bool
|
283 |
-
*/
|
284 |
-
public function check_is_checkout_page( $step_id ) {
|
285 |
-
|
286 |
-
$step_type = $this->get_step_type( $step_id );
|
287 |
-
|
288 |
-
if ( 'checkout' === $step_type ) {
|
289 |
-
|
290 |
-
return true;
|
291 |
-
}
|
292 |
-
|
293 |
-
return false;
|
294 |
-
}
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Check for thank you page
|
298 |
-
*
|
299 |
-
* @param int $step_id step ID.
|
300 |
-
* @return bool
|
301 |
-
*/
|
302 |
-
public function check_is_thankyou_page( $step_id ) {
|
303 |
-
|
304 |
-
$step_type = $this->get_step_type( $step_id );
|
305 |
-
|
306 |
-
if ( 'thankyou' === $step_type ) {
|
307 |
-
|
308 |
-
return true;
|
309 |
-
}
|
310 |
-
|
311 |
-
return false;
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Check for offer page
|
316 |
-
*
|
317 |
-
* @param int $step_id step ID.
|
318 |
-
* @return bool
|
319 |
-
*/
|
320 |
-
public function check_is_offer_page( $step_id ) {
|
321 |
-
|
322 |
-
$step_type = $this->get_step_type( $step_id );
|
323 |
-
|
324 |
-
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
325 |
-
|
326 |
-
return true;
|
327 |
-
}
|
328 |
-
|
329 |
-
return false;
|
330 |
-
}
|
331 |
-
|
332 |
-
/**
|
333 |
-
* Check if loaded page requires woo.
|
334 |
-
*
|
335 |
-
* @return bool
|
336 |
-
*/
|
337 |
-
public function check_is_woo_required_page() {
|
338 |
-
|
339 |
-
global $post;
|
340 |
-
$step_id = $post->ID;
|
341 |
-
$woo_not_required_type = array( 'landing' );
|
342 |
-
$step_type = $this->get_step_type( $step_id );
|
343 |
-
return ( ! in_array( $step_type, $woo_not_required_type, true ) );
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Define constant for cache
|
348 |
-
*
|
349 |
-
* @return void
|
350 |
-
*/
|
351 |
-
public function do_not_cache() {
|
352 |
-
|
353 |
-
global $post;
|
354 |
-
|
355 |
-
if ( ! apply_filters( 'cartflows_do_not_cache_step', true, $post->ID ) ) {
|
356 |
-
return;
|
357 |
-
}
|
358 |
-
|
359 |
-
wcf_maybe_define_constant( 'DONOTCACHEPAGE', true );
|
360 |
-
wcf_maybe_define_constant( 'DONOTCACHEOBJECT', true );
|
361 |
-
wcf_maybe_define_constant( 'DONOTCACHEDB', true );
|
362 |
-
|
363 |
-
nocache_headers();
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* Get linking url
|
368 |
-
*
|
369 |
-
* @param array $args query args.
|
370 |
-
* @return string
|
371 |
-
*/
|
372 |
-
public function get_linking_url( $args = array() ) {
|
373 |
-
|
374 |
-
$url = get_home_url();
|
375 |
-
|
376 |
-
$url = add_query_arg( $args, $url );
|
377 |
-
|
378 |
-
return $url;
|
379 |
-
}
|
380 |
-
|
381 |
-
/**
|
382 |
-
* Get assets urls
|
383 |
-
*
|
384 |
-
* @return array
|
385 |
-
* @since 1.1.6
|
386 |
-
*/
|
387 |
-
public function get_assets_path() {
|
388 |
-
|
389 |
-
$rtl = '';
|
390 |
-
|
391 |
-
if ( is_rtl() ) {
|
392 |
-
$rtl = '-rtl';
|
393 |
-
}
|
394 |
-
|
395 |
-
$file_prefix = '';
|
396 |
-
$dir_name = '';
|
397 |
-
|
398 |
-
$is_min = apply_filters( 'cartflows_load_min_assets', false );
|
399 |
-
|
400 |
-
if ( $is_min ) {
|
401 |
-
$file_prefix = '.min';
|
402 |
-
$dir_name = 'min-';
|
403 |
-
}
|
404 |
-
|
405 |
-
$js_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'js/';
|
406 |
-
$css_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'css/';
|
407 |
-
|
408 |
-
return array(
|
409 |
-
'css' => $css_gen_path,
|
410 |
-
'js' => $js_gen_path,
|
411 |
-
'file_prefix' => $file_prefix,
|
412 |
-
'rtl' => $rtl,
|
413 |
-
);
|
414 |
-
}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* Get assets css url
|
418 |
-
*
|
419 |
-
* @param string $file file name.
|
420 |
-
* @return string
|
421 |
-
* @since 1.1.6
|
422 |
-
*/
|
423 |
-
public function get_css_url( $file ) {
|
424 |
-
|
425 |
-
$assets_vars = wcf()->assets_vars;
|
426 |
-
|
427 |
-
$url = $assets_vars['css'] . $file . $assets_vars['rtl'] . $assets_vars['file_prefix'] . '.css';
|
428 |
-
|
429 |
-
return $url;
|
430 |
-
}
|
431 |
-
|
432 |
-
/**
|
433 |
-
* Get assets js url
|
434 |
-
*
|
435 |
-
* @param string $file file name.
|
436 |
-
* @return string
|
437 |
-
* @since 1.1.6
|
438 |
-
*/
|
439 |
-
public function get_js_url( $file ) {
|
440 |
-
|
441 |
-
$assets_vars = wcf()->assets_vars;
|
442 |
-
|
443 |
-
$url = $assets_vars['js'] . $file . $assets_vars['file_prefix'] . '.js';
|
444 |
-
|
445 |
-
return $url;
|
446 |
-
}
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Get unique id.
|
450 |
-
*
|
451 |
-
* @param int $length Length.
|
452 |
-
*
|
453 |
-
* @return string
|
454 |
-
*/
|
455 |
-
public function get_unique_id( $length = 8 ) {
|
456 |
-
|
457 |
-
return substr( md5( microtime() ), 0, $length );
|
458 |
-
}
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Get selected checkout products and data
|
462 |
-
*
|
463 |
-
* @param int $checkout_id Checkout id..
|
464 |
-
* @param array $saved_products Saved product.
|
465 |
-
*
|
466 |
-
* @return array
|
467 |
-
*/
|
468 |
-
public function get_selected_checkout_products( $checkout_id = '', $saved_products = array() ) {
|
469 |
-
|
470 |
-
if ( empty( $checkout_id ) ) {
|
471 |
-
|
472 |
-
global $post;
|
473 |
-
|
474 |
-
$checkout_id = $post->ID;
|
475 |
-
}
|
476 |
-
|
477 |
-
if ( ! isset( $this->checkout_products[ $checkout_id ] ) ) {
|
478 |
-
|
479 |
-
if ( ! empty( $saved_products ) ) {
|
480 |
-
|
481 |
-
$products = $saved_products;
|
482 |
-
} else {
|
483 |
-
|
484 |
-
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
|
485 |
-
}
|
486 |
-
|
487 |
-
$verify_url_data = false;
|
488 |
-
$default_add_to_cart = false;
|
489 |
-
$default_ids = array();
|
490 |
-
$default_add_to_cart = true;
|
491 |
-
|
492 |
-
if ( isset( $_GET['wcf-default'] ) ) { //phpcs:ignore
|
493 |
-
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
494 |
-
$default_sequence = sanitize_text_field( wp_unslash( $_GET['wcf-default'] ) );
|
495 |
-
$default_ids = array_map( 'intval', explode( ',', $default_sequence ) );
|
496 |
-
$verify_url_data = true;
|
497 |
-
}
|
498 |
-
|
499 |
-
if ( is_array( $products ) ) {
|
500 |
-
|
501 |
-
foreach ( $products as $in => $data ) {
|
502 |
-
|
503 |
-
if ( $verify_url_data ) {
|
504 |
-
|
505 |
-
$default_add_to_cart = false;
|
506 |
-
$sequence = $in + 1;
|
507 |
-
|
508 |
-
if ( in_array( $sequence, $default_ids, true ) ) {
|
509 |
-
$default_add_to_cart = true;
|
510 |
-
}
|
511 |
-
}
|
512 |
-
|
513 |
-
$default_data = array(
|
514 |
-
'quantity' => 1,
|
515 |
-
'discount_type' => '',
|
516 |
-
'discount_value' => '',
|
517 |
-
'unique_id' => $this->get_unique_id(),
|
518 |
-
'add_to_cart' => $default_add_to_cart,
|
519 |
-
);
|
520 |
-
|
521 |
-
$products[ $in ] = wp_parse_args( $products[ $in ], $default_data );
|
522 |
-
}
|
523 |
-
}
|
524 |
-
|
525 |
-
$this->checkout_products[ $checkout_id ] = $products;
|
526 |
-
}
|
527 |
-
|
528 |
-
return $this->checkout_products[ $checkout_id ];
|
529 |
-
}
|
530 |
-
|
531 |
-
/**
|
532 |
-
* Get selected checkout products and data
|
533 |
-
*
|
534 |
-
* @param int $checkout_id Checkout id..
|
535 |
-
* @param array $products_data Saved product.
|
536 |
-
*
|
537 |
-
* @return array
|
538 |
-
*/
|
539 |
-
public function set_selcted_checkout_products( $checkout_id = '', $products_data = array() ) {
|
540 |
-
|
541 |
-
if ( empty( $checkout_id ) ) {
|
542 |
-
|
543 |
-
global $post;
|
544 |
-
|
545 |
-
$checkout_id = $post->ID;
|
546 |
-
}
|
547 |
-
|
548 |
-
if ( isset( $this->checkout_products[ $checkout_id ] ) ) {
|
549 |
-
|
550 |
-
$products = $this->checkout_products[ $checkout_id ];
|
551 |
-
} else {
|
552 |
-
$products = $this->get_selected_checkout_products( $checkout_id );
|
553 |
-
}
|
554 |
-
|
555 |
-
if ( is_array( $products ) && ! empty( $products_data ) ) {
|
556 |
-
|
557 |
-
foreach ( $products as $in => $data ) {
|
558 |
-
|
559 |
-
if ( isset( $products_data[ $in ] ) ) {
|
560 |
-
$products[ $in ] = wp_parse_args( $products_data[ $in ], $products[ $in ] );
|
561 |
-
}
|
562 |
-
}
|
563 |
-
}
|
564 |
-
|
565 |
-
$this->checkout_products[ $checkout_id ] = $products;
|
566 |
-
|
567 |
-
return $this->checkout_products[ $checkout_id ];
|
568 |
-
}
|
569 |
-
|
570 |
-
/**
|
571 |
-
* Clear Installed Page Builder Cache
|
572 |
-
*/
|
573 |
-
public function clear_cache() {
|
574 |
-
|
575 |
-
// Clear 'Elementor' file cache.
|
576 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
577 |
-
Elementor\Plugin::$instance->files_manager->clear_cache();
|
578 |
-
}
|
579 |
-
}
|
580 |
-
}
|
581 |
-
|
582 |
-
/**
|
583 |
-
* Get a specific property of an array without needing to check if that property exists.
|
584 |
-
*
|
585 |
-
* Provide a default value if you want to return a specific value if the property is not set.
|
586 |
-
*
|
587 |
-
* @param array $array Array from which the property's value should be retrieved.
|
588 |
-
* @param string $prop Name of the property to be retrieved.
|
589 |
-
* @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null.
|
590 |
-
*
|
591 |
-
* @return null|string|mixed The value
|
592 |
-
*/
|
593 |
-
function wcf_get_prop( $array, $prop, $default = null ) {
|
594 |
-
|
595 |
-
if ( ! is_array( $array ) && ! ( is_object( $array ) && $array instanceof ArrayAccess ) ) {
|
596 |
-
return $default;
|
597 |
-
}
|
598 |
-
|
599 |
-
if ( isset( $array[ $prop ] ) ) {
|
600 |
-
$value = $array[ $prop ];
|
601 |
-
} else {
|
602 |
-
$value = '';
|
603 |
-
}
|
604 |
-
|
605 |
-
return empty( $value ) && null !== $default ? $default : $value;
|
606 |
-
}
|
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 |
+
* Member Variable
|
26 |
+
*
|
27 |
+
* @var checkout_products
|
28 |
+
*/
|
29 |
+
public $checkout_products = array();
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Initiator
|
34 |
+
*/
|
35 |
+
public static function get_instance() {
|
36 |
+
if ( ! isset( self::$instance ) ) {
|
37 |
+
self::$instance = new self();
|
38 |
+
}
|
39 |
+
return self::$instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Constructor
|
44 |
+
*/
|
45 |
+
public function __construct() {
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get current post type
|
50 |
+
*
|
51 |
+
* @param string $post_type post type.
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function current_post_type( $post_type = '' ) {
|
55 |
+
|
56 |
+
if ( '' === $post_type ) {
|
57 |
+
$post_type = get_post_type();
|
58 |
+
}
|
59 |
+
|
60 |
+
return $post_type;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Check if post type is of step.
|
65 |
+
*
|
66 |
+
* @param string $post_type post type.
|
67 |
+
* @return bool
|
68 |
+
*/
|
69 |
+
public function is_step_post_type( $post_type = '' ) {
|
70 |
+
|
71 |
+
if ( $this->get_step_post_type() === $this->current_post_type( $post_type ) ) {
|
72 |
+
|
73 |
+
return true;
|
74 |
+
}
|
75 |
+
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Check if post type is of flow.
|
81 |
+
*
|
82 |
+
* @param string $post_type post type.
|
83 |
+
* @return bool
|
84 |
+
*/
|
85 |
+
public function is_flow_post_type( $post_type = '' ) {
|
86 |
+
|
87 |
+
if ( $this->get_flow_post_type() === $this->current_post_type( $post_type ) ) {
|
88 |
+
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get post type of step.
|
97 |
+
*
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function get_step_post_type() {
|
101 |
+
|
102 |
+
return CARTFLOWS_STEP_POST_TYPE;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get post type of flow.
|
107 |
+
*
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
public function get_flow_post_type() {
|
111 |
+
|
112 |
+
return CARTFLOWS_FLOW_POST_TYPE;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get flow id
|
117 |
+
*
|
118 |
+
* @return int
|
119 |
+
*/
|
120 |
+
public function get_flow_id() {
|
121 |
+
|
122 |
+
global $post;
|
123 |
+
|
124 |
+
$post_meta = false;
|
125 |
+
|
126 |
+
if ( $post ) {
|
127 |
+
$post_meta = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
128 |
+
}
|
129 |
+
|
130 |
+
return $post_meta;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Get flow id by step
|
135 |
+
*
|
136 |
+
* @param int $step_id step ID.
|
137 |
+
* @return int
|
138 |
+
*/
|
139 |
+
public function get_flow_id_from_step_id( $step_id ) {
|
140 |
+
|
141 |
+
return get_post_meta( $step_id, 'wcf-flow-id', true );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get flow steps by id
|
146 |
+
*
|
147 |
+
* @param int $flow_id flow ID.
|
148 |
+
* @return int
|
149 |
+
*/
|
150 |
+
public function get_flow_steps( $flow_id ) {
|
151 |
+
|
152 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
153 |
+
|
154 |
+
if ( is_array( $steps ) && ! empty( $steps ) ) {
|
155 |
+
return $steps;
|
156 |
+
}
|
157 |
+
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Get template type of step
|
163 |
+
*
|
164 |
+
* @param int $step_id step ID.
|
165 |
+
* @return int
|
166 |
+
*/
|
167 |
+
public function get_step_type( $step_id ) {
|
168 |
+
|
169 |
+
return get_post_meta( $step_id, 'wcf-step-type', true );
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Get next id for step
|
174 |
+
*
|
175 |
+
* @param int $flow_id flow ID.
|
176 |
+
* @param int $step_id step ID.
|
177 |
+
* @return bool
|
178 |
+
*/
|
179 |
+
public function get_next_step_id( $flow_id, $step_id ) {
|
180 |
+
|
181 |
+
$wcf_step_obj = wcf_get_step( $step_id );
|
182 |
+
$next_step_id = $wcf_step_obj->get_direct_next_step_id();
|
183 |
+
|
184 |
+
return $next_step_id;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Get next id for step
|
189 |
+
*
|
190 |
+
* @param int $order_id order ID.
|
191 |
+
* @return int
|
192 |
+
*/
|
193 |
+
public function get_flow_id_from_order( $order_id ) {
|
194 |
+
|
195 |
+
$flow_id = get_post_meta( $order_id, '_wcf_flow_id', true );
|
196 |
+
|
197 |
+
return intval( $flow_id );
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Get checkout id for order
|
202 |
+
*
|
203 |
+
* @param int $order_id order ID.
|
204 |
+
* @return int
|
205 |
+
*/
|
206 |
+
public function get_checkout_id_from_order( $order_id ) {
|
207 |
+
|
208 |
+
$checkout_id = get_post_meta( $order_id, '_wcf_checkout_id', true );
|
209 |
+
|
210 |
+
return intval( $checkout_id );
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* We are using this function mostly in ajax on checkout page
|
215 |
+
*
|
216 |
+
* @return bool
|
217 |
+
*/
|
218 |
+
public function get_checkout_id_from_post_data() {
|
219 |
+
|
220 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
221 |
+
|
222 |
+
$checkout_id = filter_var( wp_unslash( $_POST['_wcf_checkout_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
223 |
+
|
224 |
+
return intval( $checkout_id );
|
225 |
+
}
|
226 |
+
|
227 |
+
return false;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* We are using this function mostly in ajax on checkout page
|
232 |
+
*
|
233 |
+
* @return bool
|
234 |
+
*/
|
235 |
+
public function get_flow_id_from_post_data() {
|
236 |
+
|
237 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
238 |
+
|
239 |
+
$flow_id = filter_var( wp_unslash( $_POST['_wcf_flow_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
240 |
+
|
241 |
+
return intval( $flow_id );
|
242 |
+
}
|
243 |
+
|
244 |
+
return false;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Get optin id for order
|
249 |
+
*
|
250 |
+
* @param int $order_id order ID.
|
251 |
+
* @return int
|
252 |
+
*/
|
253 |
+
public function get_optin_id_from_order( $order_id ) {
|
254 |
+
|
255 |
+
$optin_id = get_post_meta( $order_id, '_wcf_optin_id', true );
|
256 |
+
|
257 |
+
return intval( $optin_id );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* We are using this function mostly in ajax on checkout page
|
262 |
+
*
|
263 |
+
* @return bool
|
264 |
+
*/
|
265 |
+
public function get_optin_id_from_post_data() {
|
266 |
+
|
267 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
268 |
+
|
269 |
+
$optin_id = filter_var( wp_unslash( $_POST['_wcf_optin_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
270 |
+
|
271 |
+
return intval( $optin_id );
|
272 |
+
}
|
273 |
+
|
274 |
+
return false;
|
275 |
+
}
|
276 |
+
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Check for checkout page
|
280 |
+
*
|
281 |
+
* @param int $step_id step ID.
|
282 |
+
* @return bool
|
283 |
+
*/
|
284 |
+
public function check_is_checkout_page( $step_id ) {
|
285 |
+
|
286 |
+
$step_type = $this->get_step_type( $step_id );
|
287 |
+
|
288 |
+
if ( 'checkout' === $step_type ) {
|
289 |
+
|
290 |
+
return true;
|
291 |
+
}
|
292 |
+
|
293 |
+
return false;
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Check for thank you page
|
298 |
+
*
|
299 |
+
* @param int $step_id step ID.
|
300 |
+
* @return bool
|
301 |
+
*/
|
302 |
+
public function check_is_thankyou_page( $step_id ) {
|
303 |
+
|
304 |
+
$step_type = $this->get_step_type( $step_id );
|
305 |
+
|
306 |
+
if ( 'thankyou' === $step_type ) {
|
307 |
+
|
308 |
+
return true;
|
309 |
+
}
|
310 |
+
|
311 |
+
return false;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Check for offer page
|
316 |
+
*
|
317 |
+
* @param int $step_id step ID.
|
318 |
+
* @return bool
|
319 |
+
*/
|
320 |
+
public function check_is_offer_page( $step_id ) {
|
321 |
+
|
322 |
+
$step_type = $this->get_step_type( $step_id );
|
323 |
+
|
324 |
+
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
325 |
+
|
326 |
+
return true;
|
327 |
+
}
|
328 |
+
|
329 |
+
return false;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Check if loaded page requires woo.
|
334 |
+
*
|
335 |
+
* @return bool
|
336 |
+
*/
|
337 |
+
public function check_is_woo_required_page() {
|
338 |
+
|
339 |
+
global $post;
|
340 |
+
$step_id = $post->ID;
|
341 |
+
$woo_not_required_type = array( 'landing' );
|
342 |
+
$step_type = $this->get_step_type( $step_id );
|
343 |
+
return ( ! in_array( $step_type, $woo_not_required_type, true ) );
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Define constant for cache
|
348 |
+
*
|
349 |
+
* @return void
|
350 |
+
*/
|
351 |
+
public function do_not_cache() {
|
352 |
+
|
353 |
+
global $post;
|
354 |
+
|
355 |
+
if ( ! apply_filters( 'cartflows_do_not_cache_step', true, $post->ID ) ) {
|
356 |
+
return;
|
357 |
+
}
|
358 |
+
|
359 |
+
wcf_maybe_define_constant( 'DONOTCACHEPAGE', true );
|
360 |
+
wcf_maybe_define_constant( 'DONOTCACHEOBJECT', true );
|
361 |
+
wcf_maybe_define_constant( 'DONOTCACHEDB', true );
|
362 |
+
|
363 |
+
nocache_headers();
|
364 |
+
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Get linking url
|
368 |
+
*
|
369 |
+
* @param array $args query args.
|
370 |
+
* @return string
|
371 |
+
*/
|
372 |
+
public function get_linking_url( $args = array() ) {
|
373 |
+
|
374 |
+
$url = get_home_url();
|
375 |
+
|
376 |
+
$url = add_query_arg( $args, $url );
|
377 |
+
|
378 |
+
return $url;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Get assets urls
|
383 |
+
*
|
384 |
+
* @return array
|
385 |
+
* @since 1.1.6
|
386 |
+
*/
|
387 |
+
public function get_assets_path() {
|
388 |
+
|
389 |
+
$rtl = '';
|
390 |
+
|
391 |
+
if ( is_rtl() ) {
|
392 |
+
$rtl = '-rtl';
|
393 |
+
}
|
394 |
+
|
395 |
+
$file_prefix = '';
|
396 |
+
$dir_name = '';
|
397 |
+
|
398 |
+
$is_min = apply_filters( 'cartflows_load_min_assets', false );
|
399 |
+
|
400 |
+
if ( $is_min ) {
|
401 |
+
$file_prefix = '.min';
|
402 |
+
$dir_name = 'min-';
|
403 |
+
}
|
404 |
+
|
405 |
+
$js_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'js/';
|
406 |
+
$css_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'css/';
|
407 |
+
|
408 |
+
return array(
|
409 |
+
'css' => $css_gen_path,
|
410 |
+
'js' => $js_gen_path,
|
411 |
+
'file_prefix' => $file_prefix,
|
412 |
+
'rtl' => $rtl,
|
413 |
+
);
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Get assets css url
|
418 |
+
*
|
419 |
+
* @param string $file file name.
|
420 |
+
* @return string
|
421 |
+
* @since 1.1.6
|
422 |
+
*/
|
423 |
+
public function get_css_url( $file ) {
|
424 |
+
|
425 |
+
$assets_vars = wcf()->assets_vars;
|
426 |
+
|
427 |
+
$url = $assets_vars['css'] . $file . $assets_vars['rtl'] . $assets_vars['file_prefix'] . '.css';
|
428 |
+
|
429 |
+
return $url;
|
430 |
+
}
|
431 |
+
|
432 |
+
/**
|
433 |
+
* Get assets js url
|
434 |
+
*
|
435 |
+
* @param string $file file name.
|
436 |
+
* @return string
|
437 |
+
* @since 1.1.6
|
438 |
+
*/
|
439 |
+
public function get_js_url( $file ) {
|
440 |
+
|
441 |
+
$assets_vars = wcf()->assets_vars;
|
442 |
+
|
443 |
+
$url = $assets_vars['js'] . $file . $assets_vars['file_prefix'] . '.js';
|
444 |
+
|
445 |
+
return $url;
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Get unique id.
|
450 |
+
*
|
451 |
+
* @param int $length Length.
|
452 |
+
*
|
453 |
+
* @return string
|
454 |
+
*/
|
455 |
+
public function get_unique_id( $length = 8 ) {
|
456 |
+
|
457 |
+
return substr( md5( microtime() ), 0, $length );
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Get selected checkout products and data
|
462 |
+
*
|
463 |
+
* @param int $checkout_id Checkout id..
|
464 |
+
* @param array $saved_products Saved product.
|
465 |
+
*
|
466 |
+
* @return array
|
467 |
+
*/
|
468 |
+
public function get_selected_checkout_products( $checkout_id = '', $saved_products = array() ) {
|
469 |
+
|
470 |
+
if ( empty( $checkout_id ) ) {
|
471 |
+
|
472 |
+
global $post;
|
473 |
+
|
474 |
+
$checkout_id = $post->ID;
|
475 |
+
}
|
476 |
+
|
477 |
+
if ( ! isset( $this->checkout_products[ $checkout_id ] ) ) {
|
478 |
+
|
479 |
+
if ( ! empty( $saved_products ) ) {
|
480 |
+
|
481 |
+
$products = $saved_products;
|
482 |
+
} else {
|
483 |
+
|
484 |
+
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
|
485 |
+
}
|
486 |
+
|
487 |
+
$verify_url_data = false;
|
488 |
+
$default_add_to_cart = false;
|
489 |
+
$default_ids = array();
|
490 |
+
$default_add_to_cart = true;
|
491 |
+
|
492 |
+
if ( isset( $_GET['wcf-default'] ) ) { //phpcs:ignore
|
493 |
+
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
494 |
+
$default_sequence = sanitize_text_field( wp_unslash( $_GET['wcf-default'] ) );
|
495 |
+
$default_ids = array_map( 'intval', explode( ',', $default_sequence ) );
|
496 |
+
$verify_url_data = true;
|
497 |
+
}
|
498 |
+
|
499 |
+
if ( is_array( $products ) ) {
|
500 |
+
|
501 |
+
foreach ( $products as $in => $data ) {
|
502 |
+
|
503 |
+
if ( $verify_url_data ) {
|
504 |
+
|
505 |
+
$default_add_to_cart = false;
|
506 |
+
$sequence = $in + 1;
|
507 |
+
|
508 |
+
if ( in_array( $sequence, $default_ids, true ) ) {
|
509 |
+
$default_add_to_cart = true;
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
$default_data = array(
|
514 |
+
'quantity' => 1,
|
515 |
+
'discount_type' => '',
|
516 |
+
'discount_value' => '',
|
517 |
+
'unique_id' => $this->get_unique_id(),
|
518 |
+
'add_to_cart' => $default_add_to_cart,
|
519 |
+
);
|
520 |
+
|
521 |
+
$products[ $in ] = wp_parse_args( $products[ $in ], $default_data );
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
$this->checkout_products[ $checkout_id ] = $products;
|
526 |
+
}
|
527 |
+
|
528 |
+
return $this->checkout_products[ $checkout_id ];
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Get selected checkout products and data
|
533 |
+
*
|
534 |
+
* @param int $checkout_id Checkout id..
|
535 |
+
* @param array $products_data Saved product.
|
536 |
+
*
|
537 |
+
* @return array
|
538 |
+
*/
|
539 |
+
public function set_selcted_checkout_products( $checkout_id = '', $products_data = array() ) {
|
540 |
+
|
541 |
+
if ( empty( $checkout_id ) ) {
|
542 |
+
|
543 |
+
global $post;
|
544 |
+
|
545 |
+
$checkout_id = $post->ID;
|
546 |
+
}
|
547 |
+
|
548 |
+
if ( isset( $this->checkout_products[ $checkout_id ] ) ) {
|
549 |
+
|
550 |
+
$products = $this->checkout_products[ $checkout_id ];
|
551 |
+
} else {
|
552 |
+
$products = $this->get_selected_checkout_products( $checkout_id );
|
553 |
+
}
|
554 |
+
|
555 |
+
if ( is_array( $products ) && ! empty( $products_data ) ) {
|
556 |
+
|
557 |
+
foreach ( $products as $in => $data ) {
|
558 |
+
|
559 |
+
if ( isset( $products_data[ $in ] ) ) {
|
560 |
+
$products[ $in ] = wp_parse_args( $products_data[ $in ], $products[ $in ] );
|
561 |
+
}
|
562 |
+
}
|
563 |
+
}
|
564 |
+
|
565 |
+
$this->checkout_products[ $checkout_id ] = $products;
|
566 |
+
|
567 |
+
return $this->checkout_products[ $checkout_id ];
|
568 |
+
}
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Clear Installed Page Builder Cache
|
572 |
+
*/
|
573 |
+
public function clear_cache() {
|
574 |
+
|
575 |
+
// Clear 'Elementor' file cache.
|
576 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
577 |
+
Elementor\Plugin::$instance->files_manager->clear_cache();
|
578 |
+
}
|
579 |
+
}
|
580 |
+
}
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Get a specific property of an array without needing to check if that property exists.
|
584 |
+
*
|
585 |
+
* Provide a default value if you want to return a specific value if the property is not set.
|
586 |
+
*
|
587 |
+
* @param array $array Array from which the property's value should be retrieved.
|
588 |
+
* @param string $prop Name of the property to be retrieved.
|
589 |
+
* @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null.
|
590 |
+
*
|
591 |
+
* @return null|string|mixed The value
|
592 |
+
*/
|
593 |
+
function wcf_get_prop( $array, $prop, $default = null ) {
|
594 |
+
|
595 |
+
if ( ! is_array( $array ) && ! ( is_object( $array ) && $array instanceof ArrayAccess ) ) {
|
596 |
+
return $default;
|
597 |
+
}
|
598 |
+
|
599 |
+
if ( isset( $array[ $prop ] ) ) {
|
600 |
+
$value = $array[ $prop ];
|
601 |
+
} else {
|
602 |
+
$value = '';
|
603 |
+
}
|
604 |
+
|
605 |
+
return empty( $value ) && null !== $default ? $default : $value;
|
606 |
+
}
|
languages/cartflows.pot
CHANGED
@@ -1,3071 +1,3071 @@
|
|
1 |
-
# Copyright (C) 2020 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.5.
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
-
"POT-Creation-Date: 2020-11-05
|
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: 2020-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-i18n 1.0.3\n"
|
26 |
-
|
27 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:211
|
28 |
-
#. translators: %s product name
|
29 |
-
msgid ""
|
30 |
-
"Want to help make <strong>%1s</strong> even more awesome? Allow us to "
|
31 |
-
"collect non-sensitive diagnostic data and usage information. "
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:214
|
35 |
-
msgid "This will be applicable for all sites from the network."
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:238
|
39 |
-
#. translators: %s usage doc link
|
40 |
-
msgid " Know More."
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:246
|
44 |
-
msgid "Yes! Allow it"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:255
|
48 |
-
msgid "No Thanks"
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:359
|
52 |
-
msgid "Usage Tracking"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:403
|
56 |
-
#. translators: %s Product title
|
57 |
-
msgid "Allow %s products to track non-sensitive usage tracking data."
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:406
|
61 |
-
msgid " This will be applicable for all sites from the network."
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:411
|
65 |
-
msgid "Learn More."
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: classes/batch-process/class-cartflows-importer-elementor.php:44
|
69 |
-
msgid "Invalid content."
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: classes/batch-process/class-cartflows-importer-elementor.php:56
|
73 |
-
msgid "Invalid content. Expected an array."
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: classes/batch-process/helpers/class-wp-background-process.php:435
|
77 |
-
msgid "Every %d Minutes"
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: classes/class-cartflows-admin-fields.php:241
|
81 |
-
msgid "Select"
|
82 |
-
msgstr ""
|
83 |
-
|
84 |
-
#: classes/class-cartflows-admin-fields.php:244
|
85 |
-
msgid "No Checkout Steps"
|
86 |
-
msgstr ""
|
87 |
-
|
88 |
-
#: classes/class-cartflows-admin-fields.php:270
|
89 |
-
#. translators: %s: link
|
90 |
-
msgid ""
|
91 |
-
"Be sure not to add any product in above selected Global Checkout step. "
|
92 |
-
"Please read information about how to set up Global Checkout %1$shere%2$s."
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: classes/class-cartflows-admin.php:186 includes/admin/cartflows-home.php:11
|
96 |
-
msgid "Home"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: classes/class-cartflows-admin.php:191 classes/class-cartflows-admin.php:192
|
100 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:151
|
101 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:140
|
102 |
-
msgid "Settings"
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: classes/class-cartflows-admin.php:487
|
106 |
-
msgid "This page requires WooCommerce plugin installed and activated!"
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: classes/class-cartflows-admin.php:490
|
110 |
-
msgid "Installing and activating.."
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: classes/class-cartflows-admin.php:491
|
114 |
-
msgid "There was an error with the installation of plugin."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: classes/class-cartflows-admin.php:553
|
118 |
-
msgid "Flows Library"
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
#: classes/class-cartflows-admin.php:560
|
122 |
-
#: modules/flow/view/view-remote-importer.php:26
|
123 |
-
msgid "Ready Templates"
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: classes/class-cartflows-admin.php:563
|
127 |
-
#: modules/flow/view/view-remote-importer.php:29
|
128 |
-
msgid "Create Your Own"
|
129 |
-
msgstr ""
|
130 |
-
|
131 |
-
#: classes/class-cartflows-admin.php:574
|
132 |
-
#: modules/flow/view/view-remote-importer.php:41
|
133 |
-
msgid "Search Sites"
|
134 |
-
msgstr ""
|
135 |
-
|
136 |
-
#: classes/class-cartflows-admin.php:575
|
137 |
-
#: modules/flow/view/view-remote-importer.php:42
|
138 |
-
msgid "Search Flow..."
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: classes/class-cartflows-admin.php:592
|
142 |
-
msgid "Design Your Flow"
|
143 |
-
msgstr ""
|
144 |
-
|
145 |
-
#: classes/class-cartflows-admin.php:593
|
146 |
-
#: classes/class-cartflows-importer.php:665
|
147 |
-
#: classes/class-cartflows-importer.php:764
|
148 |
-
#: modules/flow/view/view-remote-importer.php:72
|
149 |
-
msgid "Learn How"
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: classes/class-cartflows-api.php:369
|
153 |
-
msgid "Request successfully processed!"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: classes/class-cartflows-cloning.php:284
|
157 |
-
#. translators: %s flow id
|
158 |
-
msgid "Can't clone this step - %1$s. Flow - %2$s"
|
159 |
-
msgstr ""
|
160 |
-
|
161 |
-
#: classes/class-cartflows-cloning.php:401
|
162 |
-
#. translators: %s flow id
|
163 |
-
msgid "Step - %1$s cloned. Flow - %2$s"
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: classes/class-cartflows-cloning.php:427
|
167 |
-
msgid "Clone this flow"
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: classes/class-cartflows-cloning.php:427
|
171 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:824
|
172 |
-
msgid "Clone"
|
173 |
-
msgstr ""
|
174 |
-
|
175 |
-
#: classes/class-cartflows-default-meta.php:735
|
176 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:554
|
177 |
-
msgid "Submit"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: classes/class-cartflows-flow-frontend.php:53
|
181 |
-
msgid ""
|
182 |
-
"Test mode is active — which displays random products for previewing. It can "
|
183 |
-
"be deactivated from the flow settings in the admin dashboard."
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: classes/class-cartflows-flow-frontend.php:58
|
187 |
-
msgid "Click here to disable it"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: classes/class-cartflows-functions.php:579
|
191 |
-
#. translators: %1$s page builder name "string"
|
192 |
-
msgid ""
|
193 |
-
"We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can "
|
194 |
-
"add/change/update design settings directly from the page builder as well."
|
195 |
-
msgstr ""
|
196 |
-
|
197 |
-
#: classes/class-cartflows-functions.php:580
|
198 |
-
msgid "Learn More »"
|
199 |
-
msgstr ""
|
200 |
-
|
201 |
-
#: classes/class-cartflows-importer.php:81
|
202 |
-
msgid "Export this flow"
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: classes/class-cartflows-importer.php:81 includes/exporter.php:18
|
206 |
-
msgid "Export"
|
207 |
-
msgstr ""
|
208 |
-
|
209 |
-
#: classes/class-cartflows-importer.php:92
|
210 |
-
msgid "Flow Export"
|
211 |
-
msgstr ""
|
212 |
-
|
213 |
-
#: classes/class-cartflows-importer.php:93
|
214 |
-
msgid "Flow Import"
|
215 |
-
msgstr ""
|
216 |
-
|
217 |
-
#: classes/class-cartflows-importer.php:104
|
218 |
-
msgid "No post to export has been supplied!"
|
219 |
-
msgstr ""
|
220 |
-
|
221 |
-
#: classes/class-cartflows-importer.php:278
|
222 |
-
msgid "Please upload a valid .json file"
|
223 |
-
msgstr ""
|
224 |
-
|
225 |
-
#: classes/class-cartflows-importer.php:284
|
226 |
-
msgid "Please upload a file to import"
|
227 |
-
msgstr ""
|
228 |
-
|
229 |
-
#: classes/class-cartflows-importer.php:506
|
230 |
-
msgid "Successfully imported flows."
|
231 |
-
msgstr ""
|
232 |
-
|
233 |
-
#: classes/class-cartflows-importer.php:538
|
234 |
-
msgid "Loading Steps"
|
235 |
-
msgstr ""
|
236 |
-
|
237 |
-
#: classes/class-cartflows-importer.php:540
|
238 |
-
msgid "Getting steps from the cloud. Please wait for the moment."
|
239 |
-
msgstr ""
|
240 |
-
|
241 |
-
#: classes/class-cartflows-importer.php:551
|
242 |
-
msgid "Searching Template.."
|
243 |
-
msgstr ""
|
244 |
-
|
245 |
-
#: classes/class-cartflows-importer.php:553
|
246 |
-
msgid "Getting templates from the cloud. Please wait for the moment."
|
247 |
-
msgstr ""
|
248 |
-
|
249 |
-
#: classes/class-cartflows-importer.php:562
|
250 |
-
msgid "Importing.."
|
251 |
-
msgstr ""
|
252 |
-
|
253 |
-
#: classes/class-cartflows-importer.php:571
|
254 |
-
#: classes/class-cartflows-importer.php:611
|
255 |
-
msgid "Imported"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: classes/class-cartflows-importer.php:572
|
259 |
-
#: classes/class-cartflows-importer.php:612
|
260 |
-
msgid "Thanks for patience"
|
261 |
-
msgstr ""
|
262 |
-
|
263 |
-
#: classes/class-cartflows-importer.php:581
|
264 |
-
#: classes/class-cartflows-importer.php:593
|
265 |
-
msgid "Coming Soon!"
|
266 |
-
msgstr ""
|
267 |
-
|
268 |
-
#: classes/class-cartflows-importer.php:612
|
269 |
-
msgid "Redirecting to the Elementor edit window."
|
270 |
-
msgstr ""
|
271 |
-
|
272 |
-
#: classes/class-cartflows-importer.php:658
|
273 |
-
#: classes/class-cartflows-importer.php:774
|
274 |
-
msgid "Pro"
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: classes/class-cartflows-importer.php:699
|
278 |
-
#: classes/class-cartflows-importer.php:806
|
279 |
-
msgid "Activate License"
|
280 |
-
msgstr ""
|
281 |
-
|
282 |
-
#: classes/class-cartflows-importer.php:701
|
283 |
-
#: classes/class-cartflows-importer.php:808
|
284 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:503
|
285 |
-
msgid "Get Pro"
|
286 |
-
msgstr ""
|
287 |
-
|
288 |
-
#: classes/class-cartflows-importer.php:726
|
289 |
-
msgid "Create"
|
290 |
-
msgstr ""
|
291 |
-
|
292 |
-
#: classes/class-cartflows-importer.php:825
|
293 |
-
msgid "Under Maintenance.."
|
294 |
-
msgstr ""
|
295 |
-
|
296 |
-
#: classes/class-cartflows-importer.php:826
|
297 |
-
msgid ""
|
298 |
-
"If you are seeing this message, most likely our servers are under routine "
|
299 |
-
"maintenance and we will be back shortly."
|
300 |
-
msgstr ""
|
301 |
-
|
302 |
-
#: classes/class-cartflows-importer.php:827
|
303 |
-
msgid ""
|
304 |
-
"In rare case, it is possible your website is having trouble connecting with "
|
305 |
-
"ours. If you need help, please feel free to get in touch with us from our "
|
306 |
-
"website.."
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
#: classes/class-cartflows-importer.php:857
|
310 |
-
#. translators: %s: Plugin string
|
311 |
-
msgid ""
|
312 |
-
"%1$s to see CartFlows templates. If you prefer another page builder tool, "
|
313 |
-
"you can <a href=\"%2$s\" target=\"blank\">select it here</a>."
|
314 |
-
msgstr ""
|
315 |
-
|
316 |
-
#: classes/class-cartflows-importer.php:872
|
317 |
-
msgid "All"
|
318 |
-
msgstr ""
|
319 |
-
|
320 |
-
#: classes/class-cartflows-importer.php:875
|
321 |
-
msgid "Select Step Type"
|
322 |
-
msgstr ""
|
323 |
-
|
324 |
-
#: classes/class-cartflows-importer.php:959
|
325 |
-
msgid "Import from Cloud"
|
326 |
-
msgstr ""
|
327 |
-
|
328 |
-
#: classes/class-cartflows-importer.php:1265
|
329 |
-
msgid "Sales Landing"
|
330 |
-
msgstr ""
|
331 |
-
|
332 |
-
#: classes/class-cartflows-importer.php:1269
|
333 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:253
|
334 |
-
#: modules/flow/view/meta-flow-steps.php:12
|
335 |
-
msgid "Checkout (Woo)"
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
-
#: classes/class-cartflows-importer.php:1273
|
339 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:260
|
340 |
-
#: modules/flow/view/meta-flow-steps.php:13
|
341 |
-
msgid "Thank You (Woo)"
|
342 |
-
msgstr ""
|
343 |
-
|
344 |
-
#: classes/class-cartflows-importer.php:1281
|
345 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:239
|
346 |
-
#: modules/flow/view/meta-flow-steps.php:11
|
347 |
-
msgid "Landing"
|
348 |
-
msgstr ""
|
349 |
-
|
350 |
-
#: classes/class-cartflows-importer.php:1285
|
351 |
-
msgid "Thank You"
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
#: classes/class-cartflows-importer.php:1395
|
355 |
-
#. translators: %s: template ID
|
356 |
-
msgid "Invalid template id %1$s or post id %2$s."
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
#: classes/class-cartflows-importer.php:1470
|
360 |
-
#. translators: %s: flow ID
|
361 |
-
msgid "Invalid flow id %1$s OR step type %2$s."
|
362 |
-
msgstr ""
|
363 |
-
|
364 |
-
#: classes/class-cartflows-importer.php:1595
|
365 |
-
msgid ""
|
366 |
-
"Elementor is not activated. Please activate plugin Elementor Page Builder "
|
367 |
-
"to import the step."
|
368 |
-
msgstr ""
|
369 |
-
|
370 |
-
#: classes/class-cartflows-importer.php:1698
|
371 |
-
msgid "Action failed. Invalid Security Nonce."
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: classes/class-cartflows-importer.php:1705
|
375 |
-
msgid "User have not plugin install permissions."
|
376 |
-
msgstr ""
|
377 |
-
|
378 |
-
#: classes/class-cartflows-importer.php:1727
|
379 |
-
msgid "Plugin Successfully Activated"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: classes/class-cartflows-learndash-compatibility.php:86
|
383 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:329
|
384 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:521
|
385 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:216
|
386 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:245
|
387 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:192
|
388 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:338
|
389 |
-
msgid "None"
|
390 |
-
msgstr ""
|
391 |
-
|
392 |
-
#: classes/class-cartflows-learndash-compatibility.php:113
|
393 |
-
#. translators: 1: anchor start, 2: anchor close
|
394 |
-
msgid ""
|
395 |
-
"Non-enrolled students will redirect to the selected CartFlows template. If "
|
396 |
-
"you have not created any Flow already, add new Flow from %1$shere%2$s."
|
397 |
-
msgstr ""
|
398 |
-
|
399 |
-
#: classes/class-cartflows-learndash-compatibility.php:119
|
400 |
-
msgid "Select CartFlows Template for this Course"
|
401 |
-
msgstr ""
|
402 |
-
|
403 |
-
#: classes/class-cartflows-loader.php:233
|
404 |
-
#. translators: %s: html tags
|
405 |
-
msgid ""
|
406 |
-
"You are using an older version of %1$sCartFlows Pro%2$s. Please update "
|
407 |
-
"%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
|
408 |
-
msgstr ""
|
409 |
-
|
410 |
-
#: classes/class-cartflows-loader.php:517
|
411 |
-
#. translators: %s: html tags
|
412 |
-
msgid ""
|
413 |
-
"This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
|
414 |
-
"activated."
|
415 |
-
msgstr ""
|
416 |
-
|
417 |
-
#: classes/class-cartflows-loader.php:527
|
418 |
-
msgid "Activate WooCommerce"
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
-
#: classes/class-cartflows-loader.php:535
|
422 |
-
msgid "Install WooCommerce"
|
423 |
-
msgstr ""
|
424 |
-
|
425 |
-
#: classes/class-cartflows-logger.php:161
|
426 |
-
msgid "Action failed. Please refresh the page and retry."
|
427 |
-
msgstr ""
|
428 |
-
|
429 |
-
#: classes/class-cartflows-meta-fields.php:61
|
430 |
-
msgid "Thin 100"
|
431 |
-
msgstr ""
|
432 |
-
|
433 |
-
#: classes/class-cartflows-meta-fields.php:62
|
434 |
-
msgid "Extra-Light 200"
|
435 |
-
msgstr ""
|
436 |
-
|
437 |
-
#: classes/class-cartflows-meta-fields.php:63
|
438 |
-
msgid "Light 300"
|
439 |
-
msgstr ""
|
440 |
-
|
441 |
-
#: classes/class-cartflows-meta-fields.php:64
|
442 |
-
msgid "Normal 400"
|
443 |
-
msgstr ""
|
444 |
-
|
445 |
-
#: classes/class-cartflows-meta-fields.php:65
|
446 |
-
msgid "Medium 500"
|
447 |
-
msgstr ""
|
448 |
-
|
449 |
-
#: classes/class-cartflows-meta-fields.php:66
|
450 |
-
msgid "Semi-Bold 600"
|
451 |
-
msgstr ""
|
452 |
-
|
453 |
-
#: classes/class-cartflows-meta-fields.php:67
|
454 |
-
msgid "Bold 700"
|
455 |
-
msgstr ""
|
456 |
-
|
457 |
-
#: classes/class-cartflows-meta-fields.php:68
|
458 |
-
msgid "Extra-Bold 800"
|
459 |
-
msgstr ""
|
460 |
-
|
461 |
-
#: classes/class-cartflows-meta-fields.php:69
|
462 |
-
msgid "Ultra-Bold 900"
|
463 |
-
msgstr ""
|
464 |
-
|
465 |
-
#: classes/class-cartflows-meta-fields.php:182
|
466 |
-
#. Translators: %d stock amount
|
467 |
-
msgid "Stock: %d"
|
468 |
-
msgstr ""
|
469 |
-
|
470 |
-
#: classes/class-cartflows-meta-fields.php:765
|
471 |
-
#: includes/meta-fields/generate-product-repeater.php:30
|
472 |
-
msgid "Search for a product…"
|
473 |
-
msgstr ""
|
474 |
-
|
475 |
-
#: classes/class-cartflows-meta-fields.php:816
|
476 |
-
msgid "Search for a coupon…"
|
477 |
-
msgstr ""
|
478 |
-
|
479 |
-
#: classes/class-cartflows-meta.php:34
|
480 |
-
msgid "Update"
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: classes/class-cartflows-meta.php:42
|
484 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:95
|
485 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:763
|
486 |
-
msgid "Back to edit Flow"
|
487 |
-
msgstr ""
|
488 |
-
|
489 |
-
#: classes/class-cartflows-meta.php:63
|
490 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:175
|
491 |
-
#: modules/landing/classes/class-cartflows-landing-meta.php:136
|
492 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:157
|
493 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:146
|
494 |
-
msgid "Custom Script"
|
495 |
-
msgstr ""
|
496 |
-
|
497 |
-
#: classes/class-cartflows-meta.php:66
|
498 |
-
msgid ""
|
499 |
-
"Custom script lets you add your own custom script on front end of this flow "
|
500 |
-
"page."
|
501 |
-
msgstr ""
|
502 |
-
|
503 |
-
#: classes/class-cartflows-metabox.php:59
|
504 |
-
msgid "Flow Details"
|
505 |
-
msgstr ""
|
506 |
-
|
507 |
-
#: classes/class-cartflows-wizard.php:94
|
508 |
-
msgid "Thanks for installing and using CartFlows!"
|
509 |
-
msgstr ""
|
510 |
-
|
511 |
-
#: classes/class-cartflows-wizard.php:95
|
512 |
-
msgid ""
|
513 |
-
"It is easy to use the CartFlows. Please use the setup wizard to quick start "
|
514 |
-
"setup."
|
515 |
-
msgstr ""
|
516 |
-
|
517 |
-
#: classes/class-cartflows-wizard.php:97
|
518 |
-
msgid "Start Wizard"
|
519 |
-
msgstr ""
|
520 |
-
|
521 |
-
#: classes/class-cartflows-wizard.php:98
|
522 |
-
msgid "Skip Setup"
|
523 |
-
msgstr ""
|
524 |
-
|
525 |
-
#: classes/class-cartflows-wizard.php:128
|
526 |
-
msgid "Welcome"
|
527 |
-
msgstr ""
|
528 |
-
|
529 |
-
#: classes/class-cartflows-wizard.php:133
|
530 |
-
msgid "Page Builder"
|
531 |
-
msgstr ""
|
532 |
-
|
533 |
-
#: classes/class-cartflows-wizard.php:137
|
534 |
-
msgid "Checkout"
|
535 |
-
msgstr ""
|
536 |
-
|
537 |
-
#: classes/class-cartflows-wizard.php:141
|
538 |
-
msgid "Training"
|
539 |
-
msgstr ""
|
540 |
-
|
541 |
-
#: classes/class-cartflows-wizard.php:145
|
542 |
-
msgid "Ready!"
|
543 |
-
msgstr ""
|
544 |
-
|
545 |
-
#: classes/class-cartflows-wizard.php:220
|
546 |
-
msgid "CartFlows Setup"
|
547 |
-
msgstr ""
|
548 |
-
|
549 |
-
#: classes/class-cartflows-wizard.php:246
|
550 |
-
msgid "Exit Setup Wizard"
|
551 |
-
msgstr ""
|
552 |
-
|
553 |
-
#: classes/class-cartflows-wizard.php:299
|
554 |
-
msgid "Welcome to CartFlows!"
|
555 |
-
msgstr ""
|
556 |
-
|
557 |
-
#: classes/class-cartflows-wizard.php:300
|
558 |
-
msgid ""
|
559 |
-
"Thank you for choosing CartFlows to get more leads, increase conversions, & "
|
560 |
-
"maximize profits. This short setup wizard will guide you though configuring "
|
561 |
-
"CartFlows and creating your first funnel."
|
562 |
-
msgstr ""
|
563 |
-
|
564 |
-
#: classes/class-cartflows-wizard.php:304
|
565 |
-
msgid "Let's Build it better!"
|
566 |
-
msgstr ""
|
567 |
-
|
568 |
-
#: classes/class-cartflows-wizard.php:305
|
569 |
-
msgid ""
|
570 |
-
"Get improved features and faster fixes by sharing non-sensitive data via "
|
571 |
-
"usage tracking that shows us how CartFlows is used. No personal data is "
|
572 |
-
"tracked or stored."
|
573 |
-
msgstr ""
|
574 |
-
|
575 |
-
#: classes/class-cartflows-wizard.php:306
|
576 |
-
msgid "Learn More"
|
577 |
-
msgstr ""
|
578 |
-
|
579 |
-
#: classes/class-cartflows-wizard.php:309
|
580 |
-
msgid "Yes, I am in."
|
581 |
-
msgstr ""
|
582 |
-
|
583 |
-
#: classes/class-cartflows-wizard.php:316
|
584 |
-
msgid "Lets Go »"
|
585 |
-
msgstr ""
|
586 |
-
|
587 |
-
#: classes/class-cartflows-wizard.php:344
|
588 |
-
msgid "Page Builder Setup"
|
589 |
-
msgstr ""
|
590 |
-
|
591 |
-
#: classes/class-cartflows-wizard.php:345
|
592 |
-
msgid "Please select a page builder you would like to use with CartFlows."
|
593 |
-
msgstr ""
|
594 |
-
|
595 |
-
#: classes/class-cartflows-wizard.php:350
|
596 |
-
msgid "Select Page Builder"
|
597 |
-
msgstr ""
|
598 |
-
|
599 |
-
#: classes/class-cartflows-wizard.php:357
|
600 |
-
#: classes/class-cartflows-wizard.php:423
|
601 |
-
#: includes/admin/cartflows-general.php:76
|
602 |
-
msgid "Elementor"
|
603 |
-
msgstr ""
|
604 |
-
|
605 |
-
#: classes/class-cartflows-wizard.php:367
|
606 |
-
msgid "Beaver Builder Plugin (Lite Version)"
|
607 |
-
msgstr ""
|
608 |
-
|
609 |
-
#: classes/class-cartflows-wizard.php:377
|
610 |
-
#: includes/admin/cartflows-general.php:78
|
611 |
-
msgid "Divi"
|
612 |
-
msgstr ""
|
613 |
-
|
614 |
-
#: classes/class-cartflows-wizard.php:387
|
615 |
-
#: includes/admin/cartflows-general.php:79
|
616 |
-
msgid "Gutenberg"
|
617 |
-
msgstr ""
|
618 |
-
|
619 |
-
#: classes/class-cartflows-wizard.php:397
|
620 |
-
#: includes/admin/cartflows-general.php:80
|
621 |
-
msgid "Other"
|
622 |
-
msgstr ""
|
623 |
-
|
624 |
-
#: classes/class-cartflows-wizard.php:419
|
625 |
-
msgid ""
|
626 |
-
"While CartFlows Should work with most page builders, we offer templates for "
|
627 |
-
"the above page builders."
|
628 |
-
msgstr ""
|
629 |
-
|
630 |
-
#: classes/class-cartflows-wizard.php:422
|
631 |
-
#: classes/class-cartflows-wizard.php:464
|
632 |
-
msgid "The following plugin will be installed and activated for you:"
|
633 |
-
msgstr ""
|
634 |
-
|
635 |
-
#: classes/class-cartflows-wizard.php:429
|
636 |
-
#: classes/class-cartflows-wizard.php:474
|
637 |
-
#: classes/class-cartflows-wizard.php:684
|
638 |
-
msgid "« Previous"
|
639 |
-
msgstr ""
|
640 |
-
|
641 |
-
#: classes/class-cartflows-wizard.php:432
|
642 |
-
msgid "Skip this step"
|
643 |
-
msgstr ""
|
644 |
-
|
645 |
-
#: classes/class-cartflows-wizard.php:433
|
646 |
-
msgid "Next »"
|
647 |
-
msgstr ""
|
648 |
-
|
649 |
-
#: classes/class-cartflows-wizard.php:452
|
650 |
-
msgid "Choose a checkout"
|
651 |
-
msgstr ""
|
652 |
-
|
653 |
-
#: classes/class-cartflows-wizard.php:455
|
654 |
-
msgid ""
|
655 |
-
"While CartFlows is designed to use WooCommerce sell digital and physical "
|
656 |
-
"products, not all funnels need a checkout system."
|
657 |
-
msgstr ""
|
658 |
-
|
659 |
-
#: classes/class-cartflows-wizard.php:457
|
660 |
-
msgid ""
|
661 |
-
"Would you like to install WooCommerce to sell digital and physical products "
|
662 |
-
"in your funnels?"
|
663 |
-
msgstr ""
|
664 |
-
|
665 |
-
#: classes/class-cartflows-wizard.php:465
|
666 |
-
msgid "WooCommerce"
|
667 |
-
msgstr ""
|
668 |
-
|
669 |
-
#: classes/class-cartflows-wizard.php:466
|
670 |
-
msgid "WooCommerce Cart Abandonment Recovery"
|
671 |
-
msgstr ""
|
672 |
-
|
673 |
-
#: classes/class-cartflows-wizard.php:477
|
674 |
-
#: classes/class-cartflows-wizard.php:687
|
675 |
-
msgid "No thanks"
|
676 |
-
msgstr ""
|
677 |
-
|
678 |
-
#: classes/class-cartflows-wizard.php:478
|
679 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:110
|
680 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:119
|
681 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:128
|
682 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:137
|
683 |
-
msgid "Yes"
|
684 |
-
msgstr ""
|
685 |
-
|
686 |
-
#: classes/class-cartflows-wizard.php:620
|
687 |
-
msgid "Congratulations, You Did It!"
|
688 |
-
msgstr ""
|
689 |
-
|
690 |
-
#: classes/class-cartflows-wizard.php:627
|
691 |
-
msgid ""
|
692 |
-
"CartFlows is ready to use on your website. You've successfully completed "
|
693 |
-
"the setup process and all that is left for you to do is create your first "
|
694 |
-
"flow."
|
695 |
-
msgstr ""
|
696 |
-
|
697 |
-
#: classes/class-cartflows-wizard.php:641
|
698 |
-
msgid "Create a flow"
|
699 |
-
msgstr ""
|
700 |
-
|
701 |
-
#: classes/class-cartflows-wizard.php:658
|
702 |
-
msgid "Exclusive CartFlows Training Course Offer"
|
703 |
-
msgstr ""
|
704 |
-
|
705 |
-
#: classes/class-cartflows-wizard.php:669
|
706 |
-
msgid ""
|
707 |
-
"We want you to get off to a great start using CartFlows, so we would like "
|
708 |
-
"to give access to our exclusive training course."
|
709 |
-
msgstr ""
|
710 |
-
|
711 |
-
#: classes/class-cartflows-wizard.php:670
|
712 |
-
msgid "Get access to this couse, for free, by entering your email below."
|
713 |
-
msgstr ""
|
714 |
-
|
715 |
-
#: classes/class-cartflows-wizard.php:672
|
716 |
-
msgid "Enter Email address"
|
717 |
-
msgstr ""
|
718 |
-
|
719 |
-
#: classes/class-cartflows-wizard.php:688
|
720 |
-
msgid "Allow"
|
721 |
-
msgstr ""
|
722 |
-
|
723 |
-
#: classes/lib/notices/class-astra-notices.php:125
|
724 |
-
msgid "WordPress Nonce not validated."
|
725 |
-
msgstr ""
|
726 |
-
|
727 |
-
#: classes/logger/class-cartflows-log-handler-file.php:351
|
728 |
-
#: classes/logger/class-cartflows-log-handler-file.php:371
|
729 |
-
msgid "This method should not be called before plugins_loaded."
|
730 |
-
msgstr ""
|
731 |
-
|
732 |
-
#: classes/logger/class-cartflows-wc-logger.php:58
|
733 |
-
#. translators: 1: class name 2: Cartflows_Log_Handler_Interface
|
734 |
-
msgid "The provided handler %1$s does not implement %2$s."
|
735 |
-
msgstr ""
|
736 |
-
|
737 |
-
#: classes/logger/class-cartflows-wc-logger.php:136
|
738 |
-
#. translators: 1: Cartflows_WC_Logger::log 2: level
|
739 |
-
msgid "%1$s was called with an invalid level \"%2$s\"."
|
740 |
-
msgstr ""
|
741 |
-
|
742 |
-
#: includes/admin/cartflows-admin-header.php:17
|
743 |
-
#: includes/admin/cartflows-admin.php:19
|
744 |
-
msgid "Generate More Leads & More Sales"
|
745 |
-
msgstr ""
|
746 |
-
|
747 |
-
#: includes/admin/cartflows-admin.php:29
|
748 |
-
msgid "Settings saved successfully."
|
749 |
-
msgstr ""
|
750 |
-
|
751 |
-
#: includes/admin/cartflows-error-log.php:36
|
752 |
-
msgid "%1$s at %2$s"
|
753 |
-
msgstr ""
|
754 |
-
|
755 |
-
#: includes/admin/cartflows-error-log.php:41
|
756 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:804
|
757 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:225
|
758 |
-
msgid "View"
|
759 |
-
msgstr ""
|
760 |
-
|
761 |
-
#: includes/admin/cartflows-error-log.php:65
|
762 |
-
msgid "Delete log"
|
763 |
-
msgstr ""
|
764 |
-
|
765 |
-
#: includes/admin/cartflows-error-log.php:70
|
766 |
-
msgid "There are currently no logs to view."
|
767 |
-
msgstr ""
|
768 |
-
|
769 |
-
#: includes/admin/cartflows-general.php:31
|
770 |
-
#: includes/admin/cartflows-general.php:40
|
771 |
-
msgid "General Settings"
|
772 |
-
msgstr ""
|
773 |
-
|
774 |
-
#: includes/admin/cartflows-general.php:53
|
775 |
-
msgid "Disallow search engines from indexing flows"
|
776 |
-
msgstr ""
|
777 |
-
|
778 |
-
#: includes/admin/cartflows-general.php:63
|
779 |
-
#: modules/flow/view/view-flow-inner-step.php:52
|
780 |
-
msgid "Global Checkout"
|
781 |
-
msgstr ""
|
782 |
-
|
783 |
-
#: includes/admin/cartflows-general.php:72
|
784 |
-
msgid "Show Templates designed with"
|
785 |
-
msgstr ""
|
786 |
-
|
787 |
-
#: includes/admin/cartflows-general.php:73
|
788 |
-
msgid ""
|
789 |
-
"CartFlows offers flow templates that can be imported in one click. These "
|
790 |
-
"templates are available in few different page builders. Please choose your "
|
791 |
-
"preferred page builder from the list so you will only see templates that "
|
792 |
-
"are made using that page builder.."
|
793 |
-
msgstr ""
|
794 |
-
|
795 |
-
#: includes/admin/cartflows-general.php:77
|
796 |
-
msgid "Beaver Builder"
|
797 |
-
msgstr ""
|
798 |
-
|
799 |
-
#: includes/admin/cartflows-general.php:89
|
800 |
-
#: includes/admin/cartflows-general.php:175
|
801 |
-
#: includes/admin/cartflows-general.php:281
|
802 |
-
#: includes/admin/cartflows-general.php:398
|
803 |
-
msgid "Save Changes"
|
804 |
-
msgstr ""
|
805 |
-
|
806 |
-
#: includes/admin/cartflows-general.php:101
|
807 |
-
msgid "Permalink Settings"
|
808 |
-
msgstr ""
|
809 |
-
|
810 |
-
#: includes/admin/cartflows-general.php:116
|
811 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:136
|
812 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:141
|
813 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:190
|
814 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:81
|
815 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:86
|
816 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:119
|
817 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:179
|
818 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:184
|
819 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:146
|
820 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:151
|
821 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:447
|
822 |
-
msgid "Default"
|
823 |
-
msgstr ""
|
824 |
-
|
825 |
-
#: includes/admin/cartflows-general.php:122
|
826 |
-
msgid "Flow and Step Slug"
|
827 |
-
msgstr ""
|
828 |
-
|
829 |
-
#: includes/admin/cartflows-general.php:128
|
830 |
-
msgid "Flow Slug"
|
831 |
-
msgstr ""
|
832 |
-
|
833 |
-
#: includes/admin/cartflows-general.php:134
|
834 |
-
msgid "Step Slug"
|
835 |
-
msgstr ""
|
836 |
-
|
837 |
-
#: includes/admin/cartflows-general.php:146
|
838 |
-
msgid "Post Type Permalink Base"
|
839 |
-
msgstr ""
|
840 |
-
|
841 |
-
#: includes/admin/cartflows-general.php:154
|
842 |
-
msgid "Step Base"
|
843 |
-
msgstr ""
|
844 |
-
|
845 |
-
#: includes/admin/cartflows-general.php:164
|
846 |
-
msgid "Flow Base"
|
847 |
-
msgstr ""
|
848 |
-
|
849 |
-
#: includes/admin/cartflows-general.php:176
|
850 |
-
msgid "Set Default"
|
851 |
-
msgstr ""
|
852 |
-
|
853 |
-
#: includes/admin/cartflows-general.php:190
|
854 |
-
msgid "Facebook Pixel Settings"
|
855 |
-
msgstr ""
|
856 |
-
|
857 |
-
#: includes/admin/cartflows-general.php:205
|
858 |
-
msgid "Enable Facebook Pixel Tracking"
|
859 |
-
msgstr ""
|
860 |
-
|
861 |
-
#: includes/admin/cartflows-general.php:218
|
862 |
-
msgid "Enable for the whole site"
|
863 |
-
msgstr ""
|
864 |
-
|
865 |
-
#: includes/admin/cartflows-general.php:226
|
866 |
-
#: includes/admin/cartflows-general.php:325
|
867 |
-
msgid "If this option is unchecked, it will only apply to CartFlows steps."
|
868 |
-
msgstr ""
|
869 |
-
|
870 |
-
#: includes/admin/cartflows-general.php:236
|
871 |
-
msgid "Enter Facebook pixel ID"
|
872 |
-
msgstr ""
|
873 |
-
|
874 |
-
#: includes/admin/cartflows-general.php:244
|
875 |
-
#: includes/admin/cartflows-general.php:343
|
876 |
-
msgid "Enable Events:"
|
877 |
-
msgstr ""
|
878 |
-
|
879 |
-
#: includes/admin/cartflows-general.php:253
|
880 |
-
msgid "Initiate Checkout"
|
881 |
-
msgstr ""
|
882 |
-
|
883 |
-
#: includes/admin/cartflows-general.php:262
|
884 |
-
#: includes/admin/cartflows-general.php:369
|
885 |
-
msgid "Add Payment Info"
|
886 |
-
msgstr ""
|
887 |
-
|
888 |
-
#: includes/admin/cartflows-general.php:271
|
889 |
-
msgid "Purchase Complete"
|
890 |
-
msgstr ""
|
891 |
-
|
892 |
-
#: includes/admin/cartflows-general.php:293
|
893 |
-
msgid "Google Analytics Settings"
|
894 |
-
msgstr ""
|
895 |
-
|
896 |
-
#: includes/admin/cartflows-general.php:304
|
897 |
-
msgid "Enable Google Analytics Tracking"
|
898 |
-
msgstr ""
|
899 |
-
|
900 |
-
#: includes/admin/cartflows-general.php:317
|
901 |
-
msgid "Enable for the whole website"
|
902 |
-
msgstr ""
|
903 |
-
|
904 |
-
#: includes/admin/cartflows-general.php:335
|
905 |
-
msgid "Google Analytics ID"
|
906 |
-
msgstr ""
|
907 |
-
|
908 |
-
#: includes/admin/cartflows-general.php:337
|
909 |
-
msgid ""
|
910 |
-
"Log into your <a href=\"https://analytics.google.com/\" "
|
911 |
-
"target=\"_blank\">google analytics account</a> to find your ID. eg: "
|
912 |
-
"UA-XXXXXX-X."
|
913 |
-
msgstr ""
|
914 |
-
|
915 |
-
#: includes/admin/cartflows-general.php:351
|
916 |
-
msgid "Begin Checkout"
|
917 |
-
msgstr ""
|
918 |
-
|
919 |
-
#: includes/admin/cartflows-general.php:360
|
920 |
-
msgid "Add To Cart"
|
921 |
-
msgstr ""
|
922 |
-
|
923 |
-
#: includes/admin/cartflows-general.php:378
|
924 |
-
msgid "Purchase"
|
925 |
-
msgstr ""
|
926 |
-
|
927 |
-
#: includes/admin/cartflows-general.php:386
|
928 |
-
msgid ""
|
929 |
-
"Google Analytics not working correctly? <a "
|
930 |
-
"href=\"https://cartflows.com/docs/troubleshooting-google-analytics-tracking-"
|
931 |
-
"issues/\" > Click here </a> to know more. "
|
932 |
-
msgstr ""
|
933 |
-
|
934 |
-
#: includes/admin/cartflows-general.php:419
|
935 |
-
#: includes/admin/cartflows-home.php:43
|
936 |
-
msgid "Knowledge Base"
|
937 |
-
msgstr ""
|
938 |
-
|
939 |
-
#: includes/admin/cartflows-general.php:423
|
940 |
-
#: includes/admin/cartflows-home.php:47
|
941 |
-
msgid "Not sure how something works? Take a peek at the knowledge base and learn."
|
942 |
-
msgstr ""
|
943 |
-
|
944 |
-
#: includes/admin/cartflows-general.php:426
|
945 |
-
#: includes/admin/cartflows-home.php:50
|
946 |
-
msgid "Visit Knowledge Base »"
|
947 |
-
msgstr ""
|
948 |
-
|
949 |
-
#: includes/admin/cartflows-general.php:434
|
950 |
-
#: includes/admin/cartflows-home.php:58
|
951 |
-
msgid "Community"
|
952 |
-
msgstr ""
|
953 |
-
|
954 |
-
#: includes/admin/cartflows-general.php:438
|
955 |
-
#: includes/admin/cartflows-home.php:62
|
956 |
-
msgid ""
|
957 |
-
"Join the community of super helpful CartFlows users. Say hello, ask "
|
958 |
-
"questions, give feedback and help each other!"
|
959 |
-
msgstr ""
|
960 |
-
|
961 |
-
#: includes/admin/cartflows-general.php:441
|
962 |
-
#: includes/admin/cartflows-home.php:65
|
963 |
-
msgid "Join Our Facebook Group »"
|
964 |
-
msgstr ""
|
965 |
-
|
966 |
-
#: includes/admin/cartflows-general.php:449
|
967 |
-
#: includes/admin/cartflows-home.php:73
|
968 |
-
msgid "Five Star Support"
|
969 |
-
msgstr ""
|
970 |
-
|
971 |
-
#: includes/admin/cartflows-general.php:453
|
972 |
-
#: includes/admin/cartflows-home.php:77
|
973 |
-
msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
|
974 |
-
msgstr ""
|
975 |
-
|
976 |
-
#: includes/admin/cartflows-general.php:456
|
977 |
-
#: includes/admin/cartflows-home.php:80
|
978 |
-
msgid "Submit a Ticket »"
|
979 |
-
msgstr ""
|
980 |
-
|
981 |
-
#: includes/admin/cartflows-general.php:466
|
982 |
-
msgid "Load Minified CSS"
|
983 |
-
msgstr ""
|
984 |
-
|
985 |
-
#: includes/admin/cartflows-general.php:471
|
986 |
-
msgid ""
|
987 |
-
"Load the Minified CSS from here. Just Enable it by checking the below given "
|
988 |
-
"checkbox."
|
989 |
-
msgstr ""
|
990 |
-
|
991 |
-
#: includes/admin/cartflows-general.php:478
|
992 |
-
msgid "Load minified CSS & JS Files"
|
993 |
-
msgstr ""
|
994 |
-
|
995 |
-
#: includes/admin/cartflows-general.php:483
|
996 |
-
msgid "Save"
|
997 |
-
msgstr ""
|
998 |
-
|
999 |
-
#: includes/admin/cartflows-home.php:20
|
1000 |
-
msgid "Getting Started"
|
1001 |
-
msgstr ""
|
1002 |
-
|
1003 |
-
#: includes/admin/cartflows-home.php:28
|
1004 |
-
msgid "Modernizing WordPress eCommerce!"
|
1005 |
-
msgstr ""
|
1006 |
-
|
1007 |
-
#: includes/exporter.php:12
|
1008 |
-
msgid "Export Flows to a JSON file"
|
1009 |
-
msgstr ""
|
1010 |
-
|
1011 |
-
#: includes/exporter.php:13
|
1012 |
-
msgid ""
|
1013 |
-
"This tool allows you to generate and download a JSON file containing a list "
|
1014 |
-
"of all flows."
|
1015 |
-
msgstr ""
|
1016 |
-
|
1017 |
-
#: includes/importer.php:12
|
1018 |
-
msgid "Import Flows to a JSON file"
|
1019 |
-
msgstr ""
|
1020 |
-
|
1021 |
-
#: includes/importer.php:13
|
1022 |
-
msgid "This tool allows you to import the flows from the JSON file."
|
1023 |
-
msgstr ""
|
1024 |
-
|
1025 |
-
#: includes/importer.php:21
|
1026 |
-
msgid "Import"
|
1027 |
-
msgstr ""
|
1028 |
-
|
1029 |
-
#: includes/meta-fields/generate-product-repeater.php:36
|
1030 |
-
msgid "Remove"
|
1031 |
-
msgstr ""
|
1032 |
-
|
1033 |
-
#: includes/meta-fields/generate-product-repeater.php:51
|
1034 |
-
msgid "Product Quantity"
|
1035 |
-
msgstr ""
|
1036 |
-
|
1037 |
-
#: includes/meta-fields/generate-product-repeater.php:65
|
1038 |
-
msgid "Discount Type"
|
1039 |
-
msgstr ""
|
1040 |
-
|
1041 |
-
#: includes/meta-fields/generate-product-repeater.php:69
|
1042 |
-
msgid "Select Discount Type"
|
1043 |
-
msgstr ""
|
1044 |
-
|
1045 |
-
#: includes/meta-fields/generate-product-repeater.php:70
|
1046 |
-
msgid "Original"
|
1047 |
-
msgstr ""
|
1048 |
-
|
1049 |
-
#: includes/meta-fields/generate-product-repeater.php:71
|
1050 |
-
msgid "Percentage"
|
1051 |
-
msgstr ""
|
1052 |
-
|
1053 |
-
#: includes/meta-fields/generate-product-repeater.php:72
|
1054 |
-
msgid "Price"
|
1055 |
-
msgstr ""
|
1056 |
-
|
1057 |
-
#: includes/meta-fields/generate-product-repeater.php:83
|
1058 |
-
msgid "Discount Value"
|
1059 |
-
msgstr ""
|
1060 |
-
|
1061 |
-
#: includes/meta-fields/generate-product-repeater.php:85
|
1062 |
-
msgid "Discount value will apply for each quantity of product."
|
1063 |
-
msgstr ""
|
1064 |
-
|
1065 |
-
#: includes/meta-fields/get-product-selection-repeater.php:112
|
1066 |
-
msgid "Add New Product"
|
1067 |
-
msgstr ""
|
1068 |
-
|
1069 |
-
#: includes/meta-fields/get-product-selection-repeater.php:113
|
1070 |
-
msgid "Create Product"
|
1071 |
-
msgstr ""
|
1072 |
-
|
1073 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:29
|
1074 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:66
|
1075 |
-
#: modules/gutenberg/classes/class-cartflows-block-config.php:311
|
1076 |
-
msgid "Checkout Form"
|
1077 |
-
msgstr ""
|
1078 |
-
|
1079 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:30
|
1080 |
-
msgid "Checkout Form."
|
1081 |
-
msgstr ""
|
1082 |
-
|
1083 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:31
|
1084 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:32
|
1085 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:30
|
1086 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:31
|
1087 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:31
|
1088 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:32
|
1089 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:30
|
1090 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:31
|
1091 |
-
msgid "Cartflows Modules"
|
1092 |
-
msgstr ""
|
1093 |
-
|
1094 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:75
|
1095 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1058
|
1096 |
-
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:117
|
1097 |
-
msgid ""
|
1098 |
-
"No product is selected. Please select products from the checkout meta "
|
1099 |
-
"settings to continue."
|
1100 |
-
msgstr ""
|
1101 |
-
|
1102 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:109
|
1103 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:152
|
1104 |
-
msgid "One Column ( PRO )"
|
1105 |
-
msgstr ""
|
1106 |
-
|
1107 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:110
|
1108 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:116
|
1109 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:30
|
1110 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:153
|
1111 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:159
|
1112 |
-
msgid "Two Column"
|
1113 |
-
msgstr ""
|
1114 |
-
|
1115 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:111
|
1116 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:154
|
1117 |
-
msgid "Two Step ( PRO )"
|
1118 |
-
msgstr ""
|
1119 |
-
|
1120 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:115
|
1121 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:29
|
1122 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:158
|
1123 |
-
msgid "One Column"
|
1124 |
-
msgstr ""
|
1125 |
-
|
1126 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:117
|
1127 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:31
|
1128 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:160
|
1129 |
-
msgid "Two Step"
|
1130 |
-
msgstr ""
|
1131 |
-
|
1132 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:137
|
1133 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:82
|
1134 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:180
|
1135 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:147
|
1136 |
-
msgid "Floating Labels ( PRO )"
|
1137 |
-
msgstr ""
|
1138 |
-
|
1139 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:142
|
1140 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:87
|
1141 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:120
|
1142 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:185
|
1143 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:152
|
1144 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:448
|
1145 |
-
msgid "Floating Labels"
|
1146 |
-
msgstr ""
|
1147 |
-
|
1148 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:157
|
1149 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:128
|
1150 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:90
|
1151 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:157
|
1152 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:291
|
1153 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:169
|
1154 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:156
|
1155 |
-
msgid "General"
|
1156 |
-
msgstr ""
|
1157 |
-
|
1158 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:164
|
1159 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:210
|
1160 |
-
msgid "Select Layout"
|
1161 |
-
msgstr ""
|
1162 |
-
|
1163 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:166
|
1164 |
-
#. translators: %s: link
|
1165 |
-
msgid ""
|
1166 |
-
"The PRO layout options are available in the CartFlows Pro. %1$s Upgrade "
|
1167 |
-
"Now! %2$s"
|
1168 |
-
msgstr ""
|
1169 |
-
|
1170 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:178
|
1171 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:251
|
1172 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:179
|
1173 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:182
|
1174 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:102
|
1175 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:131
|
1176 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:146
|
1177 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:115
|
1178 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:451
|
1179 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:216
|
1180 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:443
|
1181 |
-
msgid "Style"
|
1182 |
-
msgstr ""
|
1183 |
-
|
1184 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:181
|
1185 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:105
|
1186 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:294
|
1187 |
-
msgid "Global"
|
1188 |
-
msgstr ""
|
1189 |
-
|
1190 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:185
|
1191 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:109
|
1192 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:40
|
1193 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:302
|
1194 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:177
|
1195 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:410
|
1196 |
-
msgid "Primary Color"
|
1197 |
-
msgstr ""
|
1198 |
-
|
1199 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:193
|
1200 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:221
|
1201 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:416
|
1202 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:649
|
1203 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:393
|
1204 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:268
|
1205 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:193
|
1206 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:221
|
1207 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:249
|
1208 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:319
|
1209 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:385
|
1210 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:451
|
1211 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:271
|
1212 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:364
|
1213 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:659
|
1214 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:754
|
1215 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:825
|
1216 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:358
|
1217 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:375
|
1218 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:435
|
1219 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:323
|
1220 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:372
|
1221 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:402
|
1222 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:468
|
1223 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:527
|
1224 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:558
|
1225 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:619
|
1226 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:649
|
1227 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:708
|
1228 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:738
|
1229 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:632
|
1230 |
-
msgid "Text Color"
|
1231 |
-
msgstr ""
|
1232 |
-
|
1233 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:207
|
1234 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:236
|
1235 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:316
|
1236 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:504
|
1237 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:454
|
1238 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:469
|
1239 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:117
|
1240 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:179
|
1241 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:324
|
1242 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:207
|
1243 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:235
|
1244 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:281
|
1245 |
-
msgid "Typography"
|
1246 |
-
msgstr ""
|
1247 |
-
|
1248 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:217
|
1249 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:189
|
1250 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:69
|
1251 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:396
|
1252 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:290
|
1253 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:509
|
1254 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:602
|
1255 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:691
|
1256 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:327
|
1257 |
-
msgid "Heading"
|
1258 |
-
msgstr ""
|
1259 |
-
|
1260 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:247
|
1261 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:127
|
1262 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:101
|
1263 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:443
|
1264 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:208
|
1265 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:430
|
1266 |
-
msgid "Input Fields"
|
1267 |
-
msgstr ""
|
1268 |
-
|
1269 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:253
|
1270 |
-
#. translators: %s: link
|
1271 |
-
msgid ""
|
1272 |
-
"The PRO style options are available in CartFlows Pro. %1$s Upgrade Now! "
|
1273 |
-
"%2$s"
|
1274 |
-
msgstr ""
|
1275 |
-
|
1276 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:262
|
1277 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:137
|
1278 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:202
|
1279 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:495
|
1280 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:941
|
1281 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:251
|
1282 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:507
|
1283 |
-
msgid "Label Color"
|
1284 |
-
msgstr ""
|
1285 |
-
|
1286 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:276
|
1287 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:151
|
1288 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:507
|
1289 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:262
|
1290 |
-
msgid "Field Background Color"
|
1291 |
-
msgstr ""
|
1292 |
-
|
1293 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:295
|
1294 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:165
|
1295 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:523
|
1296 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:273
|
1297 |
-
msgid "Input Text / Placeholder Color"
|
1298 |
-
msgstr ""
|
1299 |
-
|
1300 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:325
|
1301 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:517
|
1302 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:188
|
1303 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:334
|
1304 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:541
|
1305 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:284
|
1306 |
-
msgid "Border Style"
|
1307 |
-
msgstr ""
|
1308 |
-
|
1309 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:327
|
1310 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:519
|
1311 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:190
|
1312 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:336
|
1313 |
-
msgid ""
|
1314 |
-
"The type of border to use. Double borders must have a width of at least 3px "
|
1315 |
-
"to render properly."
|
1316 |
-
msgstr ""
|
1317 |
-
|
1318 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:330
|
1319 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:522
|
1320 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:193
|
1321 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:339
|
1322 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:547
|
1323 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:290
|
1324 |
-
msgid "Solid"
|
1325 |
-
msgstr ""
|
1326 |
-
|
1327 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:331
|
1328 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:523
|
1329 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:194
|
1330 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:340
|
1331 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:550
|
1332 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:293
|
1333 |
-
msgid "Dashed"
|
1334 |
-
msgstr ""
|
1335 |
-
|
1336 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:332
|
1337 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:524
|
1338 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:195
|
1339 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:341
|
1340 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:549
|
1341 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:292
|
1342 |
-
msgid "Dotted"
|
1343 |
-
msgstr ""
|
1344 |
-
|
1345 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:333
|
1346 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:525
|
1347 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:196
|
1348 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:342
|
1349 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:548
|
1350 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:291
|
1351 |
-
msgid "Double"
|
1352 |
-
msgstr ""
|
1353 |
-
|
1354 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:352
|
1355 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:557
|
1356 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:220
|
1357 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:367
|
1358 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:565
|
1359 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:303
|
1360 |
-
msgid "Border Width"
|
1361 |
-
msgstr ""
|
1362 |
-
|
1363 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:373
|
1364 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:580
|
1365 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:815
|
1366 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:235
|
1367 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:383
|
1368 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:195
|
1369 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:303
|
1370 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:582
|
1371 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1008
|
1372 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:315
|
1373 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:531
|
1374 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:664
|
1375 |
-
msgid "Border Color"
|
1376 |
-
msgstr ""
|
1377 |
-
|
1378 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:391
|
1379 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:621
|
1380 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:727
|
1381 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:248
|
1382 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:411
|
1383 |
-
msgid "Border Radius"
|
1384 |
-
msgstr ""
|
1385 |
-
|
1386 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:412
|
1387 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:264
|
1388 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:215
|
1389 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:626
|
1390 |
-
msgid "Buttons"
|
1391 |
-
msgstr ""
|
1392 |
-
|
1393 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:440
|
1394 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:407
|
1395 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:282
|
1396 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:279
|
1397 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:640
|
1398 |
-
msgid "Text Hover Color"
|
1399 |
-
msgstr ""
|
1400 |
-
|
1401 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:460
|
1402 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:799
|
1403 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:421
|
1404 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:296
|
1405 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:264
|
1406 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:333
|
1407 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:399
|
1408 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:465
|
1409 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:187
|
1410 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:287
|
1411 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:679
|
1412 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:789
|
1413 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:995
|
1414 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:371
|
1415 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:388
|
1416 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:458
|
1417 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:426
|
1418 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:481
|
1419 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:571
|
1420 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:662
|
1421 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:751
|
1422 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:523
|
1423 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:648
|
1424 |
-
msgid "Background Color"
|
1425 |
-
msgstr ""
|
1426 |
-
|
1427 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:484
|
1428 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:429
|
1429 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:310
|
1430 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:295
|
1431 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:656
|
1432 |
-
msgid "Background Hover Color"
|
1433 |
-
msgstr ""
|
1434 |
-
|
1435 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:601
|
1436 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:327
|
1437 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:397
|
1438 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:311
|
1439 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:771
|
1440 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:448
|
1441 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:446
|
1442 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:672
|
1443 |
-
msgid "Border Hover Color"
|
1444 |
-
msgstr ""
|
1445 |
-
|
1446 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:645
|
1447 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:818
|
1448 |
-
msgid "Payment Section"
|
1449 |
-
msgstr ""
|
1450 |
-
|
1451 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:663
|
1452 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:839
|
1453 |
-
msgid "Description Color"
|
1454 |
-
msgstr ""
|
1455 |
-
|
1456 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:677
|
1457 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:863
|
1458 |
-
msgid "Information Background Color"
|
1459 |
-
msgstr ""
|
1460 |
-
|
1461 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:685
|
1462 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:851
|
1463 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:377
|
1464 |
-
msgid "Section Background Color"
|
1465 |
-
msgstr ""
|
1466 |
-
|
1467 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:699
|
1468 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:877
|
1469 |
-
msgid "Section Padding"
|
1470 |
-
msgstr ""
|
1471 |
-
|
1472 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:713
|
1473 |
-
msgid "Margin"
|
1474 |
-
msgstr ""
|
1475 |
-
|
1476 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:743
|
1477 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:924
|
1478 |
-
msgid "Field Validation & Error Messages"
|
1479 |
-
msgstr ""
|
1480 |
-
|
1481 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:747
|
1482 |
-
msgid "Field Label Color"
|
1483 |
-
msgstr ""
|
1484 |
-
|
1485 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:763
|
1486 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:953
|
1487 |
-
msgid "Field Border Color"
|
1488 |
-
msgstr ""
|
1489 |
-
|
1490 |
-
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:783
|
1491 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:981
|
1492 |
-
msgid "Error Message Color"
|
1493 |
-
msgstr ""
|
1494 |
-
|
1495 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:28
|
1496 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:70
|
1497 |
-
#: modules/gutenberg/classes/class-cartflows-block-config.php:46
|
1498 |
-
msgid "Next Step Button"
|
1499 |
-
msgstr ""
|
1500 |
-
|
1501 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:29
|
1502 |
-
msgid "A simple next step button."
|
1503 |
-
msgstr ""
|
1504 |
-
|
1505 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:135
|
1506 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:296
|
1507 |
-
msgid "Text"
|
1508 |
-
msgstr ""
|
1509 |
-
|
1510 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:136
|
1511 |
-
#: modules/flow/classes/class-cartflows-flow-shortcodes.php:148
|
1512 |
-
#: modules/widgets/class-cartflows-next-step.php:78
|
1513 |
-
msgid "Next Step"
|
1514 |
-
msgstr ""
|
1515 |
-
|
1516 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:145
|
1517 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:187
|
1518 |
-
msgid "Icon"
|
1519 |
-
msgstr ""
|
1520 |
-
|
1521 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:156
|
1522 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:195
|
1523 |
-
msgid "Icon Position"
|
1524 |
-
msgstr ""
|
1525 |
-
|
1526 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:159
|
1527 |
-
msgid "Before Text"
|
1528 |
-
msgstr ""
|
1529 |
-
|
1530 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:160
|
1531 |
-
msgid "After Text"
|
1532 |
-
msgstr ""
|
1533 |
-
|
1534 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:168
|
1535 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:240
|
1536 |
-
msgid "Icon Spacing"
|
1537 |
-
msgstr ""
|
1538 |
-
|
1539 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:186
|
1540 |
-
msgid "Type"
|
1541 |
-
msgstr ""
|
1542 |
-
|
1543 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:191
|
1544 |
-
msgid "Flat"
|
1545 |
-
msgstr ""
|
1546 |
-
|
1547 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:192
|
1548 |
-
msgid "Gradient"
|
1549 |
-
msgstr ""
|
1550 |
-
|
1551 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:193
|
1552 |
-
msgid "Transparent"
|
1553 |
-
msgstr ""
|
1554 |
-
|
1555 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:194
|
1556 |
-
msgid "3D"
|
1557 |
-
msgstr ""
|
1558 |
-
|
1559 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:204
|
1560 |
-
msgid "Border Size"
|
1561 |
-
msgstr ""
|
1562 |
-
|
1563 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:213
|
1564 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:229
|
1565 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:242
|
1566 |
-
msgid "Hover Styles"
|
1567 |
-
msgstr ""
|
1568 |
-
|
1569 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:217
|
1570 |
-
msgid "Fade Background"
|
1571 |
-
msgstr ""
|
1572 |
-
|
1573 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:218
|
1574 |
-
msgid "Fill Background From Top"
|
1575 |
-
msgstr ""
|
1576 |
-
|
1577 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:219
|
1578 |
-
msgid "Fill Background From Bottom"
|
1579 |
-
msgstr ""
|
1580 |
-
|
1581 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:220
|
1582 |
-
msgid "Fill Background From Left"
|
1583 |
-
msgstr ""
|
1584 |
-
|
1585 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:221
|
1586 |
-
msgid "Fill Background From Right"
|
1587 |
-
msgstr ""
|
1588 |
-
|
1589 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:222
|
1590 |
-
msgid "Fill Background Vertical"
|
1591 |
-
msgstr ""
|
1592 |
-
|
1593 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:223
|
1594 |
-
msgid "Fill Background Diagonal"
|
1595 |
-
msgstr ""
|
1596 |
-
|
1597 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:224
|
1598 |
-
msgid "Fill Background Horizontal"
|
1599 |
-
msgstr ""
|
1600 |
-
|
1601 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:232
|
1602 |
-
msgid "Move Down"
|
1603 |
-
msgstr ""
|
1604 |
-
|
1605 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:233
|
1606 |
-
msgid "Move Up"
|
1607 |
-
msgstr ""
|
1608 |
-
|
1609 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:234
|
1610 |
-
msgid "Move Left"
|
1611 |
-
msgstr ""
|
1612 |
-
|
1613 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:235
|
1614 |
-
msgid "Move Right"
|
1615 |
-
msgstr ""
|
1616 |
-
|
1617 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:236
|
1618 |
-
msgid "Animate Top"
|
1619 |
-
msgstr ""
|
1620 |
-
|
1621 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:237
|
1622 |
-
msgid "Animate Bottom"
|
1623 |
-
msgstr ""
|
1624 |
-
|
1625 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:246
|
1626 |
-
msgid "Appear Icon From Right"
|
1627 |
-
msgstr ""
|
1628 |
-
|
1629 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:247
|
1630 |
-
msgid "Appear Icon From Left"
|
1631 |
-
msgstr ""
|
1632 |
-
|
1633 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:248
|
1634 |
-
msgid "Appear Icon From Top"
|
1635 |
-
msgstr ""
|
1636 |
-
|
1637 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:249
|
1638 |
-
msgid "Appear Icon From Bottom"
|
1639 |
-
msgstr ""
|
1640 |
-
|
1641 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:255
|
1642 |
-
msgid "Structure"
|
1643 |
-
msgstr ""
|
1644 |
-
|
1645 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:259
|
1646 |
-
msgid "Width"
|
1647 |
-
msgstr ""
|
1648 |
-
|
1649 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:263
|
1650 |
-
msgid "Full Width"
|
1651 |
-
msgstr ""
|
1652 |
-
|
1653 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:264
|
1654 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:156
|
1655 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:248
|
1656 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:484
|
1657 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:596
|
1658 |
-
msgid "Custom"
|
1659 |
-
msgstr ""
|
1660 |
-
|
1661 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:280
|
1662 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:299
|
1663 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:298
|
1664 |
-
msgid "Alignment"
|
1665 |
-
msgstr ""
|
1666 |
-
|
1667 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:283
|
1668 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:293
|
1669 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:307
|
1670 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:499
|
1671 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:306
|
1672 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:624
|
1673 |
-
msgid "Center"
|
1674 |
-
msgstr ""
|
1675 |
-
|
1676 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:284
|
1677 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:294
|
1678 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:303
|
1679 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:495
|
1680 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:302
|
1681 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:623
|
1682 |
-
msgid "Left"
|
1683 |
-
msgstr ""
|
1684 |
-
|
1685 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:285
|
1686 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:295
|
1687 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:311
|
1688 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:503
|
1689 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:310
|
1690 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:625
|
1691 |
-
msgid "Right"
|
1692 |
-
msgstr ""
|
1693 |
-
|
1694 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:290
|
1695 |
-
msgid "Mobile Alignment"
|
1696 |
-
msgstr ""
|
1697 |
-
|
1698 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:300
|
1699 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:337
|
1700 |
-
msgid "Padding"
|
1701 |
-
msgstr ""
|
1702 |
-
|
1703 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:314
|
1704 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:443
|
1705 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:696
|
1706 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:389
|
1707 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:398
|
1708 |
-
msgid "Border"
|
1709 |
-
msgstr ""
|
1710 |
-
|
1711 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:338
|
1712 |
-
msgid "Custom Width"
|
1713 |
-
msgstr ""
|
1714 |
-
|
1715 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:347
|
1716 |
-
msgid "Custom Height"
|
1717 |
-
msgstr ""
|
1718 |
-
|
1719 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:356
|
1720 |
-
msgid "Padding Top/Bottom"
|
1721 |
-
msgstr ""
|
1722 |
-
|
1723 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:365
|
1724 |
-
msgid "Padding Left/Right"
|
1725 |
-
msgstr ""
|
1726 |
-
|
1727 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:374
|
1728 |
-
msgid "Round Corners"
|
1729 |
-
msgstr ""
|
1730 |
-
|
1731 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:389
|
1732 |
-
msgid "Colors"
|
1733 |
-
msgstr ""
|
1734 |
-
|
1735 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:440
|
1736 |
-
msgid "Apply Hover Color To"
|
1737 |
-
msgstr ""
|
1738 |
-
|
1739 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:444
|
1740 |
-
msgid "Background"
|
1741 |
-
msgstr ""
|
1742 |
-
|
1743 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:457
|
1744 |
-
msgid "Button Settings"
|
1745 |
-
msgstr ""
|
1746 |
-
|
1747 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:461
|
1748 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:260
|
1749 |
-
msgid "Icon Size"
|
1750 |
-
msgstr ""
|
1751 |
-
|
1752 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:29
|
1753 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:66
|
1754 |
-
#: modules/gutenberg/classes/class-cartflows-block-config.php:442
|
1755 |
-
msgid "Optin Form"
|
1756 |
-
msgstr ""
|
1757 |
-
|
1758 |
-
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:30
|
1759 |
-
msgid "Optin Form."
|
1760 |
-
msgstr ""
|
1761 |
-
|
1762 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:28
|
1763 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:69
|
1764 |
-
#: modules/gutenberg/classes/class-cartflows-block-config.php:125
|
1765 |
-
msgid "Order Details Form"
|
1766 |
-
msgstr ""
|
1767 |
-
|
1768 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:29
|
1769 |
-
msgid "Order Details Form."
|
1770 |
-
msgstr ""
|
1771 |
-
|
1772 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:97
|
1773 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:163
|
1774 |
-
msgid "Thank You Text"
|
1775 |
-
msgstr ""
|
1776 |
-
|
1777 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:98
|
1778 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:165
|
1779 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:176
|
1780 |
-
#: woocommerce/template/checkout/thankyou.php:41
|
1781 |
-
#: woocommerce/template/checkout/thankyou.php:86
|
1782 |
-
msgid "Thank you. Your order has been received."
|
1783 |
-
msgstr ""
|
1784 |
-
|
1785 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:107
|
1786 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:173
|
1787 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:448
|
1788 |
-
msgid "Order Overview"
|
1789 |
-
msgstr ""
|
1790 |
-
|
1791 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:111
|
1792 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:120
|
1793 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:129
|
1794 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:138
|
1795 |
-
msgid "No"
|
1796 |
-
msgstr ""
|
1797 |
-
|
1798 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:116
|
1799 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:357
|
1800 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:185
|
1801 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:591
|
1802 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:284
|
1803 |
-
msgid "Order Details"
|
1804 |
-
msgstr ""
|
1805 |
-
|
1806 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:125
|
1807 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:197
|
1808 |
-
msgid "Billing Address"
|
1809 |
-
msgstr ""
|
1810 |
-
|
1811 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:134
|
1812 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:209
|
1813 |
-
msgid "Shipping Address"
|
1814 |
-
msgstr ""
|
1815 |
-
|
1816 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:149
|
1817 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:233
|
1818 |
-
msgid "Spacing"
|
1819 |
-
msgstr ""
|
1820 |
-
|
1821 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:153
|
1822 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:241
|
1823 |
-
msgid "Heading Bottom Spacing"
|
1824 |
-
msgstr ""
|
1825 |
-
|
1826 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:168
|
1827 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:257
|
1828 |
-
msgid "Spacing Between Sections"
|
1829 |
-
msgstr ""
|
1830 |
-
|
1831 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:217
|
1832 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:364
|
1833 |
-
msgid "Sections Heading"
|
1834 |
-
msgstr ""
|
1835 |
-
|
1836 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:245
|
1837 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:393
|
1838 |
-
msgid "Sections Content"
|
1839 |
-
msgstr ""
|
1840 |
-
|
1841 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:292
|
1842 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:501
|
1843 |
-
msgid "Downloads"
|
1844 |
-
msgstr ""
|
1845 |
-
|
1846 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:296
|
1847 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:361
|
1848 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:427
|
1849 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:75
|
1850 |
-
msgid "Heading Color"
|
1851 |
-
msgstr ""
|
1852 |
-
|
1853 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:310
|
1854 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:376
|
1855 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:442
|
1856 |
-
msgid "Heading Typography"
|
1857 |
-
msgstr ""
|
1858 |
-
|
1859 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:347
|
1860 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:413
|
1861 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:479
|
1862 |
-
msgid "Text Typography"
|
1863 |
-
msgstr ""
|
1864 |
-
|
1865 |
-
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:423
|
1866 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:683
|
1867 |
-
msgid "Customer Details"
|
1868 |
-
msgstr ""
|
1869 |
-
|
1870 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:374
|
1871 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:214
|
1872 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:97
|
1873 |
-
msgid ""
|
1874 |
-
"WooCommerce functions do not exist. If you are in an IFrame, please reload "
|
1875 |
-
"it."
|
1876 |
-
msgstr ""
|
1877 |
-
|
1878 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:375
|
1879 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:215
|
1880 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:98
|
1881 |
-
msgid "Click Here to Reload"
|
1882 |
-
msgstr ""
|
1883 |
-
|
1884 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:404
|
1885 |
-
msgid "Checkout ID not found"
|
1886 |
-
msgstr ""
|
1887 |
-
|
1888 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:407
|
1889 |
-
#. translators: %1$1s, %2$2s Link to article
|
1890 |
-
msgid ""
|
1891 |
-
"It seems that this is not the CartFlows Checkout page where you have added "
|
1892 |
-
"this shortcode. Please refer to this %1$1sarticle%2$2s to know more."
|
1893 |
-
msgstr ""
|
1894 |
-
|
1895 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:475
|
1896 |
-
#: modules/checkout/templates/embed/checkout-template-simple.php:24
|
1897 |
-
#: modules/checkout/templates/wcf-template.php:36
|
1898 |
-
#: modules/optin/templates/optin-template-simple.php:25
|
1899 |
-
msgid "Your cart is currently empty."
|
1900 |
-
msgstr ""
|
1901 |
-
|
1902 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:554
|
1903 |
-
#. translators: %1$1s, %2$2s Link to meta
|
1904 |
-
msgid ""
|
1905 |
-
"No product is selected. Please select products from the %1$1scheckout meta "
|
1906 |
-
"settings%2$2s to continue."
|
1907 |
-
msgstr ""
|
1908 |
-
|
1909 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:649
|
1910 |
-
msgid "Variations Not set"
|
1911 |
-
msgstr ""
|
1912 |
-
|
1913 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:660
|
1914 |
-
msgid "This product can't be purchased"
|
1915 |
-
msgstr ""
|
1916 |
-
|
1917 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1110
|
1918 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1153
|
1919 |
-
msgid "Coupon Code"
|
1920 |
-
msgstr ""
|
1921 |
-
|
1922 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1111
|
1923 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1162
|
1924 |
-
msgid "Apply"
|
1925 |
-
msgstr ""
|
1926 |
-
|
1927 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1299
|
1928 |
-
msgid "Sorry there was a problem removing this coupon."
|
1929 |
-
msgstr ""
|
1930 |
-
|
1931 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1302
|
1932 |
-
msgid "Coupon has been removed."
|
1933 |
-
msgstr ""
|
1934 |
-
|
1935 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1321
|
1936 |
-
msgid "Sorry there was a problem removing "
|
1937 |
-
msgstr ""
|
1938 |
-
|
1939 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1324
|
1940 |
-
msgid " has been removed."
|
1941 |
-
msgstr ""
|
1942 |
-
|
1943 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:94
|
1944 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:169
|
1945 |
-
msgid "Checkout Settings"
|
1946 |
-
msgstr ""
|
1947 |
-
|
1948 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:103
|
1949 |
-
msgid "Checkout Layout & Design"
|
1950 |
-
msgstr ""
|
1951 |
-
|
1952 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:139
|
1953 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:139
|
1954 |
-
msgid "Select Product"
|
1955 |
-
msgstr ""
|
1956 |
-
|
1957 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:145
|
1958 |
-
msgid "Product Options"
|
1959 |
-
msgstr ""
|
1960 |
-
|
1961 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:151
|
1962 |
-
msgid "Order Bump"
|
1963 |
-
msgstr ""
|
1964 |
-
|
1965 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:157
|
1966 |
-
msgid "Checkout Offer"
|
1967 |
-
msgstr ""
|
1968 |
-
|
1969 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:163
|
1970 |
-
msgid "Checkout Fields"
|
1971 |
-
msgstr ""
|
1972 |
-
|
1973 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:186
|
1974 |
-
msgid "Logo (Optional)"
|
1975 |
-
msgstr ""
|
1976 |
-
|
1977 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:271
|
1978 |
-
#. translators: %s: link
|
1979 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Product Options feature."
|
1980 |
-
msgstr ""
|
1981 |
-
|
1982 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:282
|
1983 |
-
#. translators: %s: link.
|
1984 |
-
msgid "Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options"
|
1985 |
-
msgstr ""
|
1986 |
-
|
1987 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:310
|
1988 |
-
msgid "Add this shortcode to your checkout page"
|
1989 |
-
msgstr ""
|
1990 |
-
|
1991 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:345
|
1992 |
-
#. translators: %s: link
|
1993 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon."
|
1994 |
-
msgstr ""
|
1995 |
-
|
1996 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:372
|
1997 |
-
#. translators: %s: link
|
1998 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature"
|
1999 |
-
msgstr ""
|
2000 |
-
|
2001 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:382
|
2002 |
-
#. translators: %s: link
|
2003 |
-
msgid "Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature"
|
2004 |
-
msgstr ""
|
2005 |
-
|
2006 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:409
|
2007 |
-
#. translators: %s: link
|
2008 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature"
|
2009 |
-
msgstr ""
|
2010 |
-
|
2011 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:419
|
2012 |
-
#. translators: %s: link
|
2013 |
-
msgid ""
|
2014 |
-
"Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab "
|
2015 |
-
"feature"
|
2016 |
-
msgstr ""
|
2017 |
-
|
2018 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:442
|
2019 |
-
#. translators: %s: link
|
2020 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature."
|
2021 |
-
msgstr ""
|
2022 |
-
|
2023 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:469
|
2024 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:334
|
2025 |
-
#. translators: %s: link
|
2026 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
|
2027 |
-
msgstr ""
|
2028 |
-
|
2029 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:492
|
2030 |
-
msgid "Place Order Button Text"
|
2031 |
-
msgstr ""
|
2032 |
-
|
2033 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:496
|
2034 |
-
msgid "Place order"
|
2035 |
-
msgstr ""
|
2036 |
-
|
2037 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:498
|
2038 |
-
msgid "It will change the Place Order Button text on checkout page."
|
2039 |
-
msgstr ""
|
2040 |
-
|
2041 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:508
|
2042 |
-
msgid "Enable cart editing on checkout"
|
2043 |
-
msgstr ""
|
2044 |
-
|
2045 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:516
|
2046 |
-
#. translators: %s: link
|
2047 |
-
msgid "Users will able to remove products from the checkout page."
|
2048 |
-
msgstr ""
|
2049 |
-
|
2050 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:557
|
2051 |
-
msgid "Header Logo"
|
2052 |
-
msgstr ""
|
2053 |
-
|
2054 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:565
|
2055 |
-
msgid "Logo Width (In px)"
|
2056 |
-
msgstr ""
|
2057 |
-
|
2058 |
-
#: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:12
|
2059 |
-
#: modules/landing/classes/class-cartflows-landing-meta.php:130
|
2060 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:220
|
2061 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:244
|
2062 |
-
msgid "Shortcodes"
|
2063 |
-
msgstr ""
|
2064 |
-
|
2065 |
-
#: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:18
|
2066 |
-
msgid "Checkout Design"
|
2067 |
-
msgstr ""
|
2068 |
-
|
2069 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:18
|
2070 |
-
msgid "One Column (Available in CartFlows Pro) "
|
2071 |
-
msgstr ""
|
2072 |
-
|
2073 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:19
|
2074 |
-
msgid "Two Step (Available in CartFlows Pro) "
|
2075 |
-
msgstr ""
|
2076 |
-
|
2077 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:25
|
2078 |
-
msgid "Checkout Skin"
|
2079 |
-
msgstr ""
|
2080 |
-
|
2081 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:49
|
2082 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:84
|
2083 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:130
|
2084 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:222
|
2085 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:419
|
2086 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:458
|
2087 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:570
|
2088 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:311
|
2089 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:342
|
2090 |
-
msgid "Font Family"
|
2091 |
-
msgstr ""
|
2092 |
-
|
2093 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:57
|
2094 |
-
msgid "Advance Options"
|
2095 |
-
msgstr ""
|
2096 |
-
|
2097 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:93
|
2098 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:139
|
2099 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:231
|
2100 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:467
|
2101 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:579
|
2102 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:351
|
2103 |
-
msgid "Font Weight"
|
2104 |
-
msgstr ""
|
2105 |
-
|
2106 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:109
|
2107 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:437
|
2108 |
-
msgid "Floating Labels (Available in CartFlows Pro)"
|
2109 |
-
msgstr ""
|
2110 |
-
|
2111 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:147
|
2112 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:239
|
2113 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:475
|
2114 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:587
|
2115 |
-
msgid "Size"
|
2116 |
-
msgstr ""
|
2117 |
-
|
2118 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:151
|
2119 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:243
|
2120 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:479
|
2121 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:591
|
2122 |
-
msgid "Extra Small"
|
2123 |
-
msgstr ""
|
2124 |
-
|
2125 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:152
|
2126 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:244
|
2127 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:480
|
2128 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:592
|
2129 |
-
msgid "Small"
|
2130 |
-
msgstr ""
|
2131 |
-
|
2132 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:153
|
2133 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:245
|
2134 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:481
|
2135 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:593
|
2136 |
-
msgid "Medium"
|
2137 |
-
msgstr ""
|
2138 |
-
|
2139 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:154
|
2140 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:246
|
2141 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:482
|
2142 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:594
|
2143 |
-
msgid "Large"
|
2144 |
-
msgstr ""
|
2145 |
-
|
2146 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:155
|
2147 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:247
|
2148 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:483
|
2149 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:595
|
2150 |
-
msgid "Extra Large"
|
2151 |
-
msgstr ""
|
2152 |
-
|
2153 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:163
|
2154 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:255
|
2155 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:491
|
2156 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:603
|
2157 |
-
msgid "Top Bottom Spacing"
|
2158 |
-
msgstr ""
|
2159 |
-
|
2160 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:171
|
2161 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:263
|
2162 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:499
|
2163 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:611
|
2164 |
-
msgid "Left Right Spacing"
|
2165 |
-
msgstr ""
|
2166 |
-
|
2167 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:179
|
2168 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:515
|
2169 |
-
msgid "Text / Placeholder Color"
|
2170 |
-
msgstr ""
|
2171 |
-
|
2172 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:324
|
2173 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:356
|
2174 |
-
msgid "Sections"
|
2175 |
-
msgstr ""
|
2176 |
-
|
2177 |
-
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:330
|
2178 |
-
msgid "Highlight Area Background Color"
|
2179 |
-
msgstr ""
|
2180 |
-
|
2181 |
-
#: modules/checkout/templates/wcf-template.php:46
|
2182 |
-
msgid "Copyright ©"
|
2183 |
-
msgstr ""
|
2184 |
-
|
2185 |
-
#: modules/checkout/templates/wcf-template.php:50
|
2186 |
-
msgid "All Rights Reserved"
|
2187 |
-
msgstr ""
|
2188 |
-
|
2189 |
-
#: modules/elementor/class-cartflows-el-widgets-loader.php:120
|
2190 |
-
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:327
|
2191 |
-
msgid "Cartflows"
|
2192 |
-
msgstr ""
|
2193 |
-
|
2194 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:203
|
2195 |
-
msgid "Layout"
|
2196 |
-
msgstr ""
|
2197 |
-
|
2198 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:224
|
2199 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:465
|
2200 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:230
|
2201 |
-
#. translators: %s admin link
|
2202 |
-
msgid ""
|
2203 |
-
"This feature is available in the CartFlows Pro. <a href=\"%s\" "
|
2204 |
-
"target=\"_blank\" rel=\"noopener\">Upgrade Now!</a>."
|
2205 |
-
msgstr ""
|
2206 |
-
|
2207 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:247
|
2208 |
-
msgid "Other Settings"
|
2209 |
-
msgstr ""
|
2210 |
-
|
2211 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:254
|
2212 |
-
msgid "Billing Section Text"
|
2213 |
-
msgstr ""
|
2214 |
-
|
2215 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:256
|
2216 |
-
msgid "Billing Details"
|
2217 |
-
msgstr ""
|
2218 |
-
|
2219 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:264
|
2220 |
-
msgid "Shipping Section Text"
|
2221 |
-
msgstr ""
|
2222 |
-
|
2223 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:266
|
2224 |
-
msgid "Shipping Details"
|
2225 |
-
msgstr ""
|
2226 |
-
|
2227 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:274
|
2228 |
-
msgid "Order Review Text"
|
2229 |
-
msgstr ""
|
2230 |
-
|
2231 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:276
|
2232 |
-
#: woocommerce/template/checkout/form-checkout.php:56
|
2233 |
-
msgid "Your order"
|
2234 |
-
msgstr ""
|
2235 |
-
|
2236 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:404
|
2237 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:302
|
2238 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:333
|
2239 |
-
msgid "Color"
|
2240 |
-
msgstr ""
|
2241 |
-
|
2242 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:546
|
2243 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:289
|
2244 |
-
msgid "Inherit"
|
2245 |
-
msgstr ""
|
2246 |
-
|
2247 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:598
|
2248 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:711
|
2249 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:397
|
2250 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:326
|
2251 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:406
|
2252 |
-
msgid "Rounded Corners"
|
2253 |
-
msgstr ""
|
2254 |
-
|
2255 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:652
|
2256 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:351
|
2257 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:368
|
2258 |
-
msgid "Normal"
|
2259 |
-
msgstr ""
|
2260 |
-
|
2261 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:747
|
2262 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:411
|
2263 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:428
|
2264 |
-
msgid "Hover"
|
2265 |
-
msgstr ""
|
2266 |
-
|
2267 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:890
|
2268 |
-
msgid "Section Margin"
|
2269 |
-
msgstr ""
|
2270 |
-
|
2271 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:902
|
2272 |
-
msgid "Section Rounded Corners"
|
2273 |
-
msgstr ""
|
2274 |
-
|
2275 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:932
|
2276 |
-
msgid "Field Validation"
|
2277 |
-
msgstr ""
|
2278 |
-
|
2279 |
-
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:972
|
2280 |
-
msgid "Error Messages"
|
2281 |
-
msgstr ""
|
2282 |
-
|
2283 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:164
|
2284 |
-
msgid "Title"
|
2285 |
-
msgstr ""
|
2286 |
-
|
2287 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:166
|
2288 |
-
msgid "BUY NOW"
|
2289 |
-
msgstr ""
|
2290 |
-
|
2291 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:176
|
2292 |
-
msgid "Sub Title"
|
2293 |
-
msgstr ""
|
2294 |
-
|
2295 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:199
|
2296 |
-
msgid "Before Title"
|
2297 |
-
msgstr ""
|
2298 |
-
|
2299 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:200
|
2300 |
-
msgid "After Title"
|
2301 |
-
msgstr ""
|
2302 |
-
|
2303 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:201
|
2304 |
-
msgid "Before Title & Sub Title"
|
2305 |
-
msgstr ""
|
2306 |
-
|
2307 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:202
|
2308 |
-
msgid "After Title & Sub Title"
|
2309 |
-
msgstr ""
|
2310 |
-
|
2311 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:213
|
2312 |
-
msgid "Icon Vertical Alignment"
|
2313 |
-
msgstr ""
|
2314 |
-
|
2315 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:219
|
2316 |
-
msgid "Top"
|
2317 |
-
msgstr ""
|
2318 |
-
|
2319 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:223
|
2320 |
-
msgid "Middle"
|
2321 |
-
msgstr ""
|
2322 |
-
|
2323 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:315
|
2324 |
-
msgid "Justify"
|
2325 |
-
msgstr ""
|
2326 |
-
|
2327 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:327
|
2328 |
-
msgid "Button Size"
|
2329 |
-
msgstr ""
|
2330 |
-
|
2331 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:418
|
2332 |
-
msgid "Hover Text Color"
|
2333 |
-
msgstr ""
|
2334 |
-
|
2335 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:431
|
2336 |
-
msgid "Hover Background Color"
|
2337 |
-
msgstr ""
|
2338 |
-
|
2339 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:459
|
2340 |
-
msgid "Hover Animation"
|
2341 |
-
msgstr ""
|
2342 |
-
|
2343 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:483
|
2344 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:540
|
2345 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:631
|
2346 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:720
|
2347 |
-
msgid "Content"
|
2348 |
-
msgstr ""
|
2349 |
-
|
2350 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:491
|
2351 |
-
msgid "Text Alignment"
|
2352 |
-
msgstr ""
|
2353 |
-
|
2354 |
-
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:544
|
2355 |
-
msgid "Title and Sub Title Spacing"
|
2356 |
-
msgstr ""
|
2357 |
-
|
2358 |
-
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:349
|
2359 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:544
|
2360 |
-
msgid "Submit Button"
|
2361 |
-
msgstr ""
|
2362 |
-
|
2363 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:175
|
2364 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:187
|
2365 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:199
|
2366 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:211
|
2367 |
-
msgid "Show"
|
2368 |
-
msgstr ""
|
2369 |
-
|
2370 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:176
|
2371 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:188
|
2372 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:200
|
2373 |
-
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:212
|
2374 |
-
msgid "Hide"
|
2375 |
-
msgstr ""
|
2376 |
-
|
2377 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:265
|
2378 |
-
#. translators: %s flow id
|
2379 |
-
msgid "Step not deleted for flow - %s"
|
2380 |
-
msgstr ""
|
2381 |
-
|
2382 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:303
|
2383 |
-
#. translators: %s flow id
|
2384 |
-
msgid "Step deleted for flow - %s"
|
2385 |
-
msgstr ""
|
2386 |
-
|
2387 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:312
|
2388 |
-
#. translators: %s flow id
|
2389 |
-
msgid "This step can not be deleted."
|
2390 |
-
msgstr ""
|
2391 |
-
|
2392 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:344
|
2393 |
-
#. translators: %s flow id
|
2394 |
-
msgid "Steps not sorted for flow - %s"
|
2395 |
-
msgstr ""
|
2396 |
-
|
2397 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:380
|
2398 |
-
#. translators: %s flow id
|
2399 |
-
msgid "Steps sorted for flow - %s"
|
2400 |
-
msgstr ""
|
2401 |
-
|
2402 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:485
|
2403 |
-
msgid "Analytics"
|
2404 |
-
msgstr ""
|
2405 |
-
|
2406 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:502
|
2407 |
-
#. translators: %s: link
|
2408 |
-
msgid "Upgrade to %1$sCartFlows Pro%2$s for Analytics feature"
|
2409 |
-
msgstr ""
|
2410 |
-
|
2411 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:520
|
2412 |
-
msgid "Flow Settings"
|
2413 |
-
msgstr ""
|
2414 |
-
|
2415 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:605
|
2416 |
-
msgid "Enable Test Mode"
|
2417 |
-
msgstr ""
|
2418 |
-
|
2419 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:612
|
2420 |
-
msgid ""
|
2421 |
-
"If you are using WooCommerce plugin then test mode will add random products "
|
2422 |
-
"in your flow, so you can preview it easily while testing."
|
2423 |
-
msgstr ""
|
2424 |
-
|
2425 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:732
|
2426 |
-
#: modules/flow/view/meta-flow-steps.php:145
|
2427 |
-
msgid "Add New Step"
|
2428 |
-
msgstr ""
|
2429 |
-
|
2430 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:802
|
2431 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:166
|
2432 |
-
msgid "View Step"
|
2433 |
-
msgstr ""
|
2434 |
-
|
2435 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:813
|
2436 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:165
|
2437 |
-
msgid "Edit Step"
|
2438 |
-
msgstr ""
|
2439 |
-
|
2440 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:815
|
2441 |
-
msgid "Edit"
|
2442 |
-
msgstr ""
|
2443 |
-
|
2444 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:822
|
2445 |
-
msgid "Clone Step"
|
2446 |
-
msgstr ""
|
2447 |
-
|
2448 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:833
|
2449 |
-
msgid "Delete Step"
|
2450 |
-
msgstr ""
|
2451 |
-
|
2452 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:835
|
2453 |
-
msgid "Delete"
|
2454 |
-
msgstr ""
|
2455 |
-
|
2456 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:844
|
2457 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:846
|
2458 |
-
msgid "A/B Test"
|
2459 |
-
msgstr ""
|
2460 |
-
|
2461 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
2462 |
-
msgid "Flow: "
|
2463 |
-
msgstr ""
|
2464 |
-
|
2465 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
2466 |
-
msgid "Name: "
|
2467 |
-
msgstr ""
|
2468 |
-
|
2469 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:101
|
2470 |
-
msgid "Search Flows"
|
2471 |
-
msgstr ""
|
2472 |
-
|
2473 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:102
|
2474 |
-
msgid "All Flows"
|
2475 |
-
msgstr ""
|
2476 |
-
|
2477 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:103
|
2478 |
-
msgid "Edit Flow"
|
2479 |
-
msgstr ""
|
2480 |
-
|
2481 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:104
|
2482 |
-
msgid "View Flow"
|
2483 |
-
msgstr ""
|
2484 |
-
|
2485 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:105
|
2486 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:107
|
2487 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:167
|
2488 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:169
|
2489 |
-
msgid "Add New"
|
2490 |
-
msgstr ""
|
2491 |
-
|
2492 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:106
|
2493 |
-
msgid "Update Flow"
|
2494 |
-
msgstr ""
|
2495 |
-
|
2496 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:108
|
2497 |
-
msgid "New Flow Name"
|
2498 |
-
msgstr ""
|
2499 |
-
|
2500 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:190
|
2501 |
-
msgid "Upgrade to CartFlows Pro"
|
2502 |
-
msgstr ""
|
2503 |
-
|
2504 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:209
|
2505 |
-
msgid "Slug"
|
2506 |
-
msgstr ""
|
2507 |
-
|
2508 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:321
|
2509 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:322
|
2510 |
-
msgid "Flows"
|
2511 |
-
msgstr ""
|
2512 |
-
|
2513 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:344
|
2514 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:350
|
2515 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:401
|
2516 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:407
|
2517 |
-
#. translators: %s: singular custom post type name
|
2518 |
-
msgid "%s updated."
|
2519 |
-
msgstr ""
|
2520 |
-
|
2521 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:346
|
2522 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:403
|
2523 |
-
#. translators: %s: singular custom post type name
|
2524 |
-
msgid "Custom %s updated."
|
2525 |
-
msgstr ""
|
2526 |
-
|
2527 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:348
|
2528 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:405
|
2529 |
-
#. translators: %s: singular custom post type name
|
2530 |
-
msgid "Custom %s deleted."
|
2531 |
-
msgstr ""
|
2532 |
-
|
2533 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:352
|
2534 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:409
|
2535 |
-
#. translators: %1$s: singular custom post type name ,%2$s: date and time of
|
2536 |
-
#. the revision
|
2537 |
-
msgid "%1$s restored to revision from %2$s"
|
2538 |
-
msgstr ""
|
2539 |
-
|
2540 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:354
|
2541 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:411
|
2542 |
-
#. translators: %s: singular custom post type name
|
2543 |
-
msgid "%s published."
|
2544 |
-
msgstr ""
|
2545 |
-
|
2546 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:356
|
2547 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:413
|
2548 |
-
#. translators: %s: singular custom post type name
|
2549 |
-
msgid "%s saved."
|
2550 |
-
msgstr ""
|
2551 |
-
|
2552 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:358
|
2553 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:415
|
2554 |
-
#. translators: %s: singular custom post type name
|
2555 |
-
msgid "%s submitted."
|
2556 |
-
msgstr ""
|
2557 |
-
|
2558 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:360
|
2559 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:417
|
2560 |
-
#. translators: %s: singular custom post type name
|
2561 |
-
msgid "%s scheduled for."
|
2562 |
-
msgstr ""
|
2563 |
-
|
2564 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:362
|
2565 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:419
|
2566 |
-
#. translators: %s: singular custom post type name
|
2567 |
-
msgid "%s draft updated."
|
2568 |
-
msgstr ""
|
2569 |
-
|
2570 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:163
|
2571 |
-
msgid "Search Steps"
|
2572 |
-
msgstr ""
|
2573 |
-
|
2574 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:164
|
2575 |
-
msgid "All Steps"
|
2576 |
-
msgstr ""
|
2577 |
-
|
2578 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:168
|
2579 |
-
msgid "Update Step"
|
2580 |
-
msgstr ""
|
2581 |
-
|
2582 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:170
|
2583 |
-
msgid "New Step Name"
|
2584 |
-
msgstr ""
|
2585 |
-
|
2586 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:211
|
2587 |
-
msgid "Step Type"
|
2588 |
-
msgstr ""
|
2589 |
-
|
2590 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:221
|
2591 |
-
msgid "Step Flow"
|
2592 |
-
msgstr ""
|
2593 |
-
|
2594 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:246
|
2595 |
-
#: modules/flow/view/meta-flow-steps.php:16
|
2596 |
-
msgid "Optin (Woo)"
|
2597 |
-
msgstr ""
|
2598 |
-
|
2599 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:267
|
2600 |
-
#: modules/flow/view/meta-flow-steps.php:14
|
2601 |
-
msgid "Upsell (Woo)"
|
2602 |
-
msgstr ""
|
2603 |
-
|
2604 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:274
|
2605 |
-
#: modules/flow/view/meta-flow-steps.php:15
|
2606 |
-
msgid "Downsell (Woo)"
|
2607 |
-
msgstr ""
|
2608 |
-
|
2609 |
-
#: modules/flow/view/view-flow-inner-step.php:30
|
2610 |
-
msgid "Control"
|
2611 |
-
msgstr ""
|
2612 |
-
|
2613 |
-
#: modules/flow/view/view-flow-inner-step.php:32
|
2614 |
-
#. translators: %s badge count
|
2615 |
-
msgid "Variation-%s"
|
2616 |
-
msgstr ""
|
2617 |
-
|
2618 |
-
#: modules/flow/view/view-flow-inner-step.php:44
|
2619 |
-
msgid "No Product Assigned"
|
2620 |
-
msgstr ""
|
2621 |
-
|
2622 |
-
#: modules/flow/view/view-flow-inner-step.php:48
|
2623 |
-
msgid "Global Checkout - Remove selected checkout product"
|
2624 |
-
msgstr ""
|
2625 |
-
|
2626 |
-
#: modules/flow/view/view-remote-importer.php:19
|
2627 |
-
msgid "Steps Library"
|
2628 |
-
msgstr ""
|
2629 |
-
|
2630 |
-
#: modules/flow/view/view-remote-importer.php:68
|
2631 |
-
msgid "Create Step"
|
2632 |
-
msgstr ""
|
2633 |
-
|
2634 |
-
#: modules/flow/view/view-remote-importer.php:70
|
2635 |
-
msgid "You need a Cartflows Pro version to import Upsell / Downsell"
|
2636 |
-
msgstr ""
|
2637 |
-
|
2638 |
-
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:182
|
2639 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:307
|
2640 |
-
msgid ""
|
2641 |
-
"No product is selected. Please select a Simple, Virtual and Free product "
|
2642 |
-
"from the meta settings."
|
2643 |
-
msgstr ""
|
2644 |
-
|
2645 |
-
#: modules/landing/classes/class-cartflows-landing-meta.php:66
|
2646 |
-
msgid "Landing Page Settings"
|
2647 |
-
msgstr ""
|
2648 |
-
|
2649 |
-
#: modules/landing/classes/class-cartflows-landing-meta.php:171
|
2650 |
-
msgid "Next Step Link"
|
2651 |
-
msgstr ""
|
2652 |
-
|
2653 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:247
|
2654 |
-
msgid "Please place shortcode on Optin step-type only."
|
2655 |
-
msgstr ""
|
2656 |
-
|
2657 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:324
|
2658 |
-
msgid "Please update the selected product's price to zero (0)."
|
2659 |
-
msgstr ""
|
2660 |
-
|
2661 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:333
|
2662 |
-
#: modules/optin/classes/class-cartflows-optin-markup.php:337
|
2663 |
-
msgid "Please select a Simple, Virtual and Free product."
|
2664 |
-
msgstr ""
|
2665 |
-
|
2666 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:94
|
2667 |
-
msgid "Optin Settings"
|
2668 |
-
msgstr ""
|
2669 |
-
|
2670 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:103
|
2671 |
-
msgid "Optin Design"
|
2672 |
-
msgstr ""
|
2673 |
-
|
2674 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:145
|
2675 |
-
msgid "Form Fields"
|
2676 |
-
msgstr ""
|
2677 |
-
|
2678 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:226
|
2679 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:250
|
2680 |
-
msgid "Design"
|
2681 |
-
msgstr ""
|
2682 |
-
|
2683 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:277
|
2684 |
-
msgid "Add this shortcode to your optin page"
|
2685 |
-
msgstr ""
|
2686 |
-
|
2687 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:302
|
2688 |
-
msgid "Select Free Product"
|
2689 |
-
msgstr ""
|
2690 |
-
|
2691 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:303
|
2692 |
-
msgid "Select Free and Virtual product only."
|
2693 |
-
msgstr ""
|
2694 |
-
|
2695 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:357
|
2696 |
-
msgid "Pass Fields as URL Parameters"
|
2697 |
-
msgstr ""
|
2698 |
-
|
2699 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:360
|
2700 |
-
msgid "Enable"
|
2701 |
-
msgstr ""
|
2702 |
-
|
2703 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:361
|
2704 |
-
msgid ""
|
2705 |
-
"You can pass specific fields from the form to next step as URL query "
|
2706 |
-
"parameters."
|
2707 |
-
msgstr ""
|
2708 |
-
|
2709 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:372
|
2710 |
-
msgid "Enter form field"
|
2711 |
-
msgstr ""
|
2712 |
-
|
2713 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:375
|
2714 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:385
|
2715 |
-
msgid "Enter comma seprated field name. E.g. first_name, last_name"
|
2716 |
-
msgstr ""
|
2717 |
-
|
2718 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:377
|
2719 |
-
msgid "Fields to pass, separated by commas"
|
2720 |
-
msgstr ""
|
2721 |
-
|
2722 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:387
|
2723 |
-
#. translators: %s: link
|
2724 |
-
msgid ""
|
2725 |
-
"You can pass field value as a URL parameter to the next step. %1$sClick "
|
2726 |
-
"here%2$s for more information."
|
2727 |
-
msgstr ""
|
2728 |
-
|
2729 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:550
|
2730 |
-
msgid "Button Text"
|
2731 |
-
msgstr ""
|
2732 |
-
|
2733 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:561
|
2734 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:319
|
2735 |
-
msgid "Font Size"
|
2736 |
-
msgstr ""
|
2737 |
-
|
2738 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:619
|
2739 |
-
msgid "Position"
|
2740 |
-
msgstr ""
|
2741 |
-
|
2742 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:132
|
2743 |
-
msgid "No completed or processing order found to show the order details form demo."
|
2744 |
-
msgstr ""
|
2745 |
-
|
2746 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:136
|
2747 |
-
msgid "Order not found. You cannot access this page directly."
|
2748 |
-
msgstr ""
|
2749 |
-
|
2750 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:95
|
2751 |
-
msgid "Thank You Settings"
|
2752 |
-
msgstr ""
|
2753 |
-
|
2754 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:104
|
2755 |
-
msgid "Thank You Design"
|
2756 |
-
msgstr ""
|
2757 |
-
|
2758 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:172
|
2759 |
-
msgid "Thank You Page Text"
|
2760 |
-
msgstr ""
|
2761 |
-
|
2762 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:178
|
2763 |
-
msgid "It will change the default text on thank you page."
|
2764 |
-
msgstr ""
|
2765 |
-
|
2766 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:186
|
2767 |
-
msgid "Redirect After Purchase"
|
2768 |
-
msgstr ""
|
2769 |
-
|
2770 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:195
|
2771 |
-
msgid "Redirect Link"
|
2772 |
-
msgstr ""
|
2773 |
-
|
2774 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:199
|
2775 |
-
msgid "https://"
|
2776 |
-
msgstr ""
|
2777 |
-
|
2778 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:256
|
2779 |
-
msgid "Edit Fields"
|
2780 |
-
msgstr ""
|
2781 |
-
|
2782 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:359
|
2783 |
-
msgid "Advanced Options"
|
2784 |
-
msgstr ""
|
2785 |
-
|
2786 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:369
|
2787 |
-
msgid "Container Width (In px)"
|
2788 |
-
msgstr ""
|
2789 |
-
|
2790 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:391
|
2791 |
-
msgid "Enable Order Overview "
|
2792 |
-
msgstr ""
|
2793 |
-
|
2794 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:399
|
2795 |
-
msgid "Enable Order Details "
|
2796 |
-
msgstr ""
|
2797 |
-
|
2798 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:407
|
2799 |
-
msgid "Enable Billing Details "
|
2800 |
-
msgstr ""
|
2801 |
-
|
2802 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:415
|
2803 |
-
msgid "Enable Shipping Details "
|
2804 |
-
msgstr ""
|
2805 |
-
|
2806 |
-
#: modules/widgets/class-cartflows-next-step.php:24
|
2807 |
-
msgid "CartFlows Next Step"
|
2808 |
-
msgstr ""
|
2809 |
-
|
2810 |
-
#: modules/widgets/class-cartflows-next-step.php:26
|
2811 |
-
msgid "Next Step Widgets"
|
2812 |
-
msgstr ""
|
2813 |
-
|
2814 |
-
#: modules/widgets/class-cartflows-next-step.php:106
|
2815 |
-
msgid "New title"
|
2816 |
-
msgstr ""
|
2817 |
-
|
2818 |
-
#: modules/widgets/class-cartflows-next-step.php:123
|
2819 |
-
msgid "Title:"
|
2820 |
-
msgstr ""
|
2821 |
-
|
2822 |
-
#: modules/widgets/class-cartflows-next-step.php:127
|
2823 |
-
msgid "Flow ID:"
|
2824 |
-
msgstr ""
|
2825 |
-
|
2826 |
-
#: modules/widgets/class-cartflows-next-step.php:131
|
2827 |
-
msgid "Step ID:"
|
2828 |
-
msgstr ""
|
2829 |
-
|
2830 |
-
#: woocommerce/template/cart/cart-shipping.php:51
|
2831 |
-
#. Translators: $s shipping destination.
|
2832 |
-
msgid "Estimate for %s."
|
2833 |
-
msgstr ""
|
2834 |
-
|
2835 |
-
#: woocommerce/template/cart/cart-shipping.php:52
|
2836 |
-
msgid "Change address"
|
2837 |
-
msgstr ""
|
2838 |
-
|
2839 |
-
#: woocommerce/template/cart/cart-shipping.php:54
|
2840 |
-
msgid "This is only an estimate. Prices will be updated during checkout."
|
2841 |
-
msgstr ""
|
2842 |
-
|
2843 |
-
#: woocommerce/template/cart/cart-shipping.php:61
|
2844 |
-
msgid "Enter your address to view shipping options."
|
2845 |
-
msgstr ""
|
2846 |
-
|
2847 |
-
#: woocommerce/template/cart/cart-shipping.php:63
|
2848 |
-
msgid ""
|
2849 |
-
"There are no shipping methods available. Please ensure that your address "
|
2850 |
-
"has been entered correctly, or contact us if you need any help."
|
2851 |
-
msgstr ""
|
2852 |
-
|
2853 |
-
#: woocommerce/template/cart/cart-shipping.php:66
|
2854 |
-
#. Translators: $s shipping destination.
|
2855 |
-
msgid "No shipping options were found for %s."
|
2856 |
-
msgstr ""
|
2857 |
-
|
2858 |
-
#: woocommerce/template/cart/cart-shipping.php:67
|
2859 |
-
msgid "Enter a different address"
|
2860 |
-
msgstr ""
|
2861 |
-
|
2862 |
-
#: woocommerce/template/checkout/form-billing.php:27
|
2863 |
-
msgid "Billing & Shipping"
|
2864 |
-
msgstr ""
|
2865 |
-
|
2866 |
-
#: woocommerce/template/checkout/form-billing.php:31
|
2867 |
-
msgid "Billing details"
|
2868 |
-
msgstr ""
|
2869 |
-
|
2870 |
-
#: woocommerce/template/checkout/form-billing.php:59
|
2871 |
-
msgid "Create an account?"
|
2872 |
-
msgstr ""
|
2873 |
-
|
2874 |
-
#: woocommerce/template/checkout/form-checkout.php:26
|
2875 |
-
msgid "You must be logged in to checkout."
|
2876 |
-
msgstr ""
|
2877 |
-
|
2878 |
-
#: woocommerce/template/checkout/form-coupon.php:26
|
2879 |
-
msgid "Have a coupon?"
|
2880 |
-
msgstr ""
|
2881 |
-
|
2882 |
-
#: woocommerce/template/checkout/form-coupon.php:26
|
2883 |
-
msgid "Click here to enter your code"
|
2884 |
-
msgstr ""
|
2885 |
-
|
2886 |
-
#: woocommerce/template/checkout/form-coupon.php:31
|
2887 |
-
msgid "If you have a coupon code, please apply it below."
|
2888 |
-
msgstr ""
|
2889 |
-
|
2890 |
-
#: woocommerce/template/checkout/form-coupon.php:34
|
2891 |
-
msgid "Coupon code"
|
2892 |
-
msgstr ""
|
2893 |
-
|
2894 |
-
#: woocommerce/template/checkout/form-coupon.php:38
|
2895 |
-
msgid "Apply coupon"
|
2896 |
-
msgstr ""
|
2897 |
-
|
2898 |
-
#: woocommerce/template/checkout/form-login.php:26
|
2899 |
-
msgid "Returning customer?"
|
2900 |
-
msgstr ""
|
2901 |
-
|
2902 |
-
#: woocommerce/template/checkout/form-login.php:26
|
2903 |
-
msgid "Click here to login"
|
2904 |
-
msgstr ""
|
2905 |
-
|
2906 |
-
#: woocommerce/template/checkout/form-login.php:32
|
2907 |
-
msgid ""
|
2908 |
-
"If you have shopped with us before, please enter your details below. If you "
|
2909 |
-
"are a new customer, please proceed to the Billing & Shipping section."
|
2910 |
-
msgstr ""
|
2911 |
-
|
2912 |
-
#: woocommerce/template/checkout/form-shipping.php:26
|
2913 |
-
msgid "Ship to a different address?"
|
2914 |
-
msgstr ""
|
2915 |
-
|
2916 |
-
#: woocommerce/template/checkout/form-shipping.php:57
|
2917 |
-
msgid "Additional information"
|
2918 |
-
msgstr ""
|
2919 |
-
|
2920 |
-
#: woocommerce/template/checkout/payment.php:32
|
2921 |
-
msgid ""
|
2922 |
-
"Sorry, it seems that there are no available payment methods for your state. "
|
2923 |
-
"Please contact us if you require assistance or wish to make alternate "
|
2924 |
-
"arrangements."
|
2925 |
-
msgstr ""
|
2926 |
-
|
2927 |
-
#: woocommerce/template/checkout/payment.php:32
|
2928 |
-
msgid "Please fill in your details above to see available payment methods."
|
2929 |
-
msgstr ""
|
2930 |
-
|
2931 |
-
#: woocommerce/template/checkout/payment.php:41
|
2932 |
-
#. translators: $1 and $2 opening and closing emphasis tags respectively
|
2933 |
-
msgid ""
|
2934 |
-
"Since your browser does not support JavaScript, or it is disabled, please "
|
2935 |
-
"ensure you click the %1$sUpdate Totals%2$s button before placing your "
|
2936 |
-
"order. You may be charged more than the amount stated above if you fail to "
|
2937 |
-
"do so."
|
2938 |
-
msgstr ""
|
2939 |
-
|
2940 |
-
#: woocommerce/template/checkout/payment.php:43
|
2941 |
-
msgid "Update totals"
|
2942 |
-
msgstr ""
|
2943 |
-
|
2944 |
-
#: woocommerce/template/checkout/review-order.php:26
|
2945 |
-
#: woocommerce/template/order/order-details.php:57
|
2946 |
-
msgid "Product"
|
2947 |
-
msgstr ""
|
2948 |
-
|
2949 |
-
#: woocommerce/template/checkout/review-order.php:27
|
2950 |
-
#: woocommerce/template/checkout/review-order.php:107
|
2951 |
-
#: woocommerce/template/order/order-details.php:58
|
2952 |
-
msgid "Total"
|
2953 |
-
msgstr ""
|
2954 |
-
|
2955 |
-
#: woocommerce/template/checkout/review-order.php:60
|
2956 |
-
msgid "Subtotal"
|
2957 |
-
msgstr ""
|
2958 |
-
|
2959 |
-
#: woocommerce/template/checkout/thankyou.php:30
|
2960 |
-
msgid ""
|
2961 |
-
"Unfortunately your order cannot be processed as the originating "
|
2962 |
-
"bank/merchant has declined your transaction. Please attempt your purchase "
|
2963 |
-
"again."
|
2964 |
-
msgstr ""
|
2965 |
-
|
2966 |
-
#: woocommerce/template/checkout/thankyou.php:33
|
2967 |
-
msgid "Pay"
|
2968 |
-
msgstr ""
|
2969 |
-
|
2970 |
-
#: woocommerce/template/checkout/thankyou.php:35
|
2971 |
-
msgid "My account"
|
2972 |
-
msgstr ""
|
2973 |
-
|
2974 |
-
#: woocommerce/template/checkout/thankyou.php:49
|
2975 |
-
msgid "Order number:"
|
2976 |
-
msgstr ""
|
2977 |
-
|
2978 |
-
#: woocommerce/template/checkout/thankyou.php:54
|
2979 |
-
msgid "Date:"
|
2980 |
-
msgstr ""
|
2981 |
-
|
2982 |
-
#: woocommerce/template/checkout/thankyou.php:60
|
2983 |
-
msgid "Email:"
|
2984 |
-
msgstr ""
|
2985 |
-
|
2986 |
-
#: woocommerce/template/checkout/thankyou.php:67
|
2987 |
-
msgid "Total:"
|
2988 |
-
msgstr ""
|
2989 |
-
|
2990 |
-
#: woocommerce/template/checkout/thankyou.php:74
|
2991 |
-
msgid "Payment method:"
|
2992 |
-
msgstr ""
|
2993 |
-
|
2994 |
-
#: woocommerce/template/global/form-login.php:34
|
2995 |
-
msgid "Username or email"
|
2996 |
-
msgstr ""
|
2997 |
-
|
2998 |
-
#: woocommerce/template/global/form-login.php:38
|
2999 |
-
msgid "Password"
|
3000 |
-
msgstr ""
|
3001 |
-
|
3002 |
-
#: woocommerce/template/global/form-login.php:48
|
3003 |
-
msgid "Login"
|
3004 |
-
msgstr ""
|
3005 |
-
|
3006 |
-
#: woocommerce/template/global/form-login.php:53
|
3007 |
-
msgid "Remember me"
|
3008 |
-
msgstr ""
|
3009 |
-
|
3010 |
-
#: woocommerce/template/global/form-login.php:57
|
3011 |
-
msgid "Lost your password?"
|
3012 |
-
msgstr ""
|
3013 |
-
|
3014 |
-
#: woocommerce/template/order/order-details.php:51
|
3015 |
-
msgid "Order details"
|
3016 |
-
msgstr ""
|
3017 |
-
|
3018 |
-
#: woocommerce/template/order/order-details.php:99
|
3019 |
-
msgid "Note:"
|
3020 |
-
msgstr ""
|
3021 |
-
|
3022 |
-
#. Plugin Name of the plugin/theme
|
3023 |
-
msgid "CartFlows"
|
3024 |
-
msgstr ""
|
3025 |
-
|
3026 |
-
#. Author URI of the plugin/theme
|
3027 |
-
msgid "https://cartflows.com/"
|
3028 |
-
msgstr ""
|
3029 |
-
|
3030 |
-
#. Description of the plugin/theme
|
3031 |
-
msgid "Create beautiful checkout pages & sales flows for WooCommerce."
|
3032 |
-
msgstr ""
|
3033 |
-
|
3034 |
-
#. Author of the plugin/theme
|
3035 |
-
msgid "CartFlows Inc"
|
3036 |
-
msgstr ""
|
3037 |
-
|
3038 |
-
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:262
|
3039 |
-
msgctxt "Width."
|
3040 |
-
msgid "Auto"
|
3041 |
-
msgstr ""
|
3042 |
-
|
3043 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:99
|
3044 |
-
msgctxt "flow general name"
|
3045 |
-
msgid "Flows"
|
3046 |
-
msgstr ""
|
3047 |
-
|
3048 |
-
#: modules/flow/classes/class-cartflows-flow-post-type.php:100
|
3049 |
-
msgctxt "flow singular name"
|
3050 |
-
msgid "Flow"
|
3051 |
-
msgstr ""
|
3052 |
-
|
3053 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:161
|
3054 |
-
msgctxt "flow step general name"
|
3055 |
-
msgid "Steps"
|
3056 |
-
msgstr ""
|
3057 |
-
|
3058 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:162
|
3059 |
-
msgctxt "flow step singular name"
|
3060 |
-
msgid "Step"
|
3061 |
-
msgstr ""
|
3062 |
-
|
3063 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:315
|
3064 |
-
msgctxt "cartflows"
|
3065 |
-
msgid "CartFlows — Boxed"
|
3066 |
-
msgstr ""
|
3067 |
-
|
3068 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:316
|
3069 |
-
msgctxt "cartflows"
|
3070 |
-
msgid "Template for Page Builders"
|
3071 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 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.5.21\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
+
"POT-Creation-Date: 2020-11-05 12:33:23+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: 2020-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-i18n 1.0.3\n"
|
26 |
+
|
27 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:211
|
28 |
+
#. translators: %s product name
|
29 |
+
msgid ""
|
30 |
+
"Want to help make <strong>%1s</strong> even more awesome? Allow us to "
|
31 |
+
"collect non-sensitive diagnostic data and usage information. "
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:214
|
35 |
+
msgid "This will be applicable for all sites from the network."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:238
|
39 |
+
#. translators: %s usage doc link
|
40 |
+
msgid " Know More."
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:246
|
44 |
+
msgid "Yes! Allow it"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:255
|
48 |
+
msgid "No Thanks"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:359
|
52 |
+
msgid "Usage Tracking"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:403
|
56 |
+
#. translators: %s Product title
|
57 |
+
msgid "Allow %s products to track non-sensitive usage tracking data."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:406
|
61 |
+
msgid " This will be applicable for all sites from the network."
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:411
|
65 |
+
msgid "Learn More."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: classes/batch-process/class-cartflows-importer-elementor.php:44
|
69 |
+
msgid "Invalid content."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: classes/batch-process/class-cartflows-importer-elementor.php:56
|
73 |
+
msgid "Invalid content. Expected an array."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: classes/batch-process/helpers/class-wp-background-process.php:435
|
77 |
+
msgid "Every %d Minutes"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: classes/class-cartflows-admin-fields.php:241
|
81 |
+
msgid "Select"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: classes/class-cartflows-admin-fields.php:244
|
85 |
+
msgid "No Checkout Steps"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: classes/class-cartflows-admin-fields.php:270
|
89 |
+
#. translators: %s: link
|
90 |
+
msgid ""
|
91 |
+
"Be sure not to add any product in above selected Global Checkout step. "
|
92 |
+
"Please read information about how to set up Global Checkout %1$shere%2$s."
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: classes/class-cartflows-admin.php:186 includes/admin/cartflows-home.php:11
|
96 |
+
msgid "Home"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: classes/class-cartflows-admin.php:191 classes/class-cartflows-admin.php:192
|
100 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:151
|
101 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:140
|
102 |
+
msgid "Settings"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: classes/class-cartflows-admin.php:487
|
106 |
+
msgid "This page requires WooCommerce plugin installed and activated!"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: classes/class-cartflows-admin.php:490
|
110 |
+
msgid "Installing and activating.."
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: classes/class-cartflows-admin.php:491
|
114 |
+
msgid "There was an error with the installation of plugin."
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: classes/class-cartflows-admin.php:553
|
118 |
+
msgid "Flows Library"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: classes/class-cartflows-admin.php:560
|
122 |
+
#: modules/flow/view/view-remote-importer.php:26
|
123 |
+
msgid "Ready Templates"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: classes/class-cartflows-admin.php:563
|
127 |
+
#: modules/flow/view/view-remote-importer.php:29
|
128 |
+
msgid "Create Your Own"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: classes/class-cartflows-admin.php:574
|
132 |
+
#: modules/flow/view/view-remote-importer.php:41
|
133 |
+
msgid "Search Sites"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: classes/class-cartflows-admin.php:575
|
137 |
+
#: modules/flow/view/view-remote-importer.php:42
|
138 |
+
msgid "Search Flow..."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: classes/class-cartflows-admin.php:592
|
142 |
+
msgid "Design Your Flow"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: classes/class-cartflows-admin.php:593
|
146 |
+
#: classes/class-cartflows-importer.php:665
|
147 |
+
#: classes/class-cartflows-importer.php:764
|
148 |
+
#: modules/flow/view/view-remote-importer.php:72
|
149 |
+
msgid "Learn How"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: classes/class-cartflows-api.php:369
|
153 |
+
msgid "Request successfully processed!"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: classes/class-cartflows-cloning.php:284
|
157 |
+
#. translators: %s flow id
|
158 |
+
msgid "Can't clone this step - %1$s. Flow - %2$s"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: classes/class-cartflows-cloning.php:401
|
162 |
+
#. translators: %s flow id
|
163 |
+
msgid "Step - %1$s cloned. Flow - %2$s"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: classes/class-cartflows-cloning.php:427
|
167 |
+
msgid "Clone this flow"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: classes/class-cartflows-cloning.php:427
|
171 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:824
|
172 |
+
msgid "Clone"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: classes/class-cartflows-default-meta.php:735
|
176 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:554
|
177 |
+
msgid "Submit"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: classes/class-cartflows-flow-frontend.php:53
|
181 |
+
msgid ""
|
182 |
+
"Test mode is active — which displays random products for previewing. It can "
|
183 |
+
"be deactivated from the flow settings in the admin dashboard."
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: classes/class-cartflows-flow-frontend.php:58
|
187 |
+
msgid "Click here to disable it"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: classes/class-cartflows-functions.php:579
|
191 |
+
#. translators: %1$s page builder name "string"
|
192 |
+
msgid ""
|
193 |
+
"We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can "
|
194 |
+
"add/change/update design settings directly from the page builder as well."
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: classes/class-cartflows-functions.php:580
|
198 |
+
msgid "Learn More »"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: classes/class-cartflows-importer.php:81
|
202 |
+
msgid "Export this flow"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: classes/class-cartflows-importer.php:81 includes/exporter.php:18
|
206 |
+
msgid "Export"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: classes/class-cartflows-importer.php:92
|
210 |
+
msgid "Flow Export"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: classes/class-cartflows-importer.php:93
|
214 |
+
msgid "Flow Import"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: classes/class-cartflows-importer.php:104
|
218 |
+
msgid "No post to export has been supplied!"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: classes/class-cartflows-importer.php:278
|
222 |
+
msgid "Please upload a valid .json file"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: classes/class-cartflows-importer.php:284
|
226 |
+
msgid "Please upload a file to import"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: classes/class-cartflows-importer.php:506
|
230 |
+
msgid "Successfully imported flows."
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: classes/class-cartflows-importer.php:538
|
234 |
+
msgid "Loading Steps"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: classes/class-cartflows-importer.php:540
|
238 |
+
msgid "Getting steps from the cloud. Please wait for the moment."
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: classes/class-cartflows-importer.php:551
|
242 |
+
msgid "Searching Template.."
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: classes/class-cartflows-importer.php:553
|
246 |
+
msgid "Getting templates from the cloud. Please wait for the moment."
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: classes/class-cartflows-importer.php:562
|
250 |
+
msgid "Importing.."
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: classes/class-cartflows-importer.php:571
|
254 |
+
#: classes/class-cartflows-importer.php:611
|
255 |
+
msgid "Imported"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: classes/class-cartflows-importer.php:572
|
259 |
+
#: classes/class-cartflows-importer.php:612
|
260 |
+
msgid "Thanks for patience"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: classes/class-cartflows-importer.php:581
|
264 |
+
#: classes/class-cartflows-importer.php:593
|
265 |
+
msgid "Coming Soon!"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: classes/class-cartflows-importer.php:612
|
269 |
+
msgid "Redirecting to the Elementor edit window."
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: classes/class-cartflows-importer.php:658
|
273 |
+
#: classes/class-cartflows-importer.php:774
|
274 |
+
msgid "Pro"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: classes/class-cartflows-importer.php:699
|
278 |
+
#: classes/class-cartflows-importer.php:806
|
279 |
+
msgid "Activate License"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: classes/class-cartflows-importer.php:701
|
283 |
+
#: classes/class-cartflows-importer.php:808
|
284 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:503
|
285 |
+
msgid "Get Pro"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: classes/class-cartflows-importer.php:726
|
289 |
+
msgid "Create"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: classes/class-cartflows-importer.php:825
|
293 |
+
msgid "Under Maintenance.."
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: classes/class-cartflows-importer.php:826
|
297 |
+
msgid ""
|
298 |
+
"If you are seeing this message, most likely our servers are under routine "
|
299 |
+
"maintenance and we will be back shortly."
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: classes/class-cartflows-importer.php:827
|
303 |
+
msgid ""
|
304 |
+
"In rare case, it is possible your website is having trouble connecting with "
|
305 |
+
"ours. If you need help, please feel free to get in touch with us from our "
|
306 |
+
"website.."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: classes/class-cartflows-importer.php:857
|
310 |
+
#. translators: %s: Plugin string
|
311 |
+
msgid ""
|
312 |
+
"%1$s to see CartFlows templates. If you prefer another page builder tool, "
|
313 |
+
"you can <a href=\"%2$s\" target=\"blank\">select it here</a>."
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: classes/class-cartflows-importer.php:872
|
317 |
+
msgid "All"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: classes/class-cartflows-importer.php:875
|
321 |
+
msgid "Select Step Type"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: classes/class-cartflows-importer.php:959
|
325 |
+
msgid "Import from Cloud"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: classes/class-cartflows-importer.php:1265
|
329 |
+
msgid "Sales Landing"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: classes/class-cartflows-importer.php:1269
|
333 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:253
|
334 |
+
#: modules/flow/view/meta-flow-steps.php:12
|
335 |
+
msgid "Checkout (Woo)"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: classes/class-cartflows-importer.php:1273
|
339 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:260
|
340 |
+
#: modules/flow/view/meta-flow-steps.php:13
|
341 |
+
msgid "Thank You (Woo)"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: classes/class-cartflows-importer.php:1281
|
345 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:239
|
346 |
+
#: modules/flow/view/meta-flow-steps.php:11
|
347 |
+
msgid "Landing"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: classes/class-cartflows-importer.php:1285
|
351 |
+
msgid "Thank You"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: classes/class-cartflows-importer.php:1395
|
355 |
+
#. translators: %s: template ID
|
356 |
+
msgid "Invalid template id %1$s or post id %2$s."
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: classes/class-cartflows-importer.php:1470
|
360 |
+
#. translators: %s: flow ID
|
361 |
+
msgid "Invalid flow id %1$s OR step type %2$s."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: classes/class-cartflows-importer.php:1595
|
365 |
+
msgid ""
|
366 |
+
"Elementor is not activated. Please activate plugin Elementor Page Builder "
|
367 |
+
"to import the step."
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: classes/class-cartflows-importer.php:1698
|
371 |
+
msgid "Action failed. Invalid Security Nonce."
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: classes/class-cartflows-importer.php:1705
|
375 |
+
msgid "User have not plugin install permissions."
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: classes/class-cartflows-importer.php:1727
|
379 |
+
msgid "Plugin Successfully Activated"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: classes/class-cartflows-learndash-compatibility.php:86
|
383 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:329
|
384 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:521
|
385 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:216
|
386 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:245
|
387 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:192
|
388 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:338
|
389 |
+
msgid "None"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: classes/class-cartflows-learndash-compatibility.php:113
|
393 |
+
#. translators: 1: anchor start, 2: anchor close
|
394 |
+
msgid ""
|
395 |
+
"Non-enrolled students will redirect to the selected CartFlows template. If "
|
396 |
+
"you have not created any Flow already, add new Flow from %1$shere%2$s."
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: classes/class-cartflows-learndash-compatibility.php:119
|
400 |
+
msgid "Select CartFlows Template for this Course"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: classes/class-cartflows-loader.php:233
|
404 |
+
#. translators: %s: html tags
|
405 |
+
msgid ""
|
406 |
+
"You are using an older version of %1$sCartFlows Pro%2$s. Please update "
|
407 |
+
"%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: classes/class-cartflows-loader.php:517
|
411 |
+
#. translators: %s: html tags
|
412 |
+
msgid ""
|
413 |
+
"This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
|
414 |
+
"activated."
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: classes/class-cartflows-loader.php:527
|
418 |
+
msgid "Activate WooCommerce"
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: classes/class-cartflows-loader.php:535
|
422 |
+
msgid "Install WooCommerce"
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: classes/class-cartflows-logger.php:161
|
426 |
+
msgid "Action failed. Please refresh the page and retry."
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
#: classes/class-cartflows-meta-fields.php:61
|
430 |
+
msgid "Thin 100"
|
431 |
+
msgstr ""
|
432 |
+
|
433 |
+
#: classes/class-cartflows-meta-fields.php:62
|
434 |
+
msgid "Extra-Light 200"
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: classes/class-cartflows-meta-fields.php:63
|
438 |
+
msgid "Light 300"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: classes/class-cartflows-meta-fields.php:64
|
442 |
+
msgid "Normal 400"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: classes/class-cartflows-meta-fields.php:65
|
446 |
+
msgid "Medium 500"
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: classes/class-cartflows-meta-fields.php:66
|
450 |
+
msgid "Semi-Bold 600"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: classes/class-cartflows-meta-fields.php:67
|
454 |
+
msgid "Bold 700"
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: classes/class-cartflows-meta-fields.php:68
|
458 |
+
msgid "Extra-Bold 800"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: classes/class-cartflows-meta-fields.php:69
|
462 |
+
msgid "Ultra-Bold 900"
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: classes/class-cartflows-meta-fields.php:182
|
466 |
+
#. Translators: %d stock amount
|
467 |
+
msgid "Stock: %d"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: classes/class-cartflows-meta-fields.php:765
|
471 |
+
#: includes/meta-fields/generate-product-repeater.php:30
|
472 |
+
msgid "Search for a product…"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: classes/class-cartflows-meta-fields.php:816
|
476 |
+
msgid "Search for a coupon…"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: classes/class-cartflows-meta.php:34
|
480 |
+
msgid "Update"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: classes/class-cartflows-meta.php:42
|
484 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:95
|
485 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:763
|
486 |
+
msgid "Back to edit Flow"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: classes/class-cartflows-meta.php:63
|
490 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:175
|
491 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:136
|
492 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:157
|
493 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:146
|
494 |
+
msgid "Custom Script"
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#: classes/class-cartflows-meta.php:66
|
498 |
+
msgid ""
|
499 |
+
"Custom script lets you add your own custom script on front end of this flow "
|
500 |
+
"page."
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: classes/class-cartflows-metabox.php:59
|
504 |
+
msgid "Flow Details"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: classes/class-cartflows-wizard.php:94
|
508 |
+
msgid "Thanks for installing and using CartFlows!"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: classes/class-cartflows-wizard.php:95
|
512 |
+
msgid ""
|
513 |
+
"It is easy to use the CartFlows. Please use the setup wizard to quick start "
|
514 |
+
"setup."
|
515 |
+
msgstr ""
|
516 |
+
|
517 |
+
#: classes/class-cartflows-wizard.php:97
|
518 |
+
msgid "Start Wizard"
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: classes/class-cartflows-wizard.php:98
|
522 |
+
msgid "Skip Setup"
|
523 |
+
msgstr ""
|
524 |
+
|
525 |
+
#: classes/class-cartflows-wizard.php:128
|
526 |
+
msgid "Welcome"
|
527 |
+
msgstr ""
|
528 |
+
|
529 |
+
#: classes/class-cartflows-wizard.php:133
|
530 |
+
msgid "Page Builder"
|
531 |
+
msgstr ""
|
532 |
+
|
533 |
+
#: classes/class-cartflows-wizard.php:137
|
534 |
+
msgid "Checkout"
|
535 |
+
msgstr ""
|
536 |
+
|
537 |
+
#: classes/class-cartflows-wizard.php:141
|
538 |
+
msgid "Training"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
#: classes/class-cartflows-wizard.php:145
|
542 |
+
msgid "Ready!"
|
543 |
+
msgstr ""
|
544 |
+
|
545 |
+
#: classes/class-cartflows-wizard.php:220
|
546 |
+
msgid "CartFlows Setup"
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: classes/class-cartflows-wizard.php:246
|
550 |
+
msgid "Exit Setup Wizard"
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: classes/class-cartflows-wizard.php:299
|
554 |
+
msgid "Welcome to CartFlows!"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: classes/class-cartflows-wizard.php:300
|
558 |
+
msgid ""
|
559 |
+
"Thank you for choosing CartFlows to get more leads, increase conversions, & "
|
560 |
+
"maximize profits. This short setup wizard will guide you though configuring "
|
561 |
+
"CartFlows and creating your first funnel."
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: classes/class-cartflows-wizard.php:304
|
565 |
+
msgid "Let's Build it better!"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: classes/class-cartflows-wizard.php:305
|
569 |
+
msgid ""
|
570 |
+
"Get improved features and faster fixes by sharing non-sensitive data via "
|
571 |
+
"usage tracking that shows us how CartFlows is used. No personal data is "
|
572 |
+
"tracked or stored."
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: classes/class-cartflows-wizard.php:306
|
576 |
+
msgid "Learn More"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: classes/class-cartflows-wizard.php:309
|
580 |
+
msgid "Yes, I am in."
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: classes/class-cartflows-wizard.php:316
|
584 |
+
msgid "Lets Go »"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: classes/class-cartflows-wizard.php:344
|
588 |
+
msgid "Page Builder Setup"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: classes/class-cartflows-wizard.php:345
|
592 |
+
msgid "Please select a page builder you would like to use with CartFlows."
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: classes/class-cartflows-wizard.php:350
|
596 |
+
msgid "Select Page Builder"
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: classes/class-cartflows-wizard.php:357
|
600 |
+
#: classes/class-cartflows-wizard.php:423
|
601 |
+
#: includes/admin/cartflows-general.php:76
|
602 |
+
msgid "Elementor"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: classes/class-cartflows-wizard.php:367
|
606 |
+
msgid "Beaver Builder Plugin (Lite Version)"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: classes/class-cartflows-wizard.php:377
|
610 |
+
#: includes/admin/cartflows-general.php:78
|
611 |
+
msgid "Divi"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: classes/class-cartflows-wizard.php:387
|
615 |
+
#: includes/admin/cartflows-general.php:79
|
616 |
+
msgid "Gutenberg"
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: classes/class-cartflows-wizard.php:397
|
620 |
+
#: includes/admin/cartflows-general.php:80
|
621 |
+
msgid "Other"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: classes/class-cartflows-wizard.php:419
|
625 |
+
msgid ""
|
626 |
+
"While CartFlows Should work with most page builders, we offer templates for "
|
627 |
+
"the above page builders."
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: classes/class-cartflows-wizard.php:422
|
631 |
+
#: classes/class-cartflows-wizard.php:464
|
632 |
+
msgid "The following plugin will be installed and activated for you:"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: classes/class-cartflows-wizard.php:429
|
636 |
+
#: classes/class-cartflows-wizard.php:474
|
637 |
+
#: classes/class-cartflows-wizard.php:684
|
638 |
+
msgid "« Previous"
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: classes/class-cartflows-wizard.php:432
|
642 |
+
msgid "Skip this step"
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: classes/class-cartflows-wizard.php:433
|
646 |
+
msgid "Next »"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: classes/class-cartflows-wizard.php:452
|
650 |
+
msgid "Choose a checkout"
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: classes/class-cartflows-wizard.php:455
|
654 |
+
msgid ""
|
655 |
+
"While CartFlows is designed to use WooCommerce sell digital and physical "
|
656 |
+
"products, not all funnels need a checkout system."
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: classes/class-cartflows-wizard.php:457
|
660 |
+
msgid ""
|
661 |
+
"Would you like to install WooCommerce to sell digital and physical products "
|
662 |
+
"in your funnels?"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: classes/class-cartflows-wizard.php:465
|
666 |
+
msgid "WooCommerce"
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: classes/class-cartflows-wizard.php:466
|
670 |
+
msgid "WooCommerce Cart Abandonment Recovery"
|
671 |
+
msgstr ""
|
672 |
+
|
673 |
+
#: classes/class-cartflows-wizard.php:477
|
674 |
+
#: classes/class-cartflows-wizard.php:687
|
675 |
+
msgid "No thanks"
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: classes/class-cartflows-wizard.php:478
|
679 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:110
|
680 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:119
|
681 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:128
|
682 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:137
|
683 |
+
msgid "Yes"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: classes/class-cartflows-wizard.php:620
|
687 |
+
msgid "Congratulations, You Did It!"
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: classes/class-cartflows-wizard.php:627
|
691 |
+
msgid ""
|
692 |
+
"CartFlows is ready to use on your website. You've successfully completed "
|
693 |
+
"the setup process and all that is left for you to do is create your first "
|
694 |
+
"flow."
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: classes/class-cartflows-wizard.php:641
|
698 |
+
msgid "Create a flow"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: classes/class-cartflows-wizard.php:658
|
702 |
+
msgid "Exclusive CartFlows Training Course Offer"
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: classes/class-cartflows-wizard.php:669
|
706 |
+
msgid ""
|
707 |
+
"We want you to get off to a great start using CartFlows, so we would like "
|
708 |
+
"to give access to our exclusive training course."
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: classes/class-cartflows-wizard.php:670
|
712 |
+
msgid "Get access to this couse, for free, by entering your email below."
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: classes/class-cartflows-wizard.php:672
|
716 |
+
msgid "Enter Email address"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: classes/class-cartflows-wizard.php:688
|
720 |
+
msgid "Allow"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: classes/lib/notices/class-astra-notices.php:125
|
724 |
+
msgid "WordPress Nonce not validated."
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: classes/logger/class-cartflows-log-handler-file.php:351
|
728 |
+
#: classes/logger/class-cartflows-log-handler-file.php:371
|
729 |
+
msgid "This method should not be called before plugins_loaded."
|
730 |
+
msgstr ""
|
731 |
+
|
732 |
+
#: classes/logger/class-cartflows-wc-logger.php:58
|
733 |
+
#. translators: 1: class name 2: Cartflows_Log_Handler_Interface
|
734 |
+
msgid "The provided handler %1$s does not implement %2$s."
|
735 |
+
msgstr ""
|
736 |
+
|
737 |
+
#: classes/logger/class-cartflows-wc-logger.php:136
|
738 |
+
#. translators: 1: Cartflows_WC_Logger::log 2: level
|
739 |
+
msgid "%1$s was called with an invalid level \"%2$s\"."
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: includes/admin/cartflows-admin-header.php:17
|
743 |
+
#: includes/admin/cartflows-admin.php:19
|
744 |
+
msgid "Generate More Leads & More Sales"
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: includes/admin/cartflows-admin.php:29
|
748 |
+
msgid "Settings saved successfully."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/admin/cartflows-error-log.php:36
|
752 |
+
msgid "%1$s at %2$s"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: includes/admin/cartflows-error-log.php:41
|
756 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:804
|
757 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:225
|
758 |
+
msgid "View"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: includes/admin/cartflows-error-log.php:65
|
762 |
+
msgid "Delete log"
|
763 |
+
msgstr ""
|
764 |
+
|
765 |
+
#: includes/admin/cartflows-error-log.php:70
|
766 |
+
msgid "There are currently no logs to view."
|
767 |
+
msgstr ""
|
768 |
+
|
769 |
+
#: includes/admin/cartflows-general.php:31
|
770 |
+
#: includes/admin/cartflows-general.php:40
|
771 |
+
msgid "General Settings"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: includes/admin/cartflows-general.php:53
|
775 |
+
msgid "Disallow search engines from indexing flows"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/admin/cartflows-general.php:63
|
779 |
+
#: modules/flow/view/view-flow-inner-step.php:52
|
780 |
+
msgid "Global Checkout"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: includes/admin/cartflows-general.php:72
|
784 |
+
msgid "Show Templates designed with"
|
785 |
+
msgstr ""
|
786 |
+
|
787 |
+
#: includes/admin/cartflows-general.php:73
|
788 |
+
msgid ""
|
789 |
+
"CartFlows offers flow templates that can be imported in one click. These "
|
790 |
+
"templates are available in few different page builders. Please choose your "
|
791 |
+
"preferred page builder from the list so you will only see templates that "
|
792 |
+
"are made using that page builder.."
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: includes/admin/cartflows-general.php:77
|
796 |
+
msgid "Beaver Builder"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: includes/admin/cartflows-general.php:89
|
800 |
+
#: includes/admin/cartflows-general.php:175
|
801 |
+
#: includes/admin/cartflows-general.php:281
|
802 |
+
#: includes/admin/cartflows-general.php:398
|
803 |
+
msgid "Save Changes"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: includes/admin/cartflows-general.php:101
|
807 |
+
msgid "Permalink Settings"
|
808 |
+
msgstr ""
|
809 |
+
|
810 |
+
#: includes/admin/cartflows-general.php:116
|
811 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:136
|
812 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:141
|
813 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:190
|
814 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:81
|
815 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:86
|
816 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:119
|
817 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:179
|
818 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:184
|
819 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:146
|
820 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:151
|
821 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:447
|
822 |
+
msgid "Default"
|
823 |
+
msgstr ""
|
824 |
+
|
825 |
+
#: includes/admin/cartflows-general.php:122
|
826 |
+
msgid "Flow and Step Slug"
|
827 |
+
msgstr ""
|
828 |
+
|
829 |
+
#: includes/admin/cartflows-general.php:128
|
830 |
+
msgid "Flow Slug"
|
831 |
+
msgstr ""
|
832 |
+
|
833 |
+
#: includes/admin/cartflows-general.php:134
|
834 |
+
msgid "Step Slug"
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: includes/admin/cartflows-general.php:146
|
838 |
+
msgid "Post Type Permalink Base"
|
839 |
+
msgstr ""
|
840 |
+
|
841 |
+
#: includes/admin/cartflows-general.php:154
|
842 |
+
msgid "Step Base"
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: includes/admin/cartflows-general.php:164
|
846 |
+
msgid "Flow Base"
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: includes/admin/cartflows-general.php:176
|
850 |
+
msgid "Set Default"
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: includes/admin/cartflows-general.php:190
|
854 |
+
msgid "Facebook Pixel Settings"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: includes/admin/cartflows-general.php:205
|
858 |
+
msgid "Enable Facebook Pixel Tracking"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: includes/admin/cartflows-general.php:218
|
862 |
+
msgid "Enable for the whole site"
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: includes/admin/cartflows-general.php:226
|
866 |
+
#: includes/admin/cartflows-general.php:325
|
867 |
+
msgid "If this option is unchecked, it will only apply to CartFlows steps."
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: includes/admin/cartflows-general.php:236
|
871 |
+
msgid "Enter Facebook pixel ID"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: includes/admin/cartflows-general.php:244
|
875 |
+
#: includes/admin/cartflows-general.php:343
|
876 |
+
msgid "Enable Events:"
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: includes/admin/cartflows-general.php:253
|
880 |
+
msgid "Initiate Checkout"
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: includes/admin/cartflows-general.php:262
|
884 |
+
#: includes/admin/cartflows-general.php:369
|
885 |
+
msgid "Add Payment Info"
|
886 |
+
msgstr ""
|
887 |
+
|
888 |
+
#: includes/admin/cartflows-general.php:271
|
889 |
+
msgid "Purchase Complete"
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#: includes/admin/cartflows-general.php:293
|
893 |
+
msgid "Google Analytics Settings"
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: includes/admin/cartflows-general.php:304
|
897 |
+
msgid "Enable Google Analytics Tracking"
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: includes/admin/cartflows-general.php:317
|
901 |
+
msgid "Enable for the whole website"
|
902 |
+
msgstr ""
|
903 |
+
|
904 |
+
#: includes/admin/cartflows-general.php:335
|
905 |
+
msgid "Google Analytics ID"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: includes/admin/cartflows-general.php:337
|
909 |
+
msgid ""
|
910 |
+
"Log into your <a href=\"https://analytics.google.com/\" "
|
911 |
+
"target=\"_blank\">google analytics account</a> to find your ID. eg: "
|
912 |
+
"UA-XXXXXX-X."
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: includes/admin/cartflows-general.php:351
|
916 |
+
msgid "Begin Checkout"
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: includes/admin/cartflows-general.php:360
|
920 |
+
msgid "Add To Cart"
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: includes/admin/cartflows-general.php:378
|
924 |
+
msgid "Purchase"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/admin/cartflows-general.php:386
|
928 |
+
msgid ""
|
929 |
+
"Google Analytics not working correctly? <a "
|
930 |
+
"href=\"https://cartflows.com/docs/troubleshooting-google-analytics-tracking-"
|
931 |
+
"issues/\" > Click here </a> to know more. "
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: includes/admin/cartflows-general.php:419
|
935 |
+
#: includes/admin/cartflows-home.php:43
|
936 |
+
msgid "Knowledge Base"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: includes/admin/cartflows-general.php:423
|
940 |
+
#: includes/admin/cartflows-home.php:47
|
941 |
+
msgid "Not sure how something works? Take a peek at the knowledge base and learn."
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: includes/admin/cartflows-general.php:426
|
945 |
+
#: includes/admin/cartflows-home.php:50
|
946 |
+
msgid "Visit Knowledge Base »"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: includes/admin/cartflows-general.php:434
|
950 |
+
#: includes/admin/cartflows-home.php:58
|
951 |
+
msgid "Community"
|
952 |
+
msgstr ""
|
953 |
+
|
954 |
+
#: includes/admin/cartflows-general.php:438
|
955 |
+
#: includes/admin/cartflows-home.php:62
|
956 |
+
msgid ""
|
957 |
+
"Join the community of super helpful CartFlows users. Say hello, ask "
|
958 |
+
"questions, give feedback and help each other!"
|
959 |
+
msgstr ""
|
960 |
+
|
961 |
+
#: includes/admin/cartflows-general.php:441
|
962 |
+
#: includes/admin/cartflows-home.php:65
|
963 |
+
msgid "Join Our Facebook Group »"
|
964 |
+
msgstr ""
|
965 |
+
|
966 |
+
#: includes/admin/cartflows-general.php:449
|
967 |
+
#: includes/admin/cartflows-home.php:73
|
968 |
+
msgid "Five Star Support"
|
969 |
+
msgstr ""
|
970 |
+
|
971 |
+
#: includes/admin/cartflows-general.php:453
|
972 |
+
#: includes/admin/cartflows-home.php:77
|
973 |
+
msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: includes/admin/cartflows-general.php:456
|
977 |
+
#: includes/admin/cartflows-home.php:80
|
978 |
+
msgid "Submit a Ticket »"
|
979 |
+
msgstr ""
|
980 |
+
|
981 |
+
#: includes/admin/cartflows-general.php:466
|
982 |
+
msgid "Load Minified CSS"
|
983 |
+
msgstr ""
|
984 |
+
|
985 |
+
#: includes/admin/cartflows-general.php:471
|
986 |
+
msgid ""
|
987 |
+
"Load the Minified CSS from here. Just Enable it by checking the below given "
|
988 |
+
"checkbox."
|
989 |
+
msgstr ""
|
990 |
+
|
991 |
+
#: includes/admin/cartflows-general.php:478
|
992 |
+
msgid "Load minified CSS & JS Files"
|
993 |
+
msgstr ""
|
994 |
+
|
995 |
+
#: includes/admin/cartflows-general.php:483
|
996 |
+
msgid "Save"
|
997 |
+
msgstr ""
|
998 |
+
|
999 |
+
#: includes/admin/cartflows-home.php:20
|
1000 |
+
msgid "Getting Started"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: includes/admin/cartflows-home.php:28
|
1004 |
+
msgid "Modernizing WordPress eCommerce!"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/exporter.php:12
|
1008 |
+
msgid "Export Flows to a JSON file"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: includes/exporter.php:13
|
1012 |
+
msgid ""
|
1013 |
+
"This tool allows you to generate and download a JSON file containing a list "
|
1014 |
+
"of all flows."
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: includes/importer.php:12
|
1018 |
+
msgid "Import Flows to a JSON file"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: includes/importer.php:13
|
1022 |
+
msgid "This tool allows you to import the flows from the JSON file."
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: includes/importer.php:21
|
1026 |
+
msgid "Import"
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: includes/meta-fields/generate-product-repeater.php:36
|
1030 |
+
msgid "Remove"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: includes/meta-fields/generate-product-repeater.php:51
|
1034 |
+
msgid "Product Quantity"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: includes/meta-fields/generate-product-repeater.php:65
|
1038 |
+
msgid "Discount Type"
|
1039 |
+
msgstr ""
|
1040 |
+
|
1041 |
+
#: includes/meta-fields/generate-product-repeater.php:69
|
1042 |
+
msgid "Select Discount Type"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: includes/meta-fields/generate-product-repeater.php:70
|
1046 |
+
msgid "Original"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: includes/meta-fields/generate-product-repeater.php:71
|
1050 |
+
msgid "Percentage"
|
1051 |
+
msgstr ""
|
1052 |
+
|
1053 |
+
#: includes/meta-fields/generate-product-repeater.php:72
|
1054 |
+
msgid "Price"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: includes/meta-fields/generate-product-repeater.php:83
|
1058 |
+
msgid "Discount Value"
|
1059 |
+
msgstr ""
|
1060 |
+
|
1061 |
+
#: includes/meta-fields/generate-product-repeater.php:85
|
1062 |
+
msgid "Discount value will apply for each quantity of product."
|
1063 |
+
msgstr ""
|
1064 |
+
|
1065 |
+
#: includes/meta-fields/get-product-selection-repeater.php:112
|
1066 |
+
msgid "Add New Product"
|
1067 |
+
msgstr ""
|
1068 |
+
|
1069 |
+
#: includes/meta-fields/get-product-selection-repeater.php:113
|
1070 |
+
msgid "Create Product"
|
1071 |
+
msgstr ""
|
1072 |
+
|
1073 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:29
|
1074 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:66
|
1075 |
+
#: modules/gutenberg/classes/class-cartflows-block-config.php:311
|
1076 |
+
msgid "Checkout Form"
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:30
|
1080 |
+
msgid "Checkout Form."
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:31
|
1084 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:32
|
1085 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:30
|
1086 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:31
|
1087 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:31
|
1088 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:32
|
1089 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:30
|
1090 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:31
|
1091 |
+
msgid "Cartflows Modules"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:75
|
1095 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1058
|
1096 |
+
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:117
|
1097 |
+
msgid ""
|
1098 |
+
"No product is selected. Please select products from the checkout meta "
|
1099 |
+
"settings to continue."
|
1100 |
+
msgstr ""
|
1101 |
+
|
1102 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:109
|
1103 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:152
|
1104 |
+
msgid "One Column ( PRO )"
|
1105 |
+
msgstr ""
|
1106 |
+
|
1107 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:110
|
1108 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:116
|
1109 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:30
|
1110 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:153
|
1111 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:159
|
1112 |
+
msgid "Two Column"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:111
|
1116 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:154
|
1117 |
+
msgid "Two Step ( PRO )"
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:115
|
1121 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:29
|
1122 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:158
|
1123 |
+
msgid "One Column"
|
1124 |
+
msgstr ""
|
1125 |
+
|
1126 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:117
|
1127 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:31
|
1128 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:160
|
1129 |
+
msgid "Two Step"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:137
|
1133 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:82
|
1134 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:180
|
1135 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:147
|
1136 |
+
msgid "Floating Labels ( PRO )"
|
1137 |
+
msgstr ""
|
1138 |
+
|
1139 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:142
|
1140 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:87
|
1141 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:120
|
1142 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:185
|
1143 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:152
|
1144 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:448
|
1145 |
+
msgid "Floating Labels"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:157
|
1149 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:128
|
1150 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:90
|
1151 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:157
|
1152 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:291
|
1153 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:169
|
1154 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:156
|
1155 |
+
msgid "General"
|
1156 |
+
msgstr ""
|
1157 |
+
|
1158 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:164
|
1159 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:210
|
1160 |
+
msgid "Select Layout"
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:166
|
1164 |
+
#. translators: %s: link
|
1165 |
+
msgid ""
|
1166 |
+
"The PRO layout options are available in the CartFlows Pro. %1$s Upgrade "
|
1167 |
+
"Now! %2$s"
|
1168 |
+
msgstr ""
|
1169 |
+
|
1170 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:178
|
1171 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:251
|
1172 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:179
|
1173 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:182
|
1174 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:102
|
1175 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:131
|
1176 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:146
|
1177 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:115
|
1178 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:451
|
1179 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:216
|
1180 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:443
|
1181 |
+
msgid "Style"
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:181
|
1185 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:105
|
1186 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:294
|
1187 |
+
msgid "Global"
|
1188 |
+
msgstr ""
|
1189 |
+
|
1190 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:185
|
1191 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:109
|
1192 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:40
|
1193 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:302
|
1194 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:177
|
1195 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:410
|
1196 |
+
msgid "Primary Color"
|
1197 |
+
msgstr ""
|
1198 |
+
|
1199 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:193
|
1200 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:221
|
1201 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:416
|
1202 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:649
|
1203 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:393
|
1204 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:268
|
1205 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:193
|
1206 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:221
|
1207 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:249
|
1208 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:319
|
1209 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:385
|
1210 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:451
|
1211 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:271
|
1212 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:364
|
1213 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:659
|
1214 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:754
|
1215 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:825
|
1216 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:358
|
1217 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:375
|
1218 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:435
|
1219 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:323
|
1220 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:372
|
1221 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:402
|
1222 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:468
|
1223 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:527
|
1224 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:558
|
1225 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:619
|
1226 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:649
|
1227 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:708
|
1228 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:738
|
1229 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:632
|
1230 |
+
msgid "Text Color"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:207
|
1234 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:236
|
1235 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:316
|
1236 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:504
|
1237 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:454
|
1238 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:469
|
1239 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:117
|
1240 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:179
|
1241 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:324
|
1242 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:207
|
1243 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:235
|
1244 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:281
|
1245 |
+
msgid "Typography"
|
1246 |
+
msgstr ""
|
1247 |
+
|
1248 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:217
|
1249 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:189
|
1250 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:69
|
1251 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:396
|
1252 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:290
|
1253 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:509
|
1254 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:602
|
1255 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:691
|
1256 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:327
|
1257 |
+
msgid "Heading"
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:247
|
1261 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:127
|
1262 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:101
|
1263 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:443
|
1264 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:208
|
1265 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:430
|
1266 |
+
msgid "Input Fields"
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:253
|
1270 |
+
#. translators: %s: link
|
1271 |
+
msgid ""
|
1272 |
+
"The PRO style options are available in CartFlows Pro. %1$s Upgrade Now! "
|
1273 |
+
"%2$s"
|
1274 |
+
msgstr ""
|
1275 |
+
|
1276 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:262
|
1277 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:137
|
1278 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:202
|
1279 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:495
|
1280 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:941
|
1281 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:251
|
1282 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:507
|
1283 |
+
msgid "Label Color"
|
1284 |
+
msgstr ""
|
1285 |
+
|
1286 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:276
|
1287 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:151
|
1288 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:507
|
1289 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:262
|
1290 |
+
msgid "Field Background Color"
|
1291 |
+
msgstr ""
|
1292 |
+
|
1293 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:295
|
1294 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:165
|
1295 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:523
|
1296 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:273
|
1297 |
+
msgid "Input Text / Placeholder Color"
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:325
|
1301 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:517
|
1302 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:188
|
1303 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:334
|
1304 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:541
|
1305 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:284
|
1306 |
+
msgid "Border Style"
|
1307 |
+
msgstr ""
|
1308 |
+
|
1309 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:327
|
1310 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:519
|
1311 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:190
|
1312 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:336
|
1313 |
+
msgid ""
|
1314 |
+
"The type of border to use. Double borders must have a width of at least 3px "
|
1315 |
+
"to render properly."
|
1316 |
+
msgstr ""
|
1317 |
+
|
1318 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:330
|
1319 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:522
|
1320 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:193
|
1321 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:339
|
1322 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:547
|
1323 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:290
|
1324 |
+
msgid "Solid"
|
1325 |
+
msgstr ""
|
1326 |
+
|
1327 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:331
|
1328 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:523
|
1329 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:194
|
1330 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:340
|
1331 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:550
|
1332 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:293
|
1333 |
+
msgid "Dashed"
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:332
|
1337 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:524
|
1338 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:195
|
1339 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:341
|
1340 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:549
|
1341 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:292
|
1342 |
+
msgid "Dotted"
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:333
|
1346 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:525
|
1347 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:196
|
1348 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:342
|
1349 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:548
|
1350 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:291
|
1351 |
+
msgid "Double"
|
1352 |
+
msgstr ""
|
1353 |
+
|
1354 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:352
|
1355 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:557
|
1356 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:220
|
1357 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:367
|
1358 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:565
|
1359 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:303
|
1360 |
+
msgid "Border Width"
|
1361 |
+
msgstr ""
|
1362 |
+
|
1363 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:373
|
1364 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:580
|
1365 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:815
|
1366 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:235
|
1367 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:383
|
1368 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:195
|
1369 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:303
|
1370 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:582
|
1371 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1008
|
1372 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:315
|
1373 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:531
|
1374 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:664
|
1375 |
+
msgid "Border Color"
|
1376 |
+
msgstr ""
|
1377 |
+
|
1378 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:391
|
1379 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:621
|
1380 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:727
|
1381 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:248
|
1382 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:411
|
1383 |
+
msgid "Border Radius"
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:412
|
1387 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:264
|
1388 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:215
|
1389 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:626
|
1390 |
+
msgid "Buttons"
|
1391 |
+
msgstr ""
|
1392 |
+
|
1393 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:440
|
1394 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:407
|
1395 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:282
|
1396 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:279
|
1397 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:640
|
1398 |
+
msgid "Text Hover Color"
|
1399 |
+
msgstr ""
|
1400 |
+
|
1401 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:460
|
1402 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:799
|
1403 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:421
|
1404 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:296
|
1405 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:264
|
1406 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:333
|
1407 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:399
|
1408 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:465
|
1409 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:187
|
1410 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:287
|
1411 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:679
|
1412 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:789
|
1413 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:995
|
1414 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:371
|
1415 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:388
|
1416 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:458
|
1417 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:426
|
1418 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:481
|
1419 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:571
|
1420 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:662
|
1421 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:751
|
1422 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:523
|
1423 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:648
|
1424 |
+
msgid "Background Color"
|
1425 |
+
msgstr ""
|
1426 |
+
|
1427 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:484
|
1428 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:429
|
1429 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:310
|
1430 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:295
|
1431 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:656
|
1432 |
+
msgid "Background Hover Color"
|
1433 |
+
msgstr ""
|
1434 |
+
|
1435 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:601
|
1436 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:327
|
1437 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:397
|
1438 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:311
|
1439 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:771
|
1440 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:448
|
1441 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:446
|
1442 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:672
|
1443 |
+
msgid "Border Hover Color"
|
1444 |
+
msgstr ""
|
1445 |
+
|
1446 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:645
|
1447 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:818
|
1448 |
+
msgid "Payment Section"
|
1449 |
+
msgstr ""
|
1450 |
+
|
1451 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:663
|
1452 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:839
|
1453 |
+
msgid "Description Color"
|
1454 |
+
msgstr ""
|
1455 |
+
|
1456 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:677
|
1457 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:863
|
1458 |
+
msgid "Information Background Color"
|
1459 |
+
msgstr ""
|
1460 |
+
|
1461 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:685
|
1462 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:851
|
1463 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:377
|
1464 |
+
msgid "Section Background Color"
|
1465 |
+
msgstr ""
|
1466 |
+
|
1467 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:699
|
1468 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:877
|
1469 |
+
msgid "Section Padding"
|
1470 |
+
msgstr ""
|
1471 |
+
|
1472 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:713
|
1473 |
+
msgid "Margin"
|
1474 |
+
msgstr ""
|
1475 |
+
|
1476 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:743
|
1477 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:924
|
1478 |
+
msgid "Field Validation & Error Messages"
|
1479 |
+
msgstr ""
|
1480 |
+
|
1481 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:747
|
1482 |
+
msgid "Field Label Color"
|
1483 |
+
msgstr ""
|
1484 |
+
|
1485 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:763
|
1486 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:953
|
1487 |
+
msgid "Field Border Color"
|
1488 |
+
msgstr ""
|
1489 |
+
|
1490 |
+
#: modules/beaver-builder/cartflows-bb-checkout-form/cartflows-bb-checkout-form.php:783
|
1491 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:981
|
1492 |
+
msgid "Error Message Color"
|
1493 |
+
msgstr ""
|
1494 |
+
|
1495 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:28
|
1496 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:70
|
1497 |
+
#: modules/gutenberg/classes/class-cartflows-block-config.php:46
|
1498 |
+
msgid "Next Step Button"
|
1499 |
+
msgstr ""
|
1500 |
+
|
1501 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:29
|
1502 |
+
msgid "A simple next step button."
|
1503 |
+
msgstr ""
|
1504 |
+
|
1505 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:135
|
1506 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:296
|
1507 |
+
msgid "Text"
|
1508 |
+
msgstr ""
|
1509 |
+
|
1510 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:136
|
1511 |
+
#: modules/flow/classes/class-cartflows-flow-shortcodes.php:148
|
1512 |
+
#: modules/widgets/class-cartflows-next-step.php:78
|
1513 |
+
msgid "Next Step"
|
1514 |
+
msgstr ""
|
1515 |
+
|
1516 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:145
|
1517 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:187
|
1518 |
+
msgid "Icon"
|
1519 |
+
msgstr ""
|
1520 |
+
|
1521 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:156
|
1522 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:195
|
1523 |
+
msgid "Icon Position"
|
1524 |
+
msgstr ""
|
1525 |
+
|
1526 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:159
|
1527 |
+
msgid "Before Text"
|
1528 |
+
msgstr ""
|
1529 |
+
|
1530 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:160
|
1531 |
+
msgid "After Text"
|
1532 |
+
msgstr ""
|
1533 |
+
|
1534 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:168
|
1535 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:240
|
1536 |
+
msgid "Icon Spacing"
|
1537 |
+
msgstr ""
|
1538 |
+
|
1539 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:186
|
1540 |
+
msgid "Type"
|
1541 |
+
msgstr ""
|
1542 |
+
|
1543 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:191
|
1544 |
+
msgid "Flat"
|
1545 |
+
msgstr ""
|
1546 |
+
|
1547 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:192
|
1548 |
+
msgid "Gradient"
|
1549 |
+
msgstr ""
|
1550 |
+
|
1551 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:193
|
1552 |
+
msgid "Transparent"
|
1553 |
+
msgstr ""
|
1554 |
+
|
1555 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:194
|
1556 |
+
msgid "3D"
|
1557 |
+
msgstr ""
|
1558 |
+
|
1559 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:204
|
1560 |
+
msgid "Border Size"
|
1561 |
+
msgstr ""
|
1562 |
+
|
1563 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:213
|
1564 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:229
|
1565 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:242
|
1566 |
+
msgid "Hover Styles"
|
1567 |
+
msgstr ""
|
1568 |
+
|
1569 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:217
|
1570 |
+
msgid "Fade Background"
|
1571 |
+
msgstr ""
|
1572 |
+
|
1573 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:218
|
1574 |
+
msgid "Fill Background From Top"
|
1575 |
+
msgstr ""
|
1576 |
+
|
1577 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:219
|
1578 |
+
msgid "Fill Background From Bottom"
|
1579 |
+
msgstr ""
|
1580 |
+
|
1581 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:220
|
1582 |
+
msgid "Fill Background From Left"
|
1583 |
+
msgstr ""
|
1584 |
+
|
1585 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:221
|
1586 |
+
msgid "Fill Background From Right"
|
1587 |
+
msgstr ""
|
1588 |
+
|
1589 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:222
|
1590 |
+
msgid "Fill Background Vertical"
|
1591 |
+
msgstr ""
|
1592 |
+
|
1593 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:223
|
1594 |
+
msgid "Fill Background Diagonal"
|
1595 |
+
msgstr ""
|
1596 |
+
|
1597 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:224
|
1598 |
+
msgid "Fill Background Horizontal"
|
1599 |
+
msgstr ""
|
1600 |
+
|
1601 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:232
|
1602 |
+
msgid "Move Down"
|
1603 |
+
msgstr ""
|
1604 |
+
|
1605 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:233
|
1606 |
+
msgid "Move Up"
|
1607 |
+
msgstr ""
|
1608 |
+
|
1609 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:234
|
1610 |
+
msgid "Move Left"
|
1611 |
+
msgstr ""
|
1612 |
+
|
1613 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:235
|
1614 |
+
msgid "Move Right"
|
1615 |
+
msgstr ""
|
1616 |
+
|
1617 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:236
|
1618 |
+
msgid "Animate Top"
|
1619 |
+
msgstr ""
|
1620 |
+
|
1621 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:237
|
1622 |
+
msgid "Animate Bottom"
|
1623 |
+
msgstr ""
|
1624 |
+
|
1625 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:246
|
1626 |
+
msgid "Appear Icon From Right"
|
1627 |
+
msgstr ""
|
1628 |
+
|
1629 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:247
|
1630 |
+
msgid "Appear Icon From Left"
|
1631 |
+
msgstr ""
|
1632 |
+
|
1633 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:248
|
1634 |
+
msgid "Appear Icon From Top"
|
1635 |
+
msgstr ""
|
1636 |
+
|
1637 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:249
|
1638 |
+
msgid "Appear Icon From Bottom"
|
1639 |
+
msgstr ""
|
1640 |
+
|
1641 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:255
|
1642 |
+
msgid "Structure"
|
1643 |
+
msgstr ""
|
1644 |
+
|
1645 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:259
|
1646 |
+
msgid "Width"
|
1647 |
+
msgstr ""
|
1648 |
+
|
1649 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:263
|
1650 |
+
msgid "Full Width"
|
1651 |
+
msgstr ""
|
1652 |
+
|
1653 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:264
|
1654 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:156
|
1655 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:248
|
1656 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:484
|
1657 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:596
|
1658 |
+
msgid "Custom"
|
1659 |
+
msgstr ""
|
1660 |
+
|
1661 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:280
|
1662 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:299
|
1663 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:298
|
1664 |
+
msgid "Alignment"
|
1665 |
+
msgstr ""
|
1666 |
+
|
1667 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:283
|
1668 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:293
|
1669 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:307
|
1670 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:499
|
1671 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:306
|
1672 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:624
|
1673 |
+
msgid "Center"
|
1674 |
+
msgstr ""
|
1675 |
+
|
1676 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:284
|
1677 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:294
|
1678 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:303
|
1679 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:495
|
1680 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:302
|
1681 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:623
|
1682 |
+
msgid "Left"
|
1683 |
+
msgstr ""
|
1684 |
+
|
1685 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:285
|
1686 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:295
|
1687 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:311
|
1688 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:503
|
1689 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:310
|
1690 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:625
|
1691 |
+
msgid "Right"
|
1692 |
+
msgstr ""
|
1693 |
+
|
1694 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:290
|
1695 |
+
msgid "Mobile Alignment"
|
1696 |
+
msgstr ""
|
1697 |
+
|
1698 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:300
|
1699 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:337
|
1700 |
+
msgid "Padding"
|
1701 |
+
msgstr ""
|
1702 |
+
|
1703 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:314
|
1704 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:443
|
1705 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:696
|
1706 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:389
|
1707 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:398
|
1708 |
+
msgid "Border"
|
1709 |
+
msgstr ""
|
1710 |
+
|
1711 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:338
|
1712 |
+
msgid "Custom Width"
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:347
|
1716 |
+
msgid "Custom Height"
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:356
|
1720 |
+
msgid "Padding Top/Bottom"
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:365
|
1724 |
+
msgid "Padding Left/Right"
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:374
|
1728 |
+
msgid "Round Corners"
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:389
|
1732 |
+
msgid "Colors"
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:440
|
1736 |
+
msgid "Apply Hover Color To"
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:444
|
1740 |
+
msgid "Background"
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:457
|
1744 |
+
msgid "Button Settings"
|
1745 |
+
msgstr ""
|
1746 |
+
|
1747 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:461
|
1748 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:260
|
1749 |
+
msgid "Icon Size"
|
1750 |
+
msgstr ""
|
1751 |
+
|
1752 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:29
|
1753 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:66
|
1754 |
+
#: modules/gutenberg/classes/class-cartflows-block-config.php:442
|
1755 |
+
msgid "Optin Form"
|
1756 |
+
msgstr ""
|
1757 |
+
|
1758 |
+
#: modules/beaver-builder/cartflows-bb-optin-form/cartflows-bb-optin-form.php:30
|
1759 |
+
msgid "Optin Form."
|
1760 |
+
msgstr ""
|
1761 |
+
|
1762 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:28
|
1763 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:69
|
1764 |
+
#: modules/gutenberg/classes/class-cartflows-block-config.php:125
|
1765 |
+
msgid "Order Details Form"
|
1766 |
+
msgstr ""
|
1767 |
+
|
1768 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:29
|
1769 |
+
msgid "Order Details Form."
|
1770 |
+
msgstr ""
|
1771 |
+
|
1772 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:97
|
1773 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:163
|
1774 |
+
msgid "Thank You Text"
|
1775 |
+
msgstr ""
|
1776 |
+
|
1777 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:98
|
1778 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:165
|
1779 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:176
|
1780 |
+
#: woocommerce/template/checkout/thankyou.php:41
|
1781 |
+
#: woocommerce/template/checkout/thankyou.php:86
|
1782 |
+
msgid "Thank you. Your order has been received."
|
1783 |
+
msgstr ""
|
1784 |
+
|
1785 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:107
|
1786 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:173
|
1787 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:448
|
1788 |
+
msgid "Order Overview"
|
1789 |
+
msgstr ""
|
1790 |
+
|
1791 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:111
|
1792 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:120
|
1793 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:129
|
1794 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:138
|
1795 |
+
msgid "No"
|
1796 |
+
msgstr ""
|
1797 |
+
|
1798 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:116
|
1799 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:357
|
1800 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:185
|
1801 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:591
|
1802 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:284
|
1803 |
+
msgid "Order Details"
|
1804 |
+
msgstr ""
|
1805 |
+
|
1806 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:125
|
1807 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:197
|
1808 |
+
msgid "Billing Address"
|
1809 |
+
msgstr ""
|
1810 |
+
|
1811 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:134
|
1812 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:209
|
1813 |
+
msgid "Shipping Address"
|
1814 |
+
msgstr ""
|
1815 |
+
|
1816 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:149
|
1817 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:233
|
1818 |
+
msgid "Spacing"
|
1819 |
+
msgstr ""
|
1820 |
+
|
1821 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:153
|
1822 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:241
|
1823 |
+
msgid "Heading Bottom Spacing"
|
1824 |
+
msgstr ""
|
1825 |
+
|
1826 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:168
|
1827 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:257
|
1828 |
+
msgid "Spacing Between Sections"
|
1829 |
+
msgstr ""
|
1830 |
+
|
1831 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:217
|
1832 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:364
|
1833 |
+
msgid "Sections Heading"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:245
|
1837 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:393
|
1838 |
+
msgid "Sections Content"
|
1839 |
+
msgstr ""
|
1840 |
+
|
1841 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:292
|
1842 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:501
|
1843 |
+
msgid "Downloads"
|
1844 |
+
msgstr ""
|
1845 |
+
|
1846 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:296
|
1847 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:361
|
1848 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:427
|
1849 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:75
|
1850 |
+
msgid "Heading Color"
|
1851 |
+
msgstr ""
|
1852 |
+
|
1853 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:310
|
1854 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:376
|
1855 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:442
|
1856 |
+
msgid "Heading Typography"
|
1857 |
+
msgstr ""
|
1858 |
+
|
1859 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:347
|
1860 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:413
|
1861 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:479
|
1862 |
+
msgid "Text Typography"
|
1863 |
+
msgstr ""
|
1864 |
+
|
1865 |
+
#: modules/beaver-builder/cartflows-bb-order-details/cartflows-bb-order-details.php:423
|
1866 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:683
|
1867 |
+
msgid "Customer Details"
|
1868 |
+
msgstr ""
|
1869 |
+
|
1870 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:374
|
1871 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:214
|
1872 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:97
|
1873 |
+
msgid ""
|
1874 |
+
"WooCommerce functions do not exist. If you are in an IFrame, please reload "
|
1875 |
+
"it."
|
1876 |
+
msgstr ""
|
1877 |
+
|
1878 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:375
|
1879 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:215
|
1880 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:98
|
1881 |
+
msgid "Click Here to Reload"
|
1882 |
+
msgstr ""
|
1883 |
+
|
1884 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:404
|
1885 |
+
msgid "Checkout ID not found"
|
1886 |
+
msgstr ""
|
1887 |
+
|
1888 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:407
|
1889 |
+
#. translators: %1$1s, %2$2s Link to article
|
1890 |
+
msgid ""
|
1891 |
+
"It seems that this is not the CartFlows Checkout page where you have added "
|
1892 |
+
"this shortcode. Please refer to this %1$1sarticle%2$2s to know more."
|
1893 |
+
msgstr ""
|
1894 |
+
|
1895 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:475
|
1896 |
+
#: modules/checkout/templates/embed/checkout-template-simple.php:24
|
1897 |
+
#: modules/checkout/templates/wcf-template.php:36
|
1898 |
+
#: modules/optin/templates/optin-template-simple.php:25
|
1899 |
+
msgid "Your cart is currently empty."
|
1900 |
+
msgstr ""
|
1901 |
+
|
1902 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:554
|
1903 |
+
#. translators: %1$1s, %2$2s Link to meta
|
1904 |
+
msgid ""
|
1905 |
+
"No product is selected. Please select products from the %1$1scheckout meta "
|
1906 |
+
"settings%2$2s to continue."
|
1907 |
+
msgstr ""
|
1908 |
+
|
1909 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:649
|
1910 |
+
msgid "Variations Not set"
|
1911 |
+
msgstr ""
|
1912 |
+
|
1913 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:660
|
1914 |
+
msgid "This product can't be purchased"
|
1915 |
+
msgstr ""
|
1916 |
+
|
1917 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1110
|
1918 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1153
|
1919 |
+
msgid "Coupon Code"
|
1920 |
+
msgstr ""
|
1921 |
+
|
1922 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1111
|
1923 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1162
|
1924 |
+
msgid "Apply"
|
1925 |
+
msgstr ""
|
1926 |
+
|
1927 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1299
|
1928 |
+
msgid "Sorry there was a problem removing this coupon."
|
1929 |
+
msgstr ""
|
1930 |
+
|
1931 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1302
|
1932 |
+
msgid "Coupon has been removed."
|
1933 |
+
msgstr ""
|
1934 |
+
|
1935 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1321
|
1936 |
+
msgid "Sorry there was a problem removing "
|
1937 |
+
msgstr ""
|
1938 |
+
|
1939 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1324
|
1940 |
+
msgid " has been removed."
|
1941 |
+
msgstr ""
|
1942 |
+
|
1943 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:94
|
1944 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:169
|
1945 |
+
msgid "Checkout Settings"
|
1946 |
+
msgstr ""
|
1947 |
+
|
1948 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:103
|
1949 |
+
msgid "Checkout Layout & Design"
|
1950 |
+
msgstr ""
|
1951 |
+
|
1952 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:139
|
1953 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:139
|
1954 |
+
msgid "Select Product"
|
1955 |
+
msgstr ""
|
1956 |
+
|
1957 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:145
|
1958 |
+
msgid "Product Options"
|
1959 |
+
msgstr ""
|
1960 |
+
|
1961 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:151
|
1962 |
+
msgid "Order Bump"
|
1963 |
+
msgstr ""
|
1964 |
+
|
1965 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:157
|
1966 |
+
msgid "Checkout Offer"
|
1967 |
+
msgstr ""
|
1968 |
+
|
1969 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:163
|
1970 |
+
msgid "Checkout Fields"
|
1971 |
+
msgstr ""
|
1972 |
+
|
1973 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:186
|
1974 |
+
msgid "Logo (Optional)"
|
1975 |
+
msgstr ""
|
1976 |
+
|
1977 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:271
|
1978 |
+
#. translators: %s: link
|
1979 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Product Options feature."
|
1980 |
+
msgstr ""
|
1981 |
+
|
1982 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:282
|
1983 |
+
#. translators: %s: link.
|
1984 |
+
msgid "Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options"
|
1985 |
+
msgstr ""
|
1986 |
+
|
1987 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:310
|
1988 |
+
msgid "Add this shortcode to your checkout page"
|
1989 |
+
msgstr ""
|
1990 |
+
|
1991 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:345
|
1992 |
+
#. translators: %s: link
|
1993 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon."
|
1994 |
+
msgstr ""
|
1995 |
+
|
1996 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:372
|
1997 |
+
#. translators: %s: link
|
1998 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature"
|
1999 |
+
msgstr ""
|
2000 |
+
|
2001 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:382
|
2002 |
+
#. translators: %s: link
|
2003 |
+
msgid "Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature"
|
2004 |
+
msgstr ""
|
2005 |
+
|
2006 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:409
|
2007 |
+
#. translators: %s: link
|
2008 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature"
|
2009 |
+
msgstr ""
|
2010 |
+
|
2011 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:419
|
2012 |
+
#. translators: %s: link
|
2013 |
+
msgid ""
|
2014 |
+
"Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab "
|
2015 |
+
"feature"
|
2016 |
+
msgstr ""
|
2017 |
+
|
2018 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:442
|
2019 |
+
#. translators: %s: link
|
2020 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature."
|
2021 |
+
msgstr ""
|
2022 |
+
|
2023 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:469
|
2024 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:334
|
2025 |
+
#. translators: %s: link
|
2026 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
|
2027 |
+
msgstr ""
|
2028 |
+
|
2029 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:492
|
2030 |
+
msgid "Place Order Button Text"
|
2031 |
+
msgstr ""
|
2032 |
+
|
2033 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:496
|
2034 |
+
msgid "Place order"
|
2035 |
+
msgstr ""
|
2036 |
+
|
2037 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:498
|
2038 |
+
msgid "It will change the Place Order Button text on checkout page."
|
2039 |
+
msgstr ""
|
2040 |
+
|
2041 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:508
|
2042 |
+
msgid "Enable cart editing on checkout"
|
2043 |
+
msgstr ""
|
2044 |
+
|
2045 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:516
|
2046 |
+
#. translators: %s: link
|
2047 |
+
msgid "Users will able to remove products from the checkout page."
|
2048 |
+
msgstr ""
|
2049 |
+
|
2050 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:557
|
2051 |
+
msgid "Header Logo"
|
2052 |
+
msgstr ""
|
2053 |
+
|
2054 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:565
|
2055 |
+
msgid "Logo Width (In px)"
|
2056 |
+
msgstr ""
|
2057 |
+
|
2058 |
+
#: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:12
|
2059 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:130
|
2060 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:220
|
2061 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:244
|
2062 |
+
msgid "Shortcodes"
|
2063 |
+
msgstr ""
|
2064 |
+
|
2065 |
+
#: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:18
|
2066 |
+
msgid "Checkout Design"
|
2067 |
+
msgstr ""
|
2068 |
+
|
2069 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:18
|
2070 |
+
msgid "One Column (Available in CartFlows Pro) "
|
2071 |
+
msgstr ""
|
2072 |
+
|
2073 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:19
|
2074 |
+
msgid "Two Step (Available in CartFlows Pro) "
|
2075 |
+
msgstr ""
|
2076 |
+
|
2077 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:25
|
2078 |
+
msgid "Checkout Skin"
|
2079 |
+
msgstr ""
|
2080 |
+
|
2081 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:49
|
2082 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:84
|
2083 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:130
|
2084 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:222
|
2085 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:419
|
2086 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:458
|
2087 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:570
|
2088 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:311
|
2089 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:342
|
2090 |
+
msgid "Font Family"
|
2091 |
+
msgstr ""
|
2092 |
+
|
2093 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:57
|
2094 |
+
msgid "Advance Options"
|
2095 |
+
msgstr ""
|
2096 |
+
|
2097 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:93
|
2098 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:139
|
2099 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:231
|
2100 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:467
|
2101 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:579
|
2102 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:351
|
2103 |
+
msgid "Font Weight"
|
2104 |
+
msgstr ""
|
2105 |
+
|
2106 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:109
|
2107 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:437
|
2108 |
+
msgid "Floating Labels (Available in CartFlows Pro)"
|
2109 |
+
msgstr ""
|
2110 |
+
|
2111 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:147
|
2112 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:239
|
2113 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:475
|
2114 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:587
|
2115 |
+
msgid "Size"
|
2116 |
+
msgstr ""
|
2117 |
+
|
2118 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:151
|
2119 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:243
|
2120 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:479
|
2121 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:591
|
2122 |
+
msgid "Extra Small"
|
2123 |
+
msgstr ""
|
2124 |
+
|
2125 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:152
|
2126 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:244
|
2127 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:480
|
2128 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:592
|
2129 |
+
msgid "Small"
|
2130 |
+
msgstr ""
|
2131 |
+
|
2132 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:153
|
2133 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:245
|
2134 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:481
|
2135 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:593
|
2136 |
+
msgid "Medium"
|
2137 |
+
msgstr ""
|
2138 |
+
|
2139 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:154
|
2140 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:246
|
2141 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:482
|
2142 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:594
|
2143 |
+
msgid "Large"
|
2144 |
+
msgstr ""
|
2145 |
+
|
2146 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:155
|
2147 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:247
|
2148 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:483
|
2149 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:595
|
2150 |
+
msgid "Extra Large"
|
2151 |
+
msgstr ""
|
2152 |
+
|
2153 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:163
|
2154 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:255
|
2155 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:491
|
2156 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:603
|
2157 |
+
msgid "Top Bottom Spacing"
|
2158 |
+
msgstr ""
|
2159 |
+
|
2160 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:171
|
2161 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:263
|
2162 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:499
|
2163 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:611
|
2164 |
+
msgid "Left Right Spacing"
|
2165 |
+
msgstr ""
|
2166 |
+
|
2167 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:179
|
2168 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:515
|
2169 |
+
msgid "Text / Placeholder Color"
|
2170 |
+
msgstr ""
|
2171 |
+
|
2172 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:324
|
2173 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:356
|
2174 |
+
msgid "Sections"
|
2175 |
+
msgstr ""
|
2176 |
+
|
2177 |
+
#: modules/checkout/includes/meta-views/design-checkout-style-tab.php:330
|
2178 |
+
msgid "Highlight Area Background Color"
|
2179 |
+
msgstr ""
|
2180 |
+
|
2181 |
+
#: modules/checkout/templates/wcf-template.php:46
|
2182 |
+
msgid "Copyright ©"
|
2183 |
+
msgstr ""
|
2184 |
+
|
2185 |
+
#: modules/checkout/templates/wcf-template.php:50
|
2186 |
+
msgid "All Rights Reserved"
|
2187 |
+
msgstr ""
|
2188 |
+
|
2189 |
+
#: modules/elementor/class-cartflows-el-widgets-loader.php:120
|
2190 |
+
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:327
|
2191 |
+
msgid "Cartflows"
|
2192 |
+
msgstr ""
|
2193 |
+
|
2194 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:203
|
2195 |
+
msgid "Layout"
|
2196 |
+
msgstr ""
|
2197 |
+
|
2198 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:224
|
2199 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:465
|
2200 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:230
|
2201 |
+
#. translators: %s admin link
|
2202 |
+
msgid ""
|
2203 |
+
"This feature is available in the CartFlows Pro. <a href=\"%s\" "
|
2204 |
+
"target=\"_blank\" rel=\"noopener\">Upgrade Now!</a>."
|
2205 |
+
msgstr ""
|
2206 |
+
|
2207 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:247
|
2208 |
+
msgid "Other Settings"
|
2209 |
+
msgstr ""
|
2210 |
+
|
2211 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:254
|
2212 |
+
msgid "Billing Section Text"
|
2213 |
+
msgstr ""
|
2214 |
+
|
2215 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:256
|
2216 |
+
msgid "Billing Details"
|
2217 |
+
msgstr ""
|
2218 |
+
|
2219 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:264
|
2220 |
+
msgid "Shipping Section Text"
|
2221 |
+
msgstr ""
|
2222 |
+
|
2223 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:266
|
2224 |
+
msgid "Shipping Details"
|
2225 |
+
msgstr ""
|
2226 |
+
|
2227 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:274
|
2228 |
+
msgid "Order Review Text"
|
2229 |
+
msgstr ""
|
2230 |
+
|
2231 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:276
|
2232 |
+
#: woocommerce/template/checkout/form-checkout.php:56
|
2233 |
+
msgid "Your order"
|
2234 |
+
msgstr ""
|
2235 |
+
|
2236 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:404
|
2237 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:302
|
2238 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:333
|
2239 |
+
msgid "Color"
|
2240 |
+
msgstr ""
|
2241 |
+
|
2242 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:546
|
2243 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:289
|
2244 |
+
msgid "Inherit"
|
2245 |
+
msgstr ""
|
2246 |
+
|
2247 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:598
|
2248 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:711
|
2249 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:397
|
2250 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:326
|
2251 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:406
|
2252 |
+
msgid "Rounded Corners"
|
2253 |
+
msgstr ""
|
2254 |
+
|
2255 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:652
|
2256 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:351
|
2257 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:368
|
2258 |
+
msgid "Normal"
|
2259 |
+
msgstr ""
|
2260 |
+
|
2261 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:747
|
2262 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:411
|
2263 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:428
|
2264 |
+
msgid "Hover"
|
2265 |
+
msgstr ""
|
2266 |
+
|
2267 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:890
|
2268 |
+
msgid "Section Margin"
|
2269 |
+
msgstr ""
|
2270 |
+
|
2271 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:902
|
2272 |
+
msgid "Section Rounded Corners"
|
2273 |
+
msgstr ""
|
2274 |
+
|
2275 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:932
|
2276 |
+
msgid "Field Validation"
|
2277 |
+
msgstr ""
|
2278 |
+
|
2279 |
+
#: modules/elementor/widgets/class-cartflows-el-checkout-form.php:972
|
2280 |
+
msgid "Error Messages"
|
2281 |
+
msgstr ""
|
2282 |
+
|
2283 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:164
|
2284 |
+
msgid "Title"
|
2285 |
+
msgstr ""
|
2286 |
+
|
2287 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:166
|
2288 |
+
msgid "BUY NOW"
|
2289 |
+
msgstr ""
|
2290 |
+
|
2291 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:176
|
2292 |
+
msgid "Sub Title"
|
2293 |
+
msgstr ""
|
2294 |
+
|
2295 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:199
|
2296 |
+
msgid "Before Title"
|
2297 |
+
msgstr ""
|
2298 |
+
|
2299 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:200
|
2300 |
+
msgid "After Title"
|
2301 |
+
msgstr ""
|
2302 |
+
|
2303 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:201
|
2304 |
+
msgid "Before Title & Sub Title"
|
2305 |
+
msgstr ""
|
2306 |
+
|
2307 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:202
|
2308 |
+
msgid "After Title & Sub Title"
|
2309 |
+
msgstr ""
|
2310 |
+
|
2311 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:213
|
2312 |
+
msgid "Icon Vertical Alignment"
|
2313 |
+
msgstr ""
|
2314 |
+
|
2315 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:219
|
2316 |
+
msgid "Top"
|
2317 |
+
msgstr ""
|
2318 |
+
|
2319 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:223
|
2320 |
+
msgid "Middle"
|
2321 |
+
msgstr ""
|
2322 |
+
|
2323 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:315
|
2324 |
+
msgid "Justify"
|
2325 |
+
msgstr ""
|
2326 |
+
|
2327 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:327
|
2328 |
+
msgid "Button Size"
|
2329 |
+
msgstr ""
|
2330 |
+
|
2331 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:418
|
2332 |
+
msgid "Hover Text Color"
|
2333 |
+
msgstr ""
|
2334 |
+
|
2335 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:431
|
2336 |
+
msgid "Hover Background Color"
|
2337 |
+
msgstr ""
|
2338 |
+
|
2339 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:459
|
2340 |
+
msgid "Hover Animation"
|
2341 |
+
msgstr ""
|
2342 |
+
|
2343 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:483
|
2344 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:540
|
2345 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:631
|
2346 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:720
|
2347 |
+
msgid "Content"
|
2348 |
+
msgstr ""
|
2349 |
+
|
2350 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:491
|
2351 |
+
msgid "Text Alignment"
|
2352 |
+
msgstr ""
|
2353 |
+
|
2354 |
+
#: modules/elementor/widgets/class-cartflows-el-next-step-button.php:544
|
2355 |
+
msgid "Title and Sub Title Spacing"
|
2356 |
+
msgstr ""
|
2357 |
+
|
2358 |
+
#: modules/elementor/widgets/class-cartflows-el-optin-form.php:349
|
2359 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:544
|
2360 |
+
msgid "Submit Button"
|
2361 |
+
msgstr ""
|
2362 |
+
|
2363 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:175
|
2364 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:187
|
2365 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:199
|
2366 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:211
|
2367 |
+
msgid "Show"
|
2368 |
+
msgstr ""
|
2369 |
+
|
2370 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:176
|
2371 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:188
|
2372 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:200
|
2373 |
+
#: modules/elementor/widgets/class-cartflows-el-order-details-form.php:212
|
2374 |
+
msgid "Hide"
|
2375 |
+
msgstr ""
|
2376 |
+
|
2377 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:265
|
2378 |
+
#. translators: %s flow id
|
2379 |
+
msgid "Step not deleted for flow - %s"
|
2380 |
+
msgstr ""
|
2381 |
+
|
2382 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:303
|
2383 |
+
#. translators: %s flow id
|
2384 |
+
msgid "Step deleted for flow - %s"
|
2385 |
+
msgstr ""
|
2386 |
+
|
2387 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:312
|
2388 |
+
#. translators: %s flow id
|
2389 |
+
msgid "This step can not be deleted."
|
2390 |
+
msgstr ""
|
2391 |
+
|
2392 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:344
|
2393 |
+
#. translators: %s flow id
|
2394 |
+
msgid "Steps not sorted for flow - %s"
|
2395 |
+
msgstr ""
|
2396 |
+
|
2397 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:380
|
2398 |
+
#. translators: %s flow id
|
2399 |
+
msgid "Steps sorted for flow - %s"
|
2400 |
+
msgstr ""
|
2401 |
+
|
2402 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:485
|
2403 |
+
msgid "Analytics"
|
2404 |
+
msgstr ""
|
2405 |
+
|
2406 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:502
|
2407 |
+
#. translators: %s: link
|
2408 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Analytics feature"
|
2409 |
+
msgstr ""
|
2410 |
+
|
2411 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:520
|
2412 |
+
msgid "Flow Settings"
|
2413 |
+
msgstr ""
|
2414 |
+
|
2415 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:605
|
2416 |
+
msgid "Enable Test Mode"
|
2417 |
+
msgstr ""
|
2418 |
+
|
2419 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:612
|
2420 |
+
msgid ""
|
2421 |
+
"If you are using WooCommerce plugin then test mode will add random products "
|
2422 |
+
"in your flow, so you can preview it easily while testing."
|
2423 |
+
msgstr ""
|
2424 |
+
|
2425 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:732
|
2426 |
+
#: modules/flow/view/meta-flow-steps.php:145
|
2427 |
+
msgid "Add New Step"
|
2428 |
+
msgstr ""
|
2429 |
+
|
2430 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:802
|
2431 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:166
|
2432 |
+
msgid "View Step"
|
2433 |
+
msgstr ""
|
2434 |
+
|
2435 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:813
|
2436 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:165
|
2437 |
+
msgid "Edit Step"
|
2438 |
+
msgstr ""
|
2439 |
+
|
2440 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:815
|
2441 |
+
msgid "Edit"
|
2442 |
+
msgstr ""
|
2443 |
+
|
2444 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:822
|
2445 |
+
msgid "Clone Step"
|
2446 |
+
msgstr ""
|
2447 |
+
|
2448 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:833
|
2449 |
+
msgid "Delete Step"
|
2450 |
+
msgstr ""
|
2451 |
+
|
2452 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:835
|
2453 |
+
msgid "Delete"
|
2454 |
+
msgstr ""
|
2455 |
+
|
2456 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:844
|
2457 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:846
|
2458 |
+
msgid "A/B Test"
|
2459 |
+
msgstr ""
|
2460 |
+
|
2461 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
2462 |
+
msgid "Flow: "
|
2463 |
+
msgstr ""
|
2464 |
+
|
2465 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
2466 |
+
msgid "Name: "
|
2467 |
+
msgstr ""
|
2468 |
+
|
2469 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:101
|
2470 |
+
msgid "Search Flows"
|
2471 |
+
msgstr ""
|
2472 |
+
|
2473 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:102
|
2474 |
+
msgid "All Flows"
|
2475 |
+
msgstr ""
|
2476 |
+
|
2477 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:103
|
2478 |
+
msgid "Edit Flow"
|
2479 |
+
msgstr ""
|
2480 |
+
|
2481 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:104
|
2482 |
+
msgid "View Flow"
|
2483 |
+
msgstr ""
|
2484 |
+
|
2485 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:105
|
2486 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:107
|
2487 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:167
|
2488 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:169
|
2489 |
+
msgid "Add New"
|
2490 |
+
msgstr ""
|
2491 |
+
|
2492 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:106
|
2493 |
+
msgid "Update Flow"
|
2494 |
+
msgstr ""
|
2495 |
+
|
2496 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:108
|
2497 |
+
msgid "New Flow Name"
|
2498 |
+
msgstr ""
|
2499 |
+
|
2500 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:190
|
2501 |
+
msgid "Upgrade to CartFlows Pro"
|
2502 |
+
msgstr ""
|
2503 |
+
|
2504 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:209
|
2505 |
+
msgid "Slug"
|
2506 |
+
msgstr ""
|
2507 |
+
|
2508 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:321
|
2509 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:322
|
2510 |
+
msgid "Flows"
|
2511 |
+
msgstr ""
|
2512 |
+
|
2513 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:344
|
2514 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:350
|
2515 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:401
|
2516 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:407
|
2517 |
+
#. translators: %s: singular custom post type name
|
2518 |
+
msgid "%s updated."
|
2519 |
+
msgstr ""
|
2520 |
+
|
2521 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:346
|
2522 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:403
|
2523 |
+
#. translators: %s: singular custom post type name
|
2524 |
+
msgid "Custom %s updated."
|
2525 |
+
msgstr ""
|
2526 |
+
|
2527 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:348
|
2528 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:405
|
2529 |
+
#. translators: %s: singular custom post type name
|
2530 |
+
msgid "Custom %s deleted."
|
2531 |
+
msgstr ""
|
2532 |
+
|
2533 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:352
|
2534 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:409
|
2535 |
+
#. translators: %1$s: singular custom post type name ,%2$s: date and time of
|
2536 |
+
#. the revision
|
2537 |
+
msgid "%1$s restored to revision from %2$s"
|
2538 |
+
msgstr ""
|
2539 |
+
|
2540 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:354
|
2541 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:411
|
2542 |
+
#. translators: %s: singular custom post type name
|
2543 |
+
msgid "%s published."
|
2544 |
+
msgstr ""
|
2545 |
+
|
2546 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:356
|
2547 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:413
|
2548 |
+
#. translators: %s: singular custom post type name
|
2549 |
+
msgid "%s saved."
|
2550 |
+
msgstr ""
|
2551 |
+
|
2552 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:358
|
2553 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:415
|
2554 |
+
#. translators: %s: singular custom post type name
|
2555 |
+
msgid "%s submitted."
|
2556 |
+
msgstr ""
|
2557 |
+
|
2558 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:360
|
2559 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:417
|
2560 |
+
#. translators: %s: singular custom post type name
|
2561 |
+
msgid "%s scheduled for."
|
2562 |
+
msgstr ""
|
2563 |
+
|
2564 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:362
|
2565 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:419
|
2566 |
+
#. translators: %s: singular custom post type name
|
2567 |
+
msgid "%s draft updated."
|
2568 |
+
msgstr ""
|
2569 |
+
|
2570 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:163
|
2571 |
+
msgid "Search Steps"
|
2572 |
+
msgstr ""
|
2573 |
+
|
2574 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:164
|
2575 |
+
msgid "All Steps"
|
2576 |
+
msgstr ""
|
2577 |
+
|
2578 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:168
|
2579 |
+
msgid "Update Step"
|
2580 |
+
msgstr ""
|
2581 |
+
|
2582 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:170
|
2583 |
+
msgid "New Step Name"
|
2584 |
+
msgstr ""
|
2585 |
+
|
2586 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:211
|
2587 |
+
msgid "Step Type"
|
2588 |
+
msgstr ""
|
2589 |
+
|
2590 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:221
|
2591 |
+
msgid "Step Flow"
|
2592 |
+
msgstr ""
|
2593 |
+
|
2594 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:246
|
2595 |
+
#: modules/flow/view/meta-flow-steps.php:16
|
2596 |
+
msgid "Optin (Woo)"
|
2597 |
+
msgstr ""
|
2598 |
+
|
2599 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:267
|
2600 |
+
#: modules/flow/view/meta-flow-steps.php:14
|
2601 |
+
msgid "Upsell (Woo)"
|
2602 |
+
msgstr ""
|
2603 |
+
|
2604 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:274
|
2605 |
+
#: modules/flow/view/meta-flow-steps.php:15
|
2606 |
+
msgid "Downsell (Woo)"
|
2607 |
+
msgstr ""
|
2608 |
+
|
2609 |
+
#: modules/flow/view/view-flow-inner-step.php:30
|
2610 |
+
msgid "Control"
|
2611 |
+
msgstr ""
|
2612 |
+
|
2613 |
+
#: modules/flow/view/view-flow-inner-step.php:32
|
2614 |
+
#. translators: %s badge count
|
2615 |
+
msgid "Variation-%s"
|
2616 |
+
msgstr ""
|
2617 |
+
|
2618 |
+
#: modules/flow/view/view-flow-inner-step.php:44
|
2619 |
+
msgid "No Product Assigned"
|
2620 |
+
msgstr ""
|
2621 |
+
|
2622 |
+
#: modules/flow/view/view-flow-inner-step.php:48
|
2623 |
+
msgid "Global Checkout - Remove selected checkout product"
|
2624 |
+
msgstr ""
|
2625 |
+
|
2626 |
+
#: modules/flow/view/view-remote-importer.php:19
|
2627 |
+
msgid "Steps Library"
|
2628 |
+
msgstr ""
|
2629 |
+
|
2630 |
+
#: modules/flow/view/view-remote-importer.php:68
|
2631 |
+
msgid "Create Step"
|
2632 |
+
msgstr ""
|
2633 |
+
|
2634 |
+
#: modules/flow/view/view-remote-importer.php:70
|
2635 |
+
msgid "You need a Cartflows Pro version to import Upsell / Downsell"
|
2636 |
+
msgstr ""
|
2637 |
+
|
2638 |
+
#: modules/gutenberg/classes/class-cartflows-init-blocks.php:182
|
2639 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:307
|
2640 |
+
msgid ""
|
2641 |
+
"No product is selected. Please select a Simple, Virtual and Free product "
|
2642 |
+
"from the meta settings."
|
2643 |
+
msgstr ""
|
2644 |
+
|
2645 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:66
|
2646 |
+
msgid "Landing Page Settings"
|
2647 |
+
msgstr ""
|
2648 |
+
|
2649 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:171
|
2650 |
+
msgid "Next Step Link"
|
2651 |
+
msgstr ""
|
2652 |
+
|
2653 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:247
|
2654 |
+
msgid "Please place shortcode on Optin step-type only."
|
2655 |
+
msgstr ""
|
2656 |
+
|
2657 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:324
|
2658 |
+
msgid "Please update the selected product's price to zero (0)."
|
2659 |
+
msgstr ""
|
2660 |
+
|
2661 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:333
|
2662 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:337
|
2663 |
+
msgid "Please select a Simple, Virtual and Free product."
|
2664 |
+
msgstr ""
|
2665 |
+
|
2666 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:94
|
2667 |
+
msgid "Optin Settings"
|
2668 |
+
msgstr ""
|
2669 |
+
|
2670 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:103
|
2671 |
+
msgid "Optin Design"
|
2672 |
+
msgstr ""
|
2673 |
+
|
2674 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:145
|
2675 |
+
msgid "Form Fields"
|
2676 |
+
msgstr ""
|
2677 |
+
|
2678 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:226
|
2679 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:250
|
2680 |
+
msgid "Design"
|
2681 |
+
msgstr ""
|
2682 |
+
|
2683 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:277
|
2684 |
+
msgid "Add this shortcode to your optin page"
|
2685 |
+
msgstr ""
|
2686 |
+
|
2687 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:302
|
2688 |
+
msgid "Select Free Product"
|
2689 |
+
msgstr ""
|
2690 |
+
|
2691 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:303
|
2692 |
+
msgid "Select Free and Virtual product only."
|
2693 |
+
msgstr ""
|
2694 |
+
|
2695 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:357
|
2696 |
+
msgid "Pass Fields as URL Parameters"
|
2697 |
+
msgstr ""
|
2698 |
+
|
2699 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:360
|
2700 |
+
msgid "Enable"
|
2701 |
+
msgstr ""
|
2702 |
+
|
2703 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:361
|
2704 |
+
msgid ""
|
2705 |
+
"You can pass specific fields from the form to next step as URL query "
|
2706 |
+
"parameters."
|
2707 |
+
msgstr ""
|
2708 |
+
|
2709 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:372
|
2710 |
+
msgid "Enter form field"
|
2711 |
+
msgstr ""
|
2712 |
+
|
2713 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:375
|
2714 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:385
|
2715 |
+
msgid "Enter comma seprated field name. E.g. first_name, last_name"
|
2716 |
+
msgstr ""
|
2717 |
+
|
2718 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:377
|
2719 |
+
msgid "Fields to pass, separated by commas"
|
2720 |
+
msgstr ""
|
2721 |
+
|
2722 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:387
|
2723 |
+
#. translators: %s: link
|
2724 |
+
msgid ""
|
2725 |
+
"You can pass field value as a URL parameter to the next step. %1$sClick "
|
2726 |
+
"here%2$s for more information."
|
2727 |
+
msgstr ""
|
2728 |
+
|
2729 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:550
|
2730 |
+
msgid "Button Text"
|
2731 |
+
msgstr ""
|
2732 |
+
|
2733 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:561
|
2734 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:319
|
2735 |
+
msgid "Font Size"
|
2736 |
+
msgstr ""
|
2737 |
+
|
2738 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:619
|
2739 |
+
msgid "Position"
|
2740 |
+
msgstr ""
|
2741 |
+
|
2742 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:132
|
2743 |
+
msgid "No completed or processing order found to show the order details form demo."
|
2744 |
+
msgstr ""
|
2745 |
+
|
2746 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:136
|
2747 |
+
msgid "Order not found. You cannot access this page directly."
|
2748 |
+
msgstr ""
|
2749 |
+
|
2750 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:95
|
2751 |
+
msgid "Thank You Settings"
|
2752 |
+
msgstr ""
|
2753 |
+
|
2754 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:104
|
2755 |
+
msgid "Thank You Design"
|
2756 |
+
msgstr ""
|
2757 |
+
|
2758 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:172
|
2759 |
+
msgid "Thank You Page Text"
|
2760 |
+
msgstr ""
|
2761 |
+
|
2762 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:178
|
2763 |
+
msgid "It will change the default text on thank you page."
|
2764 |
+
msgstr ""
|
2765 |
+
|
2766 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:186
|
2767 |
+
msgid "Redirect After Purchase"
|
2768 |
+
msgstr ""
|
2769 |
+
|
2770 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:195
|
2771 |
+
msgid "Redirect Link"
|
2772 |
+
msgstr ""
|
2773 |
+
|
2774 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:199
|
2775 |
+
msgid "https://"
|
2776 |
+
msgstr ""
|
2777 |
+
|
2778 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:256
|
2779 |
+
msgid "Edit Fields"
|
2780 |
+
msgstr ""
|
2781 |
+
|
2782 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:359
|
2783 |
+
msgid "Advanced Options"
|
2784 |
+
msgstr ""
|
2785 |
+
|
2786 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:369
|
2787 |
+
msgid "Container Width (In px)"
|
2788 |
+
msgstr ""
|
2789 |
+
|
2790 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:391
|
2791 |
+
msgid "Enable Order Overview "
|
2792 |
+
msgstr ""
|
2793 |
+
|
2794 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:399
|
2795 |
+
msgid "Enable Order Details "
|
2796 |
+
msgstr ""
|
2797 |
+
|
2798 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:407
|
2799 |
+
msgid "Enable Billing Details "
|
2800 |
+
msgstr ""
|
2801 |
+
|
2802 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:415
|
2803 |
+
msgid "Enable Shipping Details "
|
2804 |
+
msgstr ""
|
2805 |
+
|
2806 |
+
#: modules/widgets/class-cartflows-next-step.php:24
|
2807 |
+
msgid "CartFlows Next Step"
|
2808 |
+
msgstr ""
|
2809 |
+
|
2810 |
+
#: modules/widgets/class-cartflows-next-step.php:26
|
2811 |
+
msgid "Next Step Widgets"
|
2812 |
+
msgstr ""
|
2813 |
+
|
2814 |
+
#: modules/widgets/class-cartflows-next-step.php:106
|
2815 |
+
msgid "New title"
|
2816 |
+
msgstr ""
|
2817 |
+
|
2818 |
+
#: modules/widgets/class-cartflows-next-step.php:123
|
2819 |
+
msgid "Title:"
|
2820 |
+
msgstr ""
|
2821 |
+
|
2822 |
+
#: modules/widgets/class-cartflows-next-step.php:127
|
2823 |
+
msgid "Flow ID:"
|
2824 |
+
msgstr ""
|
2825 |
+
|
2826 |
+
#: modules/widgets/class-cartflows-next-step.php:131
|
2827 |
+
msgid "Step ID:"
|
2828 |
+
msgstr ""
|
2829 |
+
|
2830 |
+
#: woocommerce/template/cart/cart-shipping.php:51
|
2831 |
+
#. Translators: $s shipping destination.
|
2832 |
+
msgid "Estimate for %s."
|
2833 |
+
msgstr ""
|
2834 |
+
|
2835 |
+
#: woocommerce/template/cart/cart-shipping.php:52
|
2836 |
+
msgid "Change address"
|
2837 |
+
msgstr ""
|
2838 |
+
|
2839 |
+
#: woocommerce/template/cart/cart-shipping.php:54
|
2840 |
+
msgid "This is only an estimate. Prices will be updated during checkout."
|
2841 |
+
msgstr ""
|
2842 |
+
|
2843 |
+
#: woocommerce/template/cart/cart-shipping.php:61
|
2844 |
+
msgid "Enter your address to view shipping options."
|
2845 |
+
msgstr ""
|
2846 |
+
|
2847 |
+
#: woocommerce/template/cart/cart-shipping.php:63
|
2848 |
+
msgid ""
|
2849 |
+
"There are no shipping methods available. Please ensure that your address "
|
2850 |
+
"has been entered correctly, or contact us if you need any help."
|
2851 |
+
msgstr ""
|
2852 |
+
|
2853 |
+
#: woocommerce/template/cart/cart-shipping.php:66
|
2854 |
+
#. Translators: $s shipping destination.
|
2855 |
+
msgid "No shipping options were found for %s."
|
2856 |
+
msgstr ""
|
2857 |
+
|
2858 |
+
#: woocommerce/template/cart/cart-shipping.php:67
|
2859 |
+
msgid "Enter a different address"
|
2860 |
+
msgstr ""
|
2861 |
+
|
2862 |
+
#: woocommerce/template/checkout/form-billing.php:27
|
2863 |
+
msgid "Billing & Shipping"
|
2864 |
+
msgstr ""
|
2865 |
+
|
2866 |
+
#: woocommerce/template/checkout/form-billing.php:31
|
2867 |
+
msgid "Billing details"
|
2868 |
+
msgstr ""
|
2869 |
+
|
2870 |
+
#: woocommerce/template/checkout/form-billing.php:59
|
2871 |
+
msgid "Create an account?"
|
2872 |
+
msgstr ""
|
2873 |
+
|
2874 |
+
#: woocommerce/template/checkout/form-checkout.php:26
|
2875 |
+
msgid "You must be logged in to checkout."
|
2876 |
+
msgstr ""
|
2877 |
+
|
2878 |
+
#: woocommerce/template/checkout/form-coupon.php:26
|
2879 |
+
msgid "Have a coupon?"
|
2880 |
+
msgstr ""
|
2881 |
+
|
2882 |
+
#: woocommerce/template/checkout/form-coupon.php:26
|
2883 |
+
msgid "Click here to enter your code"
|
2884 |
+
msgstr ""
|
2885 |
+
|
2886 |
+
#: woocommerce/template/checkout/form-coupon.php:31
|
2887 |
+
msgid "If you have a coupon code, please apply it below."
|
2888 |
+
msgstr ""
|
2889 |
+
|
2890 |
+
#: woocommerce/template/checkout/form-coupon.php:34
|
2891 |
+
msgid "Coupon code"
|
2892 |
+
msgstr ""
|
2893 |
+
|
2894 |
+
#: woocommerce/template/checkout/form-coupon.php:38
|
2895 |
+
msgid "Apply coupon"
|
2896 |
+
msgstr ""
|
2897 |
+
|
2898 |
+
#: woocommerce/template/checkout/form-login.php:26
|
2899 |
+
msgid "Returning customer?"
|
2900 |
+
msgstr ""
|
2901 |
+
|
2902 |
+
#: woocommerce/template/checkout/form-login.php:26
|
2903 |
+
msgid "Click here to login"
|
2904 |
+
msgstr ""
|
2905 |
+
|
2906 |
+
#: woocommerce/template/checkout/form-login.php:32
|
2907 |
+
msgid ""
|
2908 |
+
"If you have shopped with us before, please enter your details below. If you "
|
2909 |
+
"are a new customer, please proceed to the Billing & Shipping section."
|
2910 |
+
msgstr ""
|
2911 |
+
|
2912 |
+
#: woocommerce/template/checkout/form-shipping.php:26
|
2913 |
+
msgid "Ship to a different address?"
|
2914 |
+
msgstr ""
|
2915 |
+
|
2916 |
+
#: woocommerce/template/checkout/form-shipping.php:57
|
2917 |
+
msgid "Additional information"
|
2918 |
+
msgstr ""
|
2919 |
+
|
2920 |
+
#: woocommerce/template/checkout/payment.php:32
|
2921 |
+
msgid ""
|
2922 |
+
"Sorry, it seems that there are no available payment methods for your state. "
|
2923 |
+
"Please contact us if you require assistance or wish to make alternate "
|
2924 |
+
"arrangements."
|
2925 |
+
msgstr ""
|
2926 |
+
|
2927 |
+
#: woocommerce/template/checkout/payment.php:32
|
2928 |
+
msgid "Please fill in your details above to see available payment methods."
|
2929 |
+
msgstr ""
|
2930 |
+
|
2931 |
+
#: woocommerce/template/checkout/payment.php:41
|
2932 |
+
#. translators: $1 and $2 opening and closing emphasis tags respectively
|
2933 |
+
msgid ""
|
2934 |
+
"Since your browser does not support JavaScript, or it is disabled, please "
|
2935 |
+
"ensure you click the %1$sUpdate Totals%2$s button before placing your "
|
2936 |
+
"order. You may be charged more than the amount stated above if you fail to "
|
2937 |
+
"do so."
|
2938 |
+
msgstr ""
|
2939 |
+
|
2940 |
+
#: woocommerce/template/checkout/payment.php:43
|
2941 |
+
msgid "Update totals"
|
2942 |
+
msgstr ""
|
2943 |
+
|
2944 |
+
#: woocommerce/template/checkout/review-order.php:26
|
2945 |
+
#: woocommerce/template/order/order-details.php:57
|
2946 |
+
msgid "Product"
|
2947 |
+
msgstr ""
|
2948 |
+
|
2949 |
+
#: woocommerce/template/checkout/review-order.php:27
|
2950 |
+
#: woocommerce/template/checkout/review-order.php:107
|
2951 |
+
#: woocommerce/template/order/order-details.php:58
|
2952 |
+
msgid "Total"
|
2953 |
+
msgstr ""
|
2954 |
+
|
2955 |
+
#: woocommerce/template/checkout/review-order.php:60
|
2956 |
+
msgid "Subtotal"
|
2957 |
+
msgstr ""
|
2958 |
+
|
2959 |
+
#: woocommerce/template/checkout/thankyou.php:30
|
2960 |
+
msgid ""
|
2961 |
+
"Unfortunately your order cannot be processed as the originating "
|
2962 |
+
"bank/merchant has declined your transaction. Please attempt your purchase "
|
2963 |
+
"again."
|
2964 |
+
msgstr ""
|
2965 |
+
|
2966 |
+
#: woocommerce/template/checkout/thankyou.php:33
|
2967 |
+
msgid "Pay"
|
2968 |
+
msgstr ""
|
2969 |
+
|
2970 |
+
#: woocommerce/template/checkout/thankyou.php:35
|
2971 |
+
msgid "My account"
|
2972 |
+
msgstr ""
|
2973 |
+
|
2974 |
+
#: woocommerce/template/checkout/thankyou.php:49
|
2975 |
+
msgid "Order number:"
|
2976 |
+
msgstr ""
|
2977 |
+
|
2978 |
+
#: woocommerce/template/checkout/thankyou.php:54
|
2979 |
+
msgid "Date:"
|
2980 |
+
msgstr ""
|
2981 |
+
|
2982 |
+
#: woocommerce/template/checkout/thankyou.php:60
|
2983 |
+
msgid "Email:"
|
2984 |
+
msgstr ""
|
2985 |
+
|
2986 |
+
#: woocommerce/template/checkout/thankyou.php:67
|
2987 |
+
msgid "Total:"
|
2988 |
+
msgstr ""
|
2989 |
+
|
2990 |
+
#: woocommerce/template/checkout/thankyou.php:74
|
2991 |
+
msgid "Payment method:"
|
2992 |
+
msgstr ""
|
2993 |
+
|
2994 |
+
#: woocommerce/template/global/form-login.php:34
|
2995 |
+
msgid "Username or email"
|
2996 |
+
msgstr ""
|
2997 |
+
|
2998 |
+
#: woocommerce/template/global/form-login.php:38
|
2999 |
+
msgid "Password"
|
3000 |
+
msgstr ""
|
3001 |
+
|
3002 |
+
#: woocommerce/template/global/form-login.php:48
|
3003 |
+
msgid "Login"
|
3004 |
+
msgstr ""
|
3005 |
+
|
3006 |
+
#: woocommerce/template/global/form-login.php:53
|
3007 |
+
msgid "Remember me"
|
3008 |
+
msgstr ""
|
3009 |
+
|
3010 |
+
#: woocommerce/template/global/form-login.php:57
|
3011 |
+
msgid "Lost your password?"
|
3012 |
+
msgstr ""
|
3013 |
+
|
3014 |
+
#: woocommerce/template/order/order-details.php:51
|
3015 |
+
msgid "Order details"
|
3016 |
+
msgstr ""
|
3017 |
+
|
3018 |
+
#: woocommerce/template/order/order-details.php:99
|
3019 |
+
msgid "Note:"
|
3020 |
+
msgstr ""
|
3021 |
+
|
3022 |
+
#. Plugin Name of the plugin/theme
|
3023 |
+
msgid "CartFlows"
|
3024 |
+
msgstr ""
|
3025 |
+
|
3026 |
+
#. Author URI of the plugin/theme
|
3027 |
+
msgid "https://cartflows.com/"
|
3028 |
+
msgstr ""
|
3029 |
+
|
3030 |
+
#. Description of the plugin/theme
|
3031 |
+
msgid "Create beautiful checkout pages & sales flows for WooCommerce."
|
3032 |
+
msgstr ""
|
3033 |
+
|
3034 |
+
#. Author of the plugin/theme
|
3035 |
+
msgid "CartFlows Inc"
|
3036 |
+
msgstr ""
|
3037 |
+
|
3038 |
+
#: modules/beaver-builder/cartflows-bb-next-step/cartflows-bb-next-step.php:262
|
3039 |
+
msgctxt "Width."
|
3040 |
+
msgid "Auto"
|
3041 |
+
msgstr ""
|
3042 |
+
|
3043 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:99
|
3044 |
+
msgctxt "flow general name"
|
3045 |
+
msgid "Flows"
|
3046 |
+
msgstr ""
|
3047 |
+
|
3048 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:100
|
3049 |
+
msgctxt "flow singular name"
|
3050 |
+
msgid "Flow"
|
3051 |
+
msgstr ""
|
3052 |
+
|
3053 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:161
|
3054 |
+
msgctxt "flow step general name"
|
3055 |
+
msgid "Steps"
|
3056 |
+
msgstr ""
|
3057 |
+
|
3058 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:162
|
3059 |
+
msgctxt "flow step singular name"
|
3060 |
+
msgid "Step"
|
3061 |
+
msgstr ""
|
3062 |
+
|
3063 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:315
|
3064 |
+
msgctxt "cartflows"
|
3065 |
+
msgid "CartFlows — Boxed"
|
3066 |
+
msgstr ""
|
3067 |
+
|
3068 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:316
|
3069 |
+
msgctxt "cartflows"
|
3070 |
+
msgid "Template for Page Builders"
|
3071 |
msgstr ""
|
modules/beaver-builder/cartflows-bb-checkout-form/includes/frontend.css.php
CHANGED
@@ -1,381 +1,381 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BB Checkout Form Module front-end CSS php file.
|
4 |
-
*
|
5 |
-
* @package cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
global $post;
|
9 |
-
|
10 |
-
?>
|
11 |
-
|
12 |
-
#fl-field-checkout_layout .cartflows-bb-link,
|
13 |
-
#fl-field-input_skins .cartflows-bb-link {
|
14 |
-
color: #0086b0;
|
15 |
-
}
|
16 |
-
|
17 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
|
18 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
|
19 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
20 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-info::before,
|
21 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-message::before,
|
22 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce a,
|
23 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name,
|
24 |
-
body .wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf-content-modal-title .wcf_first_name {
|
25 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
26 |
-
}
|
27 |
-
|
28 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
|
29 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
|
30 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
|
31 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:focus,
|
32 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus,
|
33 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
34 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
35 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
36 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
37 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
38 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
39 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
40 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
41 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
42 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
43 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
|
44 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
45 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
46 |
-
}
|
47 |
-
|
48 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,
|
49 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
50 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
51 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
52 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
53 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
54 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
55 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
56 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
57 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
58 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current:before,
|
59 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current:before,
|
60 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current:before,
|
61 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
|
62 |
-
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step,
|
63 |
-
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:before,
|
64 |
-
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:after {
|
65 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
66 |
-
}
|
67 |
-
|
68 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before {
|
69 |
-
border-top-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
70 |
-
}
|
71 |
-
|
72 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
73 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
74 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
75 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
76 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
77 |
-
color: #fff;
|
78 |
-
}
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form,
|
83 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p {
|
84 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_text_color ); ?>;
|
85 |
-
}
|
86 |
-
|
87 |
-
<?php
|
88 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
89 |
-
FLBuilderCSS::typography_field_rule(
|
90 |
-
array(
|
91 |
-
'settings' => $settings,
|
92 |
-
'setting_name' => 'global_typography',
|
93 |
-
'selector' => ".fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form",
|
94 |
-
)
|
95 |
-
);
|
96 |
-
}
|
97 |
-
?>
|
98 |
-
|
99 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3,
|
100 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
|
101 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
102 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name {
|
103 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->heading_color ); ?>;
|
104 |
-
}
|
105 |
-
|
106 |
-
<?php
|
107 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
108 |
-
FLBuilderCSS::typography_field_rule(
|
109 |
-
array(
|
110 |
-
'settings' => $settings,
|
111 |
-
'setting_name' => 'heading_typography',
|
112 |
-
'selector' => ".fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3,
|
113 |
-
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
|
114 |
-
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
115 |
-
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-name,
|
116 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-1 h3,
|
117 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-2 h3",
|
118 |
-
)
|
119 |
-
);
|
120 |
-
}
|
121 |
-
?>
|
122 |
-
|
123 |
-
<?php
|
124 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
125 |
-
FLBuilderCSS::typography_field_rule(
|
126 |
-
array(
|
127 |
-
'settings' => $settings,
|
128 |
-
'setting_name' => 'input_text_typography',
|
129 |
-
'selector' => ".fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
130 |
-
.fl-node-$id .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
131 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
132 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
|
133 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
|
134 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce form p.form-row label,
|
135 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
|
136 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label,
|
137 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row select,
|
138 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type='text]",
|
139 |
-
)
|
140 |
-
);
|
141 |
-
}
|
142 |
-
?>
|
143 |
-
|
144 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout label,
|
145 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form p.form-row label {
|
146 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->label_color ); ?>;
|
147 |
-
}
|
148 |
-
|
149 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
150 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
151 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
152 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
153 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
154 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
155 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_bgcolor ); ?>;
|
156 |
-
}
|
157 |
-
|
158 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
159 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
160 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
161 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
162 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row select,
|
163 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select,
|
164 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form ::placeholder,
|
165 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form ::-webkit-input-placeholder {
|
166 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_color ); ?> !important;
|
167 |
-
}
|
168 |
-
|
169 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
170 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
171 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
172 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
173 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
174 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
175 |
-
border-radius: <?php echo ( '' != $settings->input_border_radius ) ? $settings->input_border_radius : '0'; ?>px;
|
176 |
-
}
|
177 |
-
|
178 |
-
<?php if ( 'none' !== $settings->input_border_style ) { ?>
|
179 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
180 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
181 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
182 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
183 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
184 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
185 |
-
border-style: <?php echo ( '' != $settings->input_border_style ) ? $settings->input_border_style : 'solid'; ?>;
|
186 |
-
border-width: <?php echo ( '' != $settings->input_border_width ) ? $settings->input_border_width : '1'; ?>px;
|
187 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_border_color ); ?>;
|
188 |
-
}
|
189 |
-
|
190 |
-
<?php } ?>
|
191 |
-
|
192 |
-
<?php
|
193 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
194 |
-
FLBuilderCSS::typography_field_rule(
|
195 |
-
array(
|
196 |
-
'settings' => $settings,
|
197 |
-
'setting_name' => 'button_typography',
|
198 |
-
'selector' => ".fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review button,
|
199 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
200 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
201 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
202 |
-
.fl-node-$id .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
203 |
-
.fl-node-$id .wcf-embed-checkout-form form.checkout_coupon .button,
|
204 |
-
.fl-node-$id .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
205 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn",
|
206 |
-
)
|
207 |
-
);
|
208 |
-
}
|
209 |
-
?>
|
210 |
-
|
211 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
212 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
213 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
214 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
215 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
216 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
217 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
218 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
219 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
220 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_text_color ); ?>;
|
221 |
-
}
|
222 |
-
|
223 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
224 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
225 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
226 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
227 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
228 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
229 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
230 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
231 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
232 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_bg_color ); ?>;
|
233 |
-
}
|
234 |
-
|
235 |
-
<?php // Button text hover color. ?>
|
236 |
-
|
237 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
238 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
239 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
240 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
241 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button:hover,
|
242 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
|
243 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover,
|
244 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn:hover {
|
245 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_text_hover_color ); ?>;
|
246 |
-
}
|
247 |
-
|
248 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
249 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
250 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
251 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
252 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button:hover,
|
253 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
|
254 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover,
|
255 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn:hover {
|
256 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_bg_hover_color ); ?>;
|
257 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_border_hover_color ); ?>;
|
258 |
-
}
|
259 |
-
|
260 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
261 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
262 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
263 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
264 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
265 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
266 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
267 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
268 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
269 |
-
border-radius: <?php echo ( '' != $settings->button_border_radius ) ? $settings->button_border_radius : '0'; ?>px;
|
270 |
-
}
|
271 |
-
|
272 |
-
<?php if ( 'none' != $settings->button_border_style ) { ?>
|
273 |
-
|
274 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
275 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
276 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
277 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
278 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
279 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
280 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
281 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
282 |
-
border-style: <?php echo ( '' != $settings->button_border_style ) ? $settings->button_border_style : 'solid'; ?>;
|
283 |
-
border-width: <?php echo ( '' != $settings->button_border_width ) ? $settings->button_border_width : '0'; ?>px;
|
284 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_border_color ); ?>;
|
285 |
-
}
|
286 |
-
|
287 |
-
<?php } else { ?>
|
288 |
-
|
289 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
290 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
291 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
292 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
293 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
294 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
295 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
296 |
-
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
297 |
-
border-width: 0px !important;
|
298 |
-
}
|
299 |
-
|
300 |
-
<?php } ?>
|
301 |
-
|
302 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment,
|
303 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment label,
|
304 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment label a {
|
305 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_text_color ); ?>;
|
306 |
-
}
|
307 |
-
|
308 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
|
309 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_desc_color ); ?>;
|
310 |
-
}
|
311 |
-
|
312 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
313 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_bg_color ); ?>;
|
314 |
-
}
|
315 |
-
|
316 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
|
317 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_info_bg_color ); ?>;
|
318 |
-
}
|
319 |
-
|
320 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
|
321 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
|
322 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before {
|
323 |
-
border-bottom-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_info_bg_color ); ?>;
|
324 |
-
}
|
325 |
-
|
326 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
327 |
-
border-radius: <?php echo ( '' != $settings->payment_section_border_radius ) ? $settings->payment_section_border_radius : '0'; ?>px;
|
328 |
-
}
|
329 |
-
|
330 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
331 |
-
padding-top: <?php echo ( '' != $settings->payment_section_padding_dimension_top ) ? $settings->payment_section_padding_dimension_top : ''; ?>px;
|
332 |
-
padding-bottom: <?php echo ( '' != $settings->payment_section_padding_dimension_bottom ) ? $settings->payment_section_padding_dimension_bottom : ''; ?>px;
|
333 |
-
padding-left: <?php echo ( '' != $settings->payment_section_padding_dimension_left ) ? $settings->payment_section_padding_dimension_left : ''; ?>px;
|
334 |
-
padding-right: <?php echo ( '' != $settings->payment_section_padding_dimension_right ) ? $settings->payment_section_padding_dimension_right : ''; ?>px;
|
335 |
-
}
|
336 |
-
|
337 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
338 |
-
margin-top: <?php echo ( '' != $settings->payment_section_margin_dimension_top ) ? $settings->payment_section_margin_dimension_top : ''; ?>px;
|
339 |
-
margin-bottom: <?php echo ( '' != $settings->payment_section_margin_dimension_bottom ) ? $settings->payment_section_margin_dimension_bottom : ''; ?>px;
|
340 |
-
margin-left: <?php echo ( '' != $settings->payment_section_margin_dimension_left ) ? $settings->payment_section_margin_dimension_left : ''; ?>px;
|
341 |
-
margin-right: <?php echo ( '' != $settings->payment_section_margin_dimension_right ) ? $settings->payment_section_margin_dimension_right : ''; ?>px;
|
342 |
-
}
|
343 |
-
|
344 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout .woocommerce-invalid label,
|
345 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form p.form-row.woocommerce-invalid label,
|
346 |
-
.fl-node-<?php echo $id; ?> .woocommerce form .form-row.woocommerce-invalid label {
|
347 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->field_label_color ); ?>;
|
348 |
-
}
|
349 |
-
|
350 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
|
351 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
|
352 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
|
353 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required
|
354 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
355 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
356 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select {
|
357 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_field_border_color ); ?>;
|
358 |
-
}
|
359 |
-
|
360 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-error,
|
361 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
|
362 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error {
|
363 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_text_color ); ?>;
|
364 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_border_color ); ?>;
|
365 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_bg_color ); ?>;
|
366 |
-
}
|
367 |
-
|
368 |
-
.fl-node-<?php echo $id; ?> .woocommerce form .form-row.woocommerce-invalid label {
|
369 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->field_label_color ); ?>;
|
370 |
-
}
|
371 |
-
|
372 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
|
373 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
|
374 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
|
375 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required
|
376 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
377 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
378 |
-
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select {
|
379 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_field_border_color ); ?>;
|
380 |
-
}
|
381 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BB Checkout Form Module front-end CSS php file.
|
4 |
+
*
|
5 |
+
* @package cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
global $post;
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
#fl-field-checkout_layout .cartflows-bb-link,
|
13 |
+
#fl-field-input_skins .cartflows-bb-link {
|
14 |
+
color: #0086b0;
|
15 |
+
}
|
16 |
+
|
17 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
|
18 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
|
19 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
20 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-info::before,
|
21 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-message::before,
|
22 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce a,
|
23 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name,
|
24 |
+
body .wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf-content-modal-title .wcf_first_name {
|
25 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
26 |
+
}
|
27 |
+
|
28 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
|
29 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
|
30 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
|
31 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:focus,
|
32 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus,
|
33 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
34 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
35 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
36 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
37 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
38 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
39 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
40 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
41 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
42 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
43 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
|
44 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
45 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
46 |
+
}
|
47 |
+
|
48 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,
|
49 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
50 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
51 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
52 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
53 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
54 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
55 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
56 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
57 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
58 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current:before,
|
59 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current:before,
|
60 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current:before,
|
61 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
|
62 |
+
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step,
|
63 |
+
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:before,
|
64 |
+
body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:after {
|
65 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
66 |
+
}
|
67 |
+
|
68 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before {
|
69 |
+
border-top-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
70 |
+
}
|
71 |
+
|
72 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
73 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
74 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
75 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
76 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_primary_color ); ?>;
|
77 |
+
color: #fff;
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form,
|
83 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p {
|
84 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->global_text_color ); ?>;
|
85 |
+
}
|
86 |
+
|
87 |
+
<?php
|
88 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
89 |
+
FLBuilderCSS::typography_field_rule(
|
90 |
+
array(
|
91 |
+
'settings' => $settings,
|
92 |
+
'setting_name' => 'global_typography',
|
93 |
+
'selector' => ".fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form",
|
94 |
+
)
|
95 |
+
);
|
96 |
+
}
|
97 |
+
?>
|
98 |
+
|
99 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3,
|
100 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
|
101 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
102 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name {
|
103 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->heading_color ); ?>;
|
104 |
+
}
|
105 |
+
|
106 |
+
<?php
|
107 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
108 |
+
FLBuilderCSS::typography_field_rule(
|
109 |
+
array(
|
110 |
+
'settings' => $settings,
|
111 |
+
'setting_name' => 'heading_typography',
|
112 |
+
'selector' => ".fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3,
|
113 |
+
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
|
114 |
+
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
115 |
+
.fl-node-$id .cartflows-bb__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-name,
|
116 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-1 h3,
|
117 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-2 h3",
|
118 |
+
)
|
119 |
+
);
|
120 |
+
}
|
121 |
+
?>
|
122 |
+
|
123 |
+
<?php
|
124 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
125 |
+
FLBuilderCSS::typography_field_rule(
|
126 |
+
array(
|
127 |
+
'settings' => $settings,
|
128 |
+
'setting_name' => 'input_text_typography',
|
129 |
+
'selector' => ".fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
130 |
+
.fl-node-$id .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
131 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
132 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
|
133 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
|
134 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce form p.form-row label,
|
135 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
|
136 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label,
|
137 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce form .form-row select,
|
138 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type='text]",
|
139 |
+
)
|
140 |
+
);
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
|
144 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout label,
|
145 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form p.form-row label {
|
146 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->label_color ); ?>;
|
147 |
+
}
|
148 |
+
|
149 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
150 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
151 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
152 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
153 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
154 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
155 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_bgcolor ); ?>;
|
156 |
+
}
|
157 |
+
|
158 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
159 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
160 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
161 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
162 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row select,
|
163 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select,
|
164 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form ::placeholder,
|
165 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__checkout-form .wcf-embed-checkout-form ::-webkit-input-placeholder {
|
166 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_color ); ?> !important;
|
167 |
+
}
|
168 |
+
|
169 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
170 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
171 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
172 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
173 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
174 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
175 |
+
border-radius: <?php echo ( '' != $settings->input_border_radius ) ? $settings->input_border_radius : '0'; ?>px;
|
176 |
+
}
|
177 |
+
|
178 |
+
<?php if ( 'none' !== $settings->input_border_style ) { ?>
|
179 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
|
180 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
181 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
182 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
|
183 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select.select,
|
184 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row select {
|
185 |
+
border-style: <?php echo ( '' != $settings->input_border_style ) ? $settings->input_border_style : 'solid'; ?>;
|
186 |
+
border-width: <?php echo ( '' != $settings->input_border_width ) ? $settings->input_border_width : '1'; ?>px;
|
187 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->input_border_color ); ?>;
|
188 |
+
}
|
189 |
+
|
190 |
+
<?php } ?>
|
191 |
+
|
192 |
+
<?php
|
193 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
194 |
+
FLBuilderCSS::typography_field_rule(
|
195 |
+
array(
|
196 |
+
'settings' => $settings,
|
197 |
+
'setting_name' => 'button_typography',
|
198 |
+
'selector' => ".fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review button,
|
199 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
200 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
201 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
202 |
+
.fl-node-$id .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
203 |
+
.fl-node-$id .wcf-embed-checkout-form form.checkout_coupon .button,
|
204 |
+
.fl-node-$id .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
205 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn",
|
206 |
+
)
|
207 |
+
);
|
208 |
+
}
|
209 |
+
?>
|
210 |
+
|
211 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
212 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
213 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
214 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
215 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
216 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
217 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
218 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
219 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
220 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_text_color ); ?>;
|
221 |
+
}
|
222 |
+
|
223 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
224 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
225 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
226 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
227 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
228 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
229 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
230 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
231 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
232 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_bg_color ); ?>;
|
233 |
+
}
|
234 |
+
|
235 |
+
<?php // Button text hover color. ?>
|
236 |
+
|
237 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
238 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
239 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
240 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
241 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button:hover,
|
242 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
|
243 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover,
|
244 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn:hover {
|
245 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_text_hover_color ); ?>;
|
246 |
+
}
|
247 |
+
|
248 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
249 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
250 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
251 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
|
252 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button:hover,
|
253 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
|
254 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover,
|
255 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn:hover {
|
256 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_bg_hover_color ); ?>;
|
257 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_border_hover_color ); ?>;
|
258 |
+
}
|
259 |
+
|
260 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
261 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
262 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
263 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
264 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
265 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
266 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
267 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
|
268 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
269 |
+
border-radius: <?php echo ( '' != $settings->button_border_radius ) ? $settings->button_border_radius : '0'; ?>px;
|
270 |
+
}
|
271 |
+
|
272 |
+
<?php if ( 'none' != $settings->button_border_style ) { ?>
|
273 |
+
|
274 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
275 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
276 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
277 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
278 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
279 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
280 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
281 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
282 |
+
border-style: <?php echo ( '' != $settings->button_border_style ) ? $settings->button_border_style : 'solid'; ?>;
|
283 |
+
border-width: <?php echo ( '' != $settings->button_border_width ) ? $settings->button_border_width : '0'; ?>px;
|
284 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->button_border_color ); ?>;
|
285 |
+
}
|
286 |
+
|
287 |
+
<?php } else { ?>
|
288 |
+
|
289 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button,
|
290 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
291 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
|
292 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
293 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
|
294 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form form.checkout_coupon .button,
|
295 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
|
296 |
+
body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn {
|
297 |
+
border-width: 0px !important;
|
298 |
+
}
|
299 |
+
|
300 |
+
<?php } ?>
|
301 |
+
|
302 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment,
|
303 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment label,
|
304 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment label a {
|
305 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_text_color ); ?>;
|
306 |
+
}
|
307 |
+
|
308 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
|
309 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_desc_color ); ?>;
|
310 |
+
}
|
311 |
+
|
312 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
313 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_section_bg_color ); ?>;
|
314 |
+
}
|
315 |
+
|
316 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
|
317 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_info_bg_color ); ?>;
|
318 |
+
}
|
319 |
+
|
320 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
|
321 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
|
322 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before {
|
323 |
+
border-bottom-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->payment_info_bg_color ); ?>;
|
324 |
+
}
|
325 |
+
|
326 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
327 |
+
border-radius: <?php echo ( '' != $settings->payment_section_border_radius ) ? $settings->payment_section_border_radius : '0'; ?>px;
|
328 |
+
}
|
329 |
+
|
330 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
331 |
+
padding-top: <?php echo ( '' != $settings->payment_section_padding_dimension_top ) ? $settings->payment_section_padding_dimension_top : ''; ?>px;
|
332 |
+
padding-bottom: <?php echo ( '' != $settings->payment_section_padding_dimension_bottom ) ? $settings->payment_section_padding_dimension_bottom : ''; ?>px;
|
333 |
+
padding-left: <?php echo ( '' != $settings->payment_section_padding_dimension_left ) ? $settings->payment_section_padding_dimension_left : ''; ?>px;
|
334 |
+
padding-right: <?php echo ( '' != $settings->payment_section_padding_dimension_right ) ? $settings->payment_section_padding_dimension_right : ''; ?>px;
|
335 |
+
}
|
336 |
+
|
337 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
|
338 |
+
margin-top: <?php echo ( '' != $settings->payment_section_margin_dimension_top ) ? $settings->payment_section_margin_dimension_top : ''; ?>px;
|
339 |
+
margin-bottom: <?php echo ( '' != $settings->payment_section_margin_dimension_bottom ) ? $settings->payment_section_margin_dimension_bottom : ''; ?>px;
|
340 |
+
margin-left: <?php echo ( '' != $settings->payment_section_margin_dimension_left ) ? $settings->payment_section_margin_dimension_left : ''; ?>px;
|
341 |
+
margin-right: <?php echo ( '' != $settings->payment_section_margin_dimension_right ) ? $settings->payment_section_margin_dimension_right : ''; ?>px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce-checkout .woocommerce-invalid label,
|
345 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form p.form-row.woocommerce-invalid label,
|
346 |
+
.fl-node-<?php echo $id; ?> .woocommerce form .form-row.woocommerce-invalid label {
|
347 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->field_label_color ); ?>;
|
348 |
+
}
|
349 |
+
|
350 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
|
351 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
|
352 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
|
353 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required
|
354 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
355 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
356 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select {
|
357 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_field_border_color ); ?>;
|
358 |
+
}
|
359 |
+
|
360 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-error,
|
361 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
|
362 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error {
|
363 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_text_color ); ?>;
|
364 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_border_color ); ?>;
|
365 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_bg_color ); ?>;
|
366 |
+
}
|
367 |
+
|
368 |
+
.fl-node-<?php echo $id; ?> .woocommerce form .form-row.woocommerce-invalid label {
|
369 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->field_label_color ); ?>;
|
370 |
+
}
|
371 |
+
|
372 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
|
373 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
|
374 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
|
375 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required
|
376 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
377 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
378 |
+
.fl-node-<?php echo $id; ?> .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select {
|
379 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->error_field_border_color ); ?>;
|
380 |
+
}
|
381 |
+
|
modules/beaver-builder/cartflows-bb-next-step/includes/frontend.css.php
CHANGED
@@ -1,596 +1,596 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BB Next Step Button Module front-end CSS php file.
|
4 |
-
*
|
5 |
-
* @package BB Next Step Button Module
|
6 |
-
*/
|
7 |
-
|
8 |
-
global $post;
|
9 |
-
|
10 |
-
$settings->bg_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_color', true );
|
11 |
-
$settings->bg_hover_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_hover_color', true );
|
12 |
-
$settings->text_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_color' );
|
13 |
-
$settings->text_hover_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_hover_color' );
|
14 |
-
|
15 |
-
// Border Size.
|
16 |
-
if ( 'transparent' == $settings->style ) {
|
17 |
-
$border_size = ( '' !== trim( $settings->border_size ) ) ? $settings->border_size : '2';
|
18 |
-
} else {
|
19 |
-
$border_size = 1;
|
20 |
-
}
|
21 |
-
// Border Color.
|
22 |
-
if ( ! empty( $settings->bg_color ) ) {
|
23 |
-
$border_color = $settings->bg_color;
|
24 |
-
}
|
25 |
-
if ( ! empty( $settings->bg_hover_color ) ) {
|
26 |
-
$border_hover_color = $settings->bg_hover_color;
|
27 |
-
}
|
28 |
-
|
29 |
-
// Old Background Gradient Setting.
|
30 |
-
if ( isset( $settings->three_d ) && $settings->three_d ) {
|
31 |
-
$settings->style = 'gradient';
|
32 |
-
}
|
33 |
-
|
34 |
-
// Background Gradient.
|
35 |
-
if ( ! empty( $settings->bg_color ) ) {
|
36 |
-
$hex_bg = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
37 |
-
$bg_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_bg, 30, 'lighten' );
|
38 |
-
}
|
39 |
-
if ( ! empty( $settings->bg_hover_color ) ) {
|
40 |
-
$hex_hover_bg = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
41 |
-
$bg_hover_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_hover_bg, 30, 'lighten' );
|
42 |
-
}
|
43 |
-
|
44 |
-
?>
|
45 |
-
|
46 |
-
<?php if ( ! empty( $settings->icon ) ) { ?>
|
47 |
-
|
48 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap i {
|
49 |
-
font-size: <?php echo $settings->icon_size . 'px'; ?>;
|
50 |
-
}
|
51 |
-
|
52 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap .cartflows-bb__next-step-creative-button .cartflows-bb__next-step-creative-button-icon-before {
|
53 |
-
margin-right: <?php echo $settings->icon_spacing . 'px'; ?>;
|
54 |
-
}
|
55 |
-
|
56 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap .cartflows-bb__next-step-creative-button .cartflows-bb__next-step-creative-button-icon-after {
|
57 |
-
margin-left: <?php echo $settings->icon_spacing . 'px'; ?>;
|
58 |
-
}
|
59 |
-
|
60 |
-
<?php } ?>
|
61 |
-
|
62 |
-
<?php if ( 'animate_top' == $settings->threed_button_options || 'animate_bottom' == $settings->threed_button_options ) { ?>
|
63 |
-
/* 3D Fix */
|
64 |
-
|
65 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-width-auto .perspective,
|
66 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-width-custom .perspective {
|
67 |
-
display: inline-block;
|
68 |
-
max-width: 100%;
|
69 |
-
}
|
70 |
-
<?php } ?>
|
71 |
-
|
72 |
-
<?php
|
73 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
74 |
-
FLBuilderCSS::typography_field_rule(
|
75 |
-
array(
|
76 |
-
'settings' => $settings,
|
77 |
-
'setting_name' => 'button_typo',
|
78 |
-
'selector' => ".fl-node-$id .cartflows-bb__next-step-creative-button-wrap a,.fl-node-$id .cartflows-bb__next-step-creative-button-wrap a:visited",
|
79 |
-
)
|
80 |
-
);
|
81 |
-
}
|
82 |
-
?>
|
83 |
-
|
84 |
-
<?php if ( 'default' !== $settings->style ) { ?>
|
85 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
86 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
87 |
-
<?php
|
88 |
-
if ( 'custom' == $settings->width ) {
|
89 |
-
$padding_top_bottom = ( '' !== $settings->padding_top_bottom ) ? $settings->padding_top_bottom : '0';
|
90 |
-
$padding_left_right = ( '' !== $settings->padding_left_right ) ? $settings->padding_left_right : '0';
|
91 |
-
?>
|
92 |
-
|
93 |
-
padding-top: <?php echo $padding_top_bottom; ?>px;
|
94 |
-
padding-bottom: <?php echo $padding_top_bottom; ?>px;
|
95 |
-
padding-left: <?php echo $padding_left_right; ?>px;
|
96 |
-
padding-right: <?php echo $padding_left_right; ?>px;
|
97 |
-
<?php
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( '' != $settings->border_radius ) :
|
101 |
-
?>
|
102 |
-
border-radius: <?php echo $settings->border_radius; ?>px;
|
103 |
-
-moz-border-radius: <?php echo $settings->border_radius; ?>px;
|
104 |
-
-webkit-border-radius: <?php echo $settings->border_radius; ?>px;
|
105 |
-
<?php endif; ?>
|
106 |
-
<?php if ( 'custom' == $settings->width ) : ?>
|
107 |
-
width: <?php echo $settings->custom_width; ?>px;
|
108 |
-
min-height: <?php echo $settings->custom_height; ?>px;
|
109 |
-
display: -webkit-inline-box;
|
110 |
-
display: -ms-inline-flexbox;
|
111 |
-
display: inline-flex;
|
112 |
-
-webkit-box-align: center;
|
113 |
-
-ms-flex-align: center;
|
114 |
-
align-items: center;
|
115 |
-
-webkit-box-pack: center;
|
116 |
-
-ms-flex-pack: center;
|
117 |
-
justify-content: center;
|
118 |
-
<?php endif; ?>
|
119 |
-
|
120 |
-
<?php
|
121 |
-
if ( 'transparent' == $settings->style ) : // Transparent.
|
122 |
-
?>
|
123 |
-
border: <?php echo $border_size; ?>px solid <?php echo $border_color; ?>;
|
124 |
-
<?php endif; ?>
|
125 |
-
|
126 |
-
<?php if ( ! empty( $settings->bg_color ) ) : ?>
|
127 |
-
background: <?php echo $settings->bg_color; ?>;
|
128 |
-
border: <?php echo $border_size; ?>px solid <?php echo $border_color; ?>;
|
129 |
-
<?php
|
130 |
-
if ( 'transparent' == $settings->style ) : // Transparent.
|
131 |
-
?>
|
132 |
-
background: none;
|
133 |
-
<?php endif; ?>
|
134 |
-
|
135 |
-
<?php if ( 'gradient' == $settings->style ) : // Gradient. ?>
|
136 |
-
background: -moz-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%, <?php echo $settings->bg_color; ?> 100%); /* FF3.6+ */
|
137 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,<?php echo $bg_grad_start; ?>), color-stop(100%,<?php echo $settings->bg_color; ?>)); /* Chrome,Safari4+ */
|
138 |
-
background: -webkit-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* Chrome10+,Safari5.1+ */
|
139 |
-
background: -o-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* Opera 11.10+ */
|
140 |
-
background: -ms-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* IE10+ */
|
141 |
-
background: linear-gradient(to bottom, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* W3C */
|
142 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<?php echo $bg_grad_start; ?>', endColorstr='<?php echo $settings->bg_color; ?>',GradientType=0 ); /* IE6-9 */
|
143 |
-
<?php endif; ?>
|
144 |
-
<?php endif; ?>
|
145 |
-
}
|
146 |
-
<?php
|
147 |
-
} else {
|
148 |
-
?>
|
149 |
-
|
150 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
151 |
-
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->border_hover_color ); ?>;
|
152 |
-
}
|
153 |
-
|
154 |
-
<?php
|
155 |
-
$padding_top_bottom = $settings->button_padding_dimension_top;
|
156 |
-
?>
|
157 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
158 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
159 |
-
<?php
|
160 |
-
if ( isset( $settings->button_padding_dimension_top ) ) {
|
161 |
-
echo 'padding-top:' . $settings->button_padding_dimension_top . 'px;';
|
162 |
-
}
|
163 |
-
if ( isset( $settings->button_padding_dimension_bottom ) ) {
|
164 |
-
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom . 'px;';
|
165 |
-
}
|
166 |
-
if ( isset( $settings->button_padding_dimension_left ) ) {
|
167 |
-
echo 'padding-left:' . $settings->button_padding_dimension_left . 'px;';
|
168 |
-
}
|
169 |
-
if ( isset( $settings->button_padding_dimension_right ) ) {
|
170 |
-
echo 'padding-right:' . $settings->button_padding_dimension_right . 'px;';
|
171 |
-
}
|
172 |
-
?>
|
173 |
-
}
|
174 |
-
<?php
|
175 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
176 |
-
// Border - Settings.
|
177 |
-
FLBuilderCSS::border_field_rule(
|
178 |
-
array(
|
179 |
-
'settings' => $settings,
|
180 |
-
'setting_name' => 'button_border',
|
181 |
-
'selector' => ".fl-node-$id .cartflows-bb__next-step-module-content.cartflows-bb__next-step-creative-button-wrap a, .fl-node-$id a.cartflows-bb__next-step-button",
|
182 |
-
)
|
183 |
-
);
|
184 |
-
}
|
185 |
-
?>
|
186 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
187 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
188 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-button {
|
189 |
-
background: <?php echo $settings->bg_color; ?>;
|
190 |
-
}
|
191 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-module-content.cartflows-bb__next-step-creative-button-wrap a:hover {
|
192 |
-
<?php echo 'border-color:' . FLBuilderColor::hex_or_rgb( $settings->border_hover_color ) . ';'; ?>
|
193 |
-
}
|
194 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
195 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
196 |
-
}
|
197 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
198 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a *,
|
199 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
200 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited * {
|
201 |
-
color: <?php echo $settings->text_color; ?>;
|
202 |
-
}
|
203 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover,
|
204 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover *,
|
205 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-button:hover {
|
206 |
-
color: <?php echo $settings->text_hover_color; ?>;
|
207 |
-
}
|
208 |
-
<?php } ?>
|
209 |
-
|
210 |
-
<?php if ( is_array( $settings->button_typo ) ) { ?>
|
211 |
-
<?php if ( isset( $settings->button_typo['line_height'] ) && is_array( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
212 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
213 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
214 |
-
line-height: <?php echo $settings->custom_height; ?>px;
|
215 |
-
}
|
216 |
-
<?php } elseif ( isset( $settings->button_typo['line_height'] ) && is_object( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
217 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
218 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
219 |
-
line-height: <?php echo $settings->custom_height; ?>px;
|
220 |
-
}
|
221 |
-
<?php } ?>
|
222 |
-
<?php } elseif ( is_object( $settings->button_typo ) ) { ?>
|
223 |
-
<?php if ( isset( $settings->button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
224 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
225 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
226 |
-
line-height: <?php echo $settings->custom_height; ?>px;
|
227 |
-
}
|
228 |
-
<?php } elseif ( isset( $settings->button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
229 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
230 |
-
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
231 |
-
line-height: <?php echo $settings->custom_height; ?>px;
|
232 |
-
}
|
233 |
-
<?php } ?>
|
234 |
-
<?php } ?>
|
235 |
-
|
236 |
-
<?php
|
237 |
-
if ( 'custom' == $settings->width && '' != $settings->custom_height ) :
|
238 |
-
$translateText = intval( $settings->custom_height ) + ( intval( $padding_top_bottom ) * 2 ) + 50; // @codingStandardsIgnoreLine.
|
239 |
-
?>
|
240 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-flat-btn.cartflows-bb__next-step-animate_from_top-btn:hover .cartflows-bb__next-step-button-text {
|
241 |
-
-webkit-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
242 |
-
-moz-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
243 |
-
-ms-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
244 |
-
-o-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
245 |
-
transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
246 |
-
}
|
247 |
-
|
248 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-flat-btn.cartflows-bb__next-step-animate_from_bottom-btn:hover .cartflows-bb__next-step-button-text {
|
249 |
-
-webkit-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
250 |
-
-moz-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
251 |
-
-ms-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
252 |
-
-o-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
253 |
-
transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
254 |
-
}
|
255 |
-
<?php endif; ?>
|
256 |
-
|
257 |
-
<?php if ( ! empty( $settings->text_color ) && 'default' !== $settings->style ) : ?>
|
258 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
259 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a *,
|
260 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
261 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited * {
|
262 |
-
color: <?php echo $settings->text_color; ?>;
|
263 |
-
}
|
264 |
-
<?php endif; ?>
|
265 |
-
|
266 |
-
<?php if ( ! empty( $settings->bg_hover_color ) ) : ?>
|
267 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
268 |
-
<?php if ( 'transparent' != $settings->style && 'gradient' != $settings->style && 'default' != $settings->style ) { ?>
|
269 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
270 |
-
<?php } ?>
|
271 |
-
<?php if ( 'default' !== $settings->style ) { ?>
|
272 |
-
border: <?php echo $border_size; ?>px solid <?php echo $border_hover_color; ?>;
|
273 |
-
<?php } ?>
|
274 |
-
<?php if ( 'gradient' == $settings->style ) : // Gradient. ?>
|
275 |
-
background: -moz-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%, <?php echo $settings->bg_hover_color; ?> 100%); /* FF3.6+ */
|
276 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,<?php echo $bg_hover_grad_start; ?>), color-stop(100%,<?php echo $settings->bg_hover_color; ?>)); /* Chrome,Safari4+ */
|
277 |
-
background: -webkit-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* Chrome10+,Safari5.1+ */
|
278 |
-
background: -o-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* Opera 11.10+ */
|
279 |
-
background: -ms-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* IE10+ */
|
280 |
-
background: linear-gradient(to bottom, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* W3C */
|
281 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<?php echo $bg_hover_grad_start; ?>', endColorstr='<?php echo $settings->bg_hover_color; ?>',GradientType=0 ); /* IE6-9 */
|
282 |
-
<?php endif; ?>
|
283 |
-
}
|
284 |
-
<?php endif; ?>
|
285 |
-
|
286 |
-
<?php if ( ! empty( $settings->text_hover_color ) && 'default' !== $settings->style ) : ?>
|
287 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover,
|
288 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover * {
|
289 |
-
color: <?php echo $settings->text_hover_color; ?>;
|
290 |
-
}
|
291 |
-
<?php endif; ?>
|
292 |
-
|
293 |
-
<?php
|
294 |
-
// Responsive button Alignment.
|
295 |
-
if ( $global_settings->responsive_enabled ) :
|
296 |
-
?>
|
297 |
-
@media ( max-width: <?php echo $global_settings->medium_breakpoint . 'px'; ?> ) {
|
298 |
-
<?php if ( 'default' === $settings->style ) { ?>
|
299 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
300 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
301 |
-
<?php
|
302 |
-
if ( isset( $settings->button_padding_dimension_top_medium ) ) {
|
303 |
-
echo 'padding-top:' . $settings->button_padding_dimension_top_medium . 'px;';
|
304 |
-
}
|
305 |
-
if ( isset( $settings->button_padding_dimension_bottom_medium ) ) {
|
306 |
-
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_medium . 'px;';
|
307 |
-
}
|
308 |
-
if ( isset( $settings->button_padding_dimension_left_medium ) ) {
|
309 |
-
echo 'padding-left:' . $settings->button_padding_dimension_left_medium . 'px;';
|
310 |
-
}
|
311 |
-
if ( isset( $settings->button_padding_dimension_right_medium ) ) {
|
312 |
-
echo 'padding-right:' . $settings->button_padding_dimension_right_medium . 'px;';
|
313 |
-
}
|
314 |
-
?>
|
315 |
-
}
|
316 |
-
<?php } ?>
|
317 |
-
}
|
318 |
-
@media ( max-width: <?php echo $global_settings->responsive_breakpoint; ?>px ) {
|
319 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-reponsive-<?php echo $settings->mob_align; ?> {
|
320 |
-
text-align: <?php echo $settings->mob_align; ?>;
|
321 |
-
}
|
322 |
-
<?php if ( 'default' === $settings->style ) { ?>
|
323 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
324 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
325 |
-
<?php
|
326 |
-
if ( isset( $settings->button_padding_dimension_top_responsive ) ) {
|
327 |
-
echo 'padding-top:' . $settings->button_padding_dimension_top_responsive . 'px;';
|
328 |
-
}
|
329 |
-
if ( isset( $settings->button_padding_dimension_bottom_responsive ) ) {
|
330 |
-
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_responsive . 'px;';
|
331 |
-
}
|
332 |
-
if ( isset( $settings->button_padding_dimension_left_responsive ) ) {
|
333 |
-
echo 'padding-left:' . $settings->button_padding_dimension_left_responsive . 'px;';
|
334 |
-
}
|
335 |
-
if ( isset( $settings->button_padding_dimension_right_responsive ) ) {
|
336 |
-
echo 'padding-right:' . $settings->button_padding_dimension_right_responsive . 'px;';
|
337 |
-
}
|
338 |
-
?>
|
339 |
-
}
|
340 |
-
<?php } ?>
|
341 |
-
}
|
342 |
-
<?php endif; ?>
|
343 |
-
|
344 |
-
<?php /* Transparent New Style CSS*/ ?>
|
345 |
-
<?php
|
346 |
-
if ( ! empty( $settings->style ) && 'transparent' == $settings->style ) {
|
347 |
-
?>
|
348 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover{
|
349 |
-
<?php
|
350 |
-
if ( 'none' == $settings->transparent_button_options ) {
|
351 |
-
if ( 'border' == $settings->hover_attribute ) {
|
352 |
-
?>
|
353 |
-
border-color:<?php echo $settings->bg_hover_color; ?>;
|
354 |
-
<?php
|
355 |
-
} else {
|
356 |
-
?>
|
357 |
-
background:<?php echo $settings->bg_hover_color; ?>;
|
358 |
-
<?php
|
359 |
-
}
|
360 |
-
} else {
|
361 |
-
?>
|
362 |
-
background:<?php echo $settings->bg_hover_color; ?>;
|
363 |
-
<?php
|
364 |
-
}
|
365 |
-
?>
|
366 |
-
}
|
367 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover .cartflows-bb__next-step-creative-button-icon {
|
368 |
-
<?php if ( '' != $settings->text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?>
|
369 |
-
color: <?php echo $settings->text_hover_color; ?>
|
370 |
-
<?php } else { ?>
|
371 |
-
color: <?php echo $settings->text_color; ?>;
|
372 |
-
<?php } ?>
|
373 |
-
}
|
374 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover .cartflows-bb__next-step-creative-button-text {
|
375 |
-
<?php if ( '' != $settings->text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?>
|
376 |
-
color: <?php echo $settings->text_hover_color; ?>
|
377 |
-
<?php } else { ?>
|
378 |
-
color: <?php echo $settings->text_color; ?>;
|
379 |
-
<?php } ?>
|
380 |
-
}
|
381 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fade-btn:hover{
|
382 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
383 |
-
}
|
384 |
-
|
385 |
-
/*transparent-fill-top*/
|
386 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-top-btn:hover:after{
|
387 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
388 |
-
height: 100%;
|
389 |
-
}
|
390 |
-
|
391 |
-
/*transparent-fill-bottom*/
|
392 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-bottom-btn:hover:after{
|
393 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
394 |
-
height: 100%;
|
395 |
-
}
|
396 |
-
|
397 |
-
/*transparent-fill-left*/
|
398 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-left-btn:hover:after{
|
399 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
400 |
-
width: 100%;
|
401 |
-
}
|
402 |
-
/*transparent-fill-right*/
|
403 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-right-btn:hover:after{
|
404 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
405 |
-
width: 100%;
|
406 |
-
}
|
407 |
-
|
408 |
-
/*transparent-fill-center*/
|
409 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-center-btn:hover:after{
|
410 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
411 |
-
height: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
412 |
-
width: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
413 |
-
}
|
414 |
-
|
415 |
-
/* transparent-fill-diagonal */
|
416 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-diagonal-btn:hover:after{
|
417 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
418 |
-
height: 260%;
|
419 |
-
}
|
420 |
-
|
421 |
-
/*transparent-fill-horizontal*/
|
422 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-horizontal-btn:hover:after{
|
423 |
-
background: <?php echo $settings->bg_hover_color; ?>;
|
424 |
-
height: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
425 |
-
width: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
426 |
-
}
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-transparent-fill-diagonal-btn:hover {
|
431 |
-
background: none;
|
432 |
-
}
|
433 |
-
|
434 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-text,
|
435 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover i{
|
436 |
-
color: <?php echo $settings->text_hover_color; ?>;
|
437 |
-
|
438 |
-
position: relative;
|
439 |
-
z-index: 9;
|
440 |
-
}
|
441 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-icon {
|
442 |
-
color: <?php echo $settings->text_hover_color; ?>;
|
443 |
-
position: relative;
|
444 |
-
z-index: 9;
|
445 |
-
}
|
446 |
-
<?php
|
447 |
-
}
|
448 |
-
?>
|
449 |
-
|
450 |
-
<?php /* 3D New Style CSS*/ ?>
|
451 |
-
<?php
|
452 |
-
if ( ! empty( $settings->style ) && 'threed' == $settings->style ) {
|
453 |
-
?>
|
454 |
-
<?php /* 3D Move Down*/ ?>
|
455 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn {
|
456 |
-
<?php
|
457 |
-
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
458 |
-
|
459 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
460 |
-
?>
|
461 |
-
box-shadow: 0 6px <?php echo $shadow_color; ?>;
|
462 |
-
}
|
463 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn:hover{
|
464 |
-
<?php
|
465 |
-
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
466 |
-
|
467 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
468 |
-
?>
|
469 |
-
top: 2px;
|
470 |
-
box-shadow: 0 4px <?php echo $shadow_color; ?>;
|
471 |
-
}
|
472 |
-
|
473 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn:active{
|
474 |
-
box-shadow:none!important;
|
475 |
-
-webkit-transition:all 50ms linear;
|
476 |
-
-moz-transition:all 50ms linear;
|
477 |
-
transition:all 50ms linear;
|
478 |
-
top: 6px;
|
479 |
-
}
|
480 |
-
|
481 |
-
|
482 |
-
<?php /* 3D Move Up*/ ?>
|
483 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn{
|
484 |
-
<?php
|
485 |
-
|
486 |
-
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
487 |
-
|
488 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
489 |
-
?>
|
490 |
-
box-shadow: 0 -6px <?php echo $shadow_color; ?>;
|
491 |
-
}
|
492 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn:hover{
|
493 |
-
<?php
|
494 |
-
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
495 |
-
|
496 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
497 |
-
?>
|
498 |
-
top: -2px;
|
499 |
-
box-shadow: 0 -4px <?php echo $shadow_color; ?>;
|
500 |
-
}
|
501 |
-
|
502 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn:active{
|
503 |
-
box-shadow:none!important;
|
504 |
-
-webkit-transition:all 50ms linear;
|
505 |
-
-moz-transition:all 50ms linear;
|
506 |
-
transition:all 50ms linear;
|
507 |
-
top: -6px;
|
508 |
-
}
|
509 |
-
|
510 |
-
<?php /* 3D Move Left*/ ?>
|
511 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn{
|
512 |
-
<?php
|
513 |
-
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
514 |
-
|
515 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
516 |
-
?>
|
517 |
-
box-shadow: -6px 0 <?php echo $shadow_color; ?>;
|
518 |
-
}
|
519 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn:hover{
|
520 |
-
<?php
|
521 |
-
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
522 |
-
|
523 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
524 |
-
?>
|
525 |
-
left: -2px;
|
526 |
-
box-shadow: -4px 0 <?php echo $shadow_color; ?>;
|
527 |
-
}
|
528 |
-
|
529 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn:active {
|
530 |
-
box-shadow:none!important;
|
531 |
-
-webkit-transition:all 50ms linear;
|
532 |
-
-moz-transition:all 50ms linear;
|
533 |
-
transition:all 50ms linear;
|
534 |
-
left: -6px;
|
535 |
-
}
|
536 |
-
|
537 |
-
|
538 |
-
<?php /* 3D Move Right*/ ?>
|
539 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn{
|
540 |
-
<?php
|
541 |
-
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
542 |
-
|
543 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
544 |
-
?>
|
545 |
-
box-shadow: 6px 0 <?php echo $shadow_color; ?>;
|
546 |
-
}
|
547 |
-
|
548 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn:hover{
|
549 |
-
<?php
|
550 |
-
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
551 |
-
|
552 |
-
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
553 |
-
?>
|
554 |
-
left: 2px;
|
555 |
-
box-shadow: 4px 0 <?php echo $shadow_color; ?>;
|
556 |
-
}
|
557 |
-
|
558 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn:active {
|
559 |
-
box-shadow:none!important;
|
560 |
-
-webkit-transition:all 50ms linear;
|
561 |
-
-moz-transition:all 50ms linear;
|
562 |
-
transition:all 50ms linear;
|
563 |
-
left: 6px;
|
564 |
-
}
|
565 |
-
|
566 |
-
<?php /* Animate Background Color */ ?>
|
567 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-<?php echo $settings->threed_button_options; ?>-btn:hover:after{
|
568 |
-
<?php
|
569 |
-
$hex_bg_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
570 |
-
$background_color = '#' . FLBuilderColor::adjust_brightness( $hex_bg_color, 10, 'darken' );
|
571 |
-
?>
|
572 |
-
background: <?php echo $background_color; ?>;
|
573 |
-
}
|
574 |
-
|
575 |
-
|
576 |
-
<?php /* Text Color*/ ?>
|
577 |
-
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-<?php echo $settings->threed_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-text{
|
578 |
-
color: <?php echo $settings->text_hover_color; ?>;
|
579 |
-
}
|
580 |
-
|
581 |
-
<?php /* 3D Padding for Shadow */ ?>
|
582 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap {
|
583 |
-
<?php if ( 'threed_down' == $settings->threed_button_options ) : ?>
|
584 |
-
padding-bottom: 6px;
|
585 |
-
<?php elseif ( 'threed_up' == $settings->threed_button_options ) : ?>
|
586 |
-
padding-top: 6px;
|
587 |
-
<?php elseif ( 'threed_left' == $settings->threed_button_options ) : ?>
|
588 |
-
padding-left: 6px;
|
589 |
-
<?php elseif ( 'threed_right' == $settings->threed_button_options ) : ?>
|
590 |
-
padding-right: 6px;
|
591 |
-
<?php endif; ?>
|
592 |
-
|
593 |
-
}
|
594 |
-
<?php
|
595 |
-
}
|
596 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BB Next Step Button Module front-end CSS php file.
|
4 |
+
*
|
5 |
+
* @package BB Next Step Button Module
|
6 |
+
*/
|
7 |
+
|
8 |
+
global $post;
|
9 |
+
|
10 |
+
$settings->bg_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_color', true );
|
11 |
+
$settings->bg_hover_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_hover_color', true );
|
12 |
+
$settings->text_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_color' );
|
13 |
+
$settings->text_hover_color = Cartflows_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_hover_color' );
|
14 |
+
|
15 |
+
// Border Size.
|
16 |
+
if ( 'transparent' == $settings->style ) {
|
17 |
+
$border_size = ( '' !== trim( $settings->border_size ) ) ? $settings->border_size : '2';
|
18 |
+
} else {
|
19 |
+
$border_size = 1;
|
20 |
+
}
|
21 |
+
// Border Color.
|
22 |
+
if ( ! empty( $settings->bg_color ) ) {
|
23 |
+
$border_color = $settings->bg_color;
|
24 |
+
}
|
25 |
+
if ( ! empty( $settings->bg_hover_color ) ) {
|
26 |
+
$border_hover_color = $settings->bg_hover_color;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Old Background Gradient Setting.
|
30 |
+
if ( isset( $settings->three_d ) && $settings->three_d ) {
|
31 |
+
$settings->style = 'gradient';
|
32 |
+
}
|
33 |
+
|
34 |
+
// Background Gradient.
|
35 |
+
if ( ! empty( $settings->bg_color ) ) {
|
36 |
+
$hex_bg = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
37 |
+
$bg_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_bg, 30, 'lighten' );
|
38 |
+
}
|
39 |
+
if ( ! empty( $settings->bg_hover_color ) ) {
|
40 |
+
$hex_hover_bg = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
41 |
+
$bg_hover_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_hover_bg, 30, 'lighten' );
|
42 |
+
}
|
43 |
+
|
44 |
+
?>
|
45 |
+
|
46 |
+
<?php if ( ! empty( $settings->icon ) ) { ?>
|
47 |
+
|
48 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap i {
|
49 |
+
font-size: <?php echo $settings->icon_size . 'px'; ?>;
|
50 |
+
}
|
51 |
+
|
52 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap .cartflows-bb__next-step-creative-button .cartflows-bb__next-step-creative-button-icon-before {
|
53 |
+
margin-right: <?php echo $settings->icon_spacing . 'px'; ?>;
|
54 |
+
}
|
55 |
+
|
56 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap .cartflows-bb__next-step-creative-button .cartflows-bb__next-step-creative-button-icon-after {
|
57 |
+
margin-left: <?php echo $settings->icon_spacing . 'px'; ?>;
|
58 |
+
}
|
59 |
+
|
60 |
+
<?php } ?>
|
61 |
+
|
62 |
+
<?php if ( 'animate_top' == $settings->threed_button_options || 'animate_bottom' == $settings->threed_button_options ) { ?>
|
63 |
+
/* 3D Fix */
|
64 |
+
|
65 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-width-auto .perspective,
|
66 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-width-custom .perspective {
|
67 |
+
display: inline-block;
|
68 |
+
max-width: 100%;
|
69 |
+
}
|
70 |
+
<?php } ?>
|
71 |
+
|
72 |
+
<?php
|
73 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
74 |
+
FLBuilderCSS::typography_field_rule(
|
75 |
+
array(
|
76 |
+
'settings' => $settings,
|
77 |
+
'setting_name' => 'button_typo',
|
78 |
+
'selector' => ".fl-node-$id .cartflows-bb__next-step-creative-button-wrap a,.fl-node-$id .cartflows-bb__next-step-creative-button-wrap a:visited",
|
79 |
+
)
|
80 |
+
);
|
81 |
+
}
|
82 |
+
?>
|
83 |
+
|
84 |
+
<?php if ( 'default' !== $settings->style ) { ?>
|
85 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
86 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
87 |
+
<?php
|
88 |
+
if ( 'custom' == $settings->width ) {
|
89 |
+
$padding_top_bottom = ( '' !== $settings->padding_top_bottom ) ? $settings->padding_top_bottom : '0';
|
90 |
+
$padding_left_right = ( '' !== $settings->padding_left_right ) ? $settings->padding_left_right : '0';
|
91 |
+
?>
|
92 |
+
|
93 |
+
padding-top: <?php echo $padding_top_bottom; ?>px;
|
94 |
+
padding-bottom: <?php echo $padding_top_bottom; ?>px;
|
95 |
+
padding-left: <?php echo $padding_left_right; ?>px;
|
96 |
+
padding-right: <?php echo $padding_left_right; ?>px;
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( '' != $settings->border_radius ) :
|
101 |
+
?>
|
102 |
+
border-radius: <?php echo $settings->border_radius; ?>px;
|
103 |
+
-moz-border-radius: <?php echo $settings->border_radius; ?>px;
|
104 |
+
-webkit-border-radius: <?php echo $settings->border_radius; ?>px;
|
105 |
+
<?php endif; ?>
|
106 |
+
<?php if ( 'custom' == $settings->width ) : ?>
|
107 |
+
width: <?php echo $settings->custom_width; ?>px;
|
108 |
+
min-height: <?php echo $settings->custom_height; ?>px;
|
109 |
+
display: -webkit-inline-box;
|
110 |
+
display: -ms-inline-flexbox;
|
111 |
+
display: inline-flex;
|
112 |
+
-webkit-box-align: center;
|
113 |
+
-ms-flex-align: center;
|
114 |
+
align-items: center;
|
115 |
+
-webkit-box-pack: center;
|
116 |
+
-ms-flex-pack: center;
|
117 |
+
justify-content: center;
|
118 |
+
<?php endif; ?>
|
119 |
+
|
120 |
+
<?php
|
121 |
+
if ( 'transparent' == $settings->style ) : // Transparent.
|
122 |
+
?>
|
123 |
+
border: <?php echo $border_size; ?>px solid <?php echo $border_color; ?>;
|
124 |
+
<?php endif; ?>
|
125 |
+
|
126 |
+
<?php if ( ! empty( $settings->bg_color ) ) : ?>
|
127 |
+
background: <?php echo $settings->bg_color; ?>;
|
128 |
+
border: <?php echo $border_size; ?>px solid <?php echo $border_color; ?>;
|
129 |
+
<?php
|
130 |
+
if ( 'transparent' == $settings->style ) : // Transparent.
|
131 |
+
?>
|
132 |
+
background: none;
|
133 |
+
<?php endif; ?>
|
134 |
+
|
135 |
+
<?php if ( 'gradient' == $settings->style ) : // Gradient. ?>
|
136 |
+
background: -moz-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%, <?php echo $settings->bg_color; ?> 100%); /* FF3.6+ */
|
137 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,<?php echo $bg_grad_start; ?>), color-stop(100%,<?php echo $settings->bg_color; ?>)); /* Chrome,Safari4+ */
|
138 |
+
background: -webkit-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* Chrome10+,Safari5.1+ */
|
139 |
+
background: -o-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* Opera 11.10+ */
|
140 |
+
background: -ms-linear-gradient(top, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* IE10+ */
|
141 |
+
background: linear-gradient(to bottom, <?php echo $bg_grad_start; ?> 0%,<?php echo $settings->bg_color; ?> 100%); /* W3C */
|
142 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<?php echo $bg_grad_start; ?>', endColorstr='<?php echo $settings->bg_color; ?>',GradientType=0 ); /* IE6-9 */
|
143 |
+
<?php endif; ?>
|
144 |
+
<?php endif; ?>
|
145 |
+
}
|
146 |
+
<?php
|
147 |
+
} else {
|
148 |
+
?>
|
149 |
+
|
150 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
151 |
+
border-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->border_hover_color ); ?>;
|
152 |
+
}
|
153 |
+
|
154 |
+
<?php
|
155 |
+
$padding_top_bottom = $settings->button_padding_dimension_top;
|
156 |
+
?>
|
157 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
158 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
159 |
+
<?php
|
160 |
+
if ( isset( $settings->button_padding_dimension_top ) ) {
|
161 |
+
echo 'padding-top:' . $settings->button_padding_dimension_top . 'px;';
|
162 |
+
}
|
163 |
+
if ( isset( $settings->button_padding_dimension_bottom ) ) {
|
164 |
+
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom . 'px;';
|
165 |
+
}
|
166 |
+
if ( isset( $settings->button_padding_dimension_left ) ) {
|
167 |
+
echo 'padding-left:' . $settings->button_padding_dimension_left . 'px;';
|
168 |
+
}
|
169 |
+
if ( isset( $settings->button_padding_dimension_right ) ) {
|
170 |
+
echo 'padding-right:' . $settings->button_padding_dimension_right . 'px;';
|
171 |
+
}
|
172 |
+
?>
|
173 |
+
}
|
174 |
+
<?php
|
175 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
176 |
+
// Border - Settings.
|
177 |
+
FLBuilderCSS::border_field_rule(
|
178 |
+
array(
|
179 |
+
'settings' => $settings,
|
180 |
+
'setting_name' => 'button_border',
|
181 |
+
'selector' => ".fl-node-$id .cartflows-bb__next-step-module-content.cartflows-bb__next-step-creative-button-wrap a, .fl-node-$id a.cartflows-bb__next-step-button",
|
182 |
+
)
|
183 |
+
);
|
184 |
+
}
|
185 |
+
?>
|
186 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
187 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
188 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-button {
|
189 |
+
background: <?php echo $settings->bg_color; ?>;
|
190 |
+
}
|
191 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-module-content.cartflows-bb__next-step-creative-button-wrap a:hover {
|
192 |
+
<?php echo 'border-color:' . FLBuilderColor::hex_or_rgb( $settings->border_hover_color ) . ';'; ?>
|
193 |
+
}
|
194 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
195 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
196 |
+
}
|
197 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
198 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a *,
|
199 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
200 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited * {
|
201 |
+
color: <?php echo $settings->text_color; ?>;
|
202 |
+
}
|
203 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover,
|
204 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover *,
|
205 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-button:hover {
|
206 |
+
color: <?php echo $settings->text_hover_color; ?>;
|
207 |
+
}
|
208 |
+
<?php } ?>
|
209 |
+
|
210 |
+
<?php if ( is_array( $settings->button_typo ) ) { ?>
|
211 |
+
<?php if ( isset( $settings->button_typo['line_height'] ) && is_array( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
212 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
213 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
214 |
+
line-height: <?php echo $settings->custom_height; ?>px;
|
215 |
+
}
|
216 |
+
<?php } elseif ( isset( $settings->button_typo['line_height'] ) && is_object( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
217 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
218 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
219 |
+
line-height: <?php echo $settings->custom_height; ?>px;
|
220 |
+
}
|
221 |
+
<?php } ?>
|
222 |
+
<?php } elseif ( is_object( $settings->button_typo ) ) { ?>
|
223 |
+
<?php if ( isset( $settings->button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
224 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
225 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
226 |
+
line-height: <?php echo $settings->custom_height; ?>px;
|
227 |
+
}
|
228 |
+
<?php } elseif ( isset( $settings->button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?>
|
229 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
230 |
+
html.internet-explorer .fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
231 |
+
line-height: <?php echo $settings->custom_height; ?>px;
|
232 |
+
}
|
233 |
+
<?php } ?>
|
234 |
+
<?php } ?>
|
235 |
+
|
236 |
+
<?php
|
237 |
+
if ( 'custom' == $settings->width && '' != $settings->custom_height ) :
|
238 |
+
$translateText = intval( $settings->custom_height ) + ( intval( $padding_top_bottom ) * 2 ) + 50; // @codingStandardsIgnoreLine.
|
239 |
+
?>
|
240 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-flat-btn.cartflows-bb__next-step-animate_from_top-btn:hover .cartflows-bb__next-step-button-text {
|
241 |
+
-webkit-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
242 |
+
-moz-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
243 |
+
-ms-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
244 |
+
-o-transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
245 |
+
transform: translateY(<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
246 |
+
}
|
247 |
+
|
248 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-flat-btn.cartflows-bb__next-step-animate_from_bottom-btn:hover .cartflows-bb__next-step-button-text {
|
249 |
+
-webkit-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
250 |
+
-moz-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
251 |
+
-ms-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
252 |
+
-o-transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
253 |
+
transform: translateY(-<?php echo $translateText; ?>px); <?php // @codingStandardsIgnoreLine. ?>
|
254 |
+
}
|
255 |
+
<?php endif; ?>
|
256 |
+
|
257 |
+
<?php if ( ! empty( $settings->text_color ) && 'default' !== $settings->style ) : ?>
|
258 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
259 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a *,
|
260 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited,
|
261 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited * {
|
262 |
+
color: <?php echo $settings->text_color; ?>;
|
263 |
+
}
|
264 |
+
<?php endif; ?>
|
265 |
+
|
266 |
+
<?php if ( ! empty( $settings->bg_hover_color ) ) : ?>
|
267 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover {
|
268 |
+
<?php if ( 'transparent' != $settings->style && 'gradient' != $settings->style && 'default' != $settings->style ) { ?>
|
269 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
270 |
+
<?php } ?>
|
271 |
+
<?php if ( 'default' !== $settings->style ) { ?>
|
272 |
+
border: <?php echo $border_size; ?>px solid <?php echo $border_hover_color; ?>;
|
273 |
+
<?php } ?>
|
274 |
+
<?php if ( 'gradient' == $settings->style ) : // Gradient. ?>
|
275 |
+
background: -moz-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%, <?php echo $settings->bg_hover_color; ?> 100%); /* FF3.6+ */
|
276 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,<?php echo $bg_hover_grad_start; ?>), color-stop(100%,<?php echo $settings->bg_hover_color; ?>)); /* Chrome,Safari4+ */
|
277 |
+
background: -webkit-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* Chrome10+,Safari5.1+ */
|
278 |
+
background: -o-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* Opera 11.10+ */
|
279 |
+
background: -ms-linear-gradient(top, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* IE10+ */
|
280 |
+
background: linear-gradient(to bottom, <?php echo $bg_hover_grad_start; ?> 0%,<?php echo $settings->bg_hover_color; ?> 100%); /* W3C */
|
281 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<?php echo $bg_hover_grad_start; ?>', endColorstr='<?php echo $settings->bg_hover_color; ?>',GradientType=0 ); /* IE6-9 */
|
282 |
+
<?php endif; ?>
|
283 |
+
}
|
284 |
+
<?php endif; ?>
|
285 |
+
|
286 |
+
<?php if ( ! empty( $settings->text_hover_color ) && 'default' !== $settings->style ) : ?>
|
287 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover,
|
288 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:hover * {
|
289 |
+
color: <?php echo $settings->text_hover_color; ?>;
|
290 |
+
}
|
291 |
+
<?php endif; ?>
|
292 |
+
|
293 |
+
<?php
|
294 |
+
// Responsive button Alignment.
|
295 |
+
if ( $global_settings->responsive_enabled ) :
|
296 |
+
?>
|
297 |
+
@media ( max-width: <?php echo $global_settings->medium_breakpoint . 'px'; ?> ) {
|
298 |
+
<?php if ( 'default' === $settings->style ) { ?>
|
299 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
300 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
301 |
+
<?php
|
302 |
+
if ( isset( $settings->button_padding_dimension_top_medium ) ) {
|
303 |
+
echo 'padding-top:' . $settings->button_padding_dimension_top_medium . 'px;';
|
304 |
+
}
|
305 |
+
if ( isset( $settings->button_padding_dimension_bottom_medium ) ) {
|
306 |
+
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_medium . 'px;';
|
307 |
+
}
|
308 |
+
if ( isset( $settings->button_padding_dimension_left_medium ) ) {
|
309 |
+
echo 'padding-left:' . $settings->button_padding_dimension_left_medium . 'px;';
|
310 |
+
}
|
311 |
+
if ( isset( $settings->button_padding_dimension_right_medium ) ) {
|
312 |
+
echo 'padding-right:' . $settings->button_padding_dimension_right_medium . 'px;';
|
313 |
+
}
|
314 |
+
?>
|
315 |
+
}
|
316 |
+
<?php } ?>
|
317 |
+
}
|
318 |
+
@media ( max-width: <?php echo $global_settings->responsive_breakpoint; ?>px ) {
|
319 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap.cartflows-bb__next-step-creative-button-reponsive-<?php echo $settings->mob_align; ?> {
|
320 |
+
text-align: <?php echo $settings->mob_align; ?>;
|
321 |
+
}
|
322 |
+
<?php if ( 'default' === $settings->style ) { ?>
|
323 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a,
|
324 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a:visited {
|
325 |
+
<?php
|
326 |
+
if ( isset( $settings->button_padding_dimension_top_responsive ) ) {
|
327 |
+
echo 'padding-top:' . $settings->button_padding_dimension_top_responsive . 'px;';
|
328 |
+
}
|
329 |
+
if ( isset( $settings->button_padding_dimension_bottom_responsive ) ) {
|
330 |
+
echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_responsive . 'px;';
|
331 |
+
}
|
332 |
+
if ( isset( $settings->button_padding_dimension_left_responsive ) ) {
|
333 |
+
echo 'padding-left:' . $settings->button_padding_dimension_left_responsive . 'px;';
|
334 |
+
}
|
335 |
+
if ( isset( $settings->button_padding_dimension_right_responsive ) ) {
|
336 |
+
echo 'padding-right:' . $settings->button_padding_dimension_right_responsive . 'px;';
|
337 |
+
}
|
338 |
+
?>
|
339 |
+
}
|
340 |
+
<?php } ?>
|
341 |
+
}
|
342 |
+
<?php endif; ?>
|
343 |
+
|
344 |
+
<?php /* Transparent New Style CSS*/ ?>
|
345 |
+
<?php
|
346 |
+
if ( ! empty( $settings->style ) && 'transparent' == $settings->style ) {
|
347 |
+
?>
|
348 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover{
|
349 |
+
<?php
|
350 |
+
if ( 'none' == $settings->transparent_button_options ) {
|
351 |
+
if ( 'border' == $settings->hover_attribute ) {
|
352 |
+
?>
|
353 |
+
border-color:<?php echo $settings->bg_hover_color; ?>;
|
354 |
+
<?php
|
355 |
+
} else {
|
356 |
+
?>
|
357 |
+
background:<?php echo $settings->bg_hover_color; ?>;
|
358 |
+
<?php
|
359 |
+
}
|
360 |
+
} else {
|
361 |
+
?>
|
362 |
+
background:<?php echo $settings->bg_hover_color; ?>;
|
363 |
+
<?php
|
364 |
+
}
|
365 |
+
?>
|
366 |
+
}
|
367 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover .cartflows-bb__next-step-creative-button-icon {
|
368 |
+
<?php if ( '' != $settings->text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?>
|
369 |
+
color: <?php echo $settings->text_hover_color; ?>
|
370 |
+
<?php } else { ?>
|
371 |
+
color: <?php echo $settings->text_color; ?>;
|
372 |
+
<?php } ?>
|
373 |
+
}
|
374 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-none-btn:hover .cartflows-bb__next-step-creative-button-text {
|
375 |
+
<?php if ( '' != $settings->text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?>
|
376 |
+
color: <?php echo $settings->text_hover_color; ?>
|
377 |
+
<?php } else { ?>
|
378 |
+
color: <?php echo $settings->text_color; ?>;
|
379 |
+
<?php } ?>
|
380 |
+
}
|
381 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fade-btn:hover{
|
382 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
383 |
+
}
|
384 |
+
|
385 |
+
/*transparent-fill-top*/
|
386 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-top-btn:hover:after{
|
387 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
388 |
+
height: 100%;
|
389 |
+
}
|
390 |
+
|
391 |
+
/*transparent-fill-bottom*/
|
392 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-bottom-btn:hover:after{
|
393 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
394 |
+
height: 100%;
|
395 |
+
}
|
396 |
+
|
397 |
+
/*transparent-fill-left*/
|
398 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-left-btn:hover:after{
|
399 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
400 |
+
width: 100%;
|
401 |
+
}
|
402 |
+
/*transparent-fill-right*/
|
403 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-right-btn:hover:after{
|
404 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
405 |
+
width: 100%;
|
406 |
+
}
|
407 |
+
|
408 |
+
/*transparent-fill-center*/
|
409 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-center-btn:hover:after{
|
410 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
411 |
+
height: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
412 |
+
width: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
413 |
+
}
|
414 |
+
|
415 |
+
/* transparent-fill-diagonal */
|
416 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-diagonal-btn:hover:after{
|
417 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
418 |
+
height: 260%;
|
419 |
+
}
|
420 |
+
|
421 |
+
/*transparent-fill-horizontal*/
|
422 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-transparent-fill-horizontal-btn:hover:after{
|
423 |
+
background: <?php echo $settings->bg_hover_color; ?>;
|
424 |
+
height: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
425 |
+
width: calc( 100% + <?php echo $border_size . 'px'; ?> );
|
426 |
+
}
|
427 |
+
|
428 |
+
|
429 |
+
|
430 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-transparent-fill-diagonal-btn:hover {
|
431 |
+
background: none;
|
432 |
+
}
|
433 |
+
|
434 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-text,
|
435 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-transparent-btn.cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover i{
|
436 |
+
color: <?php echo $settings->text_hover_color; ?>;
|
437 |
+
|
438 |
+
position: relative;
|
439 |
+
z-index: 9;
|
440 |
+
}
|
441 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-<?php echo $settings->transparent_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-icon {
|
442 |
+
color: <?php echo $settings->text_hover_color; ?>;
|
443 |
+
position: relative;
|
444 |
+
z-index: 9;
|
445 |
+
}
|
446 |
+
<?php
|
447 |
+
}
|
448 |
+
?>
|
449 |
+
|
450 |
+
<?php /* 3D New Style CSS*/ ?>
|
451 |
+
<?php
|
452 |
+
if ( ! empty( $settings->style ) && 'threed' == $settings->style ) {
|
453 |
+
?>
|
454 |
+
<?php /* 3D Move Down*/ ?>
|
455 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn {
|
456 |
+
<?php
|
457 |
+
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
458 |
+
|
459 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
460 |
+
?>
|
461 |
+
box-shadow: 0 6px <?php echo $shadow_color; ?>;
|
462 |
+
}
|
463 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn:hover{
|
464 |
+
<?php
|
465 |
+
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
466 |
+
|
467 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
468 |
+
?>
|
469 |
+
top: 2px;
|
470 |
+
box-shadow: 0 4px <?php echo $shadow_color; ?>;
|
471 |
+
}
|
472 |
+
|
473 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_down-btn:active{
|
474 |
+
box-shadow:none!important;
|
475 |
+
-webkit-transition:all 50ms linear;
|
476 |
+
-moz-transition:all 50ms linear;
|
477 |
+
transition:all 50ms linear;
|
478 |
+
top: 6px;
|
479 |
+
}
|
480 |
+
|
481 |
+
|
482 |
+
<?php /* 3D Move Up*/ ?>
|
483 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn{
|
484 |
+
<?php
|
485 |
+
|
486 |
+
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
487 |
+
|
488 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
489 |
+
?>
|
490 |
+
box-shadow: 0 -6px <?php echo $shadow_color; ?>;
|
491 |
+
}
|
492 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn:hover{
|
493 |
+
<?php
|
494 |
+
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
495 |
+
|
496 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
497 |
+
?>
|
498 |
+
top: -2px;
|
499 |
+
box-shadow: 0 -4px <?php echo $shadow_color; ?>;
|
500 |
+
}
|
501 |
+
|
502 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_up-btn:active{
|
503 |
+
box-shadow:none!important;
|
504 |
+
-webkit-transition:all 50ms linear;
|
505 |
+
-moz-transition:all 50ms linear;
|
506 |
+
transition:all 50ms linear;
|
507 |
+
top: -6px;
|
508 |
+
}
|
509 |
+
|
510 |
+
<?php /* 3D Move Left*/ ?>
|
511 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn{
|
512 |
+
<?php
|
513 |
+
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
514 |
+
|
515 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
516 |
+
?>
|
517 |
+
box-shadow: -6px 0 <?php echo $shadow_color; ?>;
|
518 |
+
}
|
519 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn:hover{
|
520 |
+
<?php
|
521 |
+
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
522 |
+
|
523 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
524 |
+
?>
|
525 |
+
left: -2px;
|
526 |
+
box-shadow: -4px 0 <?php echo $shadow_color; ?>;
|
527 |
+
}
|
528 |
+
|
529 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_left-btn:active {
|
530 |
+
box-shadow:none!important;
|
531 |
+
-webkit-transition:all 50ms linear;
|
532 |
+
-moz-transition:all 50ms linear;
|
533 |
+
transition:all 50ms linear;
|
534 |
+
left: -6px;
|
535 |
+
}
|
536 |
+
|
537 |
+
|
538 |
+
<?php /* 3D Move Right*/ ?>
|
539 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn{
|
540 |
+
<?php
|
541 |
+
$hex_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color );
|
542 |
+
|
543 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' );
|
544 |
+
?>
|
545 |
+
box-shadow: 6px 0 <?php echo $shadow_color; ?>;
|
546 |
+
}
|
547 |
+
|
548 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn:hover{
|
549 |
+
<?php
|
550 |
+
$hex_hover_shadow_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
551 |
+
|
552 |
+
$shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' );
|
553 |
+
?>
|
554 |
+
left: 2px;
|
555 |
+
box-shadow: 4px 0 <?php echo $shadow_color; ?>;
|
556 |
+
}
|
557 |
+
|
558 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-threed_right-btn:active {
|
559 |
+
box-shadow:none!important;
|
560 |
+
-webkit-transition:all 50ms linear;
|
561 |
+
-moz-transition:all 50ms linear;
|
562 |
+
transition:all 50ms linear;
|
563 |
+
left: 6px;
|
564 |
+
}
|
565 |
+
|
566 |
+
<?php /* Animate Background Color */ ?>
|
567 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-<?php echo $settings->threed_button_options; ?>-btn:hover:after{
|
568 |
+
<?php
|
569 |
+
$hex_bg_color = Cartflows_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color );
|
570 |
+
$background_color = '#' . FLBuilderColor::adjust_brightness( $hex_bg_color, 10, 'darken' );
|
571 |
+
?>
|
572 |
+
background: <?php echo $background_color; ?>;
|
573 |
+
}
|
574 |
+
|
575 |
+
|
576 |
+
<?php /* Text Color*/ ?>
|
577 |
+
.fl-node-<?php echo $id; ?> a.cartflows-bb__next-step-creative-threed-btn.cartflows-bb__next-step-<?php echo $settings->threed_button_options; ?>-btn:hover .cartflows-bb__next-step-creative-button-text{
|
578 |
+
color: <?php echo $settings->text_hover_color; ?>;
|
579 |
+
}
|
580 |
+
|
581 |
+
<?php /* 3D Padding for Shadow */ ?>
|
582 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__next-step-creative-button-wrap {
|
583 |
+
<?php if ( 'threed_down' == $settings->threed_button_options ) : ?>
|
584 |
+
padding-bottom: 6px;
|
585 |
+
<?php elseif ( 'threed_up' == $settings->threed_button_options ) : ?>
|
586 |
+
padding-top: 6px;
|
587 |
+
<?php elseif ( 'threed_left' == $settings->threed_button_options ) : ?>
|
588 |
+
padding-left: 6px;
|
589 |
+
<?php elseif ( 'threed_right' == $settings->threed_button_options ) : ?>
|
590 |
+
padding-right: 6px;
|
591 |
+
<?php endif; ?>
|
592 |
+
|
593 |
+
}
|
594 |
+
<?php
|
595 |
+
}
|
596 |
+
?>
|
modules/beaver-builder/cartflows-bb-order-details/includes/frontend.css.php
CHANGED
@@ -1,206 +1,206 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BB Order Details Form Module front-end CSS php file.
|
4 |
-
*
|
5 |
-
* @package cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
global $post;
|
9 |
-
?>
|
10 |
-
|
11 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received {
|
12 |
-
margin-bottom: <?php echo $settings->heading_spacing; ?>px;
|
13 |
-
}
|
14 |
-
|
15 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order ul.order_details,
|
16 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-customer-details,
|
17 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-details,
|
18 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-downloads,
|
19 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-bacs-bank-details,
|
20 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order-details.mollie-instructions {
|
21 |
-
margin-bottom: <?php echo $settings->sections_spacing; ?>px;
|
22 |
-
}
|
23 |
-
|
24 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received {
|
25 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->heading_color ); ?>;
|
26 |
-
}
|
27 |
-
|
28 |
-
<?php
|
29 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
30 |
-
FLBuilderCSS::typography_field_rule(
|
31 |
-
array(
|
32 |
-
'settings' => $settings,
|
33 |
-
'setting_name' => 'heading_typography',
|
34 |
-
'selector' => ".fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received,
|
35 |
-
.fl-node-$id .woocommerce-thankyou-order-received",
|
36 |
-
)
|
37 |
-
);
|
38 |
-
}
|
39 |
-
?>
|
40 |
-
|
41 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order h2 {
|
42 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_heading_color ); ?>;
|
43 |
-
}
|
44 |
-
|
45 |
-
<?php
|
46 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
47 |
-
FLBuilderCSS::typography_field_rule(
|
48 |
-
array(
|
49 |
-
'settings' => $settings,
|
50 |
-
'setting_name' => 'sections_heading_typo',
|
51 |
-
'selector' => ".fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order h2",
|
52 |
-
)
|
53 |
-
);
|
54 |
-
}
|
55 |
-
?>
|
56 |
-
|
57 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order,
|
58 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order-downloads table.shop_table,
|
59 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap p:not( .woocommerce-thankyou-order-received ) {
|
60 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_content_color ); ?>;
|
61 |
-
}
|
62 |
-
|
63 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details,
|
64 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details,
|
65 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
|
66 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order-downloads,
|
67 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order-downloads {
|
68 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_bg_color ); ?>;
|
69 |
-
}
|
70 |
-
|
71 |
-
<?php
|
72 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
73 |
-
FLBuilderCSS::typography_field_rule(
|
74 |
-
array(
|
75 |
-
'settings' => $settings,
|
76 |
-
'setting_name' => 'sections_content_typo',
|
77 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li,
|
78 |
-
.fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table,
|
79 |
-
.fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address,
|
80 |
-
.fl-node-$id .woocommerce-order-downloads table.shop_table,
|
81 |
-
.fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap p:not( .woocommerce-thankyou-order-received )",
|
82 |
-
)
|
83 |
-
);
|
84 |
-
}
|
85 |
-
?>
|
86 |
-
|
87 |
-
<?php
|
88 |
-
// Downloads Section.
|
89 |
-
?>
|
90 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap h2.woocommerce-order-downloads__title,
|
91 |
-
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap h2.woocommerce-order-downloads__title
|
92 |
-
{
|
93 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_heading_color ); ?>;
|
94 |
-
}
|
95 |
-
|
96 |
-
<?php
|
97 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
98 |
-
FLBuilderCSS::typography_field_rule(
|
99 |
-
array(
|
100 |
-
'settings' => $settings,
|
101 |
-
'setting_name' => 'downloads_heading_typography',
|
102 |
-
'selector' => ".fl-node-$id .woocommerce-order h2.woocommerce-order-downloads__title,
|
103 |
-
.fl-node-$id .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title",
|
104 |
-
)
|
105 |
-
);
|
106 |
-
}
|
107 |
-
?>
|
108 |
-
|
109 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table {
|
110 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_text_color ); ?>;
|
111 |
-
}
|
112 |
-
|
113 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads {
|
114 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_background_color ); ?>;
|
115 |
-
}
|
116 |
-
|
117 |
-
<?php
|
118 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
119 |
-
FLBuilderCSS::typography_field_rule(
|
120 |
-
array(
|
121 |
-
'settings' => $settings,
|
122 |
-
'setting_name' => 'downloads_text_typography',
|
123 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table",
|
124 |
-
)
|
125 |
-
);
|
126 |
-
}
|
127 |
-
?>
|
128 |
-
|
129 |
-
<?php
|
130 |
-
// Order details Section.
|
131 |
-
?>
|
132 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title {
|
133 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_heading_color ); ?>;
|
134 |
-
}
|
135 |
-
|
136 |
-
<?php
|
137 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
138 |
-
FLBuilderCSS::typography_field_rule(
|
139 |
-
array(
|
140 |
-
'settings' => $settings,
|
141 |
-
'setting_name' => 'order_details_heading_typography',
|
142 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title",
|
143 |
-
)
|
144 |
-
);
|
145 |
-
}
|
146 |
-
?>
|
147 |
-
|
148 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table,
|
149 |
-
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-details p.order-again {
|
150 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_text_color ); ?>;
|
151 |
-
}
|
152 |
-
|
153 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details {
|
154 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_background_color ); ?>;
|
155 |
-
}
|
156 |
-
|
157 |
-
<?php
|
158 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
159 |
-
FLBuilderCSS::typography_field_rule(
|
160 |
-
array(
|
161 |
-
'settings' => $settings,
|
162 |
-
'setting_name' => 'order_details_text_typography',
|
163 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table, .fl-node-$id .woocommerce-order .woocommerce-order-details p.order-again",
|
164 |
-
)
|
165 |
-
);
|
166 |
-
}
|
167 |
-
?>
|
168 |
-
|
169 |
-
<?php
|
170 |
-
// Customer details Section.
|
171 |
-
?>
|
172 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title {
|
173 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_heading_color ); ?>;
|
174 |
-
}
|
175 |
-
|
176 |
-
<?php
|
177 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
178 |
-
FLBuilderCSS::typography_field_rule(
|
179 |
-
array(
|
180 |
-
'settings' => $settings,
|
181 |
-
'setting_name' => 'customer_details_heading_typography',
|
182 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title",
|
183 |
-
)
|
184 |
-
);
|
185 |
-
}
|
186 |
-
?>
|
187 |
-
|
188 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address {
|
189 |
-
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_text_color ); ?>;
|
190 |
-
}
|
191 |
-
|
192 |
-
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details {
|
193 |
-
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_background_color ); ?>;
|
194 |
-
}
|
195 |
-
|
196 |
-
<?php
|
197 |
-
if ( class_exists( 'FLBuilderCSS' ) ) {
|
198 |
-
FLBuilderCSS::typography_field_rule(
|
199 |
-
array(
|
200 |
-
'settings' => $settings,
|
201 |
-
'setting_name' => 'customer_details_text_typography',
|
202 |
-
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address",
|
203 |
-
)
|
204 |
-
);
|
205 |
-
}
|
206 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BB Order Details Form Module front-end CSS php file.
|
4 |
+
*
|
5 |
+
* @package cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
global $post;
|
9 |
+
?>
|
10 |
+
|
11 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received {
|
12 |
+
margin-bottom: <?php echo $settings->heading_spacing; ?>px;
|
13 |
+
}
|
14 |
+
|
15 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order ul.order_details,
|
16 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-customer-details,
|
17 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-details,
|
18 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-downloads,
|
19 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-bacs-bank-details,
|
20 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order-details.mollie-instructions {
|
21 |
+
margin-bottom: <?php echo $settings->sections_spacing; ?>px;
|
22 |
+
}
|
23 |
+
|
24 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received {
|
25 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->heading_color ); ?>;
|
26 |
+
}
|
27 |
+
|
28 |
+
<?php
|
29 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
30 |
+
FLBuilderCSS::typography_field_rule(
|
31 |
+
array(
|
32 |
+
'settings' => $settings,
|
33 |
+
'setting_name' => 'heading_typography',
|
34 |
+
'selector' => ".fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received,
|
35 |
+
.fl-node-$id .woocommerce-thankyou-order-received",
|
36 |
+
)
|
37 |
+
);
|
38 |
+
}
|
39 |
+
?>
|
40 |
+
|
41 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order h2 {
|
42 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_heading_color ); ?>;
|
43 |
+
}
|
44 |
+
|
45 |
+
<?php
|
46 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
47 |
+
FLBuilderCSS::typography_field_rule(
|
48 |
+
array(
|
49 |
+
'settings' => $settings,
|
50 |
+
'setting_name' => 'sections_heading_typo',
|
51 |
+
'selector' => ".fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order h2",
|
52 |
+
)
|
53 |
+
);
|
54 |
+
}
|
55 |
+
?>
|
56 |
+
|
57 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap .woocommerce-order,
|
58 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order-downloads table.shop_table,
|
59 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap p:not( .woocommerce-thankyou-order-received ) {
|
60 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_content_color ); ?>;
|
61 |
+
}
|
62 |
+
|
63 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details,
|
64 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details,
|
65 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
|
66 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order-downloads,
|
67 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order-downloads {
|
68 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->sections_bg_color ); ?>;
|
69 |
+
}
|
70 |
+
|
71 |
+
<?php
|
72 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
73 |
+
FLBuilderCSS::typography_field_rule(
|
74 |
+
array(
|
75 |
+
'settings' => $settings,
|
76 |
+
'setting_name' => 'sections_content_typo',
|
77 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li,
|
78 |
+
.fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table,
|
79 |
+
.fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address,
|
80 |
+
.fl-node-$id .woocommerce-order-downloads table.shop_table,
|
81 |
+
.fl-node-$id .cartflows-bb__order-details-form .wcf-thankyou-wrap p:not( .woocommerce-thankyou-order-received )",
|
82 |
+
)
|
83 |
+
);
|
84 |
+
}
|
85 |
+
?>
|
86 |
+
|
87 |
+
<?php
|
88 |
+
// Downloads Section.
|
89 |
+
?>
|
90 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap h2.woocommerce-order-downloads__title,
|
91 |
+
.fl-node-<?php echo $id; ?> .cartflows-bb__order-details-form .wcf-thankyou-wrap h2.woocommerce-order-downloads__title
|
92 |
+
{
|
93 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_heading_color ); ?>;
|
94 |
+
}
|
95 |
+
|
96 |
+
<?php
|
97 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
98 |
+
FLBuilderCSS::typography_field_rule(
|
99 |
+
array(
|
100 |
+
'settings' => $settings,
|
101 |
+
'setting_name' => 'downloads_heading_typography',
|
102 |
+
'selector' => ".fl-node-$id .woocommerce-order h2.woocommerce-order-downloads__title,
|
103 |
+
.fl-node-$id .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title",
|
104 |
+
)
|
105 |
+
);
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
|
109 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table {
|
110 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_text_color ); ?>;
|
111 |
+
}
|
112 |
+
|
113 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads {
|
114 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->downloads_background_color ); ?>;
|
115 |
+
}
|
116 |
+
|
117 |
+
<?php
|
118 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
119 |
+
FLBuilderCSS::typography_field_rule(
|
120 |
+
array(
|
121 |
+
'settings' => $settings,
|
122 |
+
'setting_name' => 'downloads_text_typography',
|
123 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table",
|
124 |
+
)
|
125 |
+
);
|
126 |
+
}
|
127 |
+
?>
|
128 |
+
|
129 |
+
<?php
|
130 |
+
// Order details Section.
|
131 |
+
?>
|
132 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title {
|
133 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_heading_color ); ?>;
|
134 |
+
}
|
135 |
+
|
136 |
+
<?php
|
137 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
138 |
+
FLBuilderCSS::typography_field_rule(
|
139 |
+
array(
|
140 |
+
'settings' => $settings,
|
141 |
+
'setting_name' => 'order_details_heading_typography',
|
142 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title",
|
143 |
+
)
|
144 |
+
);
|
145 |
+
}
|
146 |
+
?>
|
147 |
+
|
148 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table,
|
149 |
+
.fl-node-<?php echo $id; ?> .woocommerce-order .woocommerce-order-details p.order-again {
|
150 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_text_color ); ?>;
|
151 |
+
}
|
152 |
+
|
153 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details {
|
154 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->order_details_background_color ); ?>;
|
155 |
+
}
|
156 |
+
|
157 |
+
<?php
|
158 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
159 |
+
FLBuilderCSS::typography_field_rule(
|
160 |
+
array(
|
161 |
+
'settings' => $settings,
|
162 |
+
'setting_name' => 'order_details_text_typography',
|
163 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table, .fl-node-$id .woocommerce-order .woocommerce-order-details p.order-again",
|
164 |
+
)
|
165 |
+
);
|
166 |
+
}
|
167 |
+
?>
|
168 |
+
|
169 |
+
<?php
|
170 |
+
// Customer details Section.
|
171 |
+
?>
|
172 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title {
|
173 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_heading_color ); ?>;
|
174 |
+
}
|
175 |
+
|
176 |
+
<?php
|
177 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
178 |
+
FLBuilderCSS::typography_field_rule(
|
179 |
+
array(
|
180 |
+
'settings' => $settings,
|
181 |
+
'setting_name' => 'customer_details_heading_typography',
|
182 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title",
|
183 |
+
)
|
184 |
+
);
|
185 |
+
}
|
186 |
+
?>
|
187 |
+
|
188 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address {
|
189 |
+
color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_text_color ); ?>;
|
190 |
+
}
|
191 |
+
|
192 |
+
.fl-node-<?php echo $id; ?> .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details {
|
193 |
+
background-color: <?php echo FLBuilderColor::hex_or_rgb( $settings->customer_details_background_color ); ?>;
|
194 |
+
}
|
195 |
+
|
196 |
+
<?php
|
197 |
+
if ( class_exists( 'FLBuilderCSS' ) ) {
|
198 |
+
FLBuilderCSS::typography_field_rule(
|
199 |
+
array(
|
200 |
+
'settings' => $settings,
|
201 |
+
'setting_name' => 'customer_details_text_typography',
|
202 |
+
'selector' => ".fl-node-$id .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address",
|
203 |
+
)
|
204 |
+
);
|
205 |
+
}
|
206 |
+
?>
|
modules/checkout/classes/class-cartflows-checkout-markup.php
CHANGED
@@ -1,1405 +1,1405 @@
|
|
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 |
-
/* Show notice if cart is empty */
|
43 |
-
add_action( 'cartflows_checkout_cart_empty', array( $this, 'display_woo_notices' ) );
|
44 |
-
|
45 |
-
/* Checkout Shortcode */
|
46 |
-
add_shortcode( 'cartflows_checkout', array( $this, 'checkout_shortcode_markup' ) );
|
47 |
-
|
48 |
-
/* Preconfigured cart data */
|
49 |
-
add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
|
50 |
-
|
51 |
-
/* Embed Checkout */
|
52 |
-
add_action( 'wp', array( $this, 'shortcode_load_data' ), 999 );
|
53 |
-
|
54 |
-
/* Ajax Endpoint */
|
55 |
-
add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
|
56 |
-
|
57 |
-
add_filter( 'cartflows_add_before_main_section', array( $this, 'enable_logo_in_header' ) );
|
58 |
-
|
59 |
-
add_filter( 'cartflows_primary_container_bottom', array( $this, 'show_cartflows_copyright_message' ) );
|
60 |
-
|
61 |
-
add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
|
62 |
-
|
63 |
-
add_action( 'wp_ajax_wcf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
|
64 |
-
add_action( 'wp_ajax_nopriv_wcf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
|
65 |
-
|
66 |
-
add_filter( 'global_cartflows_js_localize', array( $this, 'add_localize_vars' ) );
|
67 |
-
|
68 |
-
/* Global Checkout */
|
69 |
-
add_action( 'template_redirect', array( $this, 'global_checkout_template_redirect' ), 1 );
|
70 |
-
|
71 |
-
add_action( 'wp_ajax_wcf_woo_remove_coupon', array( $this, 'remove_coupon' ) );
|
72 |
-
add_action( 'wp_ajax_nopriv_wcf_woo_remove_coupon', array( $this, 'remove_coupon' ) );
|
73 |
-
|
74 |
-
add_action( 'wp_ajax_wcf_woo_remove_cart_product', array( $this, 'wcf_woo_remove_cart_product' ) );
|
75 |
-
add_action( 'wp_ajax_nopriv_wcf_woo_remove_cart_product', array( $this, 'wcf_woo_remove_cart_product' ) );
|
76 |
-
|
77 |
-
add_filter( 'woocommerce_paypal_args', array( $this, 'modify_paypal_args' ), 10, 2 );
|
78 |
-
|
79 |
-
add_filter( 'woocommerce_paypal_express_checkout_payment_button_data', array( $this, 'change_return_cancel_url' ), 10, 2 );
|
80 |
-
|
81 |
-
add_filter( 'woocommerce_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
|
82 |
-
|
83 |
-
add_action( 'woocommerce_before_calculate_totals', array( $this, 'custom_price_to_cart_item' ), 9999 );
|
84 |
-
|
85 |
-
add_action( 'init', array( $this, 'update_woo_actions_ajax' ), 10 );
|
86 |
-
|
87 |
-
$this->gutenberg_editor_compatibility();
|
88 |
-
|
89 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
90 |
-
// Load the widgets.
|
91 |
-
$this->elementor_editor_compatibility();
|
92 |
-
}
|
93 |
-
|
94 |
-
if ( class_exists( 'FLBuilder' ) ) {
|
95 |
-
$this->bb_editor_compatibility();
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Remove login and registration actions.
|
101 |
-
*/
|
102 |
-
public function update_woo_actions_ajax() {
|
103 |
-
|
104 |
-
add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'after_the_order_review_ajax_call' ) );
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Call the actions after order review ajax call.
|
109 |
-
*
|
110 |
-
* @param string $post_data post data woo.
|
111 |
-
*/
|
112 |
-
public function after_the_order_review_ajax_call( $post_data ) {
|
113 |
-
|
114 |
-
if ( isset( $post_data['_wcf_checkout_id'] ) ) { // phpcs:ignore
|
115 |
-
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Modify WooCommerce paypal arguments.
|
121 |
-
*
|
122 |
-
* @param array $args argumenets for payment.
|
123 |
-
* @param WC_Order $order order data.
|
124 |
-
* @return array
|
125 |
-
*/
|
126 |
-
public function modify_paypal_args( $args, $order ) {
|
127 |
-
|
128 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
129 |
-
|
130 |
-
if ( ! $checkout_id ) {
|
131 |
-
return $args;
|
132 |
-
}
|
133 |
-
|
134 |
-
// Set cancel return URL.
|
135 |
-
$args['cancel_return'] = esc_url_raw( $order->get_cancel_order_url_raw( get_permalink( $checkout_id ) ) );
|
136 |
-
|
137 |
-
return $args;
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Elementor editor compatibility.
|
142 |
-
*/
|
143 |
-
public function elementor_editor_compatibility() {
|
144 |
-
|
145 |
-
/* Add data */
|
146 |
-
|
147 |
-
add_action(
|
148 |
-
'cartflows_elementor_editor_compatibility',
|
149 |
-
function( $post_id, $elementor_ajax ) {
|
150 |
-
|
151 |
-
add_action( 'cartflows_elementor_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
152 |
-
},
|
153 |
-
10,
|
154 |
-
2
|
155 |
-
);
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Gutenburg editor compatibility.
|
160 |
-
*/
|
161 |
-
public function gutenberg_editor_compatibility() {
|
162 |
-
|
163 |
-
/* Add data */
|
164 |
-
|
165 |
-
add_action(
|
166 |
-
'cartflows_gutenberg_editor_compatibility',
|
167 |
-
function( $post_id ) {
|
168 |
-
|
169 |
-
add_action( 'cartflows_gutenberg_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
170 |
-
},
|
171 |
-
10,
|
172 |
-
2
|
173 |
-
);
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Function for bb editor compatibility.
|
178 |
-
*/
|
179 |
-
public function bb_editor_compatibility() {
|
180 |
-
|
181 |
-
/* Add data. */
|
182 |
-
add_action(
|
183 |
-
'cartflows_bb_editor_compatibility',
|
184 |
-
function( $post_id ) {
|
185 |
-
add_action( 'cartflows_bb_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
186 |
-
},
|
187 |
-
10,
|
188 |
-
1
|
189 |
-
);
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
* Change PayPal Express cancel URL.
|
194 |
-
*
|
195 |
-
* @param array $data button data.
|
196 |
-
* @param string $page current page.
|
197 |
-
* @return array $data modified button data with new cancel url.
|
198 |
-
*/
|
199 |
-
public function change_return_cancel_url( $data, $page ) {
|
200 |
-
|
201 |
-
global $post;
|
202 |
-
|
203 |
-
if ( _is_wcf_checkout_type() ) {
|
204 |
-
|
205 |
-
$checkout_id = $post->ID;
|
206 |
-
|
207 |
-
if ( $checkout_id ) {
|
208 |
-
|
209 |
-
// Change the default Cart URL with the CartFlows Checkout page.
|
210 |
-
$data['cancel_url'] = esc_url_raw( get_permalink( $checkout_id ) );
|
211 |
-
}
|
212 |
-
}
|
213 |
-
|
214 |
-
// Returing the modified data.
|
215 |
-
return $data;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Modify WooCommerce paypal arguments.
|
220 |
-
*
|
221 |
-
* @param string $product_name product name.
|
222 |
-
* @param object $cart_item cart item.
|
223 |
-
* @param string $cart_item_key cart item key.
|
224 |
-
* @return string
|
225 |
-
*/
|
226 |
-
public function wcf_add_remove_label( $product_name, $cart_item, $cart_item_key ) {
|
227 |
-
|
228 |
-
$checkout_id = get_the_ID();
|
229 |
-
if ( ! $checkout_id ) {
|
230 |
-
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? wp_unslash( $_POST['option']['checkout_id'] ) : '';//phpcs:ignore
|
231 |
-
}
|
232 |
-
|
233 |
-
if ( ! empty( $checkout_id ) ) {
|
234 |
-
$is_remove_product_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-remove-product-field' );
|
235 |
-
if ( 'checkout' === get_post_meta( $checkout_id, 'wcf-step-type', true ) && ( 'yes' === $is_remove_product_option ) ) {
|
236 |
-
$remove_label = apply_filters(
|
237 |
-
'woocommerce_cart_item_remove_link',
|
238 |
-
sprintf(
|
239 |
-
'<a href="#" rel="nofollow" class="remove cartflows-icon-close" data-id="%s" data-item-key="%s" ></a>',
|
240 |
-
esc_attr( $cart_item['product_id'] ),
|
241 |
-
$cart_item_key
|
242 |
-
),
|
243 |
-
$cart_item_key
|
244 |
-
);
|
245 |
-
|
246 |
-
$product_name = $remove_label . $product_name;
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
return $product_name;
|
251 |
-
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Change order button text .
|
256 |
-
*
|
257 |
-
* @param string $button_text place order.
|
258 |
-
* @return string
|
259 |
-
*/
|
260 |
-
public function place_order_button_text( $button_text ) {
|
261 |
-
|
262 |
-
$checkout_id = get_the_ID();
|
263 |
-
|
264 |
-
if ( ! $checkout_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] ) ) {
|
265 |
-
|
266 |
-
$checkout_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] );
|
267 |
-
}
|
268 |
-
|
269 |
-
if ( $checkout_id ) {
|
270 |
-
|
271 |
-
$wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
|
272 |
-
|
273 |
-
if ( ! empty( $wcf_order_button_text ) ) {
|
274 |
-
$button_text = $wcf_order_button_text;
|
275 |
-
}
|
276 |
-
}
|
277 |
-
|
278 |
-
return $button_text;
|
279 |
-
}
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Display all WooCommerce notices.
|
283 |
-
*
|
284 |
-
* @since 1.1.5
|
285 |
-
*/
|
286 |
-
public function display_woo_notices() {
|
287 |
-
|
288 |
-
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
289 |
-
woocommerce_output_all_notices();
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
|
294 |
-
/**
|
295 |
-
* Redirect from default to the global checkout page
|
296 |
-
*
|
297 |
-
* @since 1.0.0
|
298 |
-
*/
|
299 |
-
public function global_checkout_template_redirect() {
|
300 |
-
|
301 |
-
if ( ! is_checkout() ) {
|
302 |
-
return;
|
303 |
-
}
|
304 |
-
|
305 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
306 |
-
return;
|
307 |
-
}
|
308 |
-
|
309 |
-
// Return if the key OR Order paramater is found in the URL for certain Payment gateways.
|
310 |
-
if ( isset( $_GET['key'] ) || isset( $_GET['order'] ) ) { //phpcs:ignore
|
311 |
-
return;
|
312 |
-
}
|
313 |
-
|
314 |
-
// redirect only for cartflows checkout pages.
|
315 |
-
$order_pay_endpoint = get_option( 'woocommerce_checkout_pay_endpoint', 'order-pay' );
|
316 |
-
$order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );
|
317 |
-
|
318 |
-
$common = Cartflows_Helper::get_common_settings();
|
319 |
-
|
320 |
-
$global_checkout = $common['global_checkout'];
|
321 |
-
|
322 |
-
if (
|
323 |
-
isset( $_SERVER['REQUEST_URI'] ) &&
|
324 |
-
// ignore on order-pay.
|
325 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_pay_endpoint . '/' ) &&
|
326 |
-
// ignore on TY page.
|
327 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_received_endpoint . '/' ) &&
|
328 |
-
// ignore if order-pay in query param.
|
329 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $order_pay_endpoint . '=' )
|
330 |
-
) {
|
331 |
-
|
332 |
-
if ( '' !== $global_checkout ) {
|
333 |
-
|
334 |
-
$link = apply_filters( 'cartflows_global_checkout_url', get_permalink( $global_checkout ) );
|
335 |
-
|
336 |
-
if ( ! empty( $link ) ) {
|
337 |
-
|
338 |
-
wp_safe_redirect( $link );
|
339 |
-
die();
|
340 |
-
}
|
341 |
-
}
|
342 |
-
}
|
343 |
-
}
|
344 |
-
|
345 |
-
/**
|
346 |
-
* Check for checkout flag
|
347 |
-
*
|
348 |
-
* @param bool $is_checkout is checkout.
|
349 |
-
*
|
350 |
-
* @return bool
|
351 |
-
*/
|
352 |
-
public function woo_checkout_flag( $is_checkout ) {
|
353 |
-
|
354 |
-
if ( ! is_admin() ) {
|
355 |
-
|
356 |
-
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
357 |
-
|
358 |
-
$is_checkout = true;
|
359 |
-
}
|
360 |
-
}
|
361 |
-
|
362 |
-
return $is_checkout;
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Render checkout shortcode markup.
|
367 |
-
*
|
368 |
-
* @param array $atts attributes.
|
369 |
-
* @return string
|
370 |
-
*/
|
371 |
-
public function checkout_shortcode_markup( $atts ) {
|
372 |
-
|
373 |
-
if ( ! function_exists( 'wc_print_notices' ) ) {
|
374 |
-
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
375 |
-
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
376 |
-
|
377 |
-
return $notice_out;
|
378 |
-
}
|
379 |
-
|
380 |
-
$atts = shortcode_atts(
|
381 |
-
array(
|
382 |
-
'id' => 0,
|
383 |
-
),
|
384 |
-
$atts
|
385 |
-
);
|
386 |
-
|
387 |
-
$checkout_id = intval( $atts['id'] );
|
388 |
-
|
389 |
-
$show_checkout_demo = false;
|
390 |
-
|
391 |
-
if ( is_admin() ) {
|
392 |
-
|
393 |
-
$show_checkout_demo = apply_filters( 'cartflows_show_demo_checkout', false );
|
394 |
-
|
395 |
-
if ( $show_checkout_demo && 0 === $checkout_id && isset( $_POST['id'] ) ) { //phpcs:ignore
|
396 |
-
$checkout_id = intval( $_POST['id'] ); //phpcs:ignore
|
397 |
-
}
|
398 |
-
}
|
399 |
-
|
400 |
-
if ( empty( $checkout_id ) ) {
|
401 |
-
|
402 |
-
if ( ! _is_wcf_checkout_type() && false === $show_checkout_demo ) {
|
403 |
-
|
404 |
-
$error_html = '<h4>' . __( 'Checkout ID not found', 'cartflows' ) . '</h4>';
|
405 |
-
$error_html .= '<p>' . sprintf(
|
406 |
-
/* translators: %1$1s, %2$2s Link to article */
|
407 |
-
__( 'It seems that this is not the CartFlows Checkout page where you have added this shortcode. Please refer to this %1$1sarticle%2$2s to know more.', 'cartflows' ),
|
408 |
-
'<a href="https://cartflows.com/docs/resolve-checkout-id-not-found-error/" target="_blank">',
|
409 |
-
'</a>'
|
410 |
-
) . '</p>';
|
411 |
-
|
412 |
-
return $error_html;
|
413 |
-
}
|
414 |
-
|
415 |
-
global $post;
|
416 |
-
|
417 |
-
$checkout_id = intval( $post->ID );
|
418 |
-
}
|
419 |
-
|
420 |
-
$output = '';
|
421 |
-
|
422 |
-
ob_start();
|
423 |
-
|
424 |
-
do_action( 'cartflows_checkout_form_before', $checkout_id );
|
425 |
-
|
426 |
-
$checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
|
427 |
-
|
428 |
-
$template_default = CARTFLOWS_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php';
|
429 |
-
|
430 |
-
$template_layout = apply_filters( 'cartflows_checkout_layout_template', $checkout_layout );
|
431 |
-
|
432 |
-
if ( file_exists( $template_layout ) ) {
|
433 |
-
include $template_layout;
|
434 |
-
} else {
|
435 |
-
include $template_default;
|
436 |
-
}
|
437 |
-
|
438 |
-
$output .= ob_get_clean();
|
439 |
-
|
440 |
-
return $output;
|
441 |
-
}
|
442 |
-
|
443 |
-
/**
|
444 |
-
* Configure Cart Data.
|
445 |
-
*
|
446 |
-
* @since 1.0.0
|
447 |
-
*
|
448 |
-
* @return void
|
449 |
-
*/
|
450 |
-
public function preconfigured_cart_data() {
|
451 |
-
|
452 |
-
if ( is_admin() ) {
|
453 |
-
return;
|
454 |
-
}
|
455 |
-
|
456 |
-
global $post, $wcf_step;
|
457 |
-
|
458 |
-
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
459 |
-
|
460 |
-
if ( wp_doing_ajax() ) {
|
461 |
-
return;
|
462 |
-
} else {
|
463 |
-
|
464 |
-
$checkout_id = 0;
|
465 |
-
|
466 |
-
if ( _is_wcf_checkout_type() ) {
|
467 |
-
$checkout_id = $post->ID;
|
468 |
-
}
|
469 |
-
|
470 |
-
$global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
|
471 |
-
|
472 |
-
if ( ! empty( $global_checkout ) && ( $global_checkout === $wcf_step->get_control_step() ) ) {
|
473 |
-
|
474 |
-
if ( WC()->cart->is_empty() ) {
|
475 |
-
wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
|
476 |
-
}
|
477 |
-
|
478 |
-
return;
|
479 |
-
}
|
480 |
-
|
481 |
-
if ( apply_filters( 'cartflows_skip_configure_cart', false, $checkout_id ) ) {
|
482 |
-
return;
|
483 |
-
}
|
484 |
-
|
485 |
-
do_action( 'cartflows_checkout_before_configure_cart', $checkout_id );
|
486 |
-
|
487 |
-
$flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
|
488 |
-
|
489 |
-
if ( wcf()->flow->is_flow_testmode( $flow_id ) ) {
|
490 |
-
$products = 'dummy';
|
491 |
-
} else {
|
492 |
-
$products = wcf()->utils->get_selected_checkout_products( $checkout_id );
|
493 |
-
}
|
494 |
-
|
495 |
-
if ( ! is_array( $products ) ) {
|
496 |
-
|
497 |
-
if ( 'dummy' === $products ) {
|
498 |
-
|
499 |
-
$args = array(
|
500 |
-
'posts_per_page' => 1,
|
501 |
-
'orderby' => 'rand',
|
502 |
-
'post_type' => 'product',
|
503 |
-
'meta_query' => array( //phpcs:ignore
|
504 |
-
// Exclude out of stock products.
|
505 |
-
array(
|
506 |
-
'key' => '_stock_status',
|
507 |
-
'value' => 'outofstock',
|
508 |
-
'compare' => 'NOT IN',
|
509 |
-
),
|
510 |
-
),
|
511 |
-
'tax_query' => array( //phpcs:ignore
|
512 |
-
array(
|
513 |
-
'taxonomy' => 'product_type',
|
514 |
-
'field' => 'slug',
|
515 |
-
'terms' => 'simple',
|
516 |
-
),
|
517 |
-
),
|
518 |
-
);
|
519 |
-
|
520 |
-
$random_product = get_posts( $args );
|
521 |
-
|
522 |
-
if ( isset( $random_product[0]->ID ) ) {
|
523 |
-
$products = array(
|
524 |
-
array(
|
525 |
-
'product' => $random_product[0]->ID,
|
526 |
-
'add_to_cart' => true,
|
527 |
-
),
|
528 |
-
);
|
529 |
-
} else {
|
530 |
-
return;
|
531 |
-
}
|
532 |
-
} else {
|
533 |
-
return;
|
534 |
-
}
|
535 |
-
}
|
536 |
-
|
537 |
-
/* Empty the current cart */
|
538 |
-
WC()->cart->empty_cart();
|
539 |
-
|
540 |
-
if ( is_array( $products ) && empty( $products[0]['product'] ) ) {
|
541 |
-
|
542 |
-
$a_start = '';
|
543 |
-
$a_close = '';
|
544 |
-
|
545 |
-
if ( current_user_can( 'manage_options' ) ) {
|
546 |
-
|
547 |
-
$a_start = '<a href="' . Cartflows_Helper::get_current_page_edit_url( 'select-product' ) . '" target="_blank">';
|
548 |
-
$a_close = '</a>';
|
549 |
-
}
|
550 |
-
|
551 |
-
wc_add_notice(
|
552 |
-
sprintf(
|
553 |
-
/* translators: %1$1s, %2$2s Link to meta */
|
554 |
-
__( 'No product is selected. Please select products from the %1$1scheckout meta settings%2$2s to continue.', 'cartflows' ),
|
555 |
-
$a_start,
|
556 |
-
$a_close
|
557 |
-
),
|
558 |
-
'error'
|
559 |
-
);
|
560 |
-
return;
|
561 |
-
}
|
562 |
-
|
563 |
-
/* Set customer session if not set */
|
564 |
-
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
565 |
-
WC()->session->set_customer_session_cookie( true );
|
566 |
-
}
|
567 |
-
|
568 |
-
$cart_product_count = 0;
|
569 |
-
$cart_key = '';
|
570 |
-
$products_new = array();
|
571 |
-
|
572 |
-
$products = apply_filters( 'cartflows_selected_checkout_products', $products, $checkout_id );
|
573 |
-
|
574 |
-
foreach ( $products as $index => $data ) {
|
575 |
-
|
576 |
-
if ( ! isset( $data['product'] ) ) {
|
577 |
-
continue;
|
578 |
-
}
|
579 |
-
|
580 |
-
if ( empty( $data['add_to_cart'] ) ) {
|
581 |
-
continue;
|
582 |
-
}
|
583 |
-
|
584 |
-
if ( apply_filters( 'cartflows_skip_other_products', false, $cart_product_count ) ) {
|
585 |
-
break;
|
586 |
-
}
|
587 |
-
|
588 |
-
$product_id = $data['product'];
|
589 |
-
$_product = wc_get_product( $product_id );
|
590 |
-
|
591 |
-
if ( ! empty( $_product ) ) {
|
592 |
-
|
593 |
-
$quantity = 1;
|
594 |
-
|
595 |
-
if ( isset( $data['quantity'] ) && ! empty( $data['quantity'] ) ) {
|
596 |
-
$quantity = $data['quantity'];
|
597 |
-
}
|
598 |
-
|
599 |
-
$discount_type = isset( $data['discount_type'] ) ? $data['discount_type'] : '';
|
600 |
-
$discount_value = ! empty( $data['discount_value'] ) ? $data['discount_value'] : '';
|
601 |
-
$_product_price = $_product->get_price( $data['product'] );
|
602 |
-
|
603 |
-
$custom_price = $this->calculate_discount( '', $discount_type, $discount_value, $_product_price );
|
604 |
-
|
605 |
-
$cart_item_data = array();
|
606 |
-
|
607 |
-
// Set the Product's custom price even if it is zero. Discount may have applied.
|
608 |
-
if ( $custom_price >= 0 && '' !== $custom_price ) {
|
609 |
-
|
610 |
-
$cart_item_data = array(
|
611 |
-
'custom_price' => $custom_price,
|
612 |
-
);
|
613 |
-
}
|
614 |
-
|
615 |
-
if ( ! $_product->is_type( 'grouped' ) && ! $_product->is_type( 'external' ) ) {
|
616 |
-
|
617 |
-
if ( $_product->is_type( 'variable' ) ) {
|
618 |
-
|
619 |
-
$default_attributes = $_product->get_default_attributes();
|
620 |
-
|
621 |
-
if ( ! empty( $default_attributes ) ) {
|
622 |
-
|
623 |
-
foreach ( $_product->get_children() as $variation_id ) {
|
624 |
-
|
625 |
-
$single_variation = new WC_Product_Variation( $variation_id );
|
626 |
-
|
627 |
-
if ( $default_attributes == $single_variation->get_attributes() ) {
|
628 |
-
$cart_key = WC()->cart->add_to_cart( $variation_id, $quantity, 0, array(), $cart_item_data );
|
629 |
-
$cart_product_count++;
|
630 |
-
}
|
631 |
-
}
|
632 |
-
} else {
|
633 |
-
|
634 |
-
$product_childrens = $_product->get_children();
|
635 |
-
|
636 |
-
if ( isset( $product_childrens[0] ) ) {
|
637 |
-
$variation = wc_get_product( $product_childrens[0] );
|
638 |
-
$_product_price = $variation->get_price();
|
639 |
-
$custom_price = $this->calculate_discount( '', $discount_type, $discount_value, $_product_price );
|
640 |
-
if ( ! empty( $custom_price ) ) {
|
641 |
-
$cart_item_data = array(
|
642 |
-
'custom_price' => $custom_price,
|
643 |
-
'data' => $data,
|
644 |
-
);
|
645 |
-
}
|
646 |
-
$cart_key = WC()->cart->add_to_cart( $product_childrens[0], $quantity, 0, array(), $cart_item_data );
|
647 |
-
$cart_product_count++;
|
648 |
-
} else {
|
649 |
-
echo '<p>' . esc_html__( 'Variations Not set', 'cartflows' ) . '</p>';
|
650 |
-
}
|
651 |
-
}
|
652 |
-
} else {
|
653 |
-
$cart_key = WC()->cart->add_to_cart( $product_id, $quantity, 0, array(), $cart_item_data );
|
654 |
-
|
655 |
-
if ( false !== $cart_key ) {
|
656 |
-
$cart_product_count++;
|
657 |
-
}
|
658 |
-
}
|
659 |
-
} else {
|
660 |
-
$wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
|
661 |
-
wc_add_notice( $wrong_product_notice );
|
662 |
-
}
|
663 |
-
}
|
664 |
-
$products_new[ $index ] = array(
|
665 |
-
'cart_item_key' => $cart_key,
|
666 |
-
);
|
667 |
-
}
|
668 |
-
|
669 |
-
/* Set checkout products data */
|
670 |
-
wcf()->utils->set_selcted_checkout_products( $checkout_id, $products_new );
|
671 |
-
|
672 |
-
/* Since 1.2.2 */
|
673 |
-
wcf_do_action_deprecated( 'cartflows_checkout_aftet_configure_cart', array( $checkout_id ), '1.2.2', 'cartflows_checkout_after_configure_cart' );
|
674 |
-
do_action( 'cartflows_checkout_after_configure_cart', $checkout_id );
|
675 |
-
}
|
676 |
-
}
|
677 |
-
}
|
678 |
-
|
679 |
-
/**
|
680 |
-
* Load shortcode data.
|
681 |
-
*
|
682 |
-
* @return void
|
683 |
-
*/
|
684 |
-
public function shortcode_load_data() {
|
685 |
-
|
686 |
-
if ( _is_wcf_checkout_type() ) {
|
687 |
-
|
688 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
689 |
-
|
690 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
691 |
-
|
692 |
-
$this->before_checkout_shortcode_actions();
|
693 |
-
|
694 |
-
global $post;
|
695 |
-
|
696 |
-
$checkout_id = $post->ID;
|
697 |
-
|
698 |
-
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
699 |
-
}
|
700 |
-
}
|
701 |
-
|
702 |
-
/**
|
703 |
-
* Render checkout ID hidden field.
|
704 |
-
*
|
705 |
-
* @return void
|
706 |
-
*/
|
707 |
-
public function before_checkout_shortcode_actions() {
|
708 |
-
/* Show notices if cart has errors */
|
709 |
-
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
710 |
-
|
711 |
-
// Outputting the hidden field in checkout page.
|
712 |
-
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
713 |
-
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
714 |
-
|
715 |
-
remove_all_actions( 'woocommerce_checkout_billing' );
|
716 |
-
remove_all_actions( 'woocommerce_checkout_shipping' );
|
717 |
-
|
718 |
-
// Hook in actions once.
|
719 |
-
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
720 |
-
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
721 |
-
|
722 |
-
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
723 |
-
|
724 |
-
add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
|
725 |
-
|
726 |
-
add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
|
727 |
-
|
728 |
-
add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
|
729 |
-
|
730 |
-
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
731 |
-
|
732 |
-
}
|
733 |
-
|
734 |
-
/**
|
735 |
-
* Render checkout ID hidden field.
|
736 |
-
*
|
737 |
-
* @param array $checkout checkout session data.
|
738 |
-
* @return void
|
739 |
-
*/
|
740 |
-
public function checkout_shortcode_post_id( $checkout ) {
|
741 |
-
|
742 |
-
global $post;
|
743 |
-
|
744 |
-
$checkout_id = 0;
|
745 |
-
|
746 |
-
if ( _is_wcf_checkout_type() ) {
|
747 |
-
$checkout_id = $post->ID;
|
748 |
-
}
|
749 |
-
|
750 |
-
$flow_id = get_post_meta( $checkout_id, 'wcf-flow-id', true );
|
751 |
-
|
752 |
-
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
753 |
-
echo '<input type="hidden" class="input-hidden _wcf_checkout_id" name="_wcf_checkout_id" value="' . intval( $checkout_id ) . '">';
|
754 |
-
}
|
755 |
-
|
756 |
-
/**
|
757 |
-
* Load shortcode scripts.
|
758 |
-
*
|
759 |
-
* @return void
|
760 |
-
*/
|
761 |
-
public function shortcode_scripts() {
|
762 |
-
|
763 |
-
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
764 |
-
|
765 |
-
wp_enqueue_script(
|
766 |
-
'wcf-checkout-template',
|
767 |
-
wcf()->utils->get_js_url( 'checkout-template' ),
|
768 |
-
array( 'jquery' ),
|
769 |
-
CARTFLOWS_VER,
|
770 |
-
true
|
771 |
-
);
|
772 |
-
|
773 |
-
do_action( 'cartflows_checkout_scripts' );
|
774 |
-
|
775 |
-
$checkout_dynamic_css = apply_filters( 'cartflows_checkout_enable_dynamic_css', true );
|
776 |
-
|
777 |
-
if ( $checkout_dynamic_css ) {
|
778 |
-
|
779 |
-
$style = $this->generate_style();
|
780 |
-
|
781 |
-
wp_add_inline_style( 'wcf-checkout-template', $style );
|
782 |
-
|
783 |
-
}
|
784 |
-
|
785 |
-
}
|
786 |
-
|
787 |
-
/**
|
788 |
-
* Load compatibility scripts.
|
789 |
-
*
|
790 |
-
* @return void
|
791 |
-
*/
|
792 |
-
public function compatibility_scripts() {
|
793 |
-
|
794 |
-
global $post;
|
795 |
-
|
796 |
-
$checkout_id = 0;
|
797 |
-
|
798 |
-
if ( _is_wcf_checkout_type() ) {
|
799 |
-
$checkout_id = $post->ID;
|
800 |
-
}
|
801 |
-
|
802 |
-
// Add DIVI Compatibility css if DIVI theme is enabled.
|
803 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
804 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id )
|
805 |
-
) {
|
806 |
-
wp_enqueue_style( 'wcf-checkout-template-divi', wcf()->utils->get_css_url( 'checkout-template-divi' ), '', CARTFLOWS_VER );
|
807 |
-
}
|
808 |
-
|
809 |
-
// Add Flatsome Compatibility css if Flatsome theme is enabled.
|
810 |
-
if ( Cartflows_Compatibility::get_instance()->is_flatsome_enabled() ) {
|
811 |
-
wp_enqueue_style( 'wcf-checkout-template-flatsome', wcf()->utils->get_css_url( 'checkout-template-flatsome' ), '', CARTFLOWS_VER );
|
812 |
-
}
|
813 |
-
|
814 |
-
// Add The7 Compatibility css if The7 theme is enabled.
|
815 |
-
if ( Cartflows_Compatibility::get_instance()->is_the_seven_enabled() ) {
|
816 |
-
wp_enqueue_style( 'wcf-checkout-template-the-seven', wcf()->utils->get_css_url( 'checkout-template-the-seven' ), '', CARTFLOWS_VER );
|
817 |
-
}
|
818 |
-
}
|
819 |
-
|
820 |
-
/**
|
821 |
-
* Generate styles.
|
822 |
-
*
|
823 |
-
* @return string
|
824 |
-
*/
|
825 |
-
public function generate_style() {
|
826 |
-
|
827 |
-
global $post;
|
828 |
-
|
829 |
-
$checkout_id = 0;
|
830 |
-
|
831 |
-
if ( _is_wcf_checkout_type() ) {
|
832 |
-
$checkout_id = $post->ID;
|
833 |
-
}
|
834 |
-
|
835 |
-
/*Output css variable */
|
836 |
-
$output = '';
|
837 |
-
|
838 |
-
CartFlows_Font_Families::render_fonts( $checkout_id );
|
839 |
-
|
840 |
-
$primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' );
|
841 |
-
|
842 |
-
$base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' );
|
843 |
-
|
844 |
-
$header_logo_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-width' );
|
845 |
-
|
846 |
-
/**
|
847 |
-
$base_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-weight' );*/
|
848 |
-
$r = '';
|
849 |
-
$g = '';
|
850 |
-
$b = '';
|
851 |
-
|
852 |
-
$field_tb_padding = '';
|
853 |
-
$field_lr_padding = '';
|
854 |
-
|
855 |
-
$field_heading_color = '';
|
856 |
-
$field_color = '';
|
857 |
-
$field_bg_color = '';
|
858 |
-
$field_border_color = '';
|
859 |
-
$field_label_color = '';
|
860 |
-
$submit_tb_padding = '';
|
861 |
-
$submit_lr_padding = '';
|
862 |
-
$hl_bg_color = '';
|
863 |
-
$field_input_size = '';
|
864 |
-
$box_border_color = '';
|
865 |
-
$section_bg_color = '';
|
866 |
-
$submit_button_height = '';
|
867 |
-
$submit_color = '';
|
868 |
-
$submit_bg_color = $primary_color;
|
869 |
-
$submit_border_color = $primary_color;
|
870 |
-
|
871 |
-
$submit_hover_color = '';
|
872 |
-
$submit_bg_hover_color = $primary_color;
|
873 |
-
$submit_border_hover_color = $primary_color;
|
874 |
-
|
875 |
-
$section_heading_color = '';
|
876 |
-
|
877 |
-
$is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' );
|
878 |
-
|
879 |
-
$button_font_family = '';
|
880 |
-
$button_font_weight = '';
|
881 |
-
$input_font_family = '';
|
882 |
-
$input_font_weight = '';
|
883 |
-
$heading_font_family = '';
|
884 |
-
$heading_font_weight = '';
|
885 |
-
$base_font_family = $base_font_family;
|
886 |
-
/**
|
887 |
-
$base_font_weight = $base_font_weight;*/
|
888 |
-
|
889 |
-
if ( 'yes' == $is_advance_option ) {
|
890 |
-
|
891 |
-
/**
|
892 |
-
* Get Font Family and Font Weight weight values
|
893 |
-
*/
|
894 |
-
$section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' );
|
895 |
-
|
896 |
-
$heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' );
|
897 |
-
$heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' );
|
898 |
-
$section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' );
|
899 |
-
$button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' );
|
900 |
-
$button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' );
|
901 |
-
$input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' );
|
902 |
-
$input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' );
|
903 |
-
$field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' );
|
904 |
-
$field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' );
|
905 |
-
$field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' );
|
906 |
-
|
907 |
-
$field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' );
|
908 |
-
|
909 |
-
$field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' );
|
910 |
-
|
911 |
-
$field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' );
|
912 |
-
|
913 |
-
$field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' );
|
914 |
-
|
915 |
-
$field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' );
|
916 |
-
|
917 |
-
$submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' );
|
918 |
-
|
919 |
-
$submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' );
|
920 |
-
|
921 |
-
$submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' );
|
922 |
-
|
923 |
-
$submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color );
|
924 |
-
|
925 |
-
$submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color );
|
926 |
-
|
927 |
-
$submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color );
|
928 |
-
|
929 |
-
$submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' );
|
930 |
-
|
931 |
-
$submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color );
|
932 |
-
|
933 |
-
$hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' );
|
934 |
-
|
935 |
-
$box_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-box-border-color' );
|
936 |
-
|
937 |
-
$submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' );
|
938 |
-
|
939 |
-
/**
|
940 |
-
* Get font values
|
941 |
-
*/
|
942 |
-
|
943 |
-
if ( 'custom' == $submit_button_height ) {
|
944 |
-
$submit_button_height = '38px';
|
945 |
-
}
|
946 |
-
|
947 |
-
if ( 'custom' == $field_input_size ) {
|
948 |
-
$field_input_size = '38px';
|
949 |
-
}
|
950 |
-
}
|
951 |
-
if ( isset( $primary_color ) ) {
|
952 |
-
|
953 |
-
list($r, $g, $b) = sscanf( $primary_color, '#%02x%02x%02x' );
|
954 |
-
}
|
955 |
-
|
956 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
957 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id ) ) {
|
958 |
-
|
959 |
-
include CARTFLOWS_CHECKOUT_DIR . 'includes/checkout-dynamic-divi-css.php';
|
960 |
-
|
961 |
-
} else {
|
962 |
-
include CARTFLOWS_CHECKOUT_DIR . 'includes/checkout-dynamic-css.php';
|
963 |
-
}
|
964 |
-
|
965 |
-
return $output;
|
966 |
-
}
|
967 |
-
|
968 |
-
/**
|
969 |
-
* Get ajax end points.
|
970 |
-
*
|
971 |
-
* @param string $endpoint_url end point URL.
|
972 |
-
* @param string $request end point request.
|
973 |
-
* @return string
|
974 |
-
*/
|
975 |
-
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
976 |
-
|
977 |
-
global $post;
|
978 |
-
|
979 |
-
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
980 |
-
|
981 |
-
if ( _is_wcf_checkout_type() ) {
|
982 |
-
|
983 |
-
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
984 |
-
|
985 |
-
if ( '' === $request ) {
|
986 |
-
$query_args = array(
|
987 |
-
'wc-ajax' => '%%endpoint%%',
|
988 |
-
);
|
989 |
-
} else {
|
990 |
-
$query_args = array(
|
991 |
-
'wc-ajax' => $request,
|
992 |
-
);
|
993 |
-
}
|
994 |
-
|
995 |
-
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
996 |
-
$uri = $uri[0];
|
997 |
-
|
998 |
-
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
999 |
-
}
|
1000 |
-
}
|
1001 |
-
}
|
1002 |
-
|
1003 |
-
return $endpoint_url;
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
|
1007 |
-
/**
|
1008 |
-
* Save checkout fields.
|
1009 |
-
*
|
1010 |
-
* @param int $order_id order id.
|
1011 |
-
* @param array $posted posted data.
|
1012 |
-
* @return void
|
1013 |
-
*/
|
1014 |
-
public function save_checkout_fields( $order_id, $posted ) {
|
1015 |
-
|
1016 |
-
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1017 |
-
|
1018 |
-
$checkout_id = wc_clean( intval( $_POST['_wcf_checkout_id'] ) ); //phpcs:ignore
|
1019 |
-
|
1020 |
-
update_post_meta( $order_id, '_wcf_checkout_id', $checkout_id );
|
1021 |
-
|
1022 |
-
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
1023 |
-
|
1024 |
-
$flow_id = wc_clean( intval( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
1025 |
-
|
1026 |
-
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
1027 |
-
}
|
1028 |
-
}
|
1029 |
-
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
/**
|
1033 |
-
* Enable Logo In Header Of Checkout Page
|
1034 |
-
*
|
1035 |
-
* @return void
|
1036 |
-
*/
|
1037 |
-
public function enable_logo_in_header() {
|
1038 |
-
global $post;
|
1039 |
-
|
1040 |
-
$checkout_id = 0;
|
1041 |
-
|
1042 |
-
if ( _is_wcf_checkout_type() ) {
|
1043 |
-
$checkout_id = $post->ID;
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
$header_logo_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-image' );
|
1047 |
-
$add_image_markup = '';
|
1048 |
-
|
1049 |
-
if ( isset( $header_logo_image ) && ! empty( $header_logo_image ) ) {
|
1050 |
-
$add_image_markup = '<div class="wcf-checkout-header-image">';
|
1051 |
-
$add_image_markup .= '<img src="' . $header_logo_image . '" />';
|
1052 |
-
$add_image_markup .= '</div>';
|
1053 |
-
}
|
1054 |
-
|
1055 |
-
echo $add_image_markup;
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
/**
|
1059 |
-
* Add text to the bootom of the checkout page.
|
1060 |
-
*
|
1061 |
-
* @return void
|
1062 |
-
*/
|
1063 |
-
public function show_cartflows_copyright_message() {
|
1064 |
-
$output_string = '';
|
1065 |
-
|
1066 |
-
$output_string .= '<div class="wcf-footer-primary">';
|
1067 |
-
$output_string .= '<div class="wcf-footer-content">';
|
1068 |
-
$output_string .= '<p class="wcf-footer-message">';
|
1069 |
-
$output_string .= 'Checkout powered by CartFlows';
|
1070 |
-
$output_string .= '</p>';
|
1071 |
-
$output_string .= '</div>';
|
1072 |
-
$output_string .= '</div>';
|
1073 |
-
|
1074 |
-
echo $output_string;
|
1075 |
-
}
|
1076 |
-
|
1077 |
-
/**
|
1078 |
-
* Redirect users to our checkout if hidden param
|
1079 |
-
*
|
1080 |
-
* @param string $redirect redirect url.
|
1081 |
-
* @param object $user user.
|
1082 |
-
* @return string
|
1083 |
-
*/
|
1084 |
-
public function after_login_redirect( $redirect, $user ) {
|
1085 |
-
|
1086 |
-
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1087 |
-
|
1088 |
-
$checkout_id = intval( $_POST['_wcf_checkout_id'] ); //phpcs:ignore
|
1089 |
-
|
1090 |
-
$redirect = get_permalink( $checkout_id );
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
return $redirect;
|
1094 |
-
}
|
1095 |
-
|
1096 |
-
/**
|
1097 |
-
* Display coupon code field after review order fields.
|
1098 |
-
*/
|
1099 |
-
public function display_custom_coupon_field() {
|
1100 |
-
|
1101 |
-
$coupon_enabled = apply_filters( 'woocommerce_coupons_enabled', true );
|
1102 |
-
$show_coupon = apply_filters( 'cartflows_show_coupon_field', true );
|
1103 |
-
|
1104 |
-
if ( ! ( $coupon_enabled && $show_coupon ) ) {
|
1105 |
-
return;
|
1106 |
-
|
1107 |
-
}
|
1108 |
-
|
1109 |
-
$coupon_field = array(
|
1110 |
-
'field_text' => __( 'Coupon Code', 'cartflows' ),
|
1111 |
-
'button_text' => __( 'Apply', 'cartflows' ),
|
1112 |
-
'class' => '',
|
1113 |
-
);
|
1114 |
-
|
1115 |
-
$coupon_field = apply_filters( 'cartflows_coupon_field_options', $coupon_field );
|
1116 |
-
|
1117 |
-
ob_start();
|
1118 |
-
?>
|
1119 |
-
<div class="wcf-custom-coupon-field <?php echo $coupon_field['class']; ?>" id="wcf_custom_coupon_field">
|
1120 |
-
<div class="wcf-coupon-col-1">
|
1121 |
-
<span>
|
1122 |
-
<input type="text" name="coupon_code" class="input-text wcf-coupon-code-input" placeholder="<?php echo $coupon_field['field_text']; ?>" id="coupon_code" value="">
|
1123 |
-
</span>
|
1124 |
-
</div>
|
1125 |
-
<div class="wcf-coupon-col-2">
|
1126 |
-
<span>
|
1127 |
-
<button type="button" class="button wcf-submit-coupon wcf-btn-small" name="apply_coupon" value="Apply"><?php echo $coupon_field['button_text']; ?></button>
|
1128 |
-
</span>
|
1129 |
-
</div>
|
1130 |
-
</div>
|
1131 |
-
<?php
|
1132 |
-
echo ob_get_clean();
|
1133 |
-
}
|
1134 |
-
|
1135 |
-
/**
|
1136 |
-
* Apply filter to change class of remove coupon field.
|
1137 |
-
*
|
1138 |
-
* @param string $coupon coupon.
|
1139 |
-
* @return string
|
1140 |
-
*/
|
1141 |
-
public function remove_coupon_text( $coupon ) {
|
1142 |
-
|
1143 |
-
$coupon = str_replace( 'woocommerce-remove-coupon', 'wcf-remove-coupon', $coupon );
|
1144 |
-
return $coupon;
|
1145 |
-
|
1146 |
-
}
|
1147 |
-
/**
|
1148 |
-
* Apply filter to change the placeholder text of coupon field.
|
1149 |
-
*
|
1150 |
-
* @return string
|
1151 |
-
*/
|
1152 |
-
public function coupon_field_placeholder() {
|
1153 |
-
return apply_filters( 'cartflows_coupon_field_placeholder', __( 'Coupon Code', 'cartflows' ) );
|
1154 |
-
}
|
1155 |
-
|
1156 |
-
/**
|
1157 |
-
* Apply filter to change the button text of coupon field.
|
1158 |
-
*
|
1159 |
-
* @return string
|
1160 |
-
*/
|
1161 |
-
public function coupon_button_text() {
|
1162 |
-
return apply_filters( 'cartflows_coupon_button_text', __( 'Apply', 'cartflows' ) );
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
/**
|
1166 |
-
* Apply coupon on submit of custom coupon form.
|
1167 |
-
*/
|
1168 |
-
public function apply_coupon() {
|
1169 |
-
|
1170 |
-
$response = '';
|
1171 |
-
|
1172 |
-
check_ajax_referer( 'wcf-apply-coupon', 'security' );
|
1173 |
-
if ( ! empty( $_POST['coupon_code'] ) ) {
|
1174 |
-
$result = WC()->cart->add_discount( sanitize_text_field( wp_unslash( $_POST['coupon_code'] ) ) );
|
1175 |
-
} else {
|
1176 |
-
wc_add_notice( WC_Coupon::get_generic_coupon_error( WC_Coupon::E_WC_COUPON_PLEASE_ENTER ), 'error' );
|
1177 |
-
}
|
1178 |
-
|
1179 |
-
$response = array(
|
1180 |
-
'status' => $result,
|
1181 |
-
'msg' => wc_print_notices( true ),
|
1182 |
-
);
|
1183 |
-
|
1184 |
-
echo wp_json_encode( $response );
|
1185 |
-
|
1186 |
-
die();
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
|
1190 |
-
/**
|
1191 |
-
* Added ajax nonce to localize variable.
|
1192 |
-
*
|
1193 |
-
* @param array $vars localize variables.
|
1194 |
-
*/
|
1195 |
-
public function add_localize_vars( $vars ) {
|
1196 |
-
|
1197 |
-
$vars['wcf_validate_coupon_nonce'] = wp_create_nonce( 'wcf-apply-coupon' );
|
1198 |
-
|
1199 |
-
$vars['wcf_validate_remove_coupon_nonce'] = wp_create_nonce( 'wcf-remove-coupon' );
|
1200 |
-
|
1201 |
-
$vars['wcf_validate_remove_cart_product_nonce'] = wp_create_nonce( 'wcf-remove-cart-product' );
|
1202 |
-
|
1203 |
-
$vars['allow_persistence'] = wcf_apply_filters_deprecated( 'cartflows_allow_persistace', array( 'yes' ), '1.6.0', 'cartflows_allow_persistence' );
|
1204 |
-
|
1205 |
-
return $vars;
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
/**
|
1209 |
-
* Add custom class to the fields to change the UI to three column.
|
1210 |
-
*
|
1211 |
-
* @param array $fields fields.
|
1212 |
-
*/
|
1213 |
-
public function add_three_column_layout_fields( $fields ) {
|
1214 |
-
|
1215 |
-
if ( empty( $fields['billing']['billing_address_2'] ) ) {
|
1216 |
-
|
1217 |
-
if ( isset( $fields['billing']['billing_address_1'] ) && is_array( $fields['billing']['billing_address_1'] ) ) {
|
1218 |
-
$fields['billing']['billing_address_1']['class'][] = 'form-row-full';
|
1219 |
-
}
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
if ( ! empty( $fields['billing']['billing_company'] ) ) {
|
1223 |
-
|
1224 |
-
if ( isset( $fields['billing']['billing_company'] ) && is_array( $fields['billing']['billing_company'] ) ) {
|
1225 |
-
$fields['billing']['billing_company']['class'][] = 'form-row-full';
|
1226 |
-
}
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
if ( ! empty( $fields['shipping']['shipping_company'] ) ) {
|
1230 |
-
|
1231 |
-
if ( isset( $fields['shipping']['shipping_company'] ) && is_array( $fields['shipping']['shipping_company'] ) ) {
|
1232 |
-
$fields['shipping']['shipping_company']['class'][] = 'form-row-full';
|
1233 |
-
}
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
if ( ! empty( $fields['billing']['billing_country'] ) ) {
|
1237 |
-
|
1238 |
-
if ( isset( $fields['billing']['billing_country'] ) && is_array( $fields['billing']['billing_country'] ) ) {
|
1239 |
-
$fields['billing']['billing_country']['class'][] = 'form-row-full';
|
1240 |
-
}
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
if ( ! empty( $fields['shipping']['shipping_country'] ) ) {
|
1244 |
-
|
1245 |
-
if ( isset( $fields['shipping']['shipping_country'] ) && is_array( $fields['shipping']['shipping_country'] ) ) {
|
1246 |
-
$fields['shipping']['shipping_country']['class'][] = 'form-row-full';
|
1247 |
-
}
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
if ( ! empty( $fields['billing']['billing_phone'] ) ) {
|
1251 |
-
|
1252 |
-
if ( isset( $fields['billing']['billing_phone'] ) && is_array( $fields['billing']['billing_phone'] ) ) {
|
1253 |
-
$fields['billing']['billing_phone']['class'][] = 'form-row-full';
|
1254 |
-
}
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
if ( ! empty( $fields['billing']['billing_email'] ) ) {
|
1258 |
-
|
1259 |
-
if ( isset( $fields['billing']['billing_email'] ) && is_array( $fields['billing']['billing_email'] ) ) {
|
1260 |
-
$fields['billing']['billing_email']['class'][] = 'form-row-full';
|
1261 |
-
}
|
1262 |
-
}
|
1263 |
-
|
1264 |
-
if ( empty( $fields['shipping']['shipping_address_2'] ) ) {
|
1265 |
-
|
1266 |
-
if ( isset( $fields['shipping']['shipping_address_1'] ) && is_array( $fields['shipping']['shipping_address_1'] ) ) {
|
1267 |
-
$fields['shipping']['shipping_address_1']['class'][] = 'form-row-full';
|
1268 |
-
}
|
1269 |
-
}
|
1270 |
-
|
1271 |
-
if ( isset( $fields['billing']['billing_city'] ) &&
|
1272 |
-
isset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] ) ) {
|
1273 |
-
|
1274 |
-
$fields['billing']['billing_city']['class'][] = 'wcf-column-33';
|
1275 |
-
$fields['billing']['billing_state']['class'][] = 'wcf-column-33';
|
1276 |
-
$fields['billing']['billing_postcode']['class'][] = 'wcf-column-33';
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
if ( isset( $fields['shipping']['shipping_city'] ) &&
|
1280 |
-
isset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] ) ) {
|
1281 |
-
|
1282 |
-
$fields['shipping']['shipping_city']['class'][] = 'wcf-column-33';
|
1283 |
-
$fields['shipping']['shipping_state']['class'][] = 'wcf-column-33';
|
1284 |
-
$fields['shipping']['shipping_postcode']['class'][] = 'wcf-column-33';
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
return $fields;
|
1288 |
-
}
|
1289 |
-
|
1290 |
-
/**
|
1291 |
-
* Remove coupon.
|
1292 |
-
*/
|
1293 |
-
public function remove_coupon() {
|
1294 |
-
|
1295 |
-
check_ajax_referer( 'wcf-remove-coupon', 'security' );
|
1296 |
-
$coupon = isset( $_POST['coupon_code'] ) ? wc_clean( wp_unslash( $_POST['coupon_code'] ) ) : false; //phpcs:ignore
|
1297 |
-
|
1298 |
-
if ( empty( $coupon ) ) {
|
1299 |
-
echo "<div class='woocommerce-error'>" . esc_html__( 'Sorry there was a problem removing this coupon.', 'cartflows' );
|
1300 |
-
} else {
|
1301 |
-
WC()->cart->remove_coupon( $coupon );
|
1302 |
-
echo "<div class='woocommerce-error'>" . esc_html__( 'Coupon has been removed.', 'cartflows' ) . '</div>';
|
1303 |
-
}
|
1304 |
-
wc_print_notices();
|
1305 |
-
wp_die();
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
/**
|
1309 |
-
* Remove cart item.
|
1310 |
-
*/
|
1311 |
-
public function wcf_woo_remove_cart_product() {
|
1312 |
-
|
1313 |
-
check_ajax_referer( 'wcf-remove-cart-product', 'security' );
|
1314 |
-
$product_key = isset( $_POST['p_key'] ) ? wc_clean( wp_unslash( $_POST['p_key'] ) ) : false; //phpcs:ignore
|
1315 |
-
$product_id = isset( $_POST['p_id'] ) ? wc_clean( wp_unslash( $_POST['p_id'] ) ) : ''; //phpcs:ignore
|
1316 |
-
$product_title = get_the_title( $product_id );
|
1317 |
-
|
1318 |
-
$needs_shipping = false;
|
1319 |
-
|
1320 |
-
if ( empty( $product_key ) ) {
|
1321 |
-
$msg = "<div class='woocommerce-message'>" . __( 'Sorry there was a problem removing ', 'cartflows' ) . $product_title;
|
1322 |
-
} else {
|
1323 |
-
WC()->cart->remove_cart_item( $product_key );
|
1324 |
-
$msg = "<div class='woocommerce-message'>" . $product_title . __( ' has been removed.', 'cartflows' ) . '</div>';
|
1325 |
-
}
|
1326 |
-
|
1327 |
-
foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
|
1328 |
-
if ( $values['data']->needs_shipping() ) {
|
1329 |
-
$needs_shipping = true;
|
1330 |
-
break;
|
1331 |
-
}
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
$response = array(
|
1335 |
-
'need_shipping' => $needs_shipping,
|
1336 |
-
'msg' => $msg,
|
1337 |
-
);
|
1338 |
-
|
1339 |
-
echo wp_json_encode( $response );
|
1340 |
-
wp_die();
|
1341 |
-
}
|
1342 |
-
|
1343 |
-
/**
|
1344 |
-
* Calculate discount for product.
|
1345 |
-
*
|
1346 |
-
* @param string $discount_coupon discount coupon.
|
1347 |
-
* @param string $discount_type discount type.
|
1348 |
-
* @param int $discount_value discount value.
|
1349 |
-
* @param int $_product_price product price.
|
1350 |
-
* @return int
|
1351 |
-
* @since 1.1.5
|
1352 |
-
*/
|
1353 |
-
public function calculate_discount( $discount_coupon, $discount_type, $discount_value, $_product_price ) {
|
1354 |
-
|
1355 |
-
$custom_price = '';
|
1356 |
-
|
1357 |
-
if ( ! empty( $discount_type ) ) {
|
1358 |
-
if ( 'discount_percent' === $discount_type ) {
|
1359 |
-
|
1360 |
-
if ( $discount_value > 0 ) {
|
1361 |
-
$custom_price = $_product_price - ( ( $_product_price * $discount_value ) / 100 );
|
1362 |
-
}
|
1363 |
-
} elseif ( 'discount_price' === $discount_type ) {
|
1364 |
-
|
1365 |
-
if ( $discount_value > 0 ) {
|
1366 |
-
$custom_price = $_product_price - $discount_value;
|
1367 |
-
}
|
1368 |
-
} elseif ( 'coupon' === $discount_type ) {
|
1369 |
-
|
1370 |
-
if ( ! empty( $discount_coupon ) ) {
|
1371 |
-
WC()->cart->add_discount( $discount_coupon );
|
1372 |
-
}
|
1373 |
-
}
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
return $custom_price;
|
1377 |
-
}
|
1378 |
-
|
1379 |
-
/**
|
1380 |
-
* Preserve the custom item price added by Variations & Quantity feature
|
1381 |
-
*
|
1382 |
-
* @param array $cart_object cart object.
|
1383 |
-
* @since 1.0.0
|
1384 |
-
*/
|
1385 |
-
public function custom_price_to_cart_item( $cart_object ) {
|
1386 |
-
|
1387 |
-
if ( wp_doing_ajax() && ! WC()->session->__isset( 'reload_checkout' ) ) {
|
1388 |
-
|
1389 |
-
foreach ( $cart_object->cart_contents as $key => $value ) {
|
1390 |
-
|
1391 |
-
if ( isset( $value['custom_price'] ) ) {
|
1392 |
-
|
1393 |
-
$custom_price = floatval( $value['custom_price'] );
|
1394 |
-
$value['data']->set_price( $custom_price );
|
1395 |
-
}
|
1396 |
-
}
|
1397 |
-
}
|
1398 |
-
}
|
1399 |
-
|
1400 |
-
}
|
1401 |
-
|
1402 |
-
/**
|
1403 |
-
* Kicking this off by calling 'get_instance()' method
|
1404 |
-
*/
|
1405 |
-
Cartflows_Checkout_Markup::get_instance();
|
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 |
+
/* Show notice if cart is empty */
|
43 |
+
add_action( 'cartflows_checkout_cart_empty', array( $this, 'display_woo_notices' ) );
|
44 |
+
|
45 |
+
/* Checkout Shortcode */
|
46 |
+
add_shortcode( 'cartflows_checkout', array( $this, 'checkout_shortcode_markup' ) );
|
47 |
+
|
48 |
+
/* Preconfigured cart data */
|
49 |
+
add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
|
50 |
+
|
51 |
+
/* Embed Checkout */
|
52 |
+
add_action( 'wp', array( $this, 'shortcode_load_data' ), 999 );
|
53 |
+
|
54 |
+
/* Ajax Endpoint */
|
55 |
+
add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
|
56 |
+
|
57 |
+
add_filter( 'cartflows_add_before_main_section', array( $this, 'enable_logo_in_header' ) );
|
58 |
+
|
59 |
+
add_filter( 'cartflows_primary_container_bottom', array( $this, 'show_cartflows_copyright_message' ) );
|
60 |
+
|
61 |
+
add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
|
62 |
+
|
63 |
+
add_action( 'wp_ajax_wcf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
|
64 |
+
add_action( 'wp_ajax_nopriv_wcf_woo_apply_coupon', array( $this, 'apply_coupon' ) );
|
65 |
+
|
66 |
+
add_filter( 'global_cartflows_js_localize', array( $this, 'add_localize_vars' ) );
|
67 |
+
|
68 |
+
/* Global Checkout */
|
69 |
+
add_action( 'template_redirect', array( $this, 'global_checkout_template_redirect' ), 1 );
|
70 |
+
|
71 |
+
add_action( 'wp_ajax_wcf_woo_remove_coupon', array( $this, 'remove_coupon' ) );
|
72 |
+
add_action( 'wp_ajax_nopriv_wcf_woo_remove_coupon', array( $this, 'remove_coupon' ) );
|
73 |
+
|
74 |
+
add_action( 'wp_ajax_wcf_woo_remove_cart_product', array( $this, 'wcf_woo_remove_cart_product' ) );
|
75 |
+
add_action( 'wp_ajax_nopriv_wcf_woo_remove_cart_product', array( $this, 'wcf_woo_remove_cart_product' ) );
|
76 |
+
|
77 |
+
add_filter( 'woocommerce_paypal_args', array( $this, 'modify_paypal_args' ), 10, 2 );
|
78 |
+
|
79 |
+
add_filter( 'woocommerce_paypal_express_checkout_payment_button_data', array( $this, 'change_return_cancel_url' ), 10, 2 );
|
80 |
+
|
81 |
+
add_filter( 'woocommerce_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
|
82 |
+
|
83 |
+
add_action( 'woocommerce_before_calculate_totals', array( $this, 'custom_price_to_cart_item' ), 9999 );
|
84 |
+
|
85 |
+
add_action( 'init', array( $this, 'update_woo_actions_ajax' ), 10 );
|
86 |
+
|
87 |
+
$this->gutenberg_editor_compatibility();
|
88 |
+
|
89 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
90 |
+
// Load the widgets.
|
91 |
+
$this->elementor_editor_compatibility();
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( class_exists( 'FLBuilder' ) ) {
|
95 |
+
$this->bb_editor_compatibility();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Remove login and registration actions.
|
101 |
+
*/
|
102 |
+
public function update_woo_actions_ajax() {
|
103 |
+
|
104 |
+
add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'after_the_order_review_ajax_call' ) );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Call the actions after order review ajax call.
|
109 |
+
*
|
110 |
+
* @param string $post_data post data woo.
|
111 |
+
*/
|
112 |
+
public function after_the_order_review_ajax_call( $post_data ) {
|
113 |
+
|
114 |
+
if ( isset( $post_data['_wcf_checkout_id'] ) ) { // phpcs:ignore
|
115 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Modify WooCommerce paypal arguments.
|
121 |
+
*
|
122 |
+
* @param array $args argumenets for payment.
|
123 |
+
* @param WC_Order $order order data.
|
124 |
+
* @return array
|
125 |
+
*/
|
126 |
+
public function modify_paypal_args( $args, $order ) {
|
127 |
+
|
128 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
129 |
+
|
130 |
+
if ( ! $checkout_id ) {
|
131 |
+
return $args;
|
132 |
+
}
|
133 |
+
|
134 |
+
// Set cancel return URL.
|
135 |
+
$args['cancel_return'] = esc_url_raw( $order->get_cancel_order_url_raw( get_permalink( $checkout_id ) ) );
|
136 |
+
|
137 |
+
return $args;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Elementor editor compatibility.
|
142 |
+
*/
|
143 |
+
public function elementor_editor_compatibility() {
|
144 |
+
|
145 |
+
/* Add data */
|
146 |
+
|
147 |
+
add_action(
|
148 |
+
'cartflows_elementor_editor_compatibility',
|
149 |
+
function( $post_id, $elementor_ajax ) {
|
150 |
+
|
151 |
+
add_action( 'cartflows_elementor_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
152 |
+
},
|
153 |
+
10,
|
154 |
+
2
|
155 |
+
);
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Gutenburg editor compatibility.
|
160 |
+
*/
|
161 |
+
public function gutenberg_editor_compatibility() {
|
162 |
+
|
163 |
+
/* Add data */
|
164 |
+
|
165 |
+
add_action(
|
166 |
+
'cartflows_gutenberg_editor_compatibility',
|
167 |
+
function( $post_id ) {
|
168 |
+
|
169 |
+
add_action( 'cartflows_gutenberg_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
170 |
+
},
|
171 |
+
10,
|
172 |
+
2
|
173 |
+
);
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Function for bb editor compatibility.
|
178 |
+
*/
|
179 |
+
public function bb_editor_compatibility() {
|
180 |
+
|
181 |
+
/* Add data. */
|
182 |
+
add_action(
|
183 |
+
'cartflows_bb_editor_compatibility',
|
184 |
+
function( $post_id ) {
|
185 |
+
add_action( 'cartflows_bb_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
|
186 |
+
},
|
187 |
+
10,
|
188 |
+
1
|
189 |
+
);
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Change PayPal Express cancel URL.
|
194 |
+
*
|
195 |
+
* @param array $data button data.
|
196 |
+
* @param string $page current page.
|
197 |
+
* @return array $data modified button data with new cancel url.
|
198 |
+
*/
|
199 |
+
public function change_return_cancel_url( $data, $page ) {
|
200 |
+
|
201 |
+
global $post;
|
202 |
+
|
203 |
+
if ( _is_wcf_checkout_type() ) {
|
204 |
+
|
205 |
+
$checkout_id = $post->ID;
|
206 |
+
|
207 |
+
if ( $checkout_id ) {
|
208 |
+
|
209 |
+
// Change the default Cart URL with the CartFlows Checkout page.
|
210 |
+
$data['cancel_url'] = esc_url_raw( get_permalink( $checkout_id ) );
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
// Returing the modified data.
|
215 |
+
return $data;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Modify WooCommerce paypal arguments.
|
220 |
+
*
|
221 |
+
* @param string $product_name product name.
|
222 |
+
* @param object $cart_item cart item.
|
223 |
+
* @param string $cart_item_key cart item key.
|
224 |
+
* @return string
|
225 |
+
*/
|
226 |
+
public function wcf_add_remove_label( $product_name, $cart_item, $cart_item_key ) {
|
227 |
+
|
228 |
+
$checkout_id = get_the_ID();
|
229 |
+
if ( ! $checkout_id ) {
|
230 |
+
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? wp_unslash( $_POST['option']['checkout_id'] ) : '';//phpcs:ignore
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( ! empty( $checkout_id ) ) {
|
234 |
+
$is_remove_product_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-remove-product-field' );
|
235 |
+
if ( 'checkout' === get_post_meta( $checkout_id, 'wcf-step-type', true ) && ( 'yes' === $is_remove_product_option ) ) {
|
236 |
+
$remove_label = apply_filters(
|
237 |
+
'woocommerce_cart_item_remove_link',
|
238 |
+
sprintf(
|
239 |
+
'<a href="#" rel="nofollow" class="remove cartflows-icon-close" data-id="%s" data-item-key="%s" ></a>',
|
240 |
+
esc_attr( $cart_item['product_id'] ),
|
241 |
+
$cart_item_key
|
242 |
+
),
|
243 |
+
$cart_item_key
|
244 |
+
);
|
245 |
+
|
246 |
+
$product_name = $remove_label . $product_name;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
return $product_name;
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Change order button text .
|
256 |
+
*
|
257 |
+
* @param string $button_text place order.
|
258 |
+
* @return string
|
259 |
+
*/
|
260 |
+
public function place_order_button_text( $button_text ) {
|
261 |
+
|
262 |
+
$checkout_id = get_the_ID();
|
263 |
+
|
264 |
+
if ( ! $checkout_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] ) ) {
|
265 |
+
|
266 |
+
$checkout_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] );
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( $checkout_id ) {
|
270 |
+
|
271 |
+
$wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
|
272 |
+
|
273 |
+
if ( ! empty( $wcf_order_button_text ) ) {
|
274 |
+
$button_text = $wcf_order_button_text;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
return $button_text;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Display all WooCommerce notices.
|
283 |
+
*
|
284 |
+
* @since 1.1.5
|
285 |
+
*/
|
286 |
+
public function display_woo_notices() {
|
287 |
+
|
288 |
+
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
289 |
+
woocommerce_output_all_notices();
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Redirect from default to the global checkout page
|
296 |
+
*
|
297 |
+
* @since 1.0.0
|
298 |
+
*/
|
299 |
+
public function global_checkout_template_redirect() {
|
300 |
+
|
301 |
+
if ( ! is_checkout() ) {
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
|
305 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
306 |
+
return;
|
307 |
+
}
|
308 |
+
|
309 |
+
// Return if the key OR Order paramater is found in the URL for certain Payment gateways.
|
310 |
+
if ( isset( $_GET['key'] ) || isset( $_GET['order'] ) ) { //phpcs:ignore
|
311 |
+
return;
|
312 |
+
}
|
313 |
+
|
314 |
+
// redirect only for cartflows checkout pages.
|
315 |
+
$order_pay_endpoint = get_option( 'woocommerce_checkout_pay_endpoint', 'order-pay' );
|
316 |
+
$order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );
|
317 |
+
|
318 |
+
$common = Cartflows_Helper::get_common_settings();
|
319 |
+
|
320 |
+
$global_checkout = $common['global_checkout'];
|
321 |
+
|
322 |
+
if (
|
323 |
+
isset( $_SERVER['REQUEST_URI'] ) &&
|
324 |
+
// ignore on order-pay.
|
325 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_pay_endpoint . '/' ) &&
|
326 |
+
// ignore on TY page.
|
327 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_received_endpoint . '/' ) &&
|
328 |
+
// ignore if order-pay in query param.
|
329 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $order_pay_endpoint . '=' )
|
330 |
+
) {
|
331 |
+
|
332 |
+
if ( '' !== $global_checkout ) {
|
333 |
+
|
334 |
+
$link = apply_filters( 'cartflows_global_checkout_url', get_permalink( $global_checkout ) );
|
335 |
+
|
336 |
+
if ( ! empty( $link ) ) {
|
337 |
+
|
338 |
+
wp_safe_redirect( $link );
|
339 |
+
die();
|
340 |
+
}
|
341 |
+
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Check for checkout flag
|
347 |
+
*
|
348 |
+
* @param bool $is_checkout is checkout.
|
349 |
+
*
|
350 |
+
* @return bool
|
351 |
+
*/
|
352 |
+
public function woo_checkout_flag( $is_checkout ) {
|
353 |
+
|
354 |
+
if ( ! is_admin() ) {
|
355 |
+
|
356 |
+
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
357 |
+
|
358 |
+
$is_checkout = true;
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
return $is_checkout;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Render checkout shortcode markup.
|
367 |
+
*
|
368 |
+
* @param array $atts attributes.
|
369 |
+
* @return string
|
370 |
+
*/
|
371 |
+
public function checkout_shortcode_markup( $atts ) {
|
372 |
+
|
373 |
+
if ( ! function_exists( 'wc_print_notices' ) ) {
|
374 |
+
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
375 |
+
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
376 |
+
|
377 |
+
return $notice_out;
|
378 |
+
}
|
379 |
+
|
380 |
+
$atts = shortcode_atts(
|
381 |
+
array(
|
382 |
+
'id' => 0,
|
383 |
+
),
|
384 |
+
$atts
|
385 |
+
);
|
386 |
+
|
387 |
+
$checkout_id = intval( $atts['id'] );
|
388 |
+
|
389 |
+
$show_checkout_demo = false;
|
390 |
+
|
391 |
+
if ( is_admin() ) {
|
392 |
+
|
393 |
+
$show_checkout_demo = apply_filters( 'cartflows_show_demo_checkout', false );
|
394 |
+
|
395 |
+
if ( $show_checkout_demo && 0 === $checkout_id && isset( $_POST['id'] ) ) { //phpcs:ignore
|
396 |
+
$checkout_id = intval( $_POST['id'] ); //phpcs:ignore
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( empty( $checkout_id ) ) {
|
401 |
+
|
402 |
+
if ( ! _is_wcf_checkout_type() && false === $show_checkout_demo ) {
|
403 |
+
|
404 |
+
$error_html = '<h4>' . __( 'Checkout ID not found', 'cartflows' ) . '</h4>';
|
405 |
+
$error_html .= '<p>' . sprintf(
|
406 |
+
/* translators: %1$1s, %2$2s Link to article */
|
407 |
+
__( 'It seems that this is not the CartFlows Checkout page where you have added this shortcode. Please refer to this %1$1sarticle%2$2s to know more.', 'cartflows' ),
|
408 |
+
'<a href="https://cartflows.com/docs/resolve-checkout-id-not-found-error/" target="_blank">',
|
409 |
+
'</a>'
|
410 |
+
) . '</p>';
|
411 |
+
|
412 |
+
return $error_html;
|
413 |
+
}
|
414 |
+
|
415 |
+
global $post;
|
416 |
+
|
417 |
+
$checkout_id = intval( $post->ID );
|
418 |
+
}
|
419 |
+
|
420 |
+
$output = '';
|
421 |
+
|
422 |
+
ob_start();
|
423 |
+
|
424 |
+
do_action( 'cartflows_checkout_form_before', $checkout_id );
|
425 |
+
|
426 |
+
$checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
|
427 |
+
|
428 |
+
$template_default = CARTFLOWS_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php';
|
429 |
+
|
430 |
+
$template_layout = apply_filters( 'cartflows_checkout_layout_template', $checkout_layout );
|
431 |
+
|
432 |
+
if ( file_exists( $template_layout ) ) {
|
433 |
+
include $template_layout;
|
434 |
+
} else {
|
435 |
+
include $template_default;
|
436 |
+
}
|
437 |
+
|
438 |
+
$output .= ob_get_clean();
|
439 |
+
|
440 |
+
return $output;
|
441 |
+
}
|
442 |
+
|
443 |
+
/**
|
444 |
+
* Configure Cart Data.
|
445 |
+
*
|
446 |
+
* @since 1.0.0
|
447 |
+
*
|
448 |
+
* @return void
|
449 |
+
*/
|
450 |
+
public function preconfigured_cart_data() {
|
451 |
+
|
452 |
+
if ( is_admin() ) {
|
453 |
+
return;
|
454 |
+
}
|
455 |
+
|
456 |
+
global $post, $wcf_step;
|
457 |
+
|
458 |
+
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
459 |
+
|
460 |
+
if ( wp_doing_ajax() ) {
|
461 |
+
return;
|
462 |
+
} else {
|
463 |
+
|
464 |
+
$checkout_id = 0;
|
465 |
+
|
466 |
+
if ( _is_wcf_checkout_type() ) {
|
467 |
+
$checkout_id = $post->ID;
|
468 |
+
}
|
469 |
+
|
470 |
+
$global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
|
471 |
+
|
472 |
+
if ( ! empty( $global_checkout ) && ( $global_checkout === $wcf_step->get_control_step() ) ) {
|
473 |
+
|
474 |
+
if ( WC()->cart->is_empty() ) {
|
475 |
+
wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
|
476 |
+
}
|
477 |
+
|
478 |
+
return;
|
479 |
+
}
|
480 |
+
|
481 |
+
if ( apply_filters( 'cartflows_skip_configure_cart', false, $checkout_id ) ) {
|
482 |
+
return;
|
483 |
+
}
|
484 |
+
|
485 |
+
do_action( 'cartflows_checkout_before_configure_cart', $checkout_id );
|
486 |
+
|
487 |
+
$flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
|
488 |
+
|
489 |
+
if ( wcf()->flow->is_flow_testmode( $flow_id ) ) {
|
490 |
+
$products = 'dummy';
|
491 |
+
} else {
|
492 |
+
$products = wcf()->utils->get_selected_checkout_products( $checkout_id );
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( ! is_array( $products ) ) {
|
496 |
+
|
497 |
+
if ( 'dummy' === $products ) {
|
498 |
+
|
499 |
+
$args = array(
|
500 |
+
'posts_per_page' => 1,
|
501 |
+
'orderby' => 'rand',
|
502 |
+
'post_type' => 'product',
|
503 |
+
'meta_query' => array( //phpcs:ignore
|
504 |
+
// Exclude out of stock products.
|
505 |
+
array(
|
506 |
+
'key' => '_stock_status',
|
507 |
+
'value' => 'outofstock',
|
508 |
+
'compare' => 'NOT IN',
|
509 |
+
),
|
510 |
+
),
|
511 |
+
'tax_query' => array( //phpcs:ignore
|
512 |
+
array(
|
513 |
+
'taxonomy' => 'product_type',
|
514 |
+
'field' => 'slug',
|
515 |
+
'terms' => 'simple',
|
516 |
+
),
|
517 |
+
),
|
518 |
+
);
|
519 |
+
|
520 |
+
$random_product = get_posts( $args );
|
521 |
+
|
522 |
+
if ( isset( $random_product[0]->ID ) ) {
|
523 |
+
$products = array(
|
524 |
+
array(
|
525 |
+
'product' => $random_product[0]->ID,
|
526 |
+
'add_to_cart' => true,
|
527 |
+
),
|
528 |
+
);
|
529 |
+
} else {
|
530 |
+
return;
|
531 |
+
}
|
532 |
+
} else {
|
533 |
+
return;
|
534 |
+
}
|
535 |
+
}
|
536 |
+
|
537 |
+
/* Empty the current cart */
|
538 |
+
WC()->cart->empty_cart();
|
539 |
+
|
540 |
+
if ( is_array( $products ) && empty( $products[0]['product'] ) ) {
|
541 |
+
|
542 |
+
$a_start = '';
|
543 |
+
$a_close = '';
|
544 |
+
|
545 |
+
if ( current_user_can( 'manage_options' ) ) {
|
546 |
+
|
547 |
+
$a_start = '<a href="' . Cartflows_Helper::get_current_page_edit_url( 'select-product' ) . '" target="_blank">';
|
548 |
+
$a_close = '</a>';
|
549 |
+
}
|
550 |
+
|
551 |
+
wc_add_notice(
|
552 |
+
sprintf(
|
553 |
+
/* translators: %1$1s, %2$2s Link to meta */
|
554 |
+
__( 'No product is selected. Please select products from the %1$1scheckout meta settings%2$2s to continue.', 'cartflows' ),
|
555 |
+
$a_start,
|
556 |
+
$a_close
|
557 |
+
),
|
558 |
+
'error'
|
559 |
+
);
|
560 |
+
return;
|
561 |
+
}
|
562 |
+
|
563 |
+
/* Set customer session if not set */
|
564 |
+
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
565 |
+
WC()->session->set_customer_session_cookie( true );
|
566 |
+
}
|
567 |
+
|
568 |
+
$cart_product_count = 0;
|
569 |
+
$cart_key = '';
|
570 |
+
$products_new = array();
|
571 |
+
|
572 |
+
$products = apply_filters( 'cartflows_selected_checkout_products', $products, $checkout_id );
|
573 |
+
|
574 |
+
foreach ( $products as $index => $data ) {
|
575 |
+
|
576 |
+
if ( ! isset( $data['product'] ) ) {
|
577 |
+
continue;
|
578 |
+
}
|
579 |
+
|
580 |
+
if ( empty( $data['add_to_cart'] ) ) {
|
581 |
+
continue;
|
582 |
+
}
|
583 |
+
|
584 |
+
if ( apply_filters( 'cartflows_skip_other_products', false, $cart_product_count ) ) {
|
585 |
+
break;
|
586 |
+
}
|
587 |
+
|
588 |
+
$product_id = $data['product'];
|
589 |
+
$_product = wc_get_product( $product_id );
|
590 |
+
|
591 |
+
if ( ! empty( $_product ) ) {
|
592 |
+
|
593 |
+
$quantity = 1;
|
594 |
+
|
595 |
+
if ( isset( $data['quantity'] ) && ! empty( $data['quantity'] ) ) {
|
596 |
+
$quantity = $data['quantity'];
|
597 |
+
}
|
598 |
+
|
599 |
+
$discount_type = isset( $data['discount_type'] ) ? $data['discount_type'] : '';
|
600 |
+
$discount_value = ! empty( $data['discount_value'] ) ? $data['discount_value'] : '';
|
601 |
+
$_product_price = $_product->get_price( $data['product'] );
|
602 |
+
|
603 |
+
$custom_price = $this->calculate_discount( '', $discount_type, $discount_value, $_product_price );
|
604 |
+
|
605 |
+
$cart_item_data = array();
|
606 |
+
|
607 |
+
// Set the Product's custom price even if it is zero. Discount may have applied.
|
608 |
+
if ( $custom_price >= 0 && '' !== $custom_price ) {
|
609 |
+
|
610 |
+
$cart_item_data = array(
|
611 |
+
'custom_price' => $custom_price,
|
612 |
+
);
|
613 |
+
}
|
614 |
+
|
615 |
+
if ( ! $_product->is_type( 'grouped' ) && ! $_product->is_type( 'external' ) ) {
|
616 |
+
|
617 |
+
if ( $_product->is_type( 'variable' ) ) {
|
618 |
+
|
619 |
+
$default_attributes = $_product->get_default_attributes();
|
620 |
+
|
621 |
+
if ( ! empty( $default_attributes ) ) {
|
622 |
+
|
623 |
+
foreach ( $_product->get_children() as $variation_id ) {
|
624 |
+
|
625 |
+
$single_variation = new WC_Product_Variation( $variation_id );
|
626 |
+
|
627 |
+
if ( $default_attributes == $single_variation->get_attributes() ) {
|
628 |
+
$cart_key = WC()->cart->add_to_cart( $variation_id, $quantity, 0, array(), $cart_item_data );
|
629 |
+
$cart_product_count++;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
} else {
|
633 |
+
|
634 |
+
$product_childrens = $_product->get_children();
|
635 |
+
|
636 |
+
if ( isset( $product_childrens[0] ) ) {
|
637 |
+
$variation = wc_get_product( $product_childrens[0] );
|
638 |
+
$_product_price = $variation->get_price();
|
639 |
+
$custom_price = $this->calculate_discount( '', $discount_type, $discount_value, $_product_price );
|
640 |
+
if ( ! empty( $custom_price ) ) {
|
641 |
+
$cart_item_data = array(
|
642 |
+
'custom_price' => $custom_price,
|
643 |
+
'data' => $data,
|
644 |
+
);
|
645 |
+
}
|
646 |
+
$cart_key = WC()->cart->add_to_cart( $product_childrens[0], $quantity, 0, array(), $cart_item_data );
|
647 |
+
$cart_product_count++;
|
648 |
+
} else {
|
649 |
+
echo '<p>' . esc_html__( 'Variations Not set', 'cartflows' ) . '</p>';
|
650 |
+
}
|
651 |
+
}
|
652 |
+
} else {
|
653 |
+
$cart_key = WC()->cart->add_to_cart( $product_id, $quantity, 0, array(), $cart_item_data );
|
654 |
+
|
655 |
+
if ( false !== $cart_key ) {
|
656 |
+
$cart_product_count++;
|
657 |
+
}
|
658 |
+
}
|
659 |
+
} else {
|
660 |
+
$wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
|
661 |
+
wc_add_notice( $wrong_product_notice );
|
662 |
+
}
|
663 |
+
}
|
664 |
+
$products_new[ $index ] = array(
|
665 |
+
'cart_item_key' => $cart_key,
|
666 |
+
);
|
667 |
+
}
|
668 |
+
|
669 |
+
/* Set checkout products data */
|
670 |
+
wcf()->utils->set_selcted_checkout_products( $checkout_id, $products_new );
|
671 |
+
|
672 |
+
/* Since 1.2.2 */
|
673 |
+
wcf_do_action_deprecated( 'cartflows_checkout_aftet_configure_cart', array( $checkout_id ), '1.2.2', 'cartflows_checkout_after_configure_cart' );
|
674 |
+
do_action( 'cartflows_checkout_after_configure_cart', $checkout_id );
|
675 |
+
}
|
676 |
+
}
|
677 |
+
}
|
678 |
+
|
679 |
+
/**
|
680 |
+
* Load shortcode data.
|
681 |
+
*
|
682 |
+
* @return void
|
683 |
+
*/
|
684 |
+
public function shortcode_load_data() {
|
685 |
+
|
686 |
+
if ( _is_wcf_checkout_type() ) {
|
687 |
+
|
688 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
689 |
+
|
690 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
691 |
+
|
692 |
+
$this->before_checkout_shortcode_actions();
|
693 |
+
|
694 |
+
global $post;
|
695 |
+
|
696 |
+
$checkout_id = $post->ID;
|
697 |
+
|
698 |
+
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
699 |
+
}
|
700 |
+
}
|
701 |
+
|
702 |
+
/**
|
703 |
+
* Render checkout ID hidden field.
|
704 |
+
*
|
705 |
+
* @return void
|
706 |
+
*/
|
707 |
+
public function before_checkout_shortcode_actions() {
|
708 |
+
/* Show notices if cart has errors */
|
709 |
+
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
710 |
+
|
711 |
+
// Outputting the hidden field in checkout page.
|
712 |
+
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
713 |
+
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
714 |
+
|
715 |
+
remove_all_actions( 'woocommerce_checkout_billing' );
|
716 |
+
remove_all_actions( 'woocommerce_checkout_shipping' );
|
717 |
+
|
718 |
+
// Hook in actions once.
|
719 |
+
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
720 |
+
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
721 |
+
|
722 |
+
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
723 |
+
|
724 |
+
add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
|
725 |
+
|
726 |
+
add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
|
727 |
+
|
728 |
+
add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
|
729 |
+
|
730 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
731 |
+
|
732 |
+
}
|
733 |
+
|
734 |
+
/**
|
735 |
+
* Render checkout ID hidden field.
|
736 |
+
*
|
737 |
+
* @param array $checkout checkout session data.
|
738 |
+
* @return void
|
739 |
+
*/
|
740 |
+
public function checkout_shortcode_post_id( $checkout ) {
|
741 |
+
|
742 |
+
global $post;
|
743 |
+
|
744 |
+
$checkout_id = 0;
|
745 |
+
|
746 |
+
if ( _is_wcf_checkout_type() ) {
|
747 |
+
$checkout_id = $post->ID;
|
748 |
+
}
|
749 |
+
|
750 |
+
$flow_id = get_post_meta( $checkout_id, 'wcf-flow-id', true );
|
751 |
+
|
752 |
+
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
753 |
+
echo '<input type="hidden" class="input-hidden _wcf_checkout_id" name="_wcf_checkout_id" value="' . intval( $checkout_id ) . '">';
|
754 |
+
}
|
755 |
+
|
756 |
+
/**
|
757 |
+
* Load shortcode scripts.
|
758 |
+
*
|
759 |
+
* @return void
|
760 |
+
*/
|
761 |
+
public function shortcode_scripts() {
|
762 |
+
|
763 |
+
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
764 |
+
|
765 |
+
wp_enqueue_script(
|
766 |
+
'wcf-checkout-template',
|
767 |
+
wcf()->utils->get_js_url( 'checkout-template' ),
|
768 |
+
array( 'jquery' ),
|
769 |
+
CARTFLOWS_VER,
|
770 |
+
true
|
771 |
+
);
|
772 |
+
|
773 |
+
do_action( 'cartflows_checkout_scripts' );
|
774 |
+
|
775 |
+
$checkout_dynamic_css = apply_filters( 'cartflows_checkout_enable_dynamic_css', true );
|
776 |
+
|
777 |
+
if ( $checkout_dynamic_css ) {
|
778 |
+
|
779 |
+
$style = $this->generate_style();
|
780 |
+
|
781 |
+
wp_add_inline_style( 'wcf-checkout-template', $style );
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
}
|
786 |
+
|
787 |
+
/**
|
788 |
+
* Load compatibility scripts.
|
789 |
+
*
|
790 |
+
* @return void
|
791 |
+
*/
|
792 |
+
public function compatibility_scripts() {
|
793 |
+
|
794 |
+
global $post;
|
795 |
+
|
796 |
+
$checkout_id = 0;
|
797 |
+
|
798 |
+
if ( _is_wcf_checkout_type() ) {
|
799 |
+
$checkout_id = $post->ID;
|
800 |
+
}
|
801 |
+
|
802 |
+
// Add DIVI Compatibility css if DIVI theme is enabled.
|
803 |
+
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
804 |
+
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id )
|
805 |
+
) {
|
806 |
+
wp_enqueue_style( 'wcf-checkout-template-divi', wcf()->utils->get_css_url( 'checkout-template-divi' ), '', CARTFLOWS_VER );
|
807 |
+
}
|
808 |
+
|
809 |
+
// Add Flatsome Compatibility css if Flatsome theme is enabled.
|
810 |
+
if ( Cartflows_Compatibility::get_instance()->is_flatsome_enabled() ) {
|
811 |
+
wp_enqueue_style( 'wcf-checkout-template-flatsome', wcf()->utils->get_css_url( 'checkout-template-flatsome' ), '', CARTFLOWS_VER );
|
812 |
+
}
|
813 |
+
|
814 |
+
// Add The7 Compatibility css if The7 theme is enabled.
|
815 |
+
if ( Cartflows_Compatibility::get_instance()->is_the_seven_enabled() ) {
|
816 |
+
wp_enqueue_style( 'wcf-checkout-template-the-seven', wcf()->utils->get_css_url( 'checkout-template-the-seven' ), '', CARTFLOWS_VER );
|
817 |
+
}
|
818 |
+
}
|
819 |
+
|
820 |
+
/**
|
821 |
+
* Generate styles.
|
822 |
+
*
|
823 |
+
* @return string
|
824 |
+
*/
|
825 |
+
public function generate_style() {
|
826 |
+
|
827 |
+
global $post;
|
828 |
+
|
829 |
+
$checkout_id = 0;
|
830 |
+
|
831 |
+
if ( _is_wcf_checkout_type() ) {
|
832 |
+
$checkout_id = $post->ID;
|
833 |
+
}
|
834 |
+
|
835 |
+
/*Output css variable */
|
836 |
+
$output = '';
|
837 |
+
|
838 |
+
CartFlows_Font_Families::render_fonts( $checkout_id );
|
839 |
+
|
840 |
+
$primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' );
|
841 |
+
|
842 |
+
$base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' );
|
843 |
+
|
844 |
+
$header_logo_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-width' );
|
845 |
+
|
846 |
+
/**
|
847 |
+
$base_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-weight' );*/
|
848 |
+
$r = '';
|
849 |
+
$g = '';
|
850 |
+
$b = '';
|
851 |
+
|
852 |
+
$field_tb_padding = '';
|
853 |
+
$field_lr_padding = '';
|
854 |
+
|
855 |
+
$field_heading_color = '';
|
856 |
+
$field_color = '';
|
857 |
+
$field_bg_color = '';
|
858 |
+
$field_border_color = '';
|
859 |
+
$field_label_color = '';
|
860 |
+
$submit_tb_padding = '';
|
861 |
+
$submit_lr_padding = '';
|
862 |
+
$hl_bg_color = '';
|
863 |
+
$field_input_size = '';
|
864 |
+
$box_border_color = '';
|
865 |
+
$section_bg_color = '';
|
866 |
+
$submit_button_height = '';
|
867 |
+
$submit_color = '';
|
868 |
+
$submit_bg_color = $primary_color;
|
869 |
+
$submit_border_color = $primary_color;
|
870 |
+
|
871 |
+
$submit_hover_color = '';
|
872 |
+
$submit_bg_hover_color = $primary_color;
|
873 |
+
$submit_border_hover_color = $primary_color;
|
874 |
+
|
875 |
+
$section_heading_color = '';
|
876 |
+
|
877 |
+
$is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' );
|
878 |
+
|
879 |
+
$button_font_family = '';
|
880 |
+
$button_font_weight = '';
|
881 |
+
$input_font_family = '';
|
882 |
+
$input_font_weight = '';
|
883 |
+
$heading_font_family = '';
|
884 |
+
$heading_font_weight = '';
|
885 |
+
$base_font_family = $base_font_family;
|
886 |
+
/**
|
887 |
+
$base_font_weight = $base_font_weight;*/
|
888 |
+
|
889 |
+
if ( 'yes' == $is_advance_option ) {
|
890 |
+
|
891 |
+
/**
|
892 |
+
* Get Font Family and Font Weight weight values
|
893 |
+
*/
|
894 |
+
$section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' );
|
895 |
+
|
896 |
+
$heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' );
|
897 |
+
$heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' );
|
898 |
+
$section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' );
|
899 |
+
$button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' );
|
900 |
+
$button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' );
|
901 |
+
$input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' );
|
902 |
+
$input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' );
|
903 |
+
$field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' );
|
904 |
+
$field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' );
|
905 |
+
$field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' );
|
906 |
+
|
907 |
+
$field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' );
|
908 |
+
|
909 |
+
$field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' );
|
910 |
+
|
911 |
+
$field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' );
|
912 |
+
|
913 |
+
$field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' );
|
914 |
+
|
915 |
+
$field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' );
|
916 |
+
|
917 |
+
$submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' );
|
918 |
+
|
919 |
+
$submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' );
|
920 |
+
|
921 |
+
$submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' );
|
922 |
+
|
923 |
+
$submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color );
|
924 |
+
|
925 |
+
$submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color );
|
926 |
+
|
927 |
+
$submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color );
|
928 |
+
|
929 |
+
$submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' );
|
930 |
+
|
931 |
+
$submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color );
|
932 |
+
|
933 |
+
$hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' );
|
934 |
+
|
935 |
+
$box_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-box-border-color' );
|
936 |
+
|
937 |
+
$submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' );
|
938 |
+
|
939 |
+
/**
|
940 |
+
* Get font values
|
941 |
+
*/
|
942 |
+
|
943 |
+
if ( 'custom' == $submit_button_height ) {
|
944 |
+
$submit_button_height = '38px';
|
945 |
+
}
|
946 |
+
|
947 |
+
if ( 'custom' == $field_input_size ) {
|
948 |
+
$field_input_size = '38px';
|
949 |
+
}
|
950 |
+
}
|
951 |
+
if ( isset( $primary_color ) ) {
|
952 |
+
|
953 |
+
list($r, $g, $b) = sscanf( $primary_color, '#%02x%02x%02x' );
|
954 |
+
}
|
955 |
+
|
956 |
+
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
957 |
+
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id ) ) {
|
958 |
+
|
959 |
+
include CARTFLOWS_CHECKOUT_DIR . 'includes/checkout-dynamic-divi-css.php';
|
960 |
+
|
961 |
+
} else {
|
962 |
+
include CARTFLOWS_CHECKOUT_DIR . 'includes/checkout-dynamic-css.php';
|
963 |
+
}
|
964 |
+
|
965 |
+
return $output;
|
966 |
+
}
|
967 |
+
|
968 |
+
/**
|
969 |
+
* Get ajax end points.
|
970 |
+
*
|
971 |
+
* @param string $endpoint_url end point URL.
|
972 |
+
* @param string $request end point request.
|
973 |
+
* @return string
|
974 |
+
*/
|
975 |
+
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
976 |
+
|
977 |
+
global $post;
|
978 |
+
|
979 |
+
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
980 |
+
|
981 |
+
if ( _is_wcf_checkout_type() ) {
|
982 |
+
|
983 |
+
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
984 |
+
|
985 |
+
if ( '' === $request ) {
|
986 |
+
$query_args = array(
|
987 |
+
'wc-ajax' => '%%endpoint%%',
|
988 |
+
);
|
989 |
+
} else {
|
990 |
+
$query_args = array(
|
991 |
+
'wc-ajax' => $request,
|
992 |
+
);
|
993 |
+
}
|
994 |
+
|
995 |
+
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
996 |
+
$uri = $uri[0];
|
997 |
+
|
998 |
+
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
999 |
+
}
|
1000 |
+
}
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
return $endpoint_url;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
|
1007 |
+
/**
|
1008 |
+
* Save checkout fields.
|
1009 |
+
*
|
1010 |
+
* @param int $order_id order id.
|
1011 |
+
* @param array $posted posted data.
|
1012 |
+
* @return void
|
1013 |
+
*/
|
1014 |
+
public function save_checkout_fields( $order_id, $posted ) {
|
1015 |
+
|
1016 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1017 |
+
|
1018 |
+
$checkout_id = wc_clean( intval( $_POST['_wcf_checkout_id'] ) ); //phpcs:ignore
|
1019 |
+
|
1020 |
+
update_post_meta( $order_id, '_wcf_checkout_id', $checkout_id );
|
1021 |
+
|
1022 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
1023 |
+
|
1024 |
+
$flow_id = wc_clean( intval( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
1025 |
+
|
1026 |
+
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* Enable Logo In Header Of Checkout Page
|
1034 |
+
*
|
1035 |
+
* @return void
|
1036 |
+
*/
|
1037 |
+
public function enable_logo_in_header() {
|
1038 |
+
global $post;
|
1039 |
+
|
1040 |
+
$checkout_id = 0;
|
1041 |
+
|
1042 |
+
if ( _is_wcf_checkout_type() ) {
|
1043 |
+
$checkout_id = $post->ID;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
$header_logo_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-image' );
|
1047 |
+
$add_image_markup = '';
|
1048 |
+
|
1049 |
+
if ( isset( $header_logo_image ) && ! empty( $header_logo_image ) ) {
|
1050 |
+
$add_image_markup = '<div class="wcf-checkout-header-image">';
|
1051 |
+
$add_image_markup .= '<img src="' . $header_logo_image . '" />';
|
1052 |
+
$add_image_markup .= '</div>';
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
echo $add_image_markup;
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
/**
|
1059 |
+
* Add text to the bootom of the checkout page.
|
1060 |
+
*
|
1061 |
+
* @return void
|
1062 |
+
*/
|
1063 |
+
public function show_cartflows_copyright_message() {
|
1064 |
+
$output_string = '';
|
1065 |
+
|
1066 |
+
$output_string .= '<div class="wcf-footer-primary">';
|
1067 |
+
$output_string .= '<div class="wcf-footer-content">';
|
1068 |
+
$output_string .= '<p class="wcf-footer-message">';
|
1069 |
+
$output_string .= 'Checkout powered by CartFlows';
|
1070 |
+
$output_string .= '</p>';
|
1071 |
+
$output_string .= '</div>';
|
1072 |
+
$output_string .= '</div>';
|
1073 |
+
|
1074 |
+
echo $output_string;
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
/**
|
1078 |
+
* Redirect users to our checkout if hidden param
|
1079 |
+
*
|
1080 |
+
* @param string $redirect redirect url.
|
1081 |
+
* @param object $user user.
|
1082 |
+
* @return string
|
1083 |
+
*/
|
1084 |
+
public function after_login_redirect( $redirect, $user ) {
|
1085 |
+
|
1086 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1087 |
+
|
1088 |
+
$checkout_id = intval( $_POST['_wcf_checkout_id'] ); //phpcs:ignore
|
1089 |
+
|
1090 |
+
$redirect = get_permalink( $checkout_id );
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
return $redirect;
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
/**
|
1097 |
+
* Display coupon code field after review order fields.
|
1098 |
+
*/
|
1099 |
+
public function display_custom_coupon_field() {
|
1100 |
+
|
1101 |
+
$coupon_enabled = apply_filters( 'woocommerce_coupons_enabled', true );
|
1102 |
+
$show_coupon = apply_filters( 'cartflows_show_coupon_field', true );
|
1103 |
+
|
1104 |
+
if ( ! ( $coupon_enabled && $show_coupon ) ) {
|
1105 |
+
return;
|
1106 |
+
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
$coupon_field = array(
|
1110 |
+
'field_text' => __( 'Coupon Code', 'cartflows' ),
|
1111 |
+
'button_text' => __( 'Apply', 'cartflows' ),
|
1112 |
+
'class' => '',
|
1113 |
+
);
|
1114 |
+
|
1115 |
+
$coupon_field = apply_filters( 'cartflows_coupon_field_options', $coupon_field );
|
1116 |
+
|
1117 |
+
ob_start();
|
1118 |
+
?>
|
1119 |
+
<div class="wcf-custom-coupon-field <?php echo $coupon_field['class']; ?>" id="wcf_custom_coupon_field">
|
1120 |
+
<div class="wcf-coupon-col-1">
|
1121 |
+
<span>
|
1122 |
+
<input type="text" name="coupon_code" class="input-text wcf-coupon-code-input" placeholder="<?php echo $coupon_field['field_text']; ?>" id="coupon_code" value="">
|
1123 |
+
</span>
|
1124 |
+
</div>
|
1125 |
+
<div class="wcf-coupon-col-2">
|
1126 |
+
<span>
|
1127 |
+
<button type="button" class="button wcf-submit-coupon wcf-btn-small" name="apply_coupon" value="Apply"><?php echo $coupon_field['button_text']; ?></button>
|
1128 |
+
</span>
|
1129 |
+
</div>
|
1130 |
+
</div>
|
1131 |
+
<?php
|
1132 |
+
echo ob_get_clean();
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
/**
|
1136 |
+
* Apply filter to change class of remove coupon field.
|
1137 |
+
*
|
1138 |
+
* @param string $coupon coupon.
|
1139 |
+
* @return string
|
1140 |
+
*/
|
1141 |
+
public function remove_coupon_text( $coupon ) {
|
1142 |
+
|
1143 |
+
$coupon = str_replace( 'woocommerce-remove-coupon', 'wcf-remove-coupon', $coupon );
|
1144 |
+
return $coupon;
|
1145 |
+
|
1146 |
+
}
|
1147 |
+
/**
|
1148 |
+
* Apply filter to change the placeholder text of coupon field.
|
1149 |
+
*
|
1150 |
+
* @return string
|
1151 |
+
*/
|
1152 |
+
public function coupon_field_placeholder() {
|
1153 |
+
return apply_filters( 'cartflows_coupon_field_placeholder', __( 'Coupon Code', 'cartflows' ) );
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
/**
|
1157 |
+
* Apply filter to change the button text of coupon field.
|
1158 |
+
*
|
1159 |
+
* @return string
|
1160 |
+
*/
|
1161 |
+
public function coupon_button_text() {
|
1162 |
+
return apply_filters( 'cartflows_coupon_button_text', __( 'Apply', 'cartflows' ) );
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
/**
|
1166 |
+
* Apply coupon on submit of custom coupon form.
|
1167 |
+
*/
|
1168 |
+
public function apply_coupon() {
|
1169 |
+
|
1170 |
+
$response = '';
|
1171 |
+
|
1172 |
+
check_ajax_referer( 'wcf-apply-coupon', 'security' );
|
1173 |
+
if ( ! empty( $_POST['coupon_code'] ) ) {
|
1174 |
+
$result = WC()->cart->add_discount( sanitize_text_field( wp_unslash( $_POST['coupon_code'] ) ) );
|
1175 |
+
} else {
|
1176 |
+
wc_add_notice( WC_Coupon::get_generic_coupon_error( WC_Coupon::E_WC_COUPON_PLEASE_ENTER ), 'error' );
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
$response = array(
|
1180 |
+
'status' => $result,
|
1181 |
+
'msg' => wc_print_notices( true ),
|
1182 |
+
);
|
1183 |
+
|
1184 |
+
echo wp_json_encode( $response );
|
1185 |
+
|
1186 |
+
die();
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
|
1190 |
+
/**
|
1191 |
+
* Added ajax nonce to localize variable.
|
1192 |
+
*
|
1193 |
+
* @param array $vars localize variables.
|
1194 |
+
*/
|
1195 |
+
public function add_localize_vars( $vars ) {
|
1196 |
+
|
1197 |
+
$vars['wcf_validate_coupon_nonce'] = wp_create_nonce( 'wcf-apply-coupon' );
|
1198 |
+
|
1199 |
+
$vars['wcf_validate_remove_coupon_nonce'] = wp_create_nonce( 'wcf-remove-coupon' );
|
1200 |
+
|
1201 |
+
$vars['wcf_validate_remove_cart_product_nonce'] = wp_create_nonce( 'wcf-remove-cart-product' );
|
1202 |
+
|
1203 |
+
$vars['allow_persistence'] = wcf_apply_filters_deprecated( 'cartflows_allow_persistace', array( 'yes' ), '1.6.0', 'cartflows_allow_persistence' );
|
1204 |
+
|
1205 |
+
return $vars;
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
/**
|
1209 |
+
* Add custom class to the fields to change the UI to three column.
|
1210 |
+
*
|
1211 |
+
* @param array $fields fields.
|
1212 |
+
*/
|
1213 |
+
public function add_three_column_layout_fields( $fields ) {
|
1214 |
+
|
1215 |
+
if ( empty( $fields['billing']['billing_address_2'] ) ) {
|
1216 |
+
|
1217 |
+
if ( isset( $fields['billing']['billing_address_1'] ) && is_array( $fields['billing']['billing_address_1'] ) ) {
|
1218 |
+
$fields['billing']['billing_address_1']['class'][] = 'form-row-full';
|
1219 |
+
}
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
if ( ! empty( $fields['billing']['billing_company'] ) ) {
|
1223 |
+
|
1224 |
+
if ( isset( $fields['billing']['billing_company'] ) && is_array( $fields['billing']['billing_company'] ) ) {
|
1225 |
+
$fields['billing']['billing_company']['class'][] = 'form-row-full';
|
1226 |
+
}
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
if ( ! empty( $fields['shipping']['shipping_company'] ) ) {
|
1230 |
+
|
1231 |
+
if ( isset( $fields['shipping']['shipping_company'] ) && is_array( $fields['shipping']['shipping_company'] ) ) {
|
1232 |
+
$fields['shipping']['shipping_company']['class'][] = 'form-row-full';
|
1233 |
+
}
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
if ( ! empty( $fields['billing']['billing_country'] ) ) {
|
1237 |
+
|
1238 |
+
if ( isset( $fields['billing']['billing_country'] ) && is_array( $fields['billing']['billing_country'] ) ) {
|
1239 |
+
$fields['billing']['billing_country']['class'][] = 'form-row-full';
|
1240 |
+
}
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
if ( ! empty( $fields['shipping']['shipping_country'] ) ) {
|
1244 |
+
|
1245 |
+
if ( isset( $fields['shipping']['shipping_country'] ) && is_array( $fields['shipping']['shipping_country'] ) ) {
|
1246 |
+
$fields['shipping']['shipping_country']['class'][] = 'form-row-full';
|
1247 |
+
}
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
if ( ! empty( $fields['billing']['billing_phone'] ) ) {
|
1251 |
+
|
1252 |
+
if ( isset( $fields['billing']['billing_phone'] ) && is_array( $fields['billing']['billing_phone'] ) ) {
|
1253 |
+
$fields['billing']['billing_phone']['class'][] = 'form-row-full';
|
1254 |
+
}
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
if ( ! empty( $fields['billing']['billing_email'] ) ) {
|
1258 |
+
|
1259 |
+
if ( isset( $fields['billing']['billing_email'] ) && is_array( $fields['billing']['billing_email'] ) ) {
|
1260 |
+
$fields['billing']['billing_email']['class'][] = 'form-row-full';
|
1261 |
+
}
|
1262 |
+
}
|
1263 |
+
|
1264 |
+
if ( empty( $fields['shipping']['shipping_address_2'] ) ) {
|
1265 |
+
|
1266 |
+
if ( isset( $fields['shipping']['shipping_address_1'] ) && is_array( $fields['shipping']['shipping_address_1'] ) ) {
|
1267 |
+
$fields['shipping']['shipping_address_1']['class'][] = 'form-row-full';
|
1268 |
+
}
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
if ( isset( $fields['billing']['billing_city'] ) &&
|
1272 |
+
isset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] ) ) {
|
1273 |
+
|
1274 |
+
$fields['billing']['billing_city']['class'][] = 'wcf-column-33';
|
1275 |
+
$fields['billing']['billing_state']['class'][] = 'wcf-column-33';
|
1276 |
+
$fields['billing']['billing_postcode']['class'][] = 'wcf-column-33';
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
if ( isset( $fields['shipping']['shipping_city'] ) &&
|
1280 |
+
isset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] ) ) {
|
1281 |
+
|
1282 |
+
$fields['shipping']['shipping_city']['class'][] = 'wcf-column-33';
|
1283 |
+
$fields['shipping']['shipping_state']['class'][] = 'wcf-column-33';
|
1284 |
+
$fields['shipping']['shipping_postcode']['class'][] = 'wcf-column-33';
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
return $fields;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
/**
|
1291 |
+
* Remove coupon.
|
1292 |
+
*/
|
1293 |
+
public function remove_coupon() {
|
1294 |
+
|
1295 |
+
check_ajax_referer( 'wcf-remove-coupon', 'security' );
|
1296 |
+
$coupon = isset( $_POST['coupon_code'] ) ? wc_clean( wp_unslash( $_POST['coupon_code'] ) ) : false; //phpcs:ignore
|
1297 |
+
|
1298 |
+
if ( empty( $coupon ) ) {
|
1299 |
+
echo "<div class='woocommerce-error'>" . esc_html__( 'Sorry there was a problem removing this coupon.', 'cartflows' );
|
1300 |
+
} else {
|
1301 |
+
WC()->cart->remove_coupon( $coupon );
|
1302 |
+
echo "<div class='woocommerce-error'>" . esc_html__( 'Coupon has been removed.', 'cartflows' ) . '</div>';
|
1303 |
+
}
|
1304 |
+
wc_print_notices();
|
1305 |
+
wp_die();
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
/**
|
1309 |
+
* Remove cart item.
|
1310 |
+
*/
|
1311 |
+
public function wcf_woo_remove_cart_product() {
|
1312 |
+
|
1313 |
+
check_ajax_referer( 'wcf-remove-cart-product', 'security' );
|
1314 |
+
$product_key = isset( $_POST['p_key'] ) ? wc_clean( wp_unslash( $_POST['p_key'] ) ) : false; //phpcs:ignore
|
1315 |
+
$product_id = isset( $_POST['p_id'] ) ? wc_clean( wp_unslash( $_POST['p_id'] ) ) : ''; //phpcs:ignore
|
1316 |
+
$product_title = get_the_title( $product_id );
|
1317 |
+
|
1318 |
+
$needs_shipping = false;
|
1319 |
+
|
1320 |
+
if ( empty( $product_key ) ) {
|
1321 |
+
$msg = "<div class='woocommerce-message'>" . __( 'Sorry there was a problem removing ', 'cartflows' ) . $product_title;
|
1322 |
+
} else {
|
1323 |
+
WC()->cart->remove_cart_item( $product_key );
|
1324 |
+
$msg = "<div class='woocommerce-message'>" . $product_title . __( ' has been removed.', 'cartflows' ) . '</div>';
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
|
1328 |
+
if ( $values['data']->needs_shipping() ) {
|
1329 |
+
$needs_shipping = true;
|
1330 |
+
break;
|
1331 |
+
}
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
$response = array(
|
1335 |
+
'need_shipping' => $needs_shipping,
|
1336 |
+
'msg' => $msg,
|
1337 |
+
);
|
1338 |
+
|
1339 |
+
echo wp_json_encode( $response );
|
1340 |
+
wp_die();
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
/**
|
1344 |
+
* Calculate discount for product.
|
1345 |
+
*
|
1346 |
+
* @param string $discount_coupon discount coupon.
|
1347 |
+
* @param string $discount_type discount type.
|
1348 |
+
* @param int $discount_value discount value.
|
1349 |
+
* @param int $_product_price product price.
|
1350 |
+
* @return int
|
1351 |
+
* @since 1.1.5
|
1352 |
+
*/
|
1353 |
+
public function calculate_discount( $discount_coupon, $discount_type, $discount_value, $_product_price ) {
|
1354 |
+
|
1355 |
+
$custom_price = '';
|
1356 |
+
|
1357 |
+
if ( ! empty( $discount_type ) ) {
|
1358 |
+
if ( 'discount_percent' === $discount_type ) {
|
1359 |
+
|
1360 |
+
if ( $discount_value > 0 ) {
|
1361 |
+
$custom_price = $_product_price - ( ( $_product_price * $discount_value ) / 100 );
|
1362 |
+
}
|
1363 |
+
} elseif ( 'discount_price' === $discount_type ) {
|
1364 |
+
|
1365 |
+
if ( $discount_value > 0 ) {
|
1366 |
+
$custom_price = $_product_price - $discount_value;
|
1367 |
+
}
|
1368 |
+
} elseif ( 'coupon' === $discount_type ) {
|
1369 |
+
|
1370 |
+
if ( ! empty( $discount_coupon ) ) {
|
1371 |
+
WC()->cart->add_discount( $discount_coupon );
|
1372 |
+
}
|
1373 |
+
}
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
return $custom_price;
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
/**
|
1380 |
+
* Preserve the custom item price added by Variations & Quantity feature
|
1381 |
+
*
|
1382 |
+
* @param array $cart_object cart object.
|
1383 |
+
* @since 1.0.0
|
1384 |
+
*/
|
1385 |
+
public function custom_price_to_cart_item( $cart_object ) {
|
1386 |
+
|
1387 |
+
if ( wp_doing_ajax() && ! WC()->session->__isset( 'reload_checkout' ) ) {
|
1388 |
+
|
1389 |
+
foreach ( $cart_object->cart_contents as $key => $value ) {
|
1390 |
+
|
1391 |
+
if ( isset( $value['custom_price'] ) ) {
|
1392 |
+
|
1393 |
+
$custom_price = floatval( $value['custom_price'] );
|
1394 |
+
$value['data']->set_price( $custom_price );
|
1395 |
+
}
|
1396 |
+
}
|
1397 |
+
}
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
/**
|
1403 |
+
* Kicking this off by calling 'get_instance()' method
|
1404 |
+
*/
|
1405 |
+
Cartflows_Checkout_Markup::get_instance();
|
modules/checkout/templates/embed/checkout-template-simple.php
CHANGED
@@ -1,32 +1,32 @@
|
|
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 |
-
?>
|
12 |
-
<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; ?>">
|
13 |
-
<!-- CHECKOUT SHORTCODE -->
|
14 |
-
<?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
|
15 |
-
|
16 |
-
<?php
|
17 |
-
$checkout_html = do_shortcode( '[woocommerce_checkout]' );
|
18 |
-
|
19 |
-
if (
|
20 |
-
empty( $checkout_html ) ||
|
21 |
-
trim( $checkout_html ) == '<div class="woocommerce"></div>'
|
22 |
-
) {
|
23 |
-
do_action( 'cartflows_checkout_cart_empty', $checkout_id );
|
24 |
-
echo esc_html__( 'Your cart is currently empty.', 'cartflows' );
|
25 |
-
} else {
|
26 |
-
echo $checkout_html;
|
27 |
-
}
|
28 |
-
?>
|
29 |
-
|
30 |
-
<?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
|
31 |
-
<!-- END CHECKOUT SHORTCODE -->
|
32 |
-
</div>
|
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 |
+
?>
|
12 |
+
<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; ?>">
|
13 |
+
<!-- CHECKOUT SHORTCODE -->
|
14 |
+
<?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
|
15 |
+
|
16 |
+
<?php
|
17 |
+
$checkout_html = do_shortcode( '[woocommerce_checkout]' );
|
18 |
+
|
19 |
+
if (
|
20 |
+
empty( $checkout_html ) ||
|
21 |
+
trim( $checkout_html ) == '<div class="woocommerce"></div>'
|
22 |
+
) {
|
23 |
+
do_action( 'cartflows_checkout_cart_empty', $checkout_id );
|
24 |
+
echo esc_html__( 'Your cart is currently empty.', 'cartflows' );
|
25 |
+
} else {
|
26 |
+
echo $checkout_html;
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
|
30 |
+
<?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
|
31 |
+
<!-- END CHECKOUT SHORTCODE -->
|
32 |
+
</div>
|
modules/flow/classes/class-cartflows-permalink.php
CHANGED
@@ -1,165 +1,175 @@
|
|
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_Permalink {
|
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_type_link', array( $this, 'post_type_permalinks' ), 10, 3 );
|
39 |
-
add_action( 'init', array( $this, 'rewrite_step_rule' ) );
|
40 |
-
|
41 |
-
if ( ! is_admin() ) {
|
42 |
-
|
43 |
-
add_action( 'pre_get_posts', array( $this, 'add_cpt_post_names_to_main_query' ), 20 );
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Modify permalink
|
49 |
-
*
|
50 |
-
* @param string $post_link post link.
|
51 |
-
* @param array $post post data.
|
52 |
-
* @param string $leavename leave name.
|
53 |
-
* @return string
|
54 |
-
*/
|
55 |
-
public function post_type_permalinks( $post_link, $post, $leavename ) {
|
56 |
-
|
57 |
-
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE == $post->post_type ) {
|
58 |
-
|
59 |
-
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
60 |
-
$flow_name = get_post_field( 'post_name', $flow_id );
|
61 |
-
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
62 |
-
|
63 |
-
if ( isset( $cf_permalink['permalink_structure'] ) && ! empty( $cf_permalink['permalink_structure'] ) ) {
|
64 |
-
|
65 |
-
$sep = '/';
|
66 |
-
$search = array( $sep . 'cartflows_flow', $sep . '%flowname%', $sep . 'cartflows_step' );
|
67 |
-
$replace = array( $sep . $cf_permalink['permalink_flow_base'], $sep . $flow_name, $sep . $cf_permalink['permalink'] );
|
68 |
-
$post_link = str_replace( $search, $replace, $post_link );
|
69 |
-
} else {
|
70 |
-
|
71 |
-
// If elementor page preview, return post link as it is.
|
72 |
-
if ( isset( $_REQUEST['elementor-preview'] ) ) { //phpcs:ignore
|
73 |
-
return $post_link;
|
74 |
-
}
|
75 |
-
|
76 |
-
$structure = get_option( 'permalink_structure' );
|
77 |
-
|
78 |
-
if ( '/%postname%/' === $structure ) {
|
79 |
-
|
80 |
-
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
|
81 |
-
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
return $post_link;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Reqrite rules for acrtflows step.
|
91 |
-
*/
|
92 |
-
public function rewrite_step_rule() {
|
93 |
-
|
94 |
-
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
95 |
-
|
96 |
-
if ( isset( $cf_permalink['permalink_structure'] ) ) {
|
97 |
-
switch ( $cf_permalink['permalink_structure'] ) {
|
98 |
-
case '/cartflows_flow/%flowname%/cartflows_step':
|
99 |
-
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
100 |
-
break;
|
101 |
-
|
102 |
-
case '/cartflows_flow/%flowname%':
|
103 |
-
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/([^/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
104 |
-
break;
|
105 |
-
|
106 |
-
case '/%flowname%/cartflows_step':
|
107 |
-
add_rewrite_rule( '([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
108 |
-
|
109 |
-
break;
|
110 |
-
|
111 |
-
default:
|
112 |
-
break;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Have WordPress match postname to any of our public post types.
|
120 |
-
* All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts.
|
121 |
-
* By default, WordPress only accounts for posts and pages where the slug is /post-name/.
|
122 |
-
*
|
123 |
-
* @param string $query query statement.
|
124 |
-
*/
|
125 |
-
public function add_cpt_post_names_to_main_query( $query ) {
|
126 |
-
|
127 |
-
// Bail if this is not the main query.
|
128 |
-
if ( ! $query->is_main_query() ) {
|
129 |
-
return;
|
130 |
-
}
|
131 |
-
|
132 |
-
// Bail if this query doesn't match our very specific rewrite rule.
|
133 |
-
if ( ! isset( $query->query['thrive-variations'] )
|
134 |
-
&& ! isset( $query->query['page'] )
|
135 |
-
&& ! isset( $query->query_vars['page_id'] )
|
136 |
-
) {
|
137 |
-
return;
|
138 |
-
}
|
139 |
-
|
140 |
-
// Bail if we're not querying based on the post name.
|
141 |
-
if ( empty( $query->query['name'] ) && empty( $query->query_vars['page_id'] ) ) {
|
142 |
-
return;
|
143 |
-
}
|
144 |
-
|
145 |
-
//
|
146 |
-
if (
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Permalink {
|
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_type_link', array( $this, 'post_type_permalinks' ), 10, 3 );
|
39 |
+
add_action( 'init', array( $this, 'rewrite_step_rule' ) );
|
40 |
+
|
41 |
+
if ( ! is_admin() ) {
|
42 |
+
|
43 |
+
add_action( 'pre_get_posts', array( $this, 'add_cpt_post_names_to_main_query' ), 20 );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Modify permalink
|
49 |
+
*
|
50 |
+
* @param string $post_link post link.
|
51 |
+
* @param array $post post data.
|
52 |
+
* @param string $leavename leave name.
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function post_type_permalinks( $post_link, $post, $leavename ) {
|
56 |
+
|
57 |
+
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE == $post->post_type ) {
|
58 |
+
|
59 |
+
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
60 |
+
$flow_name = get_post_field( 'post_name', $flow_id );
|
61 |
+
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
62 |
+
|
63 |
+
if ( isset( $cf_permalink['permalink_structure'] ) && ! empty( $cf_permalink['permalink_structure'] ) ) {
|
64 |
+
|
65 |
+
$sep = '/';
|
66 |
+
$search = array( $sep . 'cartflows_flow', $sep . '%flowname%', $sep . 'cartflows_step' );
|
67 |
+
$replace = array( $sep . $cf_permalink['permalink_flow_base'], $sep . $flow_name, $sep . $cf_permalink['permalink'] );
|
68 |
+
$post_link = str_replace( $search, $replace, $post_link );
|
69 |
+
} else {
|
70 |
+
|
71 |
+
// If elementor page preview, return post link as it is.
|
72 |
+
if ( isset( $_REQUEST['elementor-preview'] ) ) { //phpcs:ignore
|
73 |
+
return $post_link;
|
74 |
+
}
|
75 |
+
|
76 |
+
$structure = get_option( 'permalink_structure' );
|
77 |
+
|
78 |
+
if ( '/%postname%/' === $structure ) {
|
79 |
+
|
80 |
+
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
|
81 |
+
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
return $post_link;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Reqrite rules for acrtflows step.
|
91 |
+
*/
|
92 |
+
public function rewrite_step_rule() {
|
93 |
+
|
94 |
+
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
95 |
+
|
96 |
+
if ( isset( $cf_permalink['permalink_structure'] ) ) {
|
97 |
+
switch ( $cf_permalink['permalink_structure'] ) {
|
98 |
+
case '/cartflows_flow/%flowname%/cartflows_step':
|
99 |
+
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
100 |
+
break;
|
101 |
+
|
102 |
+
case '/cartflows_flow/%flowname%':
|
103 |
+
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/([^/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
104 |
+
break;
|
105 |
+
|
106 |
+
case '/%flowname%/cartflows_step':
|
107 |
+
add_rewrite_rule( '([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
108 |
+
|
109 |
+
break;
|
110 |
+
|
111 |
+
default:
|
112 |
+
break;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Have WordPress match postname to any of our public post types.
|
120 |
+
* All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts.
|
121 |
+
* By default, WordPress only accounts for posts and pages where the slug is /post-name/.
|
122 |
+
*
|
123 |
+
* @param string $query query statement.
|
124 |
+
*/
|
125 |
+
public function add_cpt_post_names_to_main_query( $query ) {
|
126 |
+
|
127 |
+
// Bail if this is not the main query.
|
128 |
+
if ( ! $query->is_main_query() ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
// Bail if this query doesn't match our very specific rewrite rule.
|
133 |
+
if ( ! isset( $query->query['thrive-variations'] )
|
134 |
+
&& ! isset( $query->query['page'] )
|
135 |
+
&& ! isset( $query->query_vars['page_id'] )
|
136 |
+
) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
+
// Bail if we're not querying based on the post name.
|
141 |
+
if ( empty( $query->query['name'] ) && empty( $query->query_vars['page_id'] ) ) {
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
// Bail if name is set and query cout is not 2.
|
146 |
+
if ( ! empty( $query->query['name'] ) && 2 !== count( $query->query ) ) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
// Bail if page_id is set but page is not true. Added when step is set as homepage.
|
151 |
+
if ( ! empty( $query->query_vars['page_id'] ) && empty( $query->is_page ) ) {
|
152 |
+
return;
|
153 |
+
}
|
154 |
+
|
155 |
+
// Add cartflows step post type to existing post type array.
|
156 |
+
if ( isset( $query->query_vars['post_type'] ) && is_array( $query->query_vars['post_type'] ) ) {
|
157 |
+
|
158 |
+
$post_types = $query->query_vars['post_type'];
|
159 |
+
|
160 |
+
$post_types[] = CARTFLOWS_STEP_POST_TYPE;
|
161 |
+
|
162 |
+
$query->set( 'post_type', $post_types );
|
163 |
+
|
164 |
+
} else {
|
165 |
+
|
166 |
+
// Add CPT to the list of post types WP will include when it queries based on the post name.
|
167 |
+
$query->set( 'post_type', array( 'post', 'page', CARTFLOWS_STEP_POST_TYPE ) );
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Kicking this off by calling 'get_instance()' method
|
174 |
+
*/
|
175 |
+
Cartflows_Permalink::get_instance();
|
modules/gutenberg/classes/class-cartflows-block-config.php
CHANGED
@@ -1,528 +1,528 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Config.
|
4 |
-
*
|
5 |
-
* @package Cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'Cartflows_Block_Config' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Cartflows_Block_Config.
|
16 |
-
*/
|
17 |
-
class Cartflows_Block_Config {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Block Attributes
|
21 |
-
*
|
22 |
-
* @var block_attributes
|
23 |
-
*/
|
24 |
-
public static $block_attributes = null;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Block Assets
|
28 |
-
*
|
29 |
-
* @var block_attributes
|
30 |
-
*/
|
31 |
-
public static $block_assets = null;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Get Widget List.
|
35 |
-
*
|
36 |
-
* @since x.x.x
|
37 |
-
*
|
38 |
-
* @return array The Widget List.
|
39 |
-
*/
|
40 |
-
public static function get_block_attributes() {
|
41 |
-
|
42 |
-
if ( null === self::$block_attributes ) {
|
43 |
-
self::$block_attributes = array(
|
44 |
-
'wcfb/next-step-button' => array(
|
45 |
-
'slug' => '',
|
46 |
-
'title' => __( 'Next Step Button', 'cartflows' ),
|
47 |
-
'description' => '',
|
48 |
-
'default' => true,
|
49 |
-
'attributes' => array(
|
50 |
-
'classMigrate' => false,
|
51 |
-
'borderStyle' => 'solid',
|
52 |
-
'align' => 'center',
|
53 |
-
'malign' => 'center',
|
54 |
-
'talign' => 'center',
|
55 |
-
'titletextTransform' => 'none',
|
56 |
-
'subtitletextTransform' => 'none',
|
57 |
-
'letterSpacing' => '',
|
58 |
-
'borderWidth' => '1',
|
59 |
-
'borderColor' => '#abb8c3',
|
60 |
-
'borderHoverColor' => '#abb8c3',
|
61 |
-
'borderRadius' => '4',
|
62 |
-
'buttonColor' => '#abb8c3',
|
63 |
-
'buttonHoverColor' => '#abb8c3',
|
64 |
-
'paddingTypeDesktop' => 'px',
|
65 |
-
'paddingTypeTablet' => 'px',
|
66 |
-
'paddingTypeMobile' => 'px',
|
67 |
-
'vPaddingDesktop' => '5',
|
68 |
-
'hPaddingDesktop' => '30',
|
69 |
-
'vPaddingTablet' => '5',
|
70 |
-
'hPaddingTablet' => '30',
|
71 |
-
'vPaddingMobile' => '5',
|
72 |
-
'hPaddingMobile' => '30',
|
73 |
-
'textAlignment' => 'center',
|
74 |
-
'textColor' => '#ffffff',
|
75 |
-
'textHoverColor' => '#ffffff',
|
76 |
-
'titleFontFamily' => '',
|
77 |
-
'titleFontSize' => '20',
|
78 |
-
'titleFontWeight' => '500',
|
79 |
-
'titleFontSizeType' => 'px',
|
80 |
-
'titleFontSizeTablet' => '',
|
81 |
-
'titleFontSizeMobile' => '',
|
82 |
-
'titleLineHeightType' => 'em',
|
83 |
-
'titleLineHeight' => '',
|
84 |
-
'titleLineHeightTablet' => '',
|
85 |
-
'titleLineHeightMobile' => '',
|
86 |
-
'subTitleFontFamily' => '',
|
87 |
-
'subTitleFontWeight' => '500',
|
88 |
-
'subTitleFontSize' => '20',
|
89 |
-
'subTitleFontSizeType' => 'px',
|
90 |
-
'subTitleFontSizeTablet' => '',
|
91 |
-
'subTitleFontSizeMobile' => '',
|
92 |
-
'subTitleLineHeightType' => 'em',
|
93 |
-
'subTitleLineHeight' => '',
|
94 |
-
'subTitleLineHeightTablet' => '',
|
95 |
-
'subTitleLineHeightMobile' => '',
|
96 |
-
'titleletterSpacing' => '',
|
97 |
-
'subtitleletterSpacing' => '',
|
98 |
-
'titleBottomSpacing' => '0',
|
99 |
-
'iconSize' => '20',
|
100 |
-
'iconSpacing' => '10',
|
101 |
-
'iconColor' => '',
|
102 |
-
'iconHoverColor' => '',
|
103 |
-
'iconPosition' => 'before_title',
|
104 |
-
'backgroundType' => 'none',
|
105 |
-
'backgroundImage' => '',
|
106 |
-
'backgroundPosition' => 'center-center',
|
107 |
-
'backgroundSize' => 'cover',
|
108 |
-
'backgroundRepeat' => 'no-repeat',
|
109 |
-
'backgroundAttachment' => 'scroll',
|
110 |
-
'backgroundColor' => '#abb8c3',
|
111 |
-
'gradientColor1' => '#abb8c3',
|
112 |
-
'gradientColor2' => '#abb8c3',
|
113 |
-
'gradientType' => 'linear',
|
114 |
-
'gradientLocation1' => '0',
|
115 |
-
'gradientLocation2' => '100',
|
116 |
-
'gradientAngle' => '0',
|
117 |
-
'gradientPosition' => 'center center',
|
118 |
-
'backgroundOpacity' => 100,
|
119 |
-
'backgroundImageColor' => '#abb8c3',
|
120 |
-
'gradientValue' => '',
|
121 |
-
),
|
122 |
-
),
|
123 |
-
'wcfb/order-detail-form' => array(
|
124 |
-
'slug' => '',
|
125 |
-
'title' => __( 'Order Details Form', 'cartflows' ),
|
126 |
-
'description' => '',
|
127 |
-
'default' => true,
|
128 |
-
'attributes' => array(
|
129 |
-
'classMigrate' => false,
|
130 |
-
'align' => 'center',
|
131 |
-
// Genaral.
|
132 |
-
'orderOverview' => true,
|
133 |
-
'orderDetails' => true,
|
134 |
-
'billingAddress' => true,
|
135 |
-
'shippingAddress' => true,
|
136 |
-
// Spacing.
|
137 |
-
'headingBottomSpacing' => '',
|
138 |
-
'sectionSpacing' => '',
|
139 |
-
// Heading.
|
140 |
-
'thanyouText' => 'center',
|
141 |
-
'headingAlignment' => 'center',
|
142 |
-
'headingColor' => '',
|
143 |
-
'headingFontFamily' => '',
|
144 |
-
'headingFontWeight' => '',
|
145 |
-
'headingFontSize' => '',
|
146 |
-
'headingFontSizeType' => 'px',
|
147 |
-
'headingFontSizeTablet' => '',
|
148 |
-
'headingFontSizeMobile' => '',
|
149 |
-
'headingLineHeightType' => 'em',
|
150 |
-
'headingLineHeight' => '',
|
151 |
-
'headingLineHeightTablet' => '',
|
152 |
-
'headingLineHeightMobile' => '',
|
153 |
-
// Sections.
|
154 |
-
'sectionHeadingColor' => '',
|
155 |
-
'sectionHeadingFontFamily' => '',
|
156 |
-
'sectionHeadingFontWeight' => '',
|
157 |
-
'sectionHeadingFontSize' => '',
|
158 |
-
'sectionHeadingFontSizeType' => 'px',
|
159 |
-
'sectionHeadingFontSizeTablet' => '',
|
160 |
-
'sectionHeadingFontSizeMobile' => '',
|
161 |
-
'sectionHeadingLineHeightType' => '',
|
162 |
-
'sectionHeadingLineHeight' => 'em',
|
163 |
-
'sectionHeadingLineHeightTablet' => '',
|
164 |
-
'sectionHeadingLineHeightMobile' => '',
|
165 |
-
'sectionContentColor' => '',
|
166 |
-
'sectionContentFontFamily' => '',
|
167 |
-
'sectionContentFontWeight' => '',
|
168 |
-
'sectionContentFontSize' => '',
|
169 |
-
'sectionContentFontSizeType' => 'px',
|
170 |
-
'sectionContentFontSizeTablet' => '',
|
171 |
-
'sectionContentFontSizeMobile' => '',
|
172 |
-
'sectionContentLineHeightType' => 'em',
|
173 |
-
'sectionContentLineHeight' => '',
|
174 |
-
'sectionContentLineHeightTablet' => '',
|
175 |
-
'sectionContentLineHeightMobile' => '',
|
176 |
-
'sectionBackgroundColor' => '',
|
177 |
-
// Order Overview.
|
178 |
-
'orderOverviewTextColor' => '',
|
179 |
-
'orderOverviewBackgroundColor' => '',
|
180 |
-
'orderOverviewFontFamily' => '',
|
181 |
-
'orderOverviewFontWeight' => '',
|
182 |
-
'orderOverviewFontSize' => '',
|
183 |
-
'orderOverviewFontSizeType' => 'px',
|
184 |
-
'orderOverviewFontSizeTablet' => '',
|
185 |
-
'orderOverviewFontSizeMobile' => '',
|
186 |
-
'orderOverviewLineHeightType' => 'em',
|
187 |
-
'orderOverviewLineHeight' => '',
|
188 |
-
'orderOverviewLineHeightTablet' => '',
|
189 |
-
'orderOverviewLineHeightMobile' => '',
|
190 |
-
// Downloads.
|
191 |
-
'downloadHeadingColor' => '',
|
192 |
-
'downloadHeadingFontFamily' => '',
|
193 |
-
'downloadHeadingFontWeight' => '',
|
194 |
-
'downloadHeadingFontSize' => '',
|
195 |
-
'downloadHeadingFontSizeType' => 'px',
|
196 |
-
'downloadHeadingFontSizeTablet' => '',
|
197 |
-
'downloadHeadingFontSizeMobile' => '',
|
198 |
-
'downloadHeadingLineHeightType' => 'em',
|
199 |
-
'downloadHeadingLineHeight' => '',
|
200 |
-
'downloadHeadingLineHeightTablet' => '',
|
201 |
-
'downloadHeadingLineHeightMobile' => '',
|
202 |
-
'downloadContentColor' => '',
|
203 |
-
'downloadContentFontFamily' => '',
|
204 |
-
'downloadContentFontWeight' => '',
|
205 |
-
'downloadContentFontSize' => '',
|
206 |
-
'downloadContentFontSizeType' => 'px',
|
207 |
-
'downloadContentFontSizeTablet' => '',
|
208 |
-
'downloadContentFontSizeMobile' => '',
|
209 |
-
'downloadContentLineHeightType' => 'em',
|
210 |
-
'downloadContentLineHeight' => '',
|
211 |
-
'downloadContentLineHeightTablet' => '',
|
212 |
-
'downloadContentLineHeightMobile' => '',
|
213 |
-
'downloadBackgroundColor' => '',
|
214 |
-
// Order Details.
|
215 |
-
'orderDetailHeadingColor' => '',
|
216 |
-
'orderDetailHeadingFontFamily' => '',
|
217 |
-
'orderDetailHeadingFontWeight' => '',
|
218 |
-
'orderDetailHeadingFontSize' => '',
|
219 |
-
'orderDetailHeadingFontSizeType' => 'px',
|
220 |
-
'orderDetailHeadingFontSizeTablet' => '',
|
221 |
-
'orderDetailHeadingFontSizeMobile' => '',
|
222 |
-
'orderDetailHeadingLineHeightType' => 'em',
|
223 |
-
'orderDetailHeadingLineHeight' => '',
|
224 |
-
'orderDetailHeadingLineHeightTablet' => '',
|
225 |
-
'orderDetailHeadingLineHeightMobile' => '',
|
226 |
-
'orderDetailContentColor' => '',
|
227 |
-
'orderDetailContentFontFamily' => '',
|
228 |
-
'orderDetailContentFontWeight' => '',
|
229 |
-
'orderDetailContentFontSize' => '',
|
230 |
-
'orderDetailContentFontSizeType' => 'px',
|
231 |
-
'orderDetailContentFontSizeTablet' => '',
|
232 |
-
'orderDetailContentFontSizeMobile' => '',
|
233 |
-
'orderDetailContentLineHeightType' => 'em',
|
234 |
-
'orderDetailContentLineHeight' => '',
|
235 |
-
'orderDetailContentLineHeightTablet' => '',
|
236 |
-
'orderDetailContentLineHeightMobile' => '',
|
237 |
-
'orderDetailBackgroundColor' => '',
|
238 |
-
// Customer Details.
|
239 |
-
'customerDetailHeadingColor' => '',
|
240 |
-
'customerDetailHeadingFontFamily' => '',
|
241 |
-
'customerDetailHeadingFontWeight' => '',
|
242 |
-
'customerDetailHeadingFontSize' => '',
|
243 |
-
'customerDetailHeadingFontSizeType' => 'px',
|
244 |
-
'customerDetailHeadingFontSizeTablet' => '',
|
245 |
-
'customerDetailHeadingFontSizeMobile' => '',
|
246 |
-
'customerDetailHeadingLineHeightType' => 'em',
|
247 |
-
'customerDetailHeadingLineHeight' => '',
|
248 |
-
'customerDetailHeadingLineHeightTablet' => '',
|
249 |
-
'customerDetailHeadingLineHeightMobile' => '',
|
250 |
-
'customerDetailContentColor' => '',
|
251 |
-
'customerDetailContentFontFamily' => '',
|
252 |
-
'customerDetailContentFontWeight' => '',
|
253 |
-
'customerDetailContentFontSize' => '',
|
254 |
-
'customerDetailContentFontSizeType' => 'px',
|
255 |
-
'customerDetailContentFontSizeTablet' => '',
|
256 |
-
'customerDetailContentFontSizeMobile' => '',
|
257 |
-
'customerDetailContentLineHeightType' => 'em',
|
258 |
-
'customerDetailContentLineHeight' => '',
|
259 |
-
'customerDetailContentLineHeightTablet' => '',
|
260 |
-
'customerDetailContentLineHeightMobile' => '',
|
261 |
-
'customerDetailBackgroundColor' => '',
|
262 |
-
'backgroundType' => 'none',
|
263 |
-
'backgroundImage' => '',
|
264 |
-
'backgroundPosition' => 'center-center',
|
265 |
-
'backgroundSize' => 'cover',
|
266 |
-
'backgroundRepeat' => 'no-repeat',
|
267 |
-
'backgroundAttachment' => 'scroll',
|
268 |
-
'backgroundColor' => '',
|
269 |
-
'backgroundOpacity' => 100,
|
270 |
-
'backgroundImageColor' => '#abb8c3',
|
271 |
-
'odbackgroundType' => 'none',
|
272 |
-
'odbackgroundImage' => '',
|
273 |
-
'odbackgroundPosition' => 'center-center',
|
274 |
-
'odbackgroundSize' => 'cover',
|
275 |
-
'odbackgroundRepeat' => 'no-repeat',
|
276 |
-
'odbackgroundAttachment' => 'scroll',
|
277 |
-
'odbackgroundColor' => '',
|
278 |
-
'odbackgroundOpacity' => 100,
|
279 |
-
'odbackgroundImageColor' => '#abb8c3',
|
280 |
-
'dbackgroundType' => 'none',
|
281 |
-
'dbackgroundImage' => '',
|
282 |
-
'dbackgroundPosition' => 'center-center',
|
283 |
-
'dbackgroundSize' => 'cover',
|
284 |
-
'dbackgroundRepeat' => 'no-repeat',
|
285 |
-
'dbackgroundAttachment' => 'scroll',
|
286 |
-
'dbackgroundColor' => '',
|
287 |
-
'dbackgroundOpacity' => 100,
|
288 |
-
'dbackgroundImageColor' => '#abb8c3',
|
289 |
-
'odetailbackgroundType' => 'none',
|
290 |
-
'odetailbackgroundImage' => '',
|
291 |
-
'odetailbackgroundPosition' => 'center-center',
|
292 |
-
'odetailbackgroundSize' => 'cover',
|
293 |
-
'odetailbackgroundRepeat' => 'no-repeat',
|
294 |
-
'odetailbackgroundAttachment' => 'scroll',
|
295 |
-
'odetailbackgroundColor' => '',
|
296 |
-
'odetailbackgroundOpacity' => 100,
|
297 |
-
'odetailbackgroundImageColor' => '#abb8c3',
|
298 |
-
'cdetailbackgroundType' => 'none',
|
299 |
-
'cdetailbackgroundImage' => '',
|
300 |
-
'cdetailbackgroundPosition' => 'center-center',
|
301 |
-
'cdetailbackgroundSize' => 'cover',
|
302 |
-
'cdetailbackgroundRepeat' => 'no-repeat',
|
303 |
-
'cdetailbackgroundAttachment' => 'scroll',
|
304 |
-
'cdetailbackgroundColor' => '',
|
305 |
-
'cdetailsbackgroundOpacity' => 100,
|
306 |
-
'cdetailsbackgroundImageColor' => '#abb8c3',
|
307 |
-
),
|
308 |
-
),
|
309 |
-
'wcfb/checkout-form' => array(
|
310 |
-
'slug' => '',
|
311 |
-
'title' => __( 'Checkout Form', 'cartflows' ),
|
312 |
-
'description' => '',
|
313 |
-
'default' => true,
|
314 |
-
'is_active' => class_exists( 'Cartflows_Checkout_Markup' ),
|
315 |
-
'attributes' => array(
|
316 |
-
'block_id' => '',
|
317 |
-
'boxShadowColor' => '',
|
318 |
-
'boxShadowHOffset' => 0,
|
319 |
-
'boxShadowVOffset' => 0,
|
320 |
-
'boxShadowBlur' => 0,
|
321 |
-
'boxShadowSpread' => 0,
|
322 |
-
'boxShadowPosition' => 'outset',
|
323 |
-
'headBgColor' => '',
|
324 |
-
'fieldHrPadding' => '',
|
325 |
-
'fieldVrPadding' => '',
|
326 |
-
'fieldBgColor' => '',
|
327 |
-
'fieldLabelColor' => '',
|
328 |
-
'fieldInputColor' => '',
|
329 |
-
'fieldBorderStyle' => 'solid',
|
330 |
-
'fieldBorderWidth' => 1,
|
331 |
-
'fieldBorderRadius' => 0,
|
332 |
-
'fieldBorderColor' => '#eeeeee',
|
333 |
-
'fieldBorderFocusColor' => '',
|
334 |
-
'buttonAlignment' => 'left',
|
335 |
-
'buttonVrPadding' => '',
|
336 |
-
'buttonHrPadding' => '',
|
337 |
-
'buttonTextColor' => '',
|
338 |
-
'buttonBgColor' => '',
|
339 |
-
'buttonTextHoverColor' => '',
|
340 |
-
'buttonBgHoverColor' => '',
|
341 |
-
'buttonBorderStyle' => 'inherit',
|
342 |
-
'buttonBorderWidth' => '',
|
343 |
-
'buttonBorderRadius' => '',
|
344 |
-
'buttonBorderColor' => '',
|
345 |
-
'buttonBorderHoverColor' => '',
|
346 |
-
'fieldSpacing' => '',
|
347 |
-
'fieldLabelSpacing' => '',
|
348 |
-
'inputFontSize' => '',
|
349 |
-
'inputFontSizeType' => 'px',
|
350 |
-
'inputFontSizeTablet' => '',
|
351 |
-
'inputFontSizeMobile' => '',
|
352 |
-
'inputFontFamily' => 'Default',
|
353 |
-
'inputFontWeight' => '',
|
354 |
-
'inputFontSubset' => '',
|
355 |
-
'inputLineHeightType' => 'px',
|
356 |
-
'inputLineHeight' => '',
|
357 |
-
'inputLineHeightTablet' => '',
|
358 |
-
'inputLineHeightMobile' => '',
|
359 |
-
'inputLoadGoogleFonts' => false,
|
360 |
-
'submitButtonText' => '',
|
361 |
-
'buttonFontSize' => '',
|
362 |
-
'buttonFontSizeType' => 'px',
|
363 |
-
'buttonFontSizeTablet' => '',
|
364 |
-
'buttonFontSizeMobile' => '',
|
365 |
-
'buttonFontFamily' => 'Default',
|
366 |
-
'buttonFontWeight' => '',
|
367 |
-
'buttonFontSubset' => '',
|
368 |
-
'buttonLineHeightType' => 'px',
|
369 |
-
'buttonLineHeight' => '',
|
370 |
-
'buttonLineHeightTablet' => '',
|
371 |
-
'buttonLineHeightMobile' => '',
|
372 |
-
'buttonLoadGoogleFonts' => false,
|
373 |
-
'errorMsgColor' => '',
|
374 |
-
'errorMsgBgColor' => '',
|
375 |
-
'errorMsgBorderColor' => '',
|
376 |
-
'msgBorderSize' => '',
|
377 |
-
'msgBorderRadius' => '',
|
378 |
-
'msgVrPadding' => 10,
|
379 |
-
'msgHrPadding' => 10,
|
380 |
-
'msgBorderRadiusType' => 'px',
|
381 |
-
'fieldBorderRadiusType' => 'px',
|
382 |
-
'buttonBorderRadiusType' => 'px',
|
383 |
-
'paymentdescriptionColor' => '',
|
384 |
-
'paymenttitleColor' => '',
|
385 |
-
'sectionbgColor' => '',
|
386 |
-
'informationbgColor' => '',
|
387 |
-
'sectionhrPadding' => '',
|
388 |
-
'sectionvrPadding' => '',
|
389 |
-
'sectionhrMargin' => '',
|
390 |
-
'sectionvrMargin' => '',
|
391 |
-
'sectionBorderRadius' => '',
|
392 |
-
'headFontSize' => '',
|
393 |
-
'headFontSizeType' => 'px',
|
394 |
-
'headFontSizeTablet' => '',
|
395 |
-
'headFontSizeMobile' => '',
|
396 |
-
'headFontFamily' => 'Default',
|
397 |
-
'headFontWeight' => '',
|
398 |
-
'headFontSubset' => '',
|
399 |
-
'headLineHeightType' => 'px',
|
400 |
-
'headLineHeight' => '',
|
401 |
-
'headLineHeightTablet' => '',
|
402 |
-
'headLineHeightMobile' => '',
|
403 |
-
'headLoadGoogleFonts' => '',
|
404 |
-
'globaltextColor' => '',
|
405 |
-
'globalbgColor' => '',
|
406 |
-
'globalFontSize' => '',
|
407 |
-
'globalFontSizeType' => 'px',
|
408 |
-
'globalFontSizeTablet' => '',
|
409 |
-
'globalFontSizeMobile' => '',
|
410 |
-
'globalFontFamily' => 'Default',
|
411 |
-
'globalFontWeight' => '',
|
412 |
-
'globalFontSubset' => '',
|
413 |
-
'globalLineHeightType' => 'px',
|
414 |
-
'globalLineHeight' => '',
|
415 |
-
'globalLineHeightTablet' => '',
|
416 |
-
'globalLineHeightMobile' => '',
|
417 |
-
'globalLoadGoogleFonts' => false,
|
418 |
-
'backgroundType' => 'color',
|
419 |
-
'backgroundImage' => '',
|
420 |
-
'backgroundPosition' => 'center-center',
|
421 |
-
'backgroundSize' => 'cover',
|
422 |
-
'backgroundRepeat' => 'no-repeat',
|
423 |
-
'backgroundAttachment' => 'scroll',
|
424 |
-
'backgroundColor' => '',
|
425 |
-
'backgroundHoverColor' => '',
|
426 |
-
'gradientColor1' => '#abb8c3',
|
427 |
-
'gradientColor2' => '#abb8c3',
|
428 |
-
'gradientType' => 'linear',
|
429 |
-
'gradientLocation1' => '0',
|
430 |
-
'gradientLocation2' => '100',
|
431 |
-
'gradientAngle' => '0',
|
432 |
-
'gradientPosition' => 'center center',
|
433 |
-
'backgroundOpacity' => 100,
|
434 |
-
'backgroundImageColor' => '#abb8c3',
|
435 |
-
'gradientValue' => '',
|
436 |
-
'errorLabelColor' => '',
|
437 |
-
'errorFieldBorderColor' => '',
|
438 |
-
),
|
439 |
-
),
|
440 |
-
'wcfb/optin-form' => array(
|
441 |
-
'slug' => '',
|
442 |
-
'title' => __( 'Optin Form', 'cartflows' ),
|
443 |
-
'description' => '',
|
444 |
-
'default' => true,
|
445 |
-
'attributes' => array(
|
446 |
-
'block_id' => '',
|
447 |
-
'classMigrate' => false,
|
448 |
-
// General.
|
449 |
-
'generalPrimaryColor' => '',
|
450 |
-
'generalFontFamily' => '',
|
451 |
-
'generalFontWeight' => '',
|
452 |
-
'generalFontSize' => '',
|
453 |
-
'generalFontSizeType' => 'px',
|
454 |
-
'generalFontSizeTablet' => '',
|
455 |
-
'generalFontSizeMobile' => '',
|
456 |
-
'generalLineHeightType' => 'em',
|
457 |
-
'generalLineHeight' => '',
|
458 |
-
'generalLineHeightTablet' => '',
|
459 |
-
'generalLineHeightMobile' => '',
|
460 |
-
// Input Fields.
|
461 |
-
'inputFieldFontFamily' => '',
|
462 |
-
'inputFieldFontWeight' => '',
|
463 |
-
'inputFieldFontSize' => '',
|
464 |
-
'inputFieldFontSizeType' => 'px',
|
465 |
-
'inputFieldFontSizeTablet' => '',
|
466 |
-
'inputFieldFontSizeMobile' => '',
|
467 |
-
'inputFieldLineHeightType' => 'em',
|
468 |
-
'inputFieldLineHeight' => '',
|
469 |
-
'inputFieldLineHeightTablet' => '',
|
470 |
-
'inputFieldLineHeightMobile' => '',
|
471 |
-
'inputFieldLabelColor' => '',
|
472 |
-
'inputFieldBackgroundColor' => '',
|
473 |
-
'inputFieldTextPlaceholderColor' => '',
|
474 |
-
'inputFieldBorderStyle' => '',
|
475 |
-
'inputFieldBorderWidth' => '',
|
476 |
-
'inputFieldBorderRadius' => '',
|
477 |
-
'inputFieldBorderColor' => '',
|
478 |
-
// Submit Button.
|
479 |
-
'submitButtonFontFamily' => '',
|
480 |
-
'submitButtonFontWeight' => '',
|
481 |
-
'submitButtonFontSize' => '',
|
482 |
-
'submitButtonFontSizeType' => 'px',
|
483 |
-
'submitButtonFontSizeTablet' => '',
|
484 |
-
'submitButtonFontSizeMobile' => '',
|
485 |
-
'submitButtonLineHeightType' => 'em',
|
486 |
-
'submitButtonLineHeight' => '',
|
487 |
-
'submitButtonLineHeightTablet' => '',
|
488 |
-
'submitButtonLineHeightMobile' => '',
|
489 |
-
'submitButtonTextColor' => '',
|
490 |
-
'submitButtonBackgroundColor' => '',
|
491 |
-
'submitButtonTextHoverColor' => '',
|
492 |
-
'submitButtonBackgroundHoverColor' => '',
|
493 |
-
'submitButtonBorderStyle' => '',
|
494 |
-
'submitButtonBorderWidth' => '',
|
495 |
-
'submitButtonBorderRadius' => '',
|
496 |
-
'submitButtonBorderColor' => '',
|
497 |
-
'submitButtonBorderHoverColor' => '',
|
498 |
-
'boxShadowColor' => '',
|
499 |
-
'boxShadowHOffset' => 0,
|
500 |
-
'boxShadowVOffset' => 0,
|
501 |
-
'boxShadowBlur' => 0,
|
502 |
-
'boxShadowSpread' => 0,
|
503 |
-
'boxShadowPosition' => 'outset',
|
504 |
-
|
505 |
-
),
|
506 |
-
),
|
507 |
-
|
508 |
-
);
|
509 |
-
}
|
510 |
-
return self::$block_attributes;
|
511 |
-
}
|
512 |
-
|
513 |
-
/**
|
514 |
-
* Get Block Assets.
|
515 |
-
*
|
516 |
-
* @since x.x.x
|
517 |
-
*
|
518 |
-
* @return array The Asset List.
|
519 |
-
*/
|
520 |
-
public static function get_block_assets() {
|
521 |
-
|
522 |
-
if ( null === self::$block_assets ) {
|
523 |
-
self::$block_assets = array();
|
524 |
-
}
|
525 |
-
return self::$block_assets;
|
526 |
-
}
|
527 |
-
}
|
528 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Config.
|
4 |
+
*
|
5 |
+
* @package Cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'Cartflows_Block_Config' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Cartflows_Block_Config.
|
16 |
+
*/
|
17 |
+
class Cartflows_Block_Config {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Block Attributes
|
21 |
+
*
|
22 |
+
* @var block_attributes
|
23 |
+
*/
|
24 |
+
public static $block_attributes = null;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Block Assets
|
28 |
+
*
|
29 |
+
* @var block_attributes
|
30 |
+
*/
|
31 |
+
public static $block_assets = null;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get Widget List.
|
35 |
+
*
|
36 |
+
* @since x.x.x
|
37 |
+
*
|
38 |
+
* @return array The Widget List.
|
39 |
+
*/
|
40 |
+
public static function get_block_attributes() {
|
41 |
+
|
42 |
+
if ( null === self::$block_attributes ) {
|
43 |
+
self::$block_attributes = array(
|
44 |
+
'wcfb/next-step-button' => array(
|
45 |
+
'slug' => '',
|
46 |
+
'title' => __( 'Next Step Button', 'cartflows' ),
|
47 |
+
'description' => '',
|
48 |
+
'default' => true,
|
49 |
+
'attributes' => array(
|
50 |
+
'classMigrate' => false,
|
51 |
+
'borderStyle' => 'solid',
|
52 |
+
'align' => 'center',
|
53 |
+
'malign' => 'center',
|
54 |
+
'talign' => 'center',
|
55 |
+
'titletextTransform' => 'none',
|
56 |
+
'subtitletextTransform' => 'none',
|
57 |
+
'letterSpacing' => '',
|
58 |
+
'borderWidth' => '1',
|
59 |
+
'borderColor' => '#abb8c3',
|
60 |
+
'borderHoverColor' => '#abb8c3',
|
61 |
+
'borderRadius' => '4',
|
62 |
+
'buttonColor' => '#abb8c3',
|
63 |
+
'buttonHoverColor' => '#abb8c3',
|
64 |
+
'paddingTypeDesktop' => 'px',
|
65 |
+
'paddingTypeTablet' => 'px',
|
66 |
+
'paddingTypeMobile' => 'px',
|
67 |
+
'vPaddingDesktop' => '5',
|
68 |
+
'hPaddingDesktop' => '30',
|
69 |
+
'vPaddingTablet' => '5',
|
70 |
+
'hPaddingTablet' => '30',
|
71 |
+
'vPaddingMobile' => '5',
|
72 |
+
'hPaddingMobile' => '30',
|
73 |
+
'textAlignment' => 'center',
|
74 |
+
'textColor' => '#ffffff',
|
75 |
+
'textHoverColor' => '#ffffff',
|
76 |
+
'titleFontFamily' => '',
|
77 |
+
'titleFontSize' => '20',
|
78 |
+
'titleFontWeight' => '500',
|
79 |
+
'titleFontSizeType' => 'px',
|
80 |
+
'titleFontSizeTablet' => '',
|
81 |
+
'titleFontSizeMobile' => '',
|
82 |
+
'titleLineHeightType' => 'em',
|
83 |
+
'titleLineHeight' => '',
|
84 |
+
'titleLineHeightTablet' => '',
|
85 |
+
'titleLineHeightMobile' => '',
|
86 |
+
'subTitleFontFamily' => '',
|
87 |
+
'subTitleFontWeight' => '500',
|
88 |
+
'subTitleFontSize' => '20',
|
89 |
+
'subTitleFontSizeType' => 'px',
|
90 |
+
'subTitleFontSizeTablet' => '',
|
91 |
+
'subTitleFontSizeMobile' => '',
|
92 |
+
'subTitleLineHeightType' => 'em',
|
93 |
+
'subTitleLineHeight' => '',
|
94 |
+
'subTitleLineHeightTablet' => '',
|
95 |
+
'subTitleLineHeightMobile' => '',
|
96 |
+
'titleletterSpacing' => '',
|
97 |
+
'subtitleletterSpacing' => '',
|
98 |
+
'titleBottomSpacing' => '0',
|
99 |
+
'iconSize' => '20',
|
100 |
+
'iconSpacing' => '10',
|
101 |
+
'iconColor' => '',
|
102 |
+
'iconHoverColor' => '',
|
103 |
+
'iconPosition' => 'before_title',
|
104 |
+
'backgroundType' => 'none',
|
105 |
+
'backgroundImage' => '',
|
106 |
+
'backgroundPosition' => 'center-center',
|
107 |
+
'backgroundSize' => 'cover',
|
108 |
+
'backgroundRepeat' => 'no-repeat',
|
109 |
+
'backgroundAttachment' => 'scroll',
|
110 |
+
'backgroundColor' => '#abb8c3',
|
111 |
+
'gradientColor1' => '#abb8c3',
|
112 |
+
'gradientColor2' => '#abb8c3',
|
113 |
+
'gradientType' => 'linear',
|
114 |
+
'gradientLocation1' => '0',
|
115 |
+
'gradientLocation2' => '100',
|
116 |
+
'gradientAngle' => '0',
|
117 |
+
'gradientPosition' => 'center center',
|
118 |
+
'backgroundOpacity' => 100,
|
119 |
+
'backgroundImageColor' => '#abb8c3',
|
120 |
+
'gradientValue' => '',
|
121 |
+
),
|
122 |
+
),
|
123 |
+
'wcfb/order-detail-form' => array(
|
124 |
+
'slug' => '',
|
125 |
+
'title' => __( 'Order Details Form', 'cartflows' ),
|
126 |
+
'description' => '',
|
127 |
+
'default' => true,
|
128 |
+
'attributes' => array(
|
129 |
+
'classMigrate' => false,
|
130 |
+
'align' => 'center',
|
131 |
+
// Genaral.
|
132 |
+
'orderOverview' => true,
|
133 |
+
'orderDetails' => true,
|
134 |
+
'billingAddress' => true,
|
135 |
+
'shippingAddress' => true,
|
136 |
+
// Spacing.
|
137 |
+
'headingBottomSpacing' => '',
|
138 |
+
'sectionSpacing' => '',
|
139 |
+
// Heading.
|
140 |
+
'thanyouText' => 'center',
|
141 |
+
'headingAlignment' => 'center',
|
142 |
+
'headingColor' => '',
|
143 |
+
'headingFontFamily' => '',
|
144 |
+
'headingFontWeight' => '',
|
145 |
+
'headingFontSize' => '',
|
146 |
+
'headingFontSizeType' => 'px',
|
147 |
+
'headingFontSizeTablet' => '',
|
148 |
+
'headingFontSizeMobile' => '',
|
149 |
+
'headingLineHeightType' => 'em',
|
150 |
+
'headingLineHeight' => '',
|
151 |
+
'headingLineHeightTablet' => '',
|
152 |
+
'headingLineHeightMobile' => '',
|
153 |
+
// Sections.
|
154 |
+
'sectionHeadingColor' => '',
|
155 |
+
'sectionHeadingFontFamily' => '',
|
156 |
+
'sectionHeadingFontWeight' => '',
|
157 |
+
'sectionHeadingFontSize' => '',
|
158 |
+
'sectionHeadingFontSizeType' => 'px',
|
159 |
+
'sectionHeadingFontSizeTablet' => '',
|
160 |
+
'sectionHeadingFontSizeMobile' => '',
|
161 |
+
'sectionHeadingLineHeightType' => '',
|
162 |
+
'sectionHeadingLineHeight' => 'em',
|
163 |
+
'sectionHeadingLineHeightTablet' => '',
|
164 |
+
'sectionHeadingLineHeightMobile' => '',
|
165 |
+
'sectionContentColor' => '',
|
166 |
+
'sectionContentFontFamily' => '',
|
167 |
+
'sectionContentFontWeight' => '',
|
168 |
+
'sectionContentFontSize' => '',
|
169 |
+
'sectionContentFontSizeType' => 'px',
|
170 |
+
'sectionContentFontSizeTablet' => '',
|
171 |
+
'sectionContentFontSizeMobile' => '',
|
172 |
+
'sectionContentLineHeightType' => 'em',
|
173 |
+
'sectionContentLineHeight' => '',
|
174 |
+
'sectionContentLineHeightTablet' => '',
|
175 |
+
'sectionContentLineHeightMobile' => '',
|
176 |
+
'sectionBackgroundColor' => '',
|
177 |
+
// Order Overview.
|
178 |
+
'orderOverviewTextColor' => '',
|
179 |
+
'orderOverviewBackgroundColor' => '',
|
180 |
+
'orderOverviewFontFamily' => '',
|
181 |
+
'orderOverviewFontWeight' => '',
|
182 |
+
'orderOverviewFontSize' => '',
|
183 |
+
'orderOverviewFontSizeType' => 'px',
|
184 |
+
'orderOverviewFontSizeTablet' => '',
|
185 |
+
'orderOverviewFontSizeMobile' => '',
|
186 |
+
'orderOverviewLineHeightType' => 'em',
|
187 |
+
'orderOverviewLineHeight' => '',
|
188 |
+
'orderOverviewLineHeightTablet' => '',
|
189 |
+
'orderOverviewLineHeightMobile' => '',
|
190 |
+
// Downloads.
|
191 |
+
'downloadHeadingColor' => '',
|
192 |
+
'downloadHeadingFontFamily' => '',
|
193 |
+
'downloadHeadingFontWeight' => '',
|
194 |
+
'downloadHeadingFontSize' => '',
|
195 |
+
'downloadHeadingFontSizeType' => 'px',
|
196 |
+
'downloadHeadingFontSizeTablet' => '',
|
197 |
+
'downloadHeadingFontSizeMobile' => '',
|
198 |
+
'downloadHeadingLineHeightType' => 'em',
|
199 |
+
'downloadHeadingLineHeight' => '',
|
200 |
+
'downloadHeadingLineHeightTablet' => '',
|
201 |
+
'downloadHeadingLineHeightMobile' => '',
|
202 |
+
'downloadContentColor' => '',
|
203 |
+
'downloadContentFontFamily' => '',
|
204 |
+
'downloadContentFontWeight' => '',
|
205 |
+
'downloadContentFontSize' => '',
|
206 |
+
'downloadContentFontSizeType' => 'px',
|
207 |
+
'downloadContentFontSizeTablet' => '',
|
208 |
+
'downloadContentFontSizeMobile' => '',
|
209 |
+
'downloadContentLineHeightType' => 'em',
|
210 |
+
'downloadContentLineHeight' => '',
|
211 |
+
'downloadContentLineHeightTablet' => '',
|
212 |
+
'downloadContentLineHeightMobile' => '',
|
213 |
+
'downloadBackgroundColor' => '',
|
214 |
+
// Order Details.
|
215 |
+
'orderDetailHeadingColor' => '',
|
216 |
+
'orderDetailHeadingFontFamily' => '',
|
217 |
+
'orderDetailHeadingFontWeight' => '',
|
218 |
+
'orderDetailHeadingFontSize' => '',
|
219 |
+
'orderDetailHeadingFontSizeType' => 'px',
|
220 |
+
'orderDetailHeadingFontSizeTablet' => '',
|
221 |
+
'orderDetailHeadingFontSizeMobile' => '',
|
222 |
+
'orderDetailHeadingLineHeightType' => 'em',
|
223 |
+
'orderDetailHeadingLineHeight' => '',
|
224 |
+
'orderDetailHeadingLineHeightTablet' => '',
|
225 |
+
'orderDetailHeadingLineHeightMobile' => '',
|
226 |
+
'orderDetailContentColor' => '',
|
227 |
+
'orderDetailContentFontFamily' => '',
|
228 |
+
'orderDetailContentFontWeight' => '',
|
229 |
+
'orderDetailContentFontSize' => '',
|
230 |
+
'orderDetailContentFontSizeType' => 'px',
|
231 |
+
'orderDetailContentFontSizeTablet' => '',
|
232 |
+
'orderDetailContentFontSizeMobile' => '',
|
233 |
+
'orderDetailContentLineHeightType' => 'em',
|
234 |
+
'orderDetailContentLineHeight' => '',
|
235 |
+
'orderDetailContentLineHeightTablet' => '',
|
236 |
+
'orderDetailContentLineHeightMobile' => '',
|
237 |
+
'orderDetailBackgroundColor' => '',
|
238 |
+
// Customer Details.
|
239 |
+
'customerDetailHeadingColor' => '',
|
240 |
+
'customerDetailHeadingFontFamily' => '',
|
241 |
+
'customerDetailHeadingFontWeight' => '',
|
242 |
+
'customerDetailHeadingFontSize' => '',
|
243 |
+
'customerDetailHeadingFontSizeType' => 'px',
|
244 |
+
'customerDetailHeadingFontSizeTablet' => '',
|
245 |
+
'customerDetailHeadingFontSizeMobile' => '',
|
246 |
+
'customerDetailHeadingLineHeightType' => 'em',
|
247 |
+
'customerDetailHeadingLineHeight' => '',
|
248 |
+
'customerDetailHeadingLineHeightTablet' => '',
|
249 |
+
'customerDetailHeadingLineHeightMobile' => '',
|
250 |
+
'customerDetailContentColor' => '',
|
251 |
+
'customerDetailContentFontFamily' => '',
|
252 |
+
'customerDetailContentFontWeight' => '',
|
253 |
+
'customerDetailContentFontSize' => '',
|
254 |
+
'customerDetailContentFontSizeType' => 'px',
|
255 |
+
'customerDetailContentFontSizeTablet' => '',
|
256 |
+
'customerDetailContentFontSizeMobile' => '',
|
257 |
+
'customerDetailContentLineHeightType' => 'em',
|
258 |
+
'customerDetailContentLineHeight' => '',
|
259 |
+
'customerDetailContentLineHeightTablet' => '',
|
260 |
+
'customerDetailContentLineHeightMobile' => '',
|
261 |
+
'customerDetailBackgroundColor' => '',
|
262 |
+
'backgroundType' => 'none',
|
263 |
+
'backgroundImage' => '',
|
264 |
+
'backgroundPosition' => 'center-center',
|
265 |
+
'backgroundSize' => 'cover',
|
266 |
+
'backgroundRepeat' => 'no-repeat',
|
267 |
+
'backgroundAttachment' => 'scroll',
|
268 |
+
'backgroundColor' => '',
|
269 |
+
'backgroundOpacity' => 100,
|
270 |
+
'backgroundImageColor' => '#abb8c3',
|
271 |
+
'odbackgroundType' => 'none',
|
272 |
+
'odbackgroundImage' => '',
|
273 |
+
'odbackgroundPosition' => 'center-center',
|
274 |
+
'odbackgroundSize' => 'cover',
|
275 |
+
'odbackgroundRepeat' => 'no-repeat',
|
276 |
+
'odbackgroundAttachment' => 'scroll',
|
277 |
+
'odbackgroundColor' => '',
|
278 |
+
'odbackgroundOpacity' => 100,
|
279 |
+
'odbackgroundImageColor' => '#abb8c3',
|
280 |
+
'dbackgroundType' => 'none',
|
281 |
+
'dbackgroundImage' => '',
|
282 |
+
'dbackgroundPosition' => 'center-center',
|
283 |
+
'dbackgroundSize' => 'cover',
|
284 |
+
'dbackgroundRepeat' => 'no-repeat',
|
285 |
+
'dbackgroundAttachment' => 'scroll',
|
286 |
+
'dbackgroundColor' => '',
|
287 |
+
'dbackgroundOpacity' => 100,
|
288 |
+
'dbackgroundImageColor' => '#abb8c3',
|
289 |
+
'odetailbackgroundType' => 'none',
|
290 |
+
'odetailbackgroundImage' => '',
|
291 |
+
'odetailbackgroundPosition' => 'center-center',
|
292 |
+
'odetailbackgroundSize' => 'cover',
|
293 |
+
'odetailbackgroundRepeat' => 'no-repeat',
|
294 |
+
'odetailbackgroundAttachment' => 'scroll',
|
295 |
+
'odetailbackgroundColor' => '',
|
296 |
+
'odetailbackgroundOpacity' => 100,
|
297 |
+
'odetailbackgroundImageColor' => '#abb8c3',
|
298 |
+
'cdetailbackgroundType' => 'none',
|
299 |
+
'cdetailbackgroundImage' => '',
|
300 |
+
'cdetailbackgroundPosition' => 'center-center',
|
301 |
+
'cdetailbackgroundSize' => 'cover',
|
302 |
+
'cdetailbackgroundRepeat' => 'no-repeat',
|
303 |
+
'cdetailbackgroundAttachment' => 'scroll',
|
304 |
+
'cdetailbackgroundColor' => '',
|
305 |
+
'cdetailsbackgroundOpacity' => 100,
|
306 |
+
'cdetailsbackgroundImageColor' => '#abb8c3',
|
307 |
+
),
|
308 |
+
),
|
309 |
+
'wcfb/checkout-form' => array(
|
310 |
+
'slug' => '',
|
311 |
+
'title' => __( 'Checkout Form', 'cartflows' ),
|
312 |
+
'description' => '',
|
313 |
+
'default' => true,
|
314 |
+
'is_active' => class_exists( 'Cartflows_Checkout_Markup' ),
|
315 |
+
'attributes' => array(
|
316 |
+
'block_id' => '',
|
317 |
+
'boxShadowColor' => '',
|
318 |
+
'boxShadowHOffset' => 0,
|
319 |
+
'boxShadowVOffset' => 0,
|
320 |
+
'boxShadowBlur' => 0,
|
321 |
+
'boxShadowSpread' => 0,
|
322 |
+
'boxShadowPosition' => 'outset',
|
323 |
+
'headBgColor' => '',
|
324 |
+
'fieldHrPadding' => '',
|
325 |
+
'fieldVrPadding' => '',
|
326 |
+
'fieldBgColor' => '',
|
327 |
+
'fieldLabelColor' => '',
|
328 |
+
'fieldInputColor' => '',
|
329 |
+
'fieldBorderStyle' => 'solid',
|
330 |
+
'fieldBorderWidth' => 1,
|
331 |
+
'fieldBorderRadius' => 0,
|
332 |
+
'fieldBorderColor' => '#eeeeee',
|
333 |
+
'fieldBorderFocusColor' => '',
|
334 |
+
'buttonAlignment' => 'left',
|
335 |
+
'buttonVrPadding' => '',
|
336 |
+
'buttonHrPadding' => '',
|
337 |
+
'buttonTextColor' => '',
|
338 |
+
'buttonBgColor' => '',
|
339 |
+
'buttonTextHoverColor' => '',
|
340 |
+
'buttonBgHoverColor' => '',
|
341 |
+
'buttonBorderStyle' => 'inherit',
|
342 |
+
'buttonBorderWidth' => '',
|
343 |
+
'buttonBorderRadius' => '',
|
344 |
+
'buttonBorderColor' => '',
|
345 |
+
'buttonBorderHoverColor' => '',
|
346 |
+
'fieldSpacing' => '',
|
347 |
+
'fieldLabelSpacing' => '',
|
348 |
+
'inputFontSize' => '',
|
349 |
+
'inputFontSizeType' => 'px',
|
350 |
+
'inputFontSizeTablet' => '',
|
351 |
+
'inputFontSizeMobile' => '',
|
352 |
+
'inputFontFamily' => 'Default',
|
353 |
+
'inputFontWeight' => '',
|
354 |
+
'inputFontSubset' => '',
|
355 |
+
'inputLineHeightType' => 'px',
|
356 |
+
'inputLineHeight' => '',
|
357 |
+
'inputLineHeightTablet' => '',
|
358 |
+
'inputLineHeightMobile' => '',
|
359 |
+
'inputLoadGoogleFonts' => false,
|
360 |
+
'submitButtonText' => '',
|
361 |
+
'buttonFontSize' => '',
|
362 |
+
'buttonFontSizeType' => 'px',
|
363 |
+
'buttonFontSizeTablet' => '',
|
364 |
+
'buttonFontSizeMobile' => '',
|
365 |
+
'buttonFontFamily' => 'Default',
|
366 |
+
'buttonFontWeight' => '',
|
367 |
+
'buttonFontSubset' => '',
|
368 |
+
'buttonLineHeightType' => 'px',
|
369 |
+
'buttonLineHeight' => '',
|
370 |
+
'buttonLineHeightTablet' => '',
|
371 |
+
'buttonLineHeightMobile' => '',
|
372 |
+
'buttonLoadGoogleFonts' => false,
|
373 |
+
'errorMsgColor' => '',
|
374 |
+
'errorMsgBgColor' => '',
|
375 |
+
'errorMsgBorderColor' => '',
|
376 |
+
'msgBorderSize' => '',
|
377 |
+
'msgBorderRadius' => '',
|
378 |
+
'msgVrPadding' => 10,
|
379 |
+
'msgHrPadding' => 10,
|
380 |
+
'msgBorderRadiusType' => 'px',
|
381 |
+
'fieldBorderRadiusType' => 'px',
|
382 |
+
'buttonBorderRadiusType' => 'px',
|
383 |
+
'paymentdescriptionColor' => '',
|
384 |
+
'paymenttitleColor' => '',
|
385 |
+
'sectionbgColor' => '',
|
386 |
+
'informationbgColor' => '',
|
387 |
+
'sectionhrPadding' => '',
|
388 |
+
'sectionvrPadding' => '',
|
389 |
+
'sectionhrMargin' => '',
|
390 |
+
'sectionvrMargin' => '',
|
391 |
+
'sectionBorderRadius' => '',
|
392 |
+
'headFontSize' => '',
|
393 |
+
'headFontSizeType' => 'px',
|
394 |
+
'headFontSizeTablet' => '',
|
395 |
+
'headFontSizeMobile' => '',
|
396 |
+
'headFontFamily' => 'Default',
|
397 |
+
'headFontWeight' => '',
|
398 |
+
'headFontSubset' => '',
|
399 |
+
'headLineHeightType' => 'px',
|
400 |
+
'headLineHeight' => '',
|
401 |
+
'headLineHeightTablet' => '',
|
402 |
+
'headLineHeightMobile' => '',
|
403 |
+
'headLoadGoogleFonts' => '',
|
404 |
+
'globaltextColor' => '',
|
405 |
+
'globalbgColor' => '',
|
406 |
+
'globalFontSize' => '',
|
407 |
+
'globalFontSizeType' => 'px',
|
408 |
+
'globalFontSizeTablet' => '',
|
409 |
+
'globalFontSizeMobile' => '',
|
410 |
+
'globalFontFamily' => 'Default',
|
411 |
+
'globalFontWeight' => '',
|
412 |
+
'globalFontSubset' => '',
|
413 |
+
'globalLineHeightType' => 'px',
|
414 |
+
'globalLineHeight' => '',
|
415 |
+
'globalLineHeightTablet' => '',
|
416 |
+
'globalLineHeightMobile' => '',
|
417 |
+
'globalLoadGoogleFonts' => false,
|
418 |
+
'backgroundType' => 'color',
|
419 |
+
'backgroundImage' => '',
|
420 |
+
'backgroundPosition' => 'center-center',
|
421 |
+
'backgroundSize' => 'cover',
|
422 |
+
'backgroundRepeat' => 'no-repeat',
|
423 |
+
'backgroundAttachment' => 'scroll',
|
424 |
+
'backgroundColor' => '',
|
425 |
+
'backgroundHoverColor' => '',
|
426 |
+
'gradientColor1' => '#abb8c3',
|
427 |
+
'gradientColor2' => '#abb8c3',
|
428 |
+
'gradientType' => 'linear',
|
429 |
+
'gradientLocation1' => '0',
|
430 |
+
'gradientLocation2' => '100',
|
431 |
+
'gradientAngle' => '0',
|
432 |
+
'gradientPosition' => 'center center',
|
433 |
+
'backgroundOpacity' => 100,
|
434 |
+
'backgroundImageColor' => '#abb8c3',
|
435 |
+
'gradientValue' => '',
|
436 |
+
'errorLabelColor' => '',
|
437 |
+
'errorFieldBorderColor' => '',
|
438 |
+
),
|
439 |
+
),
|
440 |
+
'wcfb/optin-form' => array(
|
441 |
+
'slug' => '',
|
442 |
+
'title' => __( 'Optin Form', 'cartflows' ),
|
443 |
+
'description' => '',
|
444 |
+
'default' => true,
|
445 |
+
'attributes' => array(
|
446 |
+
'block_id' => '',
|
447 |
+
'classMigrate' => false,
|
448 |
+
// General.
|
449 |
+
'generalPrimaryColor' => '',
|
450 |
+
'generalFontFamily' => '',
|
451 |
+
'generalFontWeight' => '',
|
452 |
+
'generalFontSize' => '',
|
453 |
+
'generalFontSizeType' => 'px',
|
454 |
+
'generalFontSizeTablet' => '',
|
455 |
+
'generalFontSizeMobile' => '',
|
456 |
+
'generalLineHeightType' => 'em',
|
457 |
+
'generalLineHeight' => '',
|
458 |
+
'generalLineHeightTablet' => '',
|
459 |
+
'generalLineHeightMobile' => '',
|
460 |
+
// Input Fields.
|
461 |
+
'inputFieldFontFamily' => '',
|
462 |
+
'inputFieldFontWeight' => '',
|
463 |
+
'inputFieldFontSize' => '',
|
464 |
+
'inputFieldFontSizeType' => 'px',
|
465 |
+
'inputFieldFontSizeTablet' => '',
|
466 |
+
'inputFieldFontSizeMobile' => '',
|
467 |
+
'inputFieldLineHeightType' => 'em',
|
468 |
+
'inputFieldLineHeight' => '',
|
469 |
+
'inputFieldLineHeightTablet' => '',
|
470 |
+
'inputFieldLineHeightMobile' => '',
|
471 |
+
'inputFieldLabelColor' => '',
|
472 |
+
'inputFieldBackgroundColor' => '',
|
473 |
+
'inputFieldTextPlaceholderColor' => '',
|
474 |
+
'inputFieldBorderStyle' => '',
|
475 |
+
'inputFieldBorderWidth' => '',
|
476 |
+
'inputFieldBorderRadius' => '',
|
477 |
+
'inputFieldBorderColor' => '',
|
478 |
+
// Submit Button.
|
479 |
+
'submitButtonFontFamily' => '',
|
480 |
+
'submitButtonFontWeight' => '',
|
481 |
+
'submitButtonFontSize' => '',
|
482 |
+
'submitButtonFontSizeType' => 'px',
|
483 |
+
'submitButtonFontSizeTablet' => '',
|
484 |
+
'submitButtonFontSizeMobile' => '',
|
485 |
+
'submitButtonLineHeightType' => 'em',
|
486 |
+
'submitButtonLineHeight' => '',
|
487 |
+
'submitButtonLineHeightTablet' => '',
|
488 |
+
'submitButtonLineHeightMobile' => '',
|
489 |
+
'submitButtonTextColor' => '',
|
490 |
+
'submitButtonBackgroundColor' => '',
|
491 |
+
'submitButtonTextHoverColor' => '',
|
492 |
+
'submitButtonBackgroundHoverColor' => '',
|
493 |
+
'submitButtonBorderStyle' => '',
|
494 |
+
'submitButtonBorderWidth' => '',
|
495 |
+
'submitButtonBorderRadius' => '',
|
496 |
+
'submitButtonBorderColor' => '',
|
497 |
+
'submitButtonBorderHoverColor' => '',
|
498 |
+
'boxShadowColor' => '',
|
499 |
+
'boxShadowHOffset' => 0,
|
500 |
+
'boxShadowVOffset' => 0,
|
501 |
+
'boxShadowBlur' => 0,
|
502 |
+
'boxShadowSpread' => 0,
|
503 |
+
'boxShadowPosition' => 'outset',
|
504 |
+
|
505 |
+
),
|
506 |
+
),
|
507 |
+
|
508 |
+
);
|
509 |
+
}
|
510 |
+
return self::$block_attributes;
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Get Block Assets.
|
515 |
+
*
|
516 |
+
* @since x.x.x
|
517 |
+
*
|
518 |
+
* @return array The Asset List.
|
519 |
+
*/
|
520 |
+
public static function get_block_assets() {
|
521 |
+
|
522 |
+
if ( null === self::$block_assets ) {
|
523 |
+
self::$block_assets = array();
|
524 |
+
}
|
525 |
+
return self::$block_assets;
|
526 |
+
}
|
527 |
+
}
|
528 |
+
}
|
modules/gutenberg/classes/class-cartflows-block-helper.php
CHANGED
@@ -1,672 +1,672 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Block Helper.
|
4 |
-
*
|
5 |
-
* @package Cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'Cartflows_Block_Helper' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Cartflows_Block_Helper.
|
16 |
-
*/
|
17 |
-
class Cartflows_Block_Helper {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get Next Step Button CSS
|
21 |
-
*
|
22 |
-
* @since x.x.x
|
23 |
-
* @param array $attr The block attributes.
|
24 |
-
* @param string $id The selector ID.
|
25 |
-
* @return array The Widget List.
|
26 |
-
*/
|
27 |
-
public static function get_next_step_button_css( $attr, $id ) {
|
28 |
-
|
29 |
-
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/next-step-button']['attributes'];
|
30 |
-
|
31 |
-
$attr = array_merge( $defaults, (array) $attr );
|
32 |
-
|
33 |
-
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
34 |
-
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
35 |
-
|
36 |
-
$m_selectors = array();
|
37 |
-
$t_selectors = array();
|
38 |
-
|
39 |
-
$selectors = array(
|
40 |
-
|
41 |
-
' .wpcf__next-step-button-wrap' => array(
|
42 |
-
'text-align' => $attr['align'],
|
43 |
-
),
|
44 |
-
' .wpcf__next-step-button-link' => array(
|
45 |
-
'text-align' => $attr['textAlignment'],
|
46 |
-
'color' => $attr['textColor'],
|
47 |
-
'background-color' => $attr['backgroundColor'],
|
48 |
-
'border-style' => $attr['borderStyle'],
|
49 |
-
'border-color' => $attr['borderColor'],
|
50 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
51 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
52 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
53 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
54 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
55 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
56 |
-
),
|
57 |
-
' .wpcf__next-step-button-link:hover' => array(
|
58 |
-
'background-color' => $attr['buttonHoverColor'],
|
59 |
-
'color' => $attr['textHoverColor'],
|
60 |
-
'border-color' => $attr['borderHoverColor'],
|
61 |
-
),
|
62 |
-
' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-title-wrap' => array(
|
63 |
-
'text-transform' => $attr['titletextTransform'],
|
64 |
-
'letter-spacing' => Cartflows_Gb_Helper::get_css_value( $attr['titleletterSpacing'], 'px' ),
|
65 |
-
),
|
66 |
-
' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-sub-title' => array(
|
67 |
-
'margin-top' => Cartflows_Gb_Helper::get_css_value( $attr['titleBottomSpacing'], 'px' ),
|
68 |
-
'text-transform' => $attr['subtitletextTransform'],
|
69 |
-
'letter-spacing' => Cartflows_Gb_Helper::get_css_value( $attr['subtitleletterSpacing'], 'px' ),
|
70 |
-
),
|
71 |
-
' .wpcf__next-step-button-icon svg' => array(
|
72 |
-
'width' => Cartflows_Gb_Helper::get_css_value( $attr['iconSize'], 'px' ),
|
73 |
-
'height' => Cartflows_Gb_Helper::get_css_value( $attr['iconSize'], 'px' ),
|
74 |
-
'fill' => $attr['iconColor'],
|
75 |
-
),
|
76 |
-
' .wpcf__next-step-button-link:hover .wpcf__next-step-button-icon svg' => array(
|
77 |
-
'fill' => $attr['iconHoverColor'],
|
78 |
-
),
|
79 |
-
);
|
80 |
-
if ( 'full' === $attr['align'] ) {
|
81 |
-
$selectors[' a.wpcf__next-step-button-link'] = array(
|
82 |
-
'width' => '100%',
|
83 |
-
'justify-content' => 'center',
|
84 |
-
);
|
85 |
-
}
|
86 |
-
if ( 'color' == $bg_type ) {
|
87 |
-
$selectors[' .wpcf__next-step-button-link'] = array(
|
88 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '',
|
89 |
-
);
|
90 |
-
}
|
91 |
-
|
92 |
-
if ( 'gradient' == $bg_type ) {
|
93 |
-
$selectors[' .wpcf__next-step-button-link'] = array(
|
94 |
-
'border-style' => $attr['borderStyle'],
|
95 |
-
'border-color' => $attr['borderColor'],
|
96 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
97 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
98 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
99 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
100 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
101 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
102 |
-
'color' => $attr['textColor'],
|
103 |
-
);
|
104 |
-
}
|
105 |
-
|
106 |
-
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
107 |
-
|
108 |
-
if ( 'image' == $bg_type ) {
|
109 |
-
$selectors[' .wpcf__next-step-button-link'] = array(
|
110 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
111 |
-
'background-color' => $attr['backgroundImageColor'],
|
112 |
-
'border-style' => $attr['borderStyle'],
|
113 |
-
'border-color' => $attr['borderColor'],
|
114 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
115 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
116 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
117 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
118 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
119 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
120 |
-
'color' => $attr['textColor'],
|
121 |
-
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
122 |
-
'background-position' => $position,
|
123 |
-
'background-attachment' => $attr['backgroundAttachment'],
|
124 |
-
'background-repeat' => $attr['backgroundRepeat'],
|
125 |
-
'background-size' => $attr['backgroundSize'],
|
126 |
-
);
|
127 |
-
} elseif ( 'gradient' === $bg_type ) {
|
128 |
-
|
129 |
-
$selectors[' .wpcf__next-step-button-link']['background-color'] = 'transparent';
|
130 |
-
$selectors[' .wpcf__next-step-button-link']['opacity'] = ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '';
|
131 |
-
if ( $attr['gradientValue'] ) {
|
132 |
-
$selectors[' .wpcf__next-step-button-link']['background-image'] = $attr['gradientValue'];
|
133 |
-
|
134 |
-
} else {
|
135 |
-
if ( 'linear' === $attr['gradientType'] ) {
|
136 |
-
|
137 |
-
$selectors[' .wpcf__next-step-button-link']['background-image'] = "linear-gradient(${ $attr['gradientAngle'] }deg, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
138 |
-
} else {
|
139 |
-
|
140 |
-
$selectors[' .wpcf__next-step-button-link']['background-image'] = "radial-gradient( at ${ $attr['gradientPosition'] }, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
$margin_type = ( 'after_title' === $attr['iconPosition'] || 'after_title_sub_title' === $attr['iconPosition'] ) ? 'margin-left' : 'margin-right';
|
146 |
-
|
147 |
-
$selectors[' .wpcf__next-step-button-icon svg'][ $margin_type ] = Cartflows_Gb_Helper::get_css_value( $attr['iconSpacing'], 'px' );
|
148 |
-
|
149 |
-
$t_selectors = array(
|
150 |
-
' .wpcf__next-step-button-wrap' => array(
|
151 |
-
'text-align' => $attr['talign'],
|
152 |
-
),
|
153 |
-
' .wpcf__next-step-button-link' => array(
|
154 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingTablet'], $attr['paddingTypeTablet'] ),
|
155 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingTablet'], $attr['paddingTypeTablet'] ),
|
156 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingTablet'], $attr['paddingTypeTablet'] ),
|
157 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingTablet'], $attr['paddingTypeTablet'] ),
|
158 |
-
),
|
159 |
-
);
|
160 |
-
|
161 |
-
$m_selectors = array(
|
162 |
-
' .wpcf__next-step-button-wrap' => array(
|
163 |
-
'text-align' => $attr['malign'],
|
164 |
-
),
|
165 |
-
' .wpcf__next-step-button-link' => array(
|
166 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingMobile'], $attr['paddingTypeMobile'] ),
|
167 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingMobile'], $attr['paddingTypeMobile'] ),
|
168 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingMobile'], $attr['paddingTypeMobile'] ),
|
169 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingMobile'], $attr['paddingTypeMobile'] ),
|
170 |
-
),
|
171 |
-
);
|
172 |
-
|
173 |
-
$combined_selectors = array(
|
174 |
-
'desktop' => $selectors,
|
175 |
-
'tablet' => $t_selectors,
|
176 |
-
'mobile' => $m_selectors,
|
177 |
-
);
|
178 |
-
|
179 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'title', ' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-title-wrap', $combined_selectors );
|
180 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'subTitle', ' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-sub-title', $combined_selectors );
|
181 |
-
|
182 |
-
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Get Order Detail Form Block CSS
|
187 |
-
*
|
188 |
-
* @since x.x.x
|
189 |
-
* @param array $attr The block attributes.
|
190 |
-
* @param string $id The selector ID.
|
191 |
-
* @return array The Widget List.
|
192 |
-
*/
|
193 |
-
public static function get_order_detail_form_css( $attr, $id ) {
|
194 |
-
|
195 |
-
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/order-detail-form']['attributes'];
|
196 |
-
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
197 |
-
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
198 |
-
|
199 |
-
$attr = array_merge( $defaults, $attr );
|
200 |
-
|
201 |
-
$t_selectors = array();
|
202 |
-
$m_selectors = array();
|
203 |
-
$selectors = array();
|
204 |
-
|
205 |
-
$order_overview = ( $attr['orderOverview'] ) ? 'block' : 'none';
|
206 |
-
$order_details = ( $attr['orderDetails'] ) ? 'block' : 'none';
|
207 |
-
$billing_address = ( $attr['billingAddress'] ) ? 'block' : 'none';
|
208 |
-
$shipping_address = ( $attr['shippingAddress'] ) ? 'block' : 'none';
|
209 |
-
$shipping_address_position = ( $attr['billingAddress'] ) ? 'right' : 'left';
|
210 |
-
$customer_details = ( $attr['billingAddress'] || $attr['shippingAddress'] ) ? 'block' : 'none';
|
211 |
-
|
212 |
-
$selectors = array(
|
213 |
-
// Genaral.
|
214 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order ul.order_details' => array(
|
215 |
-
'display' => $order_overview,
|
216 |
-
),
|
217 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order section.woocommerce-order-details' => array(
|
218 |
-
'display' => $order_details,
|
219 |
-
),
|
220 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--billing-address' => array(
|
221 |
-
'display' => $billing_address,
|
222 |
-
),
|
223 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--shipping-address' => array(
|
224 |
-
'display' => $shipping_address,
|
225 |
-
'float' => $shipping_address_position,
|
226 |
-
),
|
227 |
-
// Spacing.
|
228 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order p.woocommerce-thankyou-order-received' => array(
|
229 |
-
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['headingBottomSpacing'], 'px' ),
|
230 |
-
),
|
231 |
-
' .wpcf__order-detail-form .woocommerce-order ul.order_details, .wpcf__order-detail-form .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads, .wpcf__order-detail-form .woocommerce-order .woocommerce-bacs-bank-details, .wpcf__order-detail-form .woocommerce-order-details.mollie-instructions' => array(
|
232 |
-
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionSpacing'], 'px' ),
|
233 |
-
),
|
234 |
-
// Heading.
|
235 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received' => array(
|
236 |
-
'text-align' => $attr['headingAlignment'],
|
237 |
-
'color' => $attr['headingColor'],
|
238 |
-
),
|
239 |
-
// Sections.
|
240 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order h2' => array(
|
241 |
-
'color' => $attr['sectionHeadingColor'],
|
242 |
-
),
|
243 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order, .wpcf__order-detail-form .woocommerce-order-downloads table.shop_table' => array(
|
244 |
-
'color' => $attr['sectionContentColor'],
|
245 |
-
),
|
246 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads' => array(
|
247 |
-
'background-color' => $attr['sectionBackgroundColor'],
|
248 |
-
),
|
249 |
-
// Order Overview.
|
250 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details' => array(
|
251 |
-
'color' => $attr['orderOverviewTextColor'],
|
252 |
-
'background-color' => $attr['orderOverviewBackgroundColor'],
|
253 |
-
),
|
254 |
-
// Downloads.
|
255 |
-
' .wpcf__order-detail-form .woocommerce-order h2.woocommerce-order-downloads__title, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title' => array(
|
256 |
-
'color' => $attr['downloadHeadingColor'],
|
257 |
-
),
|
258 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table' => array(
|
259 |
-
'color' => $attr['downloadContentColor'],
|
260 |
-
),
|
261 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads' => array(
|
262 |
-
'background-color' => $attr['downloadBackgroundColor'],
|
263 |
-
),
|
264 |
-
// Order Details.
|
265 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title' => array(
|
266 |
-
'color' => $attr['orderDetailHeadingColor'],
|
267 |
-
),
|
268 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table' => array(
|
269 |
-
'color' => $attr['orderDetailContentColor'],
|
270 |
-
),
|
271 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details' => array(
|
272 |
-
'background-color' => $attr['orderDetailBackgroundColor'],
|
273 |
-
),
|
274 |
-
// Customer Details.
|
275 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title' => array(
|
276 |
-
'color' => $attr['customerDetailHeadingColor'],
|
277 |
-
),
|
278 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address' => array(
|
279 |
-
'color' => $attr['customerDetailContentColor'],
|
280 |
-
),
|
281 |
-
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details' => array(
|
282 |
-
'background-color' => $attr['customerDetailBackgroundColor'],
|
283 |
-
'display' => $customer_details,
|
284 |
-
),
|
285 |
-
|
286 |
-
);
|
287 |
-
|
288 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads'] = array(
|
289 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '',
|
290 |
-
'background-color' => $attr['backgroundColor'],
|
291 |
-
);
|
292 |
-
|
293 |
-
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
294 |
-
|
295 |
-
if ( 'image' == $bg_type ) {
|
296 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads'] = array(
|
297 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
298 |
-
'background-color' => $attr['backgroundImageColor'],
|
299 |
-
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
300 |
-
'background-position' => $position,
|
301 |
-
'background-attachment' => $attr['backgroundAttachment'],
|
302 |
-
'background-repeat' => $attr['backgroundRepeat'],
|
303 |
-
'background-size' => $attr['backgroundSize'],
|
304 |
-
);
|
305 |
-
}
|
306 |
-
// Order review.
|
307 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details'] = array(
|
308 |
-
'opacity' => ( isset( $attr['odbackgroundOpacity'] ) && '' !== $attr['odbackgroundOpacity'] ) ? $attr['odbackgroundOpacity'] / 100 : 0.79,
|
309 |
-
'background-color' => $attr['odbackgroundColor'],
|
310 |
-
);
|
311 |
-
|
312 |
-
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
313 |
-
|
314 |
-
if ( 'image' == $attr['odbackgroundType'] ) {
|
315 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details'] = array(
|
316 |
-
'opacity' => ( isset( $attr['odbackgroundOpacity'] ) && '' !== $attr['odbackgroundOpacity'] ) ? $attr['odbackgroundOpacity'] / 100 : 0,
|
317 |
-
'background-color' => $attr['odbackgroundImageColor'],
|
318 |
-
'background-image' => ( isset( $attr['odbackgroundImage'] ) && isset( $attr['odbackgroundImage']['url'] ) ) ? "url('" . $attr['odbackgroundImage']['url'] . "' )" : null,
|
319 |
-
'background-position' => $position,
|
320 |
-
'background-attachment' => $attr['odbackgroundAttachment'],
|
321 |
-
'background-repeat' => $attr['odbackgroundRepeat'],
|
322 |
-
'background-size' => $attr['odbackgroundSize'],
|
323 |
-
);
|
324 |
-
}
|
325 |
-
// Downloads.
|
326 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads'] = array(
|
327 |
-
'opacity' => ( isset( $attr['dbackgroundOpacity'] ) && '' !== $attr['dbackgroundOpacity'] ) ? $attr['dbackgroundOpacity'] / 100 : 0.79,
|
328 |
-
'background-color' => $attr['dbackgroundType'],
|
329 |
-
);
|
330 |
-
|
331 |
-
$dposition = str_replace( '-', ' ', $attr['dbackgroundPosition'] );
|
332 |
-
|
333 |
-
if ( 'image' == $attr['dbackgroundType'] ) {
|
334 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads'] = array(
|
335 |
-
'opacity' => ( isset( $attr['dbackgroundOpacity'] ) && '' !== $attr['dbackgroundOpacity'] ) ? $attr['dbackgroundOpacity'] / 100 : 0,
|
336 |
-
'background-color' => $attr['dbackgroundImageColor'],
|
337 |
-
'background-image' => ( isset( $attr['dbackgroundImage'] ) && isset( $attr['dbackgroundImage']['url'] ) ) ? "url('" . $attr['dbackgroundImage']['url'] . "' )" : null,
|
338 |
-
'background-position' => $dposition,
|
339 |
-
'background-attachment' => $attr['dbackgroundAttachment'],
|
340 |
-
'background-repeat' => $attr['dbackgroundRepeat'],
|
341 |
-
'background-size' => $attr['dbackgroundSize'],
|
342 |
-
);
|
343 |
-
}
|
344 |
-
// Order details.
|
345 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details'] = array(
|
346 |
-
'opacity' => ( isset( $attr['odetailbackgroundOpacity'] ) && '' !== $attr['odetailbackgroundOpacity'] ) ? $attr['odetailbackgroundOpacity'] / 100 : 0.79,
|
347 |
-
'background-color' => $attr['odetailbackgroundColor'],
|
348 |
-
);
|
349 |
-
|
350 |
-
$odetailposition = str_replace( '-', ' ', $attr['odetailbackgroundPosition'] );
|
351 |
-
|
352 |
-
if ( 'image' == $attr['odetailbackgroundType'] ) {
|
353 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details'] = array(
|
354 |
-
'opacity' => ( isset( $attr['odetailbackgroundOpacity'] ) && '' !== $attr['odetailbackgroundOpacity'] ) ? $attr['odetailbackgroundOpacity'] / 100 : 0,
|
355 |
-
'background-color' => $attr['odetailbackgroundImageColor'],
|
356 |
-
'background-image' => ( isset( $attr['odetailbackgroundImage'] ) && isset( $attr['odetailbackgroundImage']['url'] ) ) ? "url('" . $attr['odetailbackgroundImage']['url'] . "' )" : null,
|
357 |
-
'background-position' => $odetailposition,
|
358 |
-
'background-attachment' => $attr['odetailbackgroundAttachment'],
|
359 |
-
'background-repeat' => $attr['odetailbackgroundRepeat'],
|
360 |
-
'background-size' => $attr['odetailbackgroundSize'],
|
361 |
-
);
|
362 |
-
}
|
363 |
-
// Customer details.
|
364 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details'] = array(
|
365 |
-
'opacity' => ( isset( $attr['cdetailsbackgroundOpacity'] ) && '' !== $attr['cdetailsbackgroundOpacity'] ) ? $attr['cdetailsbackgroundOpacity'] / 100 : 0.79,
|
366 |
-
'background-color' => $attr['cdetailbackgroundColor'],
|
367 |
-
);
|
368 |
-
|
369 |
-
$cdetailposition = str_replace( '-', ' ', $attr['cdetailbackgroundPosition'] );
|
370 |
-
|
371 |
-
if ( 'image' == $attr['cdetailbackgroundType'] ) {
|
372 |
-
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details'] = array(
|
373 |
-
'opacity' => ( isset( $attr['cdetailsbackgroundOpacity'] ) && '' !== $attr['cdetailsbackgroundOpacity'] ) ? $attr['cdetailsbackgroundOpacity'] / 100 : 0,
|
374 |
-
'background-color' => $attr['cdetailsbackgroundImageColor'],
|
375 |
-
'background-image' => ( isset( $attr['cdetailbackgroundImage'] ) && isset( $attr['cdetailbackgroundImage']['url'] ) ) ? "url('" . $attr['cdetailbackgroundImage']['url'] . "' )" : null,
|
376 |
-
'background-position' => $cdetailposition,
|
377 |
-
'background-attachment' => $attr['cdetailbackgroundAttachment'],
|
378 |
-
'background-repeat' => $attr['cdetailbackgroundRepeat'],
|
379 |
-
'background-size' => $attr['cdetailbackgroundSize'],
|
380 |
-
);
|
381 |
-
}
|
382 |
-
|
383 |
-
$combined_selectors = array(
|
384 |
-
'desktop' => $selectors,
|
385 |
-
'tablet' => $t_selectors,
|
386 |
-
'mobile' => $m_selectors,
|
387 |
-
);
|
388 |
-
|
389 |
-
// Heading.
|
390 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'heading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received', $combined_selectors );
|
391 |
-
// Sections.
|
392 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'sectionHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order h2', $combined_selectors );
|
393 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'sectionContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order p, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address, .wpcf__order-detail-form .woocommerce-order-downloads table.shop_table', $combined_selectors );
|
394 |
-
// Order Overview.
|
395 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderOverview', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li', $combined_selectors );
|
396 |
-
// Downloads.
|
397 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'downloadHeading', ' .wpcf__order-detail-form .woocommerce-order h2.woocommerce-order-downloads__title, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title', $combined_selectors );
|
398 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'downloadContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table', $combined_selectors );
|
399 |
-
// Order Details.
|
400 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderDetailHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title', $combined_selectors );
|
401 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderDetailContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table', $combined_selectors );
|
402 |
-
// Customer Details.
|
403 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'customerDetailHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title', $combined_selectors );
|
404 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'customerDetailContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address p', $combined_selectors );
|
405 |
-
|
406 |
-
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
407 |
-
}
|
408 |
-
|
409 |
-
/**
|
410 |
-
* Get Checkout form CSS
|
411 |
-
*
|
412 |
-
* @since x.x.x
|
413 |
-
* @param array $attr The block attributes.
|
414 |
-
* @param string $id The selector ID.
|
415 |
-
* @return array The Widget List.
|
416 |
-
*/
|
417 |
-
public static function get_checkout_form_css( $attr, $id ) {
|
418 |
-
|
419 |
-
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/checkout-form']['attributes'];
|
420 |
-
|
421 |
-
$attr = array_merge( $defaults, (array) $attr );
|
422 |
-
|
423 |
-
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
424 |
-
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
425 |
-
|
426 |
-
$box_shadow_position_css = $attr['boxShadowPosition'];
|
427 |
-
|
428 |
-
if ( 'outset' === $attr['boxShadowPosition'] ) {
|
429 |
-
$box_shadow_position_css = '';
|
430 |
-
}
|
431 |
-
|
432 |
-
$m_selectors = array();
|
433 |
-
$t_selectors = array();
|
434 |
-
|
435 |
-
$selectors = array(
|
436 |
-
' .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading, .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name' => array(
|
437 |
-
'color' => $attr['headBgColor'],
|
438 |
-
),
|
439 |
-
' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button' => array(
|
440 |
-
'color' => $attr['buttonTextColor'],
|
441 |
-
'border-style' => $attr['buttonBorderStyle'],
|
442 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['buttonBorderWidth'], 'px' ),
|
443 |
-
'border-color' => $attr['buttonBorderColor'],
|
444 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['buttonBorderRadius'], 'px' ),
|
445 |
-
'background-color' => $attr['buttonBgColor'],
|
446 |
-
),
|
447 |
-
' .wcf-embed-checkout-form .woocommerce #payment #place_order:hover' => array(
|
448 |
-
'color' => $attr['buttonTextHoverColor'],
|
449 |
-
'border-color' => $attr['buttonBorderHoverColor'],
|
450 |
-
'background-color' => $attr['buttonBgHoverColor'],
|
451 |
-
),
|
452 |
-
' .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover' => array(
|
453 |
-
'color' => $attr['buttonTextHoverColor'],
|
454 |
-
'border-color' => $attr['buttonBorderHoverColor'],
|
455 |
-
'background-color' => $attr['buttonBgHoverColor'],
|
456 |
-
),
|
457 |
-
' .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => array(
|
458 |
-
'background-color' => $attr['sectionbgColor'],
|
459 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrPadding'], 'px' ),
|
460 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrPadding'], 'px' ),
|
461 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrPadding'], 'px' ),
|
462 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrPadding'], 'px' ),
|
463 |
-
'margin-top' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrMargin'], 'px' ),
|
464 |
-
'margin-right' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrMargin'], 'px' ),
|
465 |
-
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrMargin'], 'px' ),
|
466 |
-
'margin-left' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrMargin'], 'px' ),
|
467 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['sectionBorderRadius'], 'px' ),
|
468 |
-
),
|
469 |
-
' .wcf-embed-checkout-form .woocommerce-checkout #payment label a, .wcf-embed-checkout-form .woocommerce-checkout #payment label' => array(
|
470 |
-
'color' => $attr['paymenttitleColor'],
|
471 |
-
),
|
472 |
-
' .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p' => array(
|
473 |
-
'color' => $attr['paymentdescriptionColor'],
|
474 |
-
),
|
475 |
-
' .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box' => array(
|
476 |
-
'background-color' => $attr['informationbgColor'],
|
477 |
-
'color' => $attr['paymentdescriptionColor'],
|
478 |
-
),
|
479 |
-
' .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before' => array(
|
480 |
-
'border-bottom-color' => $attr['informationbgColor'],
|
481 |
-
),
|
482 |
-
' .wcf-embed-checkout-form .woocommerce form p.form-row label' => array(
|
483 |
-
'color' => $attr['fieldLabelColor'],
|
484 |
-
),
|
485 |
-
' .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select.select, .wcf-embed-checkout-form .woocommerce form .form-row select' => array(
|
486 |
-
'background-color' => $attr['fieldBgColor'],
|
487 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['fieldBorderRadius'], 'px' ),
|
488 |
-
'border-color' => $attr['fieldBorderColor'],
|
489 |
-
'border-style' => $attr['fieldBorderStyle'],
|
490 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['fieldBorderWidth'], 'px' ),
|
491 |
-
),
|
492 |
-
' .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, span#select2-shipping_country-container, span#select2-billing_country-container, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form ::placeholder, .wcf-embed-checkout-form ::-webkit-input-placeholder, span#select2-shipping_state-container, span#select2-billing_state-container' => array(
|
493 |
-
'color' => $attr['fieldInputColor'],
|
494 |
-
),
|
495 |
-
' .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout li, .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li' => array(
|
496 |
-
'color' => $attr['errorMsgColor'],
|
497 |
-
),
|
498 |
-
' .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error, .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error' => array(
|
499 |
-
'background-color' => $attr['errorMsgBgColor'],
|
500 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['msgBorderRadius'], 'px' ),
|
501 |
-
'border-color' => $attr['errorMsgBorderColor'],
|
502 |
-
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['msgHrPadding'], 'px' ),
|
503 |
-
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['msgVrPadding'], 'px' ),
|
504 |
-
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['msgHrPadding'], 'px' ),
|
505 |
-
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['msgVrPadding'], 'px' ),
|
506 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['msgBorderSize'], 'px' ),
|
507 |
-
),
|
508 |
-
' .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before, .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, .wcf-embed-checkout-form .woocommerce #payment #place_order:hover, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:before, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:after' => array(
|
509 |
-
'background-color' => $attr['globalbgColor'],
|
510 |
-
),
|
511 |
-
' .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before' => array(
|
512 |
-
'border-top-color' => $attr['globalbgColor'],
|
513 |
-
),
|
514 |
-
' .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button, .wcf-embed-checkout-form form.checkout_coupon .button, body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => array(
|
515 |
-
'background-color' => $attr['globalbgColor'],
|
516 |
-
),
|
517 |
-
' .wcf-embed-checkout-form , .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p' => array(
|
518 |
-
'color' => $attr['globaltextColor'],
|
519 |
-
),
|
520 |
-
' .woocommerce form .form-row.woocommerce-invalid label' => array(
|
521 |
-
'color' => $attr['errorLabelColor'],
|
522 |
-
),
|
523 |
-
' .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required, .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required, .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container, .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select' => array(
|
524 |
-
'border-color' => $attr['errorFieldBorderColor'],
|
525 |
-
),
|
526 |
-
);
|
527 |
-
if ( 'color' == $bg_type ) {
|
528 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
529 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0.79,
|
530 |
-
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
531 |
-
'background-color' => $attr['backgroundColor'],
|
532 |
-
);
|
533 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button:hover, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button:hover, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button:hover, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, .wcf-embed-checkout-form form.checkout_coupon .button:hover, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover, .wcf-embed-checkout-form .woocommerce #payment #place_order:hover'] = array(
|
534 |
-
'background-color' => $attr['backgroundHoverColor'],
|
535 |
-
);
|
536 |
-
}
|
537 |
-
|
538 |
-
if ( 'gradient' == $bg_type ) {
|
539 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
540 |
-
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
541 |
-
);
|
542 |
-
}
|
543 |
-
|
544 |
-
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
545 |
-
|
546 |
-
if ( 'image' == $bg_type ) {
|
547 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
548 |
-
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
549 |
-
'background-color' => $attr['backgroundImageColor'],
|
550 |
-
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
551 |
-
'background-position' => $position,
|
552 |
-
'background-attachment' => $attr['backgroundAttachment'],
|
553 |
-
'background-repeat' => $attr['backgroundRepeat'],
|
554 |
-
'background-size' => $attr['backgroundSize'],
|
555 |
-
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
556 |
-
);
|
557 |
-
} elseif ( 'gradient' === $bg_type ) {
|
558 |
-
|
559 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-color'] = 'transparent';
|
560 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['opacity'] = ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0;
|
561 |
-
if ( $attr['gradientValue'] ) {
|
562 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = $attr['gradientValue'];
|
563 |
-
|
564 |
-
} else {
|
565 |
-
if ( 'linear' === $attr['gradientType'] ) {
|
566 |
-
|
567 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = "linear-gradient(${ $attr['gradientAngle'] }deg, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
568 |
-
} else {
|
569 |
-
|
570 |
-
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = "radial-gradient( at ${ $attr['gradientPosition'] }, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
571 |
-
}
|
572 |
-
}
|
573 |
-
}
|
574 |
-
|
575 |
-
$combined_selectors = array(
|
576 |
-
'desktop' => $selectors,
|
577 |
-
'tablet' => $t_selectors,
|
578 |
-
'mobile' => $m_selectors,
|
579 |
-
);
|
580 |
-
|
581 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'global', ' .wcf-embed-checkout-form .woocommerce', $combined_selectors );
|
582 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'head', ' .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading, .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce h3 span', $combined_selectors );
|
583 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'button', ' .wcf-embed-checkout-form .woocommerce #order_review button', $combined_selectors );
|
584 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'input', ' .wcf-embed-checkout-form .woocommerce form p.form-row label, .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .woocommerce form .form-row select#billing_country, .wcf-embed-checkout-form .woocommerce form .form-row select#billing_state, span#select2-billing_country-container, .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form ::placeholder, .wcf-embed-checkout-form ::-webkit-input-placeholder, .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label, .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label', $combined_selectors );
|
585 |
-
|
586 |
-
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
587 |
-
}
|
588 |
-
|
589 |
-
/**
|
590 |
-
* Get Optin Form Block CSS
|
591 |
-
*
|
592 |
-
* @since x.x.x
|
593 |
-
* @param array $attr The block attributes.
|
594 |
-
* @param string $id The selector ID.
|
595 |
-
* @return array The Widget List.
|
596 |
-
*/
|
597 |
-
public static function get_optin_form_css( $attr, $id ) {
|
598 |
-
|
599 |
-
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/optin-form']['attributes'];
|
600 |
-
|
601 |
-
$attr = array_merge( $defaults, $attr );
|
602 |
-
|
603 |
-
$t_selectors = array();
|
604 |
-
$m_selectors = array();
|
605 |
-
$selectors = array();
|
606 |
-
|
607 |
-
$box_shadow_position_css = $attr['boxShadowPosition'];
|
608 |
-
|
609 |
-
if ( 'outset' === $attr['boxShadowPosition'] ) {
|
610 |
-
$box_shadow_position_css = '';
|
611 |
-
}
|
612 |
-
|
613 |
-
$selectors = array(
|
614 |
-
// General.
|
615 |
-
' .wcf-optin-form .checkout.woocommerce-checkout #order_review .woocommerce-checkout-payment button#place_order' => array(
|
616 |
-
'background-color' => $attr['generalPrimaryColor'],
|
617 |
-
'border-color' => $attr['generalPrimaryColor'],
|
618 |
-
),
|
619 |
-
|
620 |
-
// Input Fields.
|
621 |
-
' .wcf-optin-form .checkout.woocommerce-checkout label' => array(
|
622 |
-
'color' => $attr['inputFieldLabelColor'],
|
623 |
-
),
|
624 |
-
' .wcf-optin-form .checkout.woocommerce-checkout span input.input-text' => array(
|
625 |
-
'color' => $attr['inputFieldTextPlaceholderColor'],
|
626 |
-
'background-color' => $attr['inputFieldBackgroundColor'],
|
627 |
-
'border-style' => $attr['inputFieldBorderStyle'],
|
628 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['inputFieldBorderWidth'], 'px' ),
|
629 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['inputFieldBorderRadius'], 'px' ),
|
630 |
-
'border-color' => $attr['inputFieldBorderColor'],
|
631 |
-
),
|
632 |
-
|
633 |
-
// Submit Button.
|
634 |
-
' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order' => array(
|
635 |
-
'color' => $attr['submitButtonTextColor'],
|
636 |
-
'background-color' => $attr['submitButtonBackgroundColor'],
|
637 |
-
'border-style' => $attr['submitButtonBorderStyle'],
|
638 |
-
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['submitButtonBorderWidth'], 'px' ),
|
639 |
-
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['submitButtonBorderRadius'], 'px' ),
|
640 |
-
'border-color' => $attr['submitButtonBorderColor'],
|
641 |
-
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
642 |
-
),
|
643 |
-
' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order:hover' => array(
|
644 |
-
'color' => $attr['submitButtonTextHoverColor'],
|
645 |
-
'background-color' => $attr['submitButtonBackgroundHoverColor'],
|
646 |
-
'border-color' => $attr['submitButtonBorderHoverColor'],
|
647 |
-
),
|
648 |
-
|
649 |
-
);
|
650 |
-
|
651 |
-
$combined_selectors = array(
|
652 |
-
'desktop' => $selectors,
|
653 |
-
'tablet' => $t_selectors,
|
654 |
-
'mobile' => $m_selectors,
|
655 |
-
);
|
656 |
-
|
657 |
-
// General.
|
658 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'general', ' .wcf-optin-form .checkout.woocommerce-checkout label, .wcf-optin-form .checkout.woocommerce-checkout span input.input-text, .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order', $combined_selectors );
|
659 |
-
|
660 |
-
// Input Fields.
|
661 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'inputField', ' .wcf-optin-form .checkout.woocommerce-checkout label, .wcf-optin-form .checkout.woocommerce-checkout span input.input-text', $combined_selectors );
|
662 |
-
|
663 |
-
// Submit Button.
|
664 |
-
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'submitButton', ' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order', $combined_selectors );
|
665 |
-
|
666 |
-
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
667 |
-
}
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
}
|
672 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Block Helper.
|
4 |
+
*
|
5 |
+
* @package Cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'Cartflows_Block_Helper' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Cartflows_Block_Helper.
|
16 |
+
*/
|
17 |
+
class Cartflows_Block_Helper {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get Next Step Button CSS
|
21 |
+
*
|
22 |
+
* @since x.x.x
|
23 |
+
* @param array $attr The block attributes.
|
24 |
+
* @param string $id The selector ID.
|
25 |
+
* @return array The Widget List.
|
26 |
+
*/
|
27 |
+
public static function get_next_step_button_css( $attr, $id ) {
|
28 |
+
|
29 |
+
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/next-step-button']['attributes'];
|
30 |
+
|
31 |
+
$attr = array_merge( $defaults, (array) $attr );
|
32 |
+
|
33 |
+
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
34 |
+
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
35 |
+
|
36 |
+
$m_selectors = array();
|
37 |
+
$t_selectors = array();
|
38 |
+
|
39 |
+
$selectors = array(
|
40 |
+
|
41 |
+
' .wpcf__next-step-button-wrap' => array(
|
42 |
+
'text-align' => $attr['align'],
|
43 |
+
),
|
44 |
+
' .wpcf__next-step-button-link' => array(
|
45 |
+
'text-align' => $attr['textAlignment'],
|
46 |
+
'color' => $attr['textColor'],
|
47 |
+
'background-color' => $attr['backgroundColor'],
|
48 |
+
'border-style' => $attr['borderStyle'],
|
49 |
+
'border-color' => $attr['borderColor'],
|
50 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
51 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
52 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
53 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
54 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
55 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
56 |
+
),
|
57 |
+
' .wpcf__next-step-button-link:hover' => array(
|
58 |
+
'background-color' => $attr['buttonHoverColor'],
|
59 |
+
'color' => $attr['textHoverColor'],
|
60 |
+
'border-color' => $attr['borderHoverColor'],
|
61 |
+
),
|
62 |
+
' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-title-wrap' => array(
|
63 |
+
'text-transform' => $attr['titletextTransform'],
|
64 |
+
'letter-spacing' => Cartflows_Gb_Helper::get_css_value( $attr['titleletterSpacing'], 'px' ),
|
65 |
+
),
|
66 |
+
' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-sub-title' => array(
|
67 |
+
'margin-top' => Cartflows_Gb_Helper::get_css_value( $attr['titleBottomSpacing'], 'px' ),
|
68 |
+
'text-transform' => $attr['subtitletextTransform'],
|
69 |
+
'letter-spacing' => Cartflows_Gb_Helper::get_css_value( $attr['subtitleletterSpacing'], 'px' ),
|
70 |
+
),
|
71 |
+
' .wpcf__next-step-button-icon svg' => array(
|
72 |
+
'width' => Cartflows_Gb_Helper::get_css_value( $attr['iconSize'], 'px' ),
|
73 |
+
'height' => Cartflows_Gb_Helper::get_css_value( $attr['iconSize'], 'px' ),
|
74 |
+
'fill' => $attr['iconColor'],
|
75 |
+
),
|
76 |
+
' .wpcf__next-step-button-link:hover .wpcf__next-step-button-icon svg' => array(
|
77 |
+
'fill' => $attr['iconHoverColor'],
|
78 |
+
),
|
79 |
+
);
|
80 |
+
if ( 'full' === $attr['align'] ) {
|
81 |
+
$selectors[' a.wpcf__next-step-button-link'] = array(
|
82 |
+
'width' => '100%',
|
83 |
+
'justify-content' => 'center',
|
84 |
+
);
|
85 |
+
}
|
86 |
+
if ( 'color' == $bg_type ) {
|
87 |
+
$selectors[' .wpcf__next-step-button-link'] = array(
|
88 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '',
|
89 |
+
);
|
90 |
+
}
|
91 |
+
|
92 |
+
if ( 'gradient' == $bg_type ) {
|
93 |
+
$selectors[' .wpcf__next-step-button-link'] = array(
|
94 |
+
'border-style' => $attr['borderStyle'],
|
95 |
+
'border-color' => $attr['borderColor'],
|
96 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
97 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
98 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
99 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
100 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
101 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
102 |
+
'color' => $attr['textColor'],
|
103 |
+
);
|
104 |
+
}
|
105 |
+
|
106 |
+
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
107 |
+
|
108 |
+
if ( 'image' == $bg_type ) {
|
109 |
+
$selectors[' .wpcf__next-step-button-link'] = array(
|
110 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
111 |
+
'background-color' => $attr['backgroundImageColor'],
|
112 |
+
'border-style' => $attr['borderStyle'],
|
113 |
+
'border-color' => $attr['borderColor'],
|
114 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['borderWidth'], 'px' ),
|
115 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['borderRadius'], 'px' ),
|
116 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
117 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
118 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
119 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingDesktop'], $attr['paddingTypeDesktop'] ),
|
120 |
+
'color' => $attr['textColor'],
|
121 |
+
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
122 |
+
'background-position' => $position,
|
123 |
+
'background-attachment' => $attr['backgroundAttachment'],
|
124 |
+
'background-repeat' => $attr['backgroundRepeat'],
|
125 |
+
'background-size' => $attr['backgroundSize'],
|
126 |
+
);
|
127 |
+
} elseif ( 'gradient' === $bg_type ) {
|
128 |
+
|
129 |
+
$selectors[' .wpcf__next-step-button-link']['background-color'] = 'transparent';
|
130 |
+
$selectors[' .wpcf__next-step-button-link']['opacity'] = ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '';
|
131 |
+
if ( $attr['gradientValue'] ) {
|
132 |
+
$selectors[' .wpcf__next-step-button-link']['background-image'] = $attr['gradientValue'];
|
133 |
+
|
134 |
+
} else {
|
135 |
+
if ( 'linear' === $attr['gradientType'] ) {
|
136 |
+
|
137 |
+
$selectors[' .wpcf__next-step-button-link']['background-image'] = "linear-gradient(${ $attr['gradientAngle'] }deg, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
138 |
+
} else {
|
139 |
+
|
140 |
+
$selectors[' .wpcf__next-step-button-link']['background-image'] = "radial-gradient( at ${ $attr['gradientPosition'] }, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
$margin_type = ( 'after_title' === $attr['iconPosition'] || 'after_title_sub_title' === $attr['iconPosition'] ) ? 'margin-left' : 'margin-right';
|
146 |
+
|
147 |
+
$selectors[' .wpcf__next-step-button-icon svg'][ $margin_type ] = Cartflows_Gb_Helper::get_css_value( $attr['iconSpacing'], 'px' );
|
148 |
+
|
149 |
+
$t_selectors = array(
|
150 |
+
' .wpcf__next-step-button-wrap' => array(
|
151 |
+
'text-align' => $attr['talign'],
|
152 |
+
),
|
153 |
+
' .wpcf__next-step-button-link' => array(
|
154 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingTablet'], $attr['paddingTypeTablet'] ),
|
155 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingTablet'], $attr['paddingTypeTablet'] ),
|
156 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingTablet'], $attr['paddingTypeTablet'] ),
|
157 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingTablet'], $attr['paddingTypeTablet'] ),
|
158 |
+
),
|
159 |
+
);
|
160 |
+
|
161 |
+
$m_selectors = array(
|
162 |
+
' .wpcf__next-step-button-wrap' => array(
|
163 |
+
'text-align' => $attr['malign'],
|
164 |
+
),
|
165 |
+
' .wpcf__next-step-button-link' => array(
|
166 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingMobile'], $attr['paddingTypeMobile'] ),
|
167 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['vPaddingMobile'], $attr['paddingTypeMobile'] ),
|
168 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingMobile'], $attr['paddingTypeMobile'] ),
|
169 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['hPaddingMobile'], $attr['paddingTypeMobile'] ),
|
170 |
+
),
|
171 |
+
);
|
172 |
+
|
173 |
+
$combined_selectors = array(
|
174 |
+
'desktop' => $selectors,
|
175 |
+
'tablet' => $t_selectors,
|
176 |
+
'mobile' => $m_selectors,
|
177 |
+
);
|
178 |
+
|
179 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'title', ' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-title-wrap', $combined_selectors );
|
180 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'subTitle', ' .wpcf__next-step-button-link .wpcf__next-step-button-content-wrap .wpcf__next-step-button-sub-title', $combined_selectors );
|
181 |
+
|
182 |
+
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Get Order Detail Form Block CSS
|
187 |
+
*
|
188 |
+
* @since x.x.x
|
189 |
+
* @param array $attr The block attributes.
|
190 |
+
* @param string $id The selector ID.
|
191 |
+
* @return array The Widget List.
|
192 |
+
*/
|
193 |
+
public static function get_order_detail_form_css( $attr, $id ) {
|
194 |
+
|
195 |
+
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/order-detail-form']['attributes'];
|
196 |
+
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
197 |
+
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
198 |
+
|
199 |
+
$attr = array_merge( $defaults, $attr );
|
200 |
+
|
201 |
+
$t_selectors = array();
|
202 |
+
$m_selectors = array();
|
203 |
+
$selectors = array();
|
204 |
+
|
205 |
+
$order_overview = ( $attr['orderOverview'] ) ? 'block' : 'none';
|
206 |
+
$order_details = ( $attr['orderDetails'] ) ? 'block' : 'none';
|
207 |
+
$billing_address = ( $attr['billingAddress'] ) ? 'block' : 'none';
|
208 |
+
$shipping_address = ( $attr['shippingAddress'] ) ? 'block' : 'none';
|
209 |
+
$shipping_address_position = ( $attr['billingAddress'] ) ? 'right' : 'left';
|
210 |
+
$customer_details = ( $attr['billingAddress'] || $attr['shippingAddress'] ) ? 'block' : 'none';
|
211 |
+
|
212 |
+
$selectors = array(
|
213 |
+
// Genaral.
|
214 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order ul.order_details' => array(
|
215 |
+
'display' => $order_overview,
|
216 |
+
),
|
217 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order section.woocommerce-order-details' => array(
|
218 |
+
'display' => $order_details,
|
219 |
+
),
|
220 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--billing-address' => array(
|
221 |
+
'display' => $billing_address,
|
222 |
+
),
|
223 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--shipping-address' => array(
|
224 |
+
'display' => $shipping_address,
|
225 |
+
'float' => $shipping_address_position,
|
226 |
+
),
|
227 |
+
// Spacing.
|
228 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order p.woocommerce-thankyou-order-received' => array(
|
229 |
+
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['headingBottomSpacing'], 'px' ),
|
230 |
+
),
|
231 |
+
' .wpcf__order-detail-form .woocommerce-order ul.order_details, .wpcf__order-detail-form .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads, .wpcf__order-detail-form .woocommerce-order .woocommerce-bacs-bank-details, .wpcf__order-detail-form .woocommerce-order-details.mollie-instructions' => array(
|
232 |
+
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionSpacing'], 'px' ),
|
233 |
+
),
|
234 |
+
// Heading.
|
235 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received' => array(
|
236 |
+
'text-align' => $attr['headingAlignment'],
|
237 |
+
'color' => $attr['headingColor'],
|
238 |
+
),
|
239 |
+
// Sections.
|
240 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order h2' => array(
|
241 |
+
'color' => $attr['sectionHeadingColor'],
|
242 |
+
),
|
243 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order, .wpcf__order-detail-form .woocommerce-order-downloads table.shop_table' => array(
|
244 |
+
'color' => $attr['sectionContentColor'],
|
245 |
+
),
|
246 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads' => array(
|
247 |
+
'background-color' => $attr['sectionBackgroundColor'],
|
248 |
+
),
|
249 |
+
// Order Overview.
|
250 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details' => array(
|
251 |
+
'color' => $attr['orderOverviewTextColor'],
|
252 |
+
'background-color' => $attr['orderOverviewBackgroundColor'],
|
253 |
+
),
|
254 |
+
// Downloads.
|
255 |
+
' .wpcf__order-detail-form .woocommerce-order h2.woocommerce-order-downloads__title, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title' => array(
|
256 |
+
'color' => $attr['downloadHeadingColor'],
|
257 |
+
),
|
258 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table' => array(
|
259 |
+
'color' => $attr['downloadContentColor'],
|
260 |
+
),
|
261 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads' => array(
|
262 |
+
'background-color' => $attr['downloadBackgroundColor'],
|
263 |
+
),
|
264 |
+
// Order Details.
|
265 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title' => array(
|
266 |
+
'color' => $attr['orderDetailHeadingColor'],
|
267 |
+
),
|
268 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table' => array(
|
269 |
+
'color' => $attr['orderDetailContentColor'],
|
270 |
+
),
|
271 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details' => array(
|
272 |
+
'background-color' => $attr['orderDetailBackgroundColor'],
|
273 |
+
),
|
274 |
+
// Customer Details.
|
275 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title' => array(
|
276 |
+
'color' => $attr['customerDetailHeadingColor'],
|
277 |
+
),
|
278 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address' => array(
|
279 |
+
'color' => $attr['customerDetailContentColor'],
|
280 |
+
),
|
281 |
+
' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details' => array(
|
282 |
+
'background-color' => $attr['customerDetailBackgroundColor'],
|
283 |
+
'display' => $customer_details,
|
284 |
+
),
|
285 |
+
|
286 |
+
);
|
287 |
+
|
288 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads'] = array(
|
289 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : '',
|
290 |
+
'background-color' => $attr['backgroundColor'],
|
291 |
+
);
|
292 |
+
|
293 |
+
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
294 |
+
|
295 |
+
if ( 'image' == $bg_type ) {
|
296 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details, .wpcf__order-detail-form .woocommerce-order-downloads'] = array(
|
297 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
298 |
+
'background-color' => $attr['backgroundImageColor'],
|
299 |
+
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
300 |
+
'background-position' => $position,
|
301 |
+
'background-attachment' => $attr['backgroundAttachment'],
|
302 |
+
'background-repeat' => $attr['backgroundRepeat'],
|
303 |
+
'background-size' => $attr['backgroundSize'],
|
304 |
+
);
|
305 |
+
}
|
306 |
+
// Order review.
|
307 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details'] = array(
|
308 |
+
'opacity' => ( isset( $attr['odbackgroundOpacity'] ) && '' !== $attr['odbackgroundOpacity'] ) ? $attr['odbackgroundOpacity'] / 100 : 0.79,
|
309 |
+
'background-color' => $attr['odbackgroundColor'],
|
310 |
+
);
|
311 |
+
|
312 |
+
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
313 |
+
|
314 |
+
if ( 'image' == $attr['odbackgroundType'] ) {
|
315 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details'] = array(
|
316 |
+
'opacity' => ( isset( $attr['odbackgroundOpacity'] ) && '' !== $attr['odbackgroundOpacity'] ) ? $attr['odbackgroundOpacity'] / 100 : 0,
|
317 |
+
'background-color' => $attr['odbackgroundImageColor'],
|
318 |
+
'background-image' => ( isset( $attr['odbackgroundImage'] ) && isset( $attr['odbackgroundImage']['url'] ) ) ? "url('" . $attr['odbackgroundImage']['url'] . "' )" : null,
|
319 |
+
'background-position' => $position,
|
320 |
+
'background-attachment' => $attr['odbackgroundAttachment'],
|
321 |
+
'background-repeat' => $attr['odbackgroundRepeat'],
|
322 |
+
'background-size' => $attr['odbackgroundSize'],
|
323 |
+
);
|
324 |
+
}
|
325 |
+
// Downloads.
|
326 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads'] = array(
|
327 |
+
'opacity' => ( isset( $attr['dbackgroundOpacity'] ) && '' !== $attr['dbackgroundOpacity'] ) ? $attr['dbackgroundOpacity'] / 100 : 0.79,
|
328 |
+
'background-color' => $attr['dbackgroundType'],
|
329 |
+
);
|
330 |
+
|
331 |
+
$dposition = str_replace( '-', ' ', $attr['dbackgroundPosition'] );
|
332 |
+
|
333 |
+
if ( 'image' == $attr['dbackgroundType'] ) {
|
334 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads'] = array(
|
335 |
+
'opacity' => ( isset( $attr['dbackgroundOpacity'] ) && '' !== $attr['dbackgroundOpacity'] ) ? $attr['dbackgroundOpacity'] / 100 : 0,
|
336 |
+
'background-color' => $attr['dbackgroundImageColor'],
|
337 |
+
'background-image' => ( isset( $attr['dbackgroundImage'] ) && isset( $attr['dbackgroundImage']['url'] ) ) ? "url('" . $attr['dbackgroundImage']['url'] . "' )" : null,
|
338 |
+
'background-position' => $dposition,
|
339 |
+
'background-attachment' => $attr['dbackgroundAttachment'],
|
340 |
+
'background-repeat' => $attr['dbackgroundRepeat'],
|
341 |
+
'background-size' => $attr['dbackgroundSize'],
|
342 |
+
);
|
343 |
+
}
|
344 |
+
// Order details.
|
345 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details'] = array(
|
346 |
+
'opacity' => ( isset( $attr['odetailbackgroundOpacity'] ) && '' !== $attr['odetailbackgroundOpacity'] ) ? $attr['odetailbackgroundOpacity'] / 100 : 0.79,
|
347 |
+
'background-color' => $attr['odetailbackgroundColor'],
|
348 |
+
);
|
349 |
+
|
350 |
+
$odetailposition = str_replace( '-', ' ', $attr['odetailbackgroundPosition'] );
|
351 |
+
|
352 |
+
if ( 'image' == $attr['odetailbackgroundType'] ) {
|
353 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details'] = array(
|
354 |
+
'opacity' => ( isset( $attr['odetailbackgroundOpacity'] ) && '' !== $attr['odetailbackgroundOpacity'] ) ? $attr['odetailbackgroundOpacity'] / 100 : 0,
|
355 |
+
'background-color' => $attr['odetailbackgroundImageColor'],
|
356 |
+
'background-image' => ( isset( $attr['odetailbackgroundImage'] ) && isset( $attr['odetailbackgroundImage']['url'] ) ) ? "url('" . $attr['odetailbackgroundImage']['url'] . "' )" : null,
|
357 |
+
'background-position' => $odetailposition,
|
358 |
+
'background-attachment' => $attr['odetailbackgroundAttachment'],
|
359 |
+
'background-repeat' => $attr['odetailbackgroundRepeat'],
|
360 |
+
'background-size' => $attr['odetailbackgroundSize'],
|
361 |
+
);
|
362 |
+
}
|
363 |
+
// Customer details.
|
364 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details'] = array(
|
365 |
+
'opacity' => ( isset( $attr['cdetailsbackgroundOpacity'] ) && '' !== $attr['cdetailsbackgroundOpacity'] ) ? $attr['cdetailsbackgroundOpacity'] / 100 : 0.79,
|
366 |
+
'background-color' => $attr['cdetailbackgroundColor'],
|
367 |
+
);
|
368 |
+
|
369 |
+
$cdetailposition = str_replace( '-', ' ', $attr['cdetailbackgroundPosition'] );
|
370 |
+
|
371 |
+
if ( 'image' == $attr['cdetailbackgroundType'] ) {
|
372 |
+
$selectors[' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details'] = array(
|
373 |
+
'opacity' => ( isset( $attr['cdetailsbackgroundOpacity'] ) && '' !== $attr['cdetailsbackgroundOpacity'] ) ? $attr['cdetailsbackgroundOpacity'] / 100 : 0,
|
374 |
+
'background-color' => $attr['cdetailsbackgroundImageColor'],
|
375 |
+
'background-image' => ( isset( $attr['cdetailbackgroundImage'] ) && isset( $attr['cdetailbackgroundImage']['url'] ) ) ? "url('" . $attr['cdetailbackgroundImage']['url'] . "' )" : null,
|
376 |
+
'background-position' => $cdetailposition,
|
377 |
+
'background-attachment' => $attr['cdetailbackgroundAttachment'],
|
378 |
+
'background-repeat' => $attr['cdetailbackgroundRepeat'],
|
379 |
+
'background-size' => $attr['cdetailbackgroundSize'],
|
380 |
+
);
|
381 |
+
}
|
382 |
+
|
383 |
+
$combined_selectors = array(
|
384 |
+
'desktop' => $selectors,
|
385 |
+
'tablet' => $t_selectors,
|
386 |
+
'mobile' => $m_selectors,
|
387 |
+
);
|
388 |
+
|
389 |
+
// Heading.
|
390 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'heading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received', $combined_selectors );
|
391 |
+
// Sections.
|
392 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'sectionHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order h2', $combined_selectors );
|
393 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'sectionContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order p, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address, .wpcf__order-detail-form .woocommerce-order-downloads table.shop_table', $combined_selectors );
|
394 |
+
// Order Overview.
|
395 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderOverview', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li', $combined_selectors );
|
396 |
+
// Downloads.
|
397 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'downloadHeading', ' .wpcf__order-detail-form .woocommerce-order h2.woocommerce-order-downloads__title, .wpcf__order-detail-form .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title', $combined_selectors );
|
398 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'downloadContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table', $combined_selectors );
|
399 |
+
// Order Details.
|
400 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderDetailHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title', $combined_selectors );
|
401 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'orderDetailContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table', $combined_selectors );
|
402 |
+
// Customer Details.
|
403 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'customerDetailHeading', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title', $combined_selectors );
|
404 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'customerDetailContent', ' .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address, .wpcf__order-detail-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address p', $combined_selectors );
|
405 |
+
|
406 |
+
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Get Checkout form CSS
|
411 |
+
*
|
412 |
+
* @since x.x.x
|
413 |
+
* @param array $attr The block attributes.
|
414 |
+
* @param string $id The selector ID.
|
415 |
+
* @return array The Widget List.
|
416 |
+
*/
|
417 |
+
public static function get_checkout_form_css( $attr, $id ) {
|
418 |
+
|
419 |
+
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/checkout-form']['attributes'];
|
420 |
+
|
421 |
+
$attr = array_merge( $defaults, (array) $attr );
|
422 |
+
|
423 |
+
$bg_type = ( isset( $attr['backgroundType'] ) ) ? $attr['backgroundType'] : 'none';
|
424 |
+
$overlay_type = ( isset( $attr['overlayType'] ) ) ? $attr['overlayType'] : 'none';
|
425 |
+
|
426 |
+
$box_shadow_position_css = $attr['boxShadowPosition'];
|
427 |
+
|
428 |
+
if ( 'outset' === $attr['boxShadowPosition'] ) {
|
429 |
+
$box_shadow_position_css = '';
|
430 |
+
}
|
431 |
+
|
432 |
+
$m_selectors = array();
|
433 |
+
$t_selectors = array();
|
434 |
+
|
435 |
+
$selectors = array(
|
436 |
+
' .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading, .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name' => array(
|
437 |
+
'color' => $attr['headBgColor'],
|
438 |
+
),
|
439 |
+
' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button' => array(
|
440 |
+
'color' => $attr['buttonTextColor'],
|
441 |
+
'border-style' => $attr['buttonBorderStyle'],
|
442 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['buttonBorderWidth'], 'px' ),
|
443 |
+
'border-color' => $attr['buttonBorderColor'],
|
444 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['buttonBorderRadius'], 'px' ),
|
445 |
+
'background-color' => $attr['buttonBgColor'],
|
446 |
+
),
|
447 |
+
' .wcf-embed-checkout-form .woocommerce #payment #place_order:hover' => array(
|
448 |
+
'color' => $attr['buttonTextHoverColor'],
|
449 |
+
'border-color' => $attr['buttonBorderHoverColor'],
|
450 |
+
'background-color' => $attr['buttonBgHoverColor'],
|
451 |
+
),
|
452 |
+
' .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover' => array(
|
453 |
+
'color' => $attr['buttonTextHoverColor'],
|
454 |
+
'border-color' => $attr['buttonBorderHoverColor'],
|
455 |
+
'background-color' => $attr['buttonBgHoverColor'],
|
456 |
+
),
|
457 |
+
' .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => array(
|
458 |
+
'background-color' => $attr['sectionbgColor'],
|
459 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrPadding'], 'px' ),
|
460 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrPadding'], 'px' ),
|
461 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrPadding'], 'px' ),
|
462 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrPadding'], 'px' ),
|
463 |
+
'margin-top' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrMargin'], 'px' ),
|
464 |
+
'margin-right' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrMargin'], 'px' ),
|
465 |
+
'margin-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['sectionhrMargin'], 'px' ),
|
466 |
+
'margin-left' => Cartflows_Gb_Helper::get_css_value( $attr['sectionvrMargin'], 'px' ),
|
467 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['sectionBorderRadius'], 'px' ),
|
468 |
+
),
|
469 |
+
' .wcf-embed-checkout-form .woocommerce-checkout #payment label a, .wcf-embed-checkout-form .woocommerce-checkout #payment label' => array(
|
470 |
+
'color' => $attr['paymenttitleColor'],
|
471 |
+
),
|
472 |
+
' .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p' => array(
|
473 |
+
'color' => $attr['paymentdescriptionColor'],
|
474 |
+
),
|
475 |
+
' .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box' => array(
|
476 |
+
'background-color' => $attr['informationbgColor'],
|
477 |
+
'color' => $attr['paymentdescriptionColor'],
|
478 |
+
),
|
479 |
+
' .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before' => array(
|
480 |
+
'border-bottom-color' => $attr['informationbgColor'],
|
481 |
+
),
|
482 |
+
' .wcf-embed-checkout-form .woocommerce form p.form-row label' => array(
|
483 |
+
'color' => $attr['fieldLabelColor'],
|
484 |
+
),
|
485 |
+
' .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select.select, .wcf-embed-checkout-form .woocommerce form .form-row select' => array(
|
486 |
+
'background-color' => $attr['fieldBgColor'],
|
487 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['fieldBorderRadius'], 'px' ),
|
488 |
+
'border-color' => $attr['fieldBorderColor'],
|
489 |
+
'border-style' => $attr['fieldBorderStyle'],
|
490 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['fieldBorderWidth'], 'px' ),
|
491 |
+
),
|
492 |
+
' .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, span#select2-shipping_country-container, span#select2-billing_country-container, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form ::placeholder, .wcf-embed-checkout-form ::-webkit-input-placeholder, span#select2-shipping_state-container, span#select2-billing_state-container' => array(
|
493 |
+
'color' => $attr['fieldInputColor'],
|
494 |
+
),
|
495 |
+
' .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout li, .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li' => array(
|
496 |
+
'color' => $attr['errorMsgColor'],
|
497 |
+
),
|
498 |
+
' .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error, .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error' => array(
|
499 |
+
'background-color' => $attr['errorMsgBgColor'],
|
500 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['msgBorderRadius'], 'px' ),
|
501 |
+
'border-color' => $attr['errorMsgBorderColor'],
|
502 |
+
'padding-top' => Cartflows_Gb_Helper::get_css_value( $attr['msgHrPadding'], 'px' ),
|
503 |
+
'padding-right' => Cartflows_Gb_Helper::get_css_value( $attr['msgVrPadding'], 'px' ),
|
504 |
+
'padding-bottom' => Cartflows_Gb_Helper::get_css_value( $attr['msgHrPadding'], 'px' ),
|
505 |
+
'padding-left' => Cartflows_Gb_Helper::get_css_value( $attr['msgVrPadding'], 'px' ),
|
506 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['msgBorderSize'], 'px' ),
|
507 |
+
),
|
508 |
+
' .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before, .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, .wcf-embed-checkout-form .woocommerce #payment #place_order:hover, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current:before, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:before, body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:after' => array(
|
509 |
+
'background-color' => $attr['globalbgColor'],
|
510 |
+
),
|
511 |
+
' .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before' => array(
|
512 |
+
'border-top-color' => $attr['globalbgColor'],
|
513 |
+
),
|
514 |
+
' .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button, .wcf-embed-checkout-form form.checkout_coupon .button, body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => array(
|
515 |
+
'background-color' => $attr['globalbgColor'],
|
516 |
+
),
|
517 |
+
' .wcf-embed-checkout-form , .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p' => array(
|
518 |
+
'color' => $attr['globaltextColor'],
|
519 |
+
),
|
520 |
+
' .woocommerce form .form-row.woocommerce-invalid label' => array(
|
521 |
+
'color' => $attr['errorLabelColor'],
|
522 |
+
),
|
523 |
+
' .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required, .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required, .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container, .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select' => array(
|
524 |
+
'border-color' => $attr['errorFieldBorderColor'],
|
525 |
+
),
|
526 |
+
);
|
527 |
+
if ( 'color' == $bg_type ) {
|
528 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
529 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0.79,
|
530 |
+
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
531 |
+
'background-color' => $attr['backgroundColor'],
|
532 |
+
);
|
533 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button:hover, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button:hover, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button:hover, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, .wcf-embed-checkout-form form.checkout_coupon .button:hover, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover, .wcf-embed-checkout-form .woocommerce #payment #place_order:hover'] = array(
|
534 |
+
'background-color' => $attr['backgroundHoverColor'],
|
535 |
+
);
|
536 |
+
}
|
537 |
+
|
538 |
+
if ( 'gradient' == $bg_type ) {
|
539 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
540 |
+
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
541 |
+
);
|
542 |
+
}
|
543 |
+
|
544 |
+
$position = str_replace( '-', ' ', $attr['backgroundPosition'] );
|
545 |
+
|
546 |
+
if ( 'image' == $bg_type ) {
|
547 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button'] = array(
|
548 |
+
'opacity' => ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0,
|
549 |
+
'background-color' => $attr['backgroundImageColor'],
|
550 |
+
'background-image' => ( isset( $attr['backgroundImage'] ) && isset( $attr['backgroundImage']['url'] ) ) ? "url('" . $attr['backgroundImage']['url'] . "' )" : null,
|
551 |
+
'background-position' => $position,
|
552 |
+
'background-attachment' => $attr['backgroundAttachment'],
|
553 |
+
'background-repeat' => $attr['backgroundRepeat'],
|
554 |
+
'background-size' => $attr['backgroundSize'],
|
555 |
+
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
556 |
+
);
|
557 |
+
} elseif ( 'gradient' === $bg_type ) {
|
558 |
+
|
559 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-color'] = 'transparent';
|
560 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['opacity'] = ( isset( $attr['backgroundOpacity'] ) && '' !== $attr['backgroundOpacity'] ) ? $attr['backgroundOpacity'] / 100 : 0;
|
561 |
+
if ( $attr['gradientValue'] ) {
|
562 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = $attr['gradientValue'];
|
563 |
+
|
564 |
+
} else {
|
565 |
+
if ( 'linear' === $attr['gradientType'] ) {
|
566 |
+
|
567 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = "linear-gradient(${ $attr['gradientAngle'] }deg, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
568 |
+
} else {
|
569 |
+
|
570 |
+
$selectors[' .wcf-embed-checkout-form .woocommerce #order_review button, .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small, .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button, .wcf-embed-checkout-form form.checkout_coupon .button, .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button']['background-image'] = "radial-gradient( at ${ $attr['gradientPosition'] }, ${ $attr['gradientColor1'] } ${ $attr['gradientLocation1'] }%, ${ $attr['gradientColor2'] } ${ $attr['gradientLocation2'] }%)";
|
571 |
+
}
|
572 |
+
}
|
573 |
+
}
|
574 |
+
|
575 |
+
$combined_selectors = array(
|
576 |
+
'desktop' => $selectors,
|
577 |
+
'tablet' => $t_selectors,
|
578 |
+
'mobile' => $m_selectors,
|
579 |
+
);
|
580 |
+
|
581 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'global', ' .wcf-embed-checkout-form .woocommerce', $combined_selectors );
|
582 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'head', ' .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading, .wcf-embed-checkout-form .woocommerce h3, .wcf-embed-checkout-form .woocommerce h3 span', $combined_selectors );
|
583 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'button', ' .wcf-embed-checkout-form .woocommerce #order_review button', $combined_selectors );
|
584 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'input', ' .wcf-embed-checkout-form .woocommerce form p.form-row label, .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .woocommerce form .form-row select#billing_country, .wcf-embed-checkout-form .woocommerce form .form-row select#billing_state, span#select2-billing_country-container, .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered, .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"], .wcf-embed-checkout-form .woocommerce form .form-row input.input-text, .wcf-embed-checkout-form .woocommerce form .form-row textarea, .wcf-embed-checkout-form .select2-container--default .select2-selection--single, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form .woocommerce form .form-row select, .wcf-embed-checkout-form ::placeholder, .wcf-embed-checkout-form ::-webkit-input-placeholder, .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label, .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label', $combined_selectors );
|
585 |
+
|
586 |
+
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
587 |
+
}
|
588 |
+
|
589 |
+
/**
|
590 |
+
* Get Optin Form Block CSS
|
591 |
+
*
|
592 |
+
* @since x.x.x
|
593 |
+
* @param array $attr The block attributes.
|
594 |
+
* @param string $id The selector ID.
|
595 |
+
* @return array The Widget List.
|
596 |
+
*/
|
597 |
+
public static function get_optin_form_css( $attr, $id ) {
|
598 |
+
|
599 |
+
$defaults = Cartflows_Gb_Helper::$block_list['wcfb/optin-form']['attributes'];
|
600 |
+
|
601 |
+
$attr = array_merge( $defaults, $attr );
|
602 |
+
|
603 |
+
$t_selectors = array();
|
604 |
+
$m_selectors = array();
|
605 |
+
$selectors = array();
|
606 |
+
|
607 |
+
$box_shadow_position_css = $attr['boxShadowPosition'];
|
608 |
+
|
609 |
+
if ( 'outset' === $attr['boxShadowPosition'] ) {
|
610 |
+
$box_shadow_position_css = '';
|
611 |
+
}
|
612 |
+
|
613 |
+
$selectors = array(
|
614 |
+
// General.
|
615 |
+
' .wcf-optin-form .checkout.woocommerce-checkout #order_review .woocommerce-checkout-payment button#place_order' => array(
|
616 |
+
'background-color' => $attr['generalPrimaryColor'],
|
617 |
+
'border-color' => $attr['generalPrimaryColor'],
|
618 |
+
),
|
619 |
+
|
620 |
+
// Input Fields.
|
621 |
+
' .wcf-optin-form .checkout.woocommerce-checkout label' => array(
|
622 |
+
'color' => $attr['inputFieldLabelColor'],
|
623 |
+
),
|
624 |
+
' .wcf-optin-form .checkout.woocommerce-checkout span input.input-text' => array(
|
625 |
+
'color' => $attr['inputFieldTextPlaceholderColor'],
|
626 |
+
'background-color' => $attr['inputFieldBackgroundColor'],
|
627 |
+
'border-style' => $attr['inputFieldBorderStyle'],
|
628 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['inputFieldBorderWidth'], 'px' ),
|
629 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['inputFieldBorderRadius'], 'px' ),
|
630 |
+
'border-color' => $attr['inputFieldBorderColor'],
|
631 |
+
),
|
632 |
+
|
633 |
+
// Submit Button.
|
634 |
+
' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order' => array(
|
635 |
+
'color' => $attr['submitButtonTextColor'],
|
636 |
+
'background-color' => $attr['submitButtonBackgroundColor'],
|
637 |
+
'border-style' => $attr['submitButtonBorderStyle'],
|
638 |
+
'border-width' => Cartflows_Gb_Helper::get_css_value( $attr['submitButtonBorderWidth'], 'px' ),
|
639 |
+
'border-radius' => Cartflows_Gb_Helper::get_css_value( $attr['submitButtonBorderRadius'], 'px' ),
|
640 |
+
'border-color' => $attr['submitButtonBorderColor'],
|
641 |
+
'box-shadow' => Cartflows_Gb_Helper::get_css_value( $attr['boxShadowHOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowVOffset'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowBlur'], 'px' ) . ' ' . Cartflows_Gb_Helper::get_css_value( $attr['boxShadowSpread'], 'px' ) . ' ' . $attr['boxShadowColor'] . ' ' . $box_shadow_position_css,
|
642 |
+
),
|
643 |
+
' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order:hover' => array(
|
644 |
+
'color' => $attr['submitButtonTextHoverColor'],
|
645 |
+
'background-color' => $attr['submitButtonBackgroundHoverColor'],
|
646 |
+
'border-color' => $attr['submitButtonBorderHoverColor'],
|
647 |
+
),
|
648 |
+
|
649 |
+
);
|
650 |
+
|
651 |
+
$combined_selectors = array(
|
652 |
+
'desktop' => $selectors,
|
653 |
+
'tablet' => $t_selectors,
|
654 |
+
'mobile' => $m_selectors,
|
655 |
+
);
|
656 |
+
|
657 |
+
// General.
|
658 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'general', ' .wcf-optin-form .checkout.woocommerce-checkout label, .wcf-optin-form .checkout.woocommerce-checkout span input.input-text, .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order', $combined_selectors );
|
659 |
+
|
660 |
+
// Input Fields.
|
661 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'inputField', ' .wcf-optin-form .checkout.woocommerce-checkout label, .wcf-optin-form .checkout.woocommerce-checkout span input.input-text', $combined_selectors );
|
662 |
+
|
663 |
+
// Submit Button.
|
664 |
+
$combined_selectors = Cartflows_Gb_Helper::get_typography_css( $attr, 'submitButton', ' .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order', $combined_selectors );
|
665 |
+
|
666 |
+
return Cartflows_Gb_Helper::generate_all_css( $combined_selectors, ' .cf-block-' . $id );
|
667 |
+
}
|
668 |
+
|
669 |
+
|
670 |
+
|
671 |
+
}
|
672 |
+
}
|
modules/gutenberg/classes/class-cartflows-block-js.php
CHANGED
@@ -1,170 +1,170 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Block Js.
|
4 |
-
*
|
5 |
-
* @package Cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'Cartflows_Block_JS' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Cartflows_Block_JS.
|
16 |
-
*/
|
17 |
-
class Cartflows_Block_JS {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Adds Google fonts for Next Step Button.
|
21 |
-
*
|
22 |
-
* @since x.x.x
|
23 |
-
* @param array $attr the blocks attr.
|
24 |
-
*/
|
25 |
-
public static function blocks_next_step_button_gfont( $attr ) {
|
26 |
-
|
27 |
-
$title_load_google_font = isset( $attr['titleLoadGoogleFonts'] ) ? $attr['titleLoadGoogleFonts'] : '';
|
28 |
-
$title_font_family = isset( $attr['titleFontFamily'] ) ? $attr['titleFontFamily'] : '';
|
29 |
-
$title_font_weight = isset( $attr['titleFontWeight'] ) ? $attr['titleFontWeight'] : '';
|
30 |
-
$title_font_subset = isset( $attr['titleFontSubset'] ) ? $attr['titleFontSubset'] : '';
|
31 |
-
|
32 |
-
$sub_title_load_google_font = isset( $attr['subTitleLoadGoogleFonts'] ) ? $attr['subTitleLoadGoogleFonts'] : '';
|
33 |
-
$sub_title_font_family = isset( $attr['subTitleFontFamily'] ) ? $attr['subTitleFontFamily'] : '';
|
34 |
-
$sub_title_font_weight = isset( $attr['subTitleFontWeight'] ) ? $attr['subTitleFontWeight'] : '';
|
35 |
-
$sub_title_font_subset = isset( $attr['subTitleFontSubset'] ) ? $attr['subTitleFontSubset'] : '';
|
36 |
-
|
37 |
-
Cartflows_Gb_Helper::blocks_google_font( $title_load_google_font, $title_font_family, $title_font_weight, $title_font_subset );
|
38 |
-
Cartflows_Gb_Helper::blocks_google_font( $sub_title_load_google_font, $sub_title_font_family, $sub_title_font_weight, $sub_title_font_subset );
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Adds Google fonts for Order Detail Form block.
|
43 |
-
*
|
44 |
-
* @since x.x.x
|
45 |
-
* @param array $attr the blocks attr.
|
46 |
-
*/
|
47 |
-
public static function blocks_order_detail_form_gfont( $attr ) {
|
48 |
-
|
49 |
-
$heading_load_google_font = isset( $attr['headingLoadGoogleFonts'] ) ? $attr['headingLoadGoogleFonts'] : '';
|
50 |
-
$heading_font_family = isset( $attr['headingFontFamily'] ) ? $attr['headingFontFamily'] : '';
|
51 |
-
$heading_font_weight = isset( $attr['headingFontWeight'] ) ? $attr['headingFontWeight'] : '';
|
52 |
-
$heading_font_subset = isset( $attr['headingFontSubset'] ) ? $attr['headingFontSubset'] : '';
|
53 |
-
|
54 |
-
$section_heading_load_google_font = isset( $attr['sectionHeadingLoadGoogleFonts'] ) ? $attr['sectionHeadingLoadGoogleFonts'] : '';
|
55 |
-
$section_heading_font_family = isset( $attr['sectionHeadingFontFamily'] ) ? $attr['sectionHeadingFontFamily'] : '';
|
56 |
-
$section_heading_font_weight = isset( $attr['sectionHeadingFontWeight'] ) ? $attr['sectionHeadingFontWeight'] : '';
|
57 |
-
$section_heading_font_subset = isset( $attr['sectionHeadingFontSubset'] ) ? $attr['sectionHeadingFontSubset'] : '';
|
58 |
-
|
59 |
-
$section_content_load_google_font = isset( $attr['sectionContentLoadGoogleFonts'] ) ? $attr['sectionContentLoadGoogleFonts'] : '';
|
60 |
-
$section_content_font_family = isset( $attr['sectionContentFontFamily'] ) ? $attr['sectionContentFontFamily'] : '';
|
61 |
-
$section_content_font_weight = isset( $attr['sectionContentFontWeight'] ) ? $attr['sectionContentFontWeight'] : '';
|
62 |
-
$section_content_font_subset = isset( $attr['sectionContentFontSubset'] ) ? $attr['sectionContentFontSubset'] : '';
|
63 |
-
|
64 |
-
$order_overview_load_google_font = isset( $attr['orderOverviewLoadGoogleFonts'] ) ? $attr['orderOverviewLoadGoogleFonts'] : '';
|
65 |
-
$order_overview_font_family = isset( $attr['orderOverviewFontFamily'] ) ? $attr['orderOverviewFontFamily'] : '';
|
66 |
-
$order_overview_font_weight = isset( $attr['orderOverviewFontWeight'] ) ? $attr['orderOverviewFontWeight'] : '';
|
67 |
-
$order_overview_font_subset = isset( $attr['orderOverviewFontSubset'] ) ? $attr['orderOverviewFontSubset'] : '';
|
68 |
-
|
69 |
-
$download_heading_load_google_font = isset( $attr['downloadHeadingLoadGoogleFonts'] ) ? $attr['downloadHeadingLoadGoogleFonts'] : '';
|
70 |
-
$download_heading_font_family = isset( $attr['downloadHeadingFontFamily'] ) ? $attr['downloadHeadingFontFamily'] : '';
|
71 |
-
$download_heading_font_weight = isset( $attr['downloadHeadingFontWeight'] ) ? $attr['downloadHeadingFontWeight'] : '';
|
72 |
-
$download_heading_font_subset = isset( $attr['downloadHeadingFontSubset'] ) ? $attr['downloadHeadingFontSubset'] : '';
|
73 |
-
|
74 |
-
$download_content_load_google_font = isset( $attr['downloadContentLoadGoogleFonts'] ) ? $attr['downloadContentLoadGoogleFonts'] : '';
|
75 |
-
$download_content_font_family = isset( $attr['downloadContentFontFamily'] ) ? $attr['downloadContentFontFamily'] : '';
|
76 |
-
$download_content_font_weight = isset( $attr['downloadContentFontWeight'] ) ? $attr['downloadContentFontWeight'] : '';
|
77 |
-
$download_content_font_subset = isset( $attr['downloadContentFontSubset'] ) ? $attr['downloadContentFontSubset'] : '';
|
78 |
-
|
79 |
-
$order_detail_heading_load_google_font = isset( $attr['orderDetailHeadingLoadGoogleFonts'] ) ? $attr['orderDetailHeadingLoadGoogleFonts'] : '';
|
80 |
-
$order_detail_heading_font_family = isset( $attr['orderDetailHeadingFontFamily'] ) ? $attr['orderDetailHeadingFontFamily'] : '';
|
81 |
-
$order_detail_heading_font_weight = isset( $attr['orderDetailHeadingFontWeight'] ) ? $attr['orderDetailHeadingFontWeight'] : '';
|
82 |
-
$order_detail_heading_font_subset = isset( $attr['orderDetailHeadingFontSubset'] ) ? $attr['orderDetailHeadingFontSubset'] : '';
|
83 |
-
|
84 |
-
$order_detail_content_load_google_font = isset( $attr['orderDetailContentLoadGoogleFonts'] ) ? $attr['orderDetailContentLoadGoogleFonts'] : '';
|
85 |
-
$order_detail_content_font_family = isset( $attr['orderDetailContentFontFamily'] ) ? $attr['orderDetailContentFontFamily'] : '';
|
86 |
-
$order_detail_content_font_weight = isset( $attr['orderDetailContentFontWeight'] ) ? $attr['orderDetailContentFontWeight'] : '';
|
87 |
-
$order_detail_content_font_subset = isset( $attr['orderDetailContentFontSubset'] ) ? $attr['orderDetailContentFontSubset'] : '';
|
88 |
-
|
89 |
-
$customer_detail_heading_load_google_font = isset( $attr['customerDetailHeadingLoadGoogleFonts'] ) ? $attr['customerDetailHeadingLoadGoogleFonts'] : '';
|
90 |
-
$customer_detail_heading_font_family = isset( $attr['customerDetailHeadingFontFamily'] ) ? $attr['customerDetailHeadingFontFamily'] : '';
|
91 |
-
$customer_detail_heading_font_weight = isset( $attr['customerDetailHeadingFontWeight'] ) ? $attr['customerDetailHeadingFontWeight'] : '';
|
92 |
-
$customer_detail_heading_font_subset = isset( $attr['customerDetailHeadingFontSubset'] ) ? $attr['customerDetailHeadingFontSubset'] : '';
|
93 |
-
|
94 |
-
$customer_detail_content_load_google_font = isset( $attr['customerDetailContentLoadGoogleFonts'] ) ? $attr['customerDetailContentLoadGoogleFonts'] : '';
|
95 |
-
$customer_detail_content_font_family = isset( $attr['customerDetailContentFontFamily'] ) ? $attr['customerDetailContentFontFamily'] : '';
|
96 |
-
$customer_detail_content_font_weight = isset( $attr['customerDetailContentFontWeight'] ) ? $attr['customerDetailContentFontWeight'] : '';
|
97 |
-
$customer_detail_content_font_subset = isset( $attr['customerDetailContentFontSubset'] ) ? $attr['customerDetailContentFontSubset'] : '';
|
98 |
-
|
99 |
-
Cartflows_Gb_Helper::blocks_google_font( $heading_load_google_font, $heading_font_family, $heading_font_weight, $heading_font_subset );
|
100 |
-
Cartflows_Gb_Helper::blocks_google_font( $section_heading_load_google_font, $section_heading_font_family, $section_heading_font_weight, $section_heading_font_subset );
|
101 |
-
Cartflows_Gb_Helper::blocks_google_font( $section_content_load_google_font, $section_content_font_family, $section_content_font_weight, $section_content_font_subset );
|
102 |
-
Cartflows_Gb_Helper::blocks_google_font( $order_overview_load_google_font, $order_overview_font_family, $order_overview_font_weight, $order_overview_font_subset );
|
103 |
-
Cartflows_Gb_Helper::blocks_google_font( $download_heading_load_google_font, $download_heading_font_family, $download_heading_font_weight, $download_heading_font_subset );
|
104 |
-
Cartflows_Gb_Helper::blocks_google_font( $download_content_load_google_font, $download_content_font_family, $download_content_font_weight, $download_content_font_subset );
|
105 |
-
Cartflows_Gb_Helper::blocks_google_font( $order_detail_heading_load_google_font, $order_detail_heading_font_family, $order_detail_heading_font_weight, $order_detail_heading_font_subset );
|
106 |
-
Cartflows_Gb_Helper::blocks_google_font( $order_detail_content_load_google_font, $order_detail_content_font_family, $order_detail_content_font_weight, $order_detail_content_font_subset );
|
107 |
-
Cartflows_Gb_Helper::blocks_google_font( $customer_detail_heading_load_google_font, $customer_detail_heading_font_family, $customer_detail_heading_font_weight, $customer_detail_heading_font_subset );
|
108 |
-
Cartflows_Gb_Helper::blocks_google_font( $customer_detail_content_load_google_font, $customer_detail_content_font_family, $customer_detail_content_font_weight, $customer_detail_content_font_subset );
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Adds Google fonts for checkout form.
|
114 |
-
*
|
115 |
-
* @since x.x.x
|
116 |
-
* @param array $attr the blocks attr.
|
117 |
-
*/
|
118 |
-
public static function blocks_checkout_form_gfont( $attr ) {
|
119 |
-
|
120 |
-
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
121 |
-
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
122 |
-
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
123 |
-
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
124 |
-
|
125 |
-
$input_load_google_font = isset( $attr['inputLoadGoogleFonts'] ) ? $attr['inputLoadGoogleFonts'] : '';
|
126 |
-
$input_font_family = isset( $attr['inputFontFamily'] ) ? $attr['inputFontFamily'] : '';
|
127 |
-
$input_font_weight = isset( $attr['inputFontWeight'] ) ? $attr['inputFontWeight'] : '';
|
128 |
-
$input_font_subset = isset( $attr['inputFontSubset'] ) ? $attr['inputFontSubset'] : '';
|
129 |
-
|
130 |
-
$button_load_google_font = isset( $attr['buttonLoadGoogleFonts'] ) ? $attr['buttonLoadGoogleFonts'] : '';
|
131 |
-
$button_font_family = isset( $attr['buttonFontFamily'] ) ? $attr['buttonFontFamily'] : '';
|
132 |
-
$button_font_weight = isset( $attr['buttonFontWeight'] ) ? $attr['buttonFontWeight'] : '';
|
133 |
-
$button_font_subset = isset( $attr['buttonFontSubset'] ) ? $attr['buttonFontSubset'] : '';
|
134 |
-
|
135 |
-
$global_load_google_font = isset( $attr['globalLoadGoogleFonts'] ) ? $attr['globalLoadGoogleFonts'] : '';
|
136 |
-
$global_font_family = isset( $attr['globalFontFamily'] ) ? $attr['globalFontFamily'] : '';
|
137 |
-
$global_font_weight = isset( $attr['globalFontWeight'] ) ? $attr['globalFontWeight'] : '';
|
138 |
-
$global_font_subset = isset( $attr['globalFontSubset'] ) ? $attr['globalFontSubset'] : '';
|
139 |
-
|
140 |
-
Cartflows_Gb_Helper::blocks_google_font( $global_load_google_font, $global_font_family, $global_font_weight, $global_font_subset );
|
141 |
-
Cartflows_Gb_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
142 |
-
Cartflows_Gb_Helper::blocks_google_font( $button_load_google_font, $button_font_family, $button_font_weight, $button_font_subset );
|
143 |
-
Cartflows_Gb_Helper::blocks_google_font( $input_load_google_font, $input_font_family, $input_font_weight, $input_font_subset );
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Adds Google fonts for Optin Form block.
|
149 |
-
*
|
150 |
-
* @since x.x.x
|
151 |
-
* @param array $attr the blocks attr.
|
152 |
-
*/
|
153 |
-
public static function blocks_optin_form_gfont( $attr ) {
|
154 |
-
|
155 |
-
$general_load_google_font = isset( $attr['generalLoadGoogleFonts'] ) ? $attr['generalLoadGoogleFonts'] : '';
|
156 |
-
$general_font_family = isset( $attr['generalFontFamily'] ) ? $attr['generalFontFamily'] : '';
|
157 |
-
$general_font_weight = isset( $attr['generalFontWeight'] ) ? $attr['generalFontWeight'] : '';
|
158 |
-
$general_font_subset = isset( $attr['generalFontSubset'] ) ? $attr['generalFontSubset'] : '';
|
159 |
-
|
160 |
-
$submit_button_load_google_font = isset( $attr['submitButtonLoadGoogleFonts'] ) ? $attr['submitButtonLoadGoogleFonts'] : '';
|
161 |
-
$submit_button_font_family = isset( $attr['submitButtonFontFamily'] ) ? $attr['submitButtonFontFamily'] : '';
|
162 |
-
$submit_button_font_weight = isset( $attr['submitButtonFontWeight'] ) ? $attr['submitButtonFontWeight'] : '';
|
163 |
-
$submit_button_font_subset = isset( $attr['submitButtonFontSubset'] ) ? $attr['submitButtonFontSubset'] : '';
|
164 |
-
|
165 |
-
Cartflows_Gb_Helper::blocks_google_font( $general_load_google_font, $general_font_family, $general_font_weight, $general_font_subset );
|
166 |
-
Cartflows_Gb_Helper::blocks_google_font( $submit_button_load_google_font, $submit_button_font_family, $submit_button_font_weight, $submit_button_font_subset );
|
167 |
-
|
168 |
-
}
|
169 |
-
}
|
170 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Block Js.
|
4 |
+
*
|
5 |
+
* @package Cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'Cartflows_Block_JS' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Cartflows_Block_JS.
|
16 |
+
*/
|
17 |
+
class Cartflows_Block_JS {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Adds Google fonts for Next Step Button.
|
21 |
+
*
|
22 |
+
* @since x.x.x
|
23 |
+
* @param array $attr the blocks attr.
|
24 |
+
*/
|
25 |
+
public static function blocks_next_step_button_gfont( $attr ) {
|
26 |
+
|
27 |
+
$title_load_google_font = isset( $attr['titleLoadGoogleFonts'] ) ? $attr['titleLoadGoogleFonts'] : '';
|
28 |
+
$title_font_family = isset( $attr['titleFontFamily'] ) ? $attr['titleFontFamily'] : '';
|
29 |
+
$title_font_weight = isset( $attr['titleFontWeight'] ) ? $attr['titleFontWeight'] : '';
|
30 |
+
$title_font_subset = isset( $attr['titleFontSubset'] ) ? $attr['titleFontSubset'] : '';
|
31 |
+
|
32 |
+
$sub_title_load_google_font = isset( $attr['subTitleLoadGoogleFonts'] ) ? $attr['subTitleLoadGoogleFonts'] : '';
|
33 |
+
$sub_title_font_family = isset( $attr['subTitleFontFamily'] ) ? $attr['subTitleFontFamily'] : '';
|
34 |
+
$sub_title_font_weight = isset( $attr['subTitleFontWeight'] ) ? $attr['subTitleFontWeight'] : '';
|
35 |
+
$sub_title_font_subset = isset( $attr['subTitleFontSubset'] ) ? $attr['subTitleFontSubset'] : '';
|
36 |
+
|
37 |
+
Cartflows_Gb_Helper::blocks_google_font( $title_load_google_font, $title_font_family, $title_font_weight, $title_font_subset );
|
38 |
+
Cartflows_Gb_Helper::blocks_google_font( $sub_title_load_google_font, $sub_title_font_family, $sub_title_font_weight, $sub_title_font_subset );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Adds Google fonts for Order Detail Form block.
|
43 |
+
*
|
44 |
+
* @since x.x.x
|
45 |
+
* @param array $attr the blocks attr.
|
46 |
+
*/
|
47 |
+
public static function blocks_order_detail_form_gfont( $attr ) {
|
48 |
+
|
49 |
+
$heading_load_google_font = isset( $attr['headingLoadGoogleFonts'] ) ? $attr['headingLoadGoogleFonts'] : '';
|
50 |
+
$heading_font_family = isset( $attr['headingFontFamily'] ) ? $attr['headingFontFamily'] : '';
|
51 |
+
$heading_font_weight = isset( $attr['headingFontWeight'] ) ? $attr['headingFontWeight'] : '';
|
52 |
+
$heading_font_subset = isset( $attr['headingFontSubset'] ) ? $attr['headingFontSubset'] : '';
|
53 |
+
|
54 |
+
$section_heading_load_google_font = isset( $attr['sectionHeadingLoadGoogleFonts'] ) ? $attr['sectionHeadingLoadGoogleFonts'] : '';
|
55 |
+
$section_heading_font_family = isset( $attr['sectionHeadingFontFamily'] ) ? $attr['sectionHeadingFontFamily'] : '';
|
56 |
+
$section_heading_font_weight = isset( $attr['sectionHeadingFontWeight'] ) ? $attr['sectionHeadingFontWeight'] : '';
|
57 |
+
$section_heading_font_subset = isset( $attr['sectionHeadingFontSubset'] ) ? $attr['sectionHeadingFontSubset'] : '';
|
58 |
+
|
59 |
+
$section_content_load_google_font = isset( $attr['sectionContentLoadGoogleFonts'] ) ? $attr['sectionContentLoadGoogleFonts'] : '';
|
60 |
+
$section_content_font_family = isset( $attr['sectionContentFontFamily'] ) ? $attr['sectionContentFontFamily'] : '';
|
61 |
+
$section_content_font_weight = isset( $attr['sectionContentFontWeight'] ) ? $attr['sectionContentFontWeight'] : '';
|
62 |
+
$section_content_font_subset = isset( $attr['sectionContentFontSubset'] ) ? $attr['sectionContentFontSubset'] : '';
|
63 |
+
|
64 |
+
$order_overview_load_google_font = isset( $attr['orderOverviewLoadGoogleFonts'] ) ? $attr['orderOverviewLoadGoogleFonts'] : '';
|
65 |
+
$order_overview_font_family = isset( $attr['orderOverviewFontFamily'] ) ? $attr['orderOverviewFontFamily'] : '';
|
66 |
+
$order_overview_font_weight = isset( $attr['orderOverviewFontWeight'] ) ? $attr['orderOverviewFontWeight'] : '';
|
67 |
+
$order_overview_font_subset = isset( $attr['orderOverviewFontSubset'] ) ? $attr['orderOverviewFontSubset'] : '';
|
68 |
+
|
69 |
+
$download_heading_load_google_font = isset( $attr['downloadHeadingLoadGoogleFonts'] ) ? $attr['downloadHeadingLoadGoogleFonts'] : '';
|
70 |
+
$download_heading_font_family = isset( $attr['downloadHeadingFontFamily'] ) ? $attr['downloadHeadingFontFamily'] : '';
|
71 |
+
$download_heading_font_weight = isset( $attr['downloadHeadingFontWeight'] ) ? $attr['downloadHeadingFontWeight'] : '';
|
72 |
+
$download_heading_font_subset = isset( $attr['downloadHeadingFontSubset'] ) ? $attr['downloadHeadingFontSubset'] : '';
|
73 |
+
|
74 |
+
$download_content_load_google_font = isset( $attr['downloadContentLoadGoogleFonts'] ) ? $attr['downloadContentLoadGoogleFonts'] : '';
|
75 |
+
$download_content_font_family = isset( $attr['downloadContentFontFamily'] ) ? $attr['downloadContentFontFamily'] : '';
|
76 |
+
$download_content_font_weight = isset( $attr['downloadContentFontWeight'] ) ? $attr['downloadContentFontWeight'] : '';
|
77 |
+
$download_content_font_subset = isset( $attr['downloadContentFontSubset'] ) ? $attr['downloadContentFontSubset'] : '';
|
78 |
+
|
79 |
+
$order_detail_heading_load_google_font = isset( $attr['orderDetailHeadingLoadGoogleFonts'] ) ? $attr['orderDetailHeadingLoadGoogleFonts'] : '';
|
80 |
+
$order_detail_heading_font_family = isset( $attr['orderDetailHeadingFontFamily'] ) ? $attr['orderDetailHeadingFontFamily'] : '';
|
81 |
+
$order_detail_heading_font_weight = isset( $attr['orderDetailHeadingFontWeight'] ) ? $attr['orderDetailHeadingFontWeight'] : '';
|
82 |
+
$order_detail_heading_font_subset = isset( $attr['orderDetailHeadingFontSubset'] ) ? $attr['orderDetailHeadingFontSubset'] : '';
|
83 |
+
|
84 |
+
$order_detail_content_load_google_font = isset( $attr['orderDetailContentLoadGoogleFonts'] ) ? $attr['orderDetailContentLoadGoogleFonts'] : '';
|
85 |
+
$order_detail_content_font_family = isset( $attr['orderDetailContentFontFamily'] ) ? $attr['orderDetailContentFontFamily'] : '';
|
86 |
+
$order_detail_content_font_weight = isset( $attr['orderDetailContentFontWeight'] ) ? $attr['orderDetailContentFontWeight'] : '';
|
87 |
+
$order_detail_content_font_subset = isset( $attr['orderDetailContentFontSubset'] ) ? $attr['orderDetailContentFontSubset'] : '';
|
88 |
+
|
89 |
+
$customer_detail_heading_load_google_font = isset( $attr['customerDetailHeadingLoadGoogleFonts'] ) ? $attr['customerDetailHeadingLoadGoogleFonts'] : '';
|
90 |
+
$customer_detail_heading_font_family = isset( $attr['customerDetailHeadingFontFamily'] ) ? $attr['customerDetailHeadingFontFamily'] : '';
|
91 |
+
$customer_detail_heading_font_weight = isset( $attr['customerDetailHeadingFontWeight'] ) ? $attr['customerDetailHeadingFontWeight'] : '';
|
92 |
+
$customer_detail_heading_font_subset = isset( $attr['customerDetailHeadingFontSubset'] ) ? $attr['customerDetailHeadingFontSubset'] : '';
|
93 |
+
|
94 |
+
$customer_detail_content_load_google_font = isset( $attr['customerDetailContentLoadGoogleFonts'] ) ? $attr['customerDetailContentLoadGoogleFonts'] : '';
|
95 |
+
$customer_detail_content_font_family = isset( $attr['customerDetailContentFontFamily'] ) ? $attr['customerDetailContentFontFamily'] : '';
|
96 |
+
$customer_detail_content_font_weight = isset( $attr['customerDetailContentFontWeight'] ) ? $attr['customerDetailContentFontWeight'] : '';
|
97 |
+
$customer_detail_content_font_subset = isset( $attr['customerDetailContentFontSubset'] ) ? $attr['customerDetailContentFontSubset'] : '';
|
98 |
+
|
99 |
+
Cartflows_Gb_Helper::blocks_google_font( $heading_load_google_font, $heading_font_family, $heading_font_weight, $heading_font_subset );
|
100 |
+
Cartflows_Gb_Helper::blocks_google_font( $section_heading_load_google_font, $section_heading_font_family, $section_heading_font_weight, $section_heading_font_subset );
|
101 |
+
Cartflows_Gb_Helper::blocks_google_font( $section_content_load_google_font, $section_content_font_family, $section_content_font_weight, $section_content_font_subset );
|
102 |
+
Cartflows_Gb_Helper::blocks_google_font( $order_overview_load_google_font, $order_overview_font_family, $order_overview_font_weight, $order_overview_font_subset );
|
103 |
+
Cartflows_Gb_Helper::blocks_google_font( $download_heading_load_google_font, $download_heading_font_family, $download_heading_font_weight, $download_heading_font_subset );
|
104 |
+
Cartflows_Gb_Helper::blocks_google_font( $download_content_load_google_font, $download_content_font_family, $download_content_font_weight, $download_content_font_subset );
|
105 |
+
Cartflows_Gb_Helper::blocks_google_font( $order_detail_heading_load_google_font, $order_detail_heading_font_family, $order_detail_heading_font_weight, $order_detail_heading_font_subset );
|
106 |
+
Cartflows_Gb_Helper::blocks_google_font( $order_detail_content_load_google_font, $order_detail_content_font_family, $order_detail_content_font_weight, $order_detail_content_font_subset );
|
107 |
+
Cartflows_Gb_Helper::blocks_google_font( $customer_detail_heading_load_google_font, $customer_detail_heading_font_family, $customer_detail_heading_font_weight, $customer_detail_heading_font_subset );
|
108 |
+
Cartflows_Gb_Helper::blocks_google_font( $customer_detail_content_load_google_font, $customer_detail_content_font_family, $customer_detail_content_font_weight, $customer_detail_content_font_subset );
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Adds Google fonts for checkout form.
|
114 |
+
*
|
115 |
+
* @since x.x.x
|
116 |
+
* @param array $attr the blocks attr.
|
117 |
+
*/
|
118 |
+
public static function blocks_checkout_form_gfont( $attr ) {
|
119 |
+
|
120 |
+
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
121 |
+
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
122 |
+
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
123 |
+
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
124 |
+
|
125 |
+
$input_load_google_font = isset( $attr['inputLoadGoogleFonts'] ) ? $attr['inputLoadGoogleFonts'] : '';
|
126 |
+
$input_font_family = isset( $attr['inputFontFamily'] ) ? $attr['inputFontFamily'] : '';
|
127 |
+
$input_font_weight = isset( $attr['inputFontWeight'] ) ? $attr['inputFontWeight'] : '';
|
128 |
+
$input_font_subset = isset( $attr['inputFontSubset'] ) ? $attr['inputFontSubset'] : '';
|
129 |
+
|
130 |
+
$button_load_google_font = isset( $attr['buttonLoadGoogleFonts'] ) ? $attr['buttonLoadGoogleFonts'] : '';
|
131 |
+
$button_font_family = isset( $attr['buttonFontFamily'] ) ? $attr['buttonFontFamily'] : '';
|
132 |
+
$button_font_weight = isset( $attr['buttonFontWeight'] ) ? $attr['buttonFontWeight'] : '';
|
133 |
+
$button_font_subset = isset( $attr['buttonFontSubset'] ) ? $attr['buttonFontSubset'] : '';
|
134 |
+
|
135 |
+
$global_load_google_font = isset( $attr['globalLoadGoogleFonts'] ) ? $attr['globalLoadGoogleFonts'] : '';
|
136 |
+
$global_font_family = isset( $attr['globalFontFamily'] ) ? $attr['globalFontFamily'] : '';
|
137 |
+
$global_font_weight = isset( $attr['globalFontWeight'] ) ? $attr['globalFontWeight'] : '';
|
138 |
+
$global_font_subset = isset( $attr['globalFontSubset'] ) ? $attr['globalFontSubset'] : '';
|
139 |
+
|
140 |
+
Cartflows_Gb_Helper::blocks_google_font( $global_load_google_font, $global_font_family, $global_font_weight, $global_font_subset );
|
141 |
+
Cartflows_Gb_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
142 |
+
Cartflows_Gb_Helper::blocks_google_font( $button_load_google_font, $button_font_family, $button_font_weight, $button_font_subset );
|
143 |
+
Cartflows_Gb_Helper::blocks_google_font( $input_load_google_font, $input_font_family, $input_font_weight, $input_font_subset );
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Adds Google fonts for Optin Form block.
|
149 |
+
*
|
150 |
+
* @since x.x.x
|
151 |
+
* @param array $attr the blocks attr.
|
152 |
+
*/
|
153 |
+
public static function blocks_optin_form_gfont( $attr ) {
|
154 |
+
|
155 |
+
$general_load_google_font = isset( $attr['generalLoadGoogleFonts'] ) ? $attr['generalLoadGoogleFonts'] : '';
|
156 |
+
$general_font_family = isset( $attr['generalFontFamily'] ) ? $attr['generalFontFamily'] : '';
|
157 |
+
$general_font_weight = isset( $attr['generalFontWeight'] ) ? $attr['generalFontWeight'] : '';
|
158 |
+
$general_font_subset = isset( $attr['generalFontSubset'] ) ? $attr['generalFontSubset'] : '';
|
159 |
+
|
160 |
+
$submit_button_load_google_font = isset( $attr['submitButtonLoadGoogleFonts'] ) ? $attr['submitButtonLoadGoogleFonts'] : '';
|
161 |
+
$submit_button_font_family = isset( $attr['submitButtonFontFamily'] ) ? $attr['submitButtonFontFamily'] : '';
|
162 |
+
$submit_button_font_weight = isset( $attr['submitButtonFontWeight'] ) ? $attr['submitButtonFontWeight'] : '';
|
163 |
+
$submit_button_font_subset = isset( $attr['submitButtonFontSubset'] ) ? $attr['submitButtonFontSubset'] : '';
|
164 |
+
|
165 |
+
Cartflows_Gb_Helper::blocks_google_font( $general_load_google_font, $general_font_family, $general_font_weight, $general_font_subset );
|
166 |
+
Cartflows_Gb_Helper::blocks_google_font( $submit_button_load_google_font, $submit_button_font_family, $submit_button_font_weight, $submit_button_font_subset );
|
167 |
+
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
modules/gutenberg/classes/class-cartflows-block-loader.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Blocks Loader.
|
4 |
-
*
|
5 |
-
* @package Cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'Cartflows_Block_Loader' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Cartflows_Block_Loader.
|
16 |
-
*/
|
17 |
-
final class Cartflows_Block_Loader {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Member Variable
|
21 |
-
*
|
22 |
-
* @var 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
|
38 |
-
*/
|
39 |
-
public function __construct() {
|
40 |
-
|
41 |
-
define( 'CF_TABLET_BREAKPOINT', '976' );
|
42 |
-
define( 'CF_MOBILE_BREAKPOINT', '767' );
|
43 |
-
|
44 |
-
$this->load_plugin();
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Loads plugin files.
|
49 |
-
*
|
50 |
-
* @since x.x.x
|
51 |
-
*
|
52 |
-
* @return void
|
53 |
-
*/
|
54 |
-
public function load_plugin() {
|
55 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gb-helper.php';
|
56 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gutenberg-editor.php';
|
57 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-init-blocks.php';
|
58 |
-
if ( wcf()->is_woo_active ) {
|
59 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/order-detail-form/class-wcfb-order-detail-form.php';
|
60 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/checkout-form/class-wcfb-checkout-form.php';
|
61 |
-
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/optin-form/class-wcfb-optin-form.php';
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
Cartflows_Block_Loader::get_instance();
|
66 |
-
}
|
67 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Blocks Loader.
|
4 |
+
*
|
5 |
+
* @package Cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'Cartflows_Block_Loader' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Cartflows_Block_Loader.
|
16 |
+
*/
|
17 |
+
final class Cartflows_Block_Loader {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Member Variable
|
21 |
+
*
|
22 |
+
* @var 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
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
|
41 |
+
define( 'CF_TABLET_BREAKPOINT', '976' );
|
42 |
+
define( 'CF_MOBILE_BREAKPOINT', '767' );
|
43 |
+
|
44 |
+
$this->load_plugin();
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Loads plugin files.
|
49 |
+
*
|
50 |
+
* @since x.x.x
|
51 |
+
*
|
52 |
+
* @return void
|
53 |
+
*/
|
54 |
+
public function load_plugin() {
|
55 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gb-helper.php';
|
56 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gutenberg-editor.php';
|
57 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-init-blocks.php';
|
58 |
+
if ( wcf()->is_woo_active ) {
|
59 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/order-detail-form/class-wcfb-order-detail-form.php';
|
60 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/checkout-form/class-wcfb-checkout-form.php';
|
61 |
+
require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/optin-form/class-wcfb-optin-form.php';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
Cartflows_Block_Loader::get_instance();
|
66 |
+
}
|
67 |
+
|
modules/gutenberg/classes/class-cartflows-gb-helper.php
CHANGED
@@ -1,661 +1,661 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Gb Helper.
|
4 |
-
*
|
5 |
-
* @package Cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'Cartflows_Gb_Helper' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Cartflows_Gb_Helper.
|
16 |
-
*/
|
17 |
-
final class Cartflows_Gb_Helper {
|
18 |
-
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Member Variable
|
22 |
-
*
|
23 |
-
* @since x.x.x
|
24 |
-
* @var instance
|
25 |
-
*/
|
26 |
-
private static $instance;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Member Variable
|
30 |
-
*
|
31 |
-
* @since x.x.x
|
32 |
-
* @var instance
|
33 |
-
*/
|
34 |
-
public static $block_list;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Current Block List
|
38 |
-
*
|
39 |
-
* @since x.x.x
|
40 |
-
* @var current_block_list
|
41 |
-
*/
|
42 |
-
public static $current_block_list = array();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Page Blocks Variable
|
46 |
-
*
|
47 |
-
* @since x.x.x
|
48 |
-
* @var instance
|
49 |
-
*/
|
50 |
-
public static $page_blocks;
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Stylesheet
|
54 |
-
*
|
55 |
-
* @since x.x.x
|
56 |
-
* @var stylesheet
|
57 |
-
*/
|
58 |
-
public static $stylesheet;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Script
|
62 |
-
*
|
63 |
-
* @since x.x.x
|
64 |
-
* @var script
|
65 |
-
*/
|
66 |
-
public static $script;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Cartflows Block Flag
|
70 |
-
*
|
71 |
-
* @since x.x.x
|
72 |
-
* @var cf_flag
|
73 |
-
*/
|
74 |
-
public static $cf_flag = false;
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Google fonts to enqueue
|
78 |
-
*
|
79 |
-
* @var array
|
80 |
-
*/
|
81 |
-
public static $gfonts = array();
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Initiator
|
85 |
-
*
|
86 |
-
* @since x.x.x
|
87 |
-
*/
|
88 |
-
public static function get_instance() {
|
89 |
-
if ( ! isset( self::$instance ) ) {
|
90 |
-
self::$instance = new self();
|
91 |
-
}
|
92 |
-
return self::$instance;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Constructor
|
97 |
-
*/
|
98 |
-
public function __construct() {
|
99 |
-
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-config.php';
|
100 |
-
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-helper.php';
|
101 |
-
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-js.php';
|
102 |
-
|
103 |
-
self::$block_list = Cartflows_Block_Config::get_block_attributes();
|
104 |
-
|
105 |
-
add_action( 'wp', array( $this, 'wp_actions' ), 10 );
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* WP Actions.
|
110 |
-
*/
|
111 |
-
public function wp_actions() {
|
112 |
-
|
113 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
114 |
-
|
115 |
-
$this->generate_assets();
|
116 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'block_assets' ), 10 );
|
117 |
-
add_action( 'wp_head', array( $this, 'frontend_gfonts' ), 120 );
|
118 |
-
add_action( 'wp_head', array( $this, 'print_stylesheet' ), 80 );
|
119 |
-
add_action( 'wp_footer', array( $this, 'print_script' ), 1000 );
|
120 |
-
}
|
121 |
-
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Load the front end Google Fonts.
|
126 |
-
*/
|
127 |
-
public function frontend_gfonts() {
|
128 |
-
|
129 |
-
if ( empty( self::$gfonts ) ) {
|
130 |
-
return;
|
131 |
-
}
|
132 |
-
$show_google_fonts = apply_filters( 'cf_blocks_show_google_fonts', true );
|
133 |
-
if ( ! $show_google_fonts ) {
|
134 |
-
return;
|
135 |
-
}
|
136 |
-
$link = '';
|
137 |
-
$subsets = array();
|
138 |
-
foreach ( self::$gfonts as $key => $gfont_values ) {
|
139 |
-
if ( ! empty( $link ) ) {
|
140 |
-
$link .= '%7C'; // Append a new font to the string.
|
141 |
-
}
|
142 |
-
$link .= $gfont_values['fontfamily'];
|
143 |
-
if ( ! empty( $gfont_values['fontvariants'] ) ) {
|
144 |
-
$link .= ':';
|
145 |
-
$link .= implode( ',', $gfont_values['fontvariants'] );
|
146 |
-
}
|
147 |
-
if ( ! empty( $gfont_values['fontsubsets'] ) ) {
|
148 |
-
foreach ( $gfont_values['fontsubsets'] as $subset ) {
|
149 |
-
if ( ! in_array( $subset, $subsets, true ) ) {
|
150 |
-
array_push( $subsets, $subset );
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
if ( ! empty( $subsets ) ) {
|
156 |
-
$link .= '&subset=' . implode( ',', $subsets );
|
157 |
-
}
|
158 |
-
|
159 |
-
if ( isset( $link ) && ! empty( $link ) ) {
|
160 |
-
echo '<link id="cf_show_google_fonts" href="//fonts.googleapis.com/css?family=' . esc_attr( str_replace( '|', '%7C', $link ) ) . '" rel="stylesheet">'; //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Print the Script in footer.
|
166 |
-
*/
|
167 |
-
public function print_script() {
|
168 |
-
|
169 |
-
if ( is_null( self::$script ) || '' === self::$script ) {
|
170 |
-
return;
|
171 |
-
}
|
172 |
-
|
173 |
-
ob_start();
|
174 |
-
?>
|
175 |
-
<script type="text/javascript" id="cf-script-frontend"><?php echo self::$script; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></script>
|
176 |
-
<?php
|
177 |
-
ob_end_flush();
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Print the Stylesheet in header.
|
182 |
-
*/
|
183 |
-
public function print_stylesheet() {
|
184 |
-
|
185 |
-
if ( is_null( self::$stylesheet ) || '' === self::$stylesheet ) {
|
186 |
-
return;
|
187 |
-
}
|
188 |
-
|
189 |
-
ob_start();
|
190 |
-
?>
|
191 |
-
<style id="cf-style-frontend"><?php echo self::$stylesheet; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></style>
|
192 |
-
<?php
|
193 |
-
ob_end_flush();
|
194 |
-
}
|
195 |
-
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Generates stylesheet and appends in head tag.
|
199 |
-
*
|
200 |
-
* @since x.x.x
|
201 |
-
*/
|
202 |
-
public function generate_assets() {
|
203 |
-
|
204 |
-
$this_post = array();
|
205 |
-
|
206 |
-
global $post;
|
207 |
-
$this_post = $post;
|
208 |
-
|
209 |
-
if ( ! is_object( $this_post ) ) {
|
210 |
-
return;
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Filters the post to build stylesheet for.
|
215 |
-
*
|
216 |
-
* @param \WP_Post $this_post The global post.
|
217 |
-
*/
|
218 |
-
$this_post = apply_filters( 'cf_post_for_stylesheet', $this_post );
|
219 |
-
|
220 |
-
$this->get_generated_stylesheet( $this_post );
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Generates stylesheet in loop.
|
225 |
-
*
|
226 |
-
* @param object $this_post Current Post Object.
|
227 |
-
* @since x.x.x
|
228 |
-
*/
|
229 |
-
public function get_generated_stylesheet( $this_post ) {
|
230 |
-
|
231 |
-
if ( is_object( $this_post ) && isset( $this_post->ID ) && has_blocks( $this_post->ID ) && isset( $this_post->post_content ) ) {
|
232 |
-
|
233 |
-
$blocks = $this->parse( $this_post->post_content );
|
234 |
-
|
235 |
-
self::$page_blocks = $blocks;
|
236 |
-
|
237 |
-
if ( ! is_array( $blocks ) || empty( $blocks ) ) {
|
238 |
-
return;
|
239 |
-
}
|
240 |
-
|
241 |
-
$assets = $this->get_assets( $blocks );
|
242 |
-
|
243 |
-
self::$stylesheet .= $assets['css'];
|
244 |
-
self::$script .= $assets['js'];
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Enqueue Gutenberg block assets for both frontend + backend.
|
250 |
-
*
|
251 |
-
* @since x.x.x
|
252 |
-
*/
|
253 |
-
public function block_assets() {
|
254 |
-
|
255 |
-
$block_list_for_assets = self::$current_block_list;
|
256 |
-
|
257 |
-
$blocks = Cartflows_Block_Config::get_block_attributes();
|
258 |
-
|
259 |
-
foreach ( $block_list_for_assets as $key => $curr_block_name ) {
|
260 |
-
|
261 |
-
$js_assets = ( isset( $blocks[ $curr_block_name ]['js_assets'] ) ) ? $blocks[ $curr_block_name ]['js_assets'] : array();
|
262 |
-
|
263 |
-
$css_assets = ( isset( $blocks[ $curr_block_name ]['css_assets'] ) ) ? $blocks[ $curr_block_name ]['css_assets'] : array();
|
264 |
-
|
265 |
-
foreach ( $js_assets as $asset_handle => $val ) {
|
266 |
-
// Scripts.
|
267 |
-
wp_enqueue_script( $val );
|
268 |
-
}
|
269 |
-
|
270 |
-
foreach ( $css_assets as $asset_handle => $val ) {
|
271 |
-
// Styles.
|
272 |
-
wp_enqueue_style( $val );
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Parse Guten Block.
|
280 |
-
*
|
281 |
-
* @param string $content the content string.
|
282 |
-
* @since x.x.x
|
283 |
-
*/
|
284 |
-
public function parse( $content ) {
|
285 |
-
|
286 |
-
global $wp_version;
|
287 |
-
|
288 |
-
return ( version_compare( $wp_version, '5', '>=' ) ) ? parse_blocks( $content ) : gutenberg_parse_blocks( $content );
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Generates stylesheet for reusable blocks.
|
293 |
-
*
|
294 |
-
* @param array $blocks Blocks array.
|
295 |
-
* @since x.x.x
|
296 |
-
*/
|
297 |
-
public function get_assets( $blocks ) {
|
298 |
-
|
299 |
-
$desktop = '';
|
300 |
-
$tablet = '';
|
301 |
-
$mobile = '';
|
302 |
-
|
303 |
-
$tab_styling_css = '';
|
304 |
-
$mob_styling_css = '';
|
305 |
-
|
306 |
-
$js = '';
|
307 |
-
|
308 |
-
foreach ( $blocks as $i => $block ) {
|
309 |
-
|
310 |
-
if ( is_array( $block ) ) {
|
311 |
-
|
312 |
-
if ( '' === $block['blockName'] ) {
|
313 |
-
continue;
|
314 |
-
}
|
315 |
-
if ( 'core/block' === $block['blockName'] ) {
|
316 |
-
$id = ( isset( $block['attrs']['ref'] ) ) ? $block['attrs']['ref'] : 0;
|
317 |
-
|
318 |
-
if ( $id ) {
|
319 |
-
$content = get_post_field( 'post_content', $id );
|
320 |
-
|
321 |
-
$reusable_blocks = $this->parse( $content );
|
322 |
-
|
323 |
-
$assets = $this->get_assets( $reusable_blocks );
|
324 |
-
|
325 |
-
self::$stylesheet .= $assets['css'];
|
326 |
-
self::$script .= $assets['js'];
|
327 |
-
|
328 |
-
}
|
329 |
-
} else {
|
330 |
-
|
331 |
-
$block_assets = $this->get_block_css_and_js( $block );
|
332 |
-
// Get CSS for the Block.
|
333 |
-
$css = $block_assets['css'];
|
334 |
-
|
335 |
-
if ( isset( $css['desktop'] ) ) {
|
336 |
-
$desktop .= $css['desktop'];
|
337 |
-
$tablet .= $css['tablet'];
|
338 |
-
$mobile .= $css['mobile'];
|
339 |
-
}
|
340 |
-
|
341 |
-
$js .= $block_assets['js'];
|
342 |
-
}
|
343 |
-
}
|
344 |
-
}
|
345 |
-
|
346 |
-
if ( ! empty( $tablet ) ) {
|
347 |
-
$tab_styling_css .= '@media only screen and (max-width: ' . CF_TABLET_BREAKPOINT . 'px) {';
|
348 |
-
$tab_styling_css .= $tablet;
|
349 |
-
$tab_styling_css .= '}';
|
350 |
-
}
|
351 |
-
|
352 |
-
if ( ! empty( $mobile ) ) {
|
353 |
-
$mob_styling_css .= '@media only screen and (max-width: ' . CF_MOBILE_BREAKPOINT . 'px) {';
|
354 |
-
$mob_styling_css .= $mobile;
|
355 |
-
$mob_styling_css .= '}';
|
356 |
-
}
|
357 |
-
|
358 |
-
return array(
|
359 |
-
'css' => $desktop . $tab_styling_css . $mob_styling_css,
|
360 |
-
'js' => $js,
|
361 |
-
);
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Get Typography Dynamic CSS.
|
366 |
-
*
|
367 |
-
* @param array $attr The Attribute array.
|
368 |
-
* @param string $slug The field slug.
|
369 |
-
* @param string $selector The selector array.
|
370 |
-
* @param array $combined_selectors The combined selector array.
|
371 |
-
* @since x.x.x
|
372 |
-
* @return bool|string
|
373 |
-
*/
|
374 |
-
public static function get_typography_css( $attr, $slug, $selector, $combined_selectors ) {
|
375 |
-
|
376 |
-
$typo_css_desktop = array();
|
377 |
-
$typo_css_tablet = array();
|
378 |
-
$typo_css_mobile = array();
|
379 |
-
|
380 |
-
$already_selectors_desktop = ( isset( $combined_selectors['desktop'][ $selector ] ) ) ? $combined_selectors['desktop'][ $selector ] : array();
|
381 |
-
$already_selectors_tablet = ( isset( $combined_selectors['tablet'][ $selector ] ) ) ? $combined_selectors['tablet'][ $selector ] : array();
|
382 |
-
$already_selectors_mobile = ( isset( $combined_selectors['mobile'][ $selector ] ) ) ? $combined_selectors['mobile'][ $selector ] : array();
|
383 |
-
|
384 |
-
$family_slug = ( '' === $slug ) ? 'fontFamily' : $slug . 'FontFamily';
|
385 |
-
$weight_slug = ( '' === $slug ) ? 'fontWeight' : $slug . 'FontWeight';
|
386 |
-
|
387 |
-
$l_ht_slug = ( '' === $slug ) ? 'lineHeight' : $slug . 'LineHeight';
|
388 |
-
$f_sz_slug = ( '' === $slug ) ? 'fontSize' : $slug . 'FontSize';
|
389 |
-
$l_ht_type_slug = ( '' === $slug ) ? 'lineHeightType' : $slug . 'LineHeightType';
|
390 |
-
$f_sz_type_slug = ( '' === $slug ) ? 'fontSizeType' : $slug . 'FontSizeType';
|
391 |
-
|
392 |
-
$typo_css_desktop[ $selector ] = array(
|
393 |
-
'font-family' => $attr[ $family_slug ],
|
394 |
-
'font-weight' => $attr[ $weight_slug ],
|
395 |
-
'font-size' => ( isset( $attr[ $f_sz_slug ] ) ) ? self::get_css_value( $attr[ $f_sz_slug ], $attr[ $f_sz_type_slug ] ) : '',
|
396 |
-
'line-height' => ( isset( $attr[ $l_ht_slug ] ) ) ? self::get_css_value( $attr[ $l_ht_slug ], $attr[ $l_ht_type_slug ] ) : '',
|
397 |
-
);
|
398 |
-
|
399 |
-
$typo_css_desktop[ $selector ] = array_merge(
|
400 |
-
$typo_css_desktop[ $selector ],
|
401 |
-
$already_selectors_desktop
|
402 |
-
);
|
403 |
-
|
404 |
-
$typo_css_tablet[ $selector ] = array(
|
405 |
-
'font-size' => ( isset( $attr[ $f_sz_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Tablet' ], $attr[ $f_sz_type_slug ] ) : '',
|
406 |
-
'line-height' => ( isset( $attr[ $l_ht_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Tablet' ], $attr[ $l_ht_type_slug ] ) : '',
|
407 |
-
);
|
408 |
-
|
409 |
-
$typo_css_tablet[ $selector ] = array_merge(
|
410 |
-
$typo_css_tablet[ $selector ],
|
411 |
-
$already_selectors_tablet
|
412 |
-
);
|
413 |
-
|
414 |
-
$typo_css_mobile[ $selector ] = array(
|
415 |
-
'font-size' => ( isset( $attr[ $f_sz_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Mobile' ], $attr[ $f_sz_type_slug ] ) : '',
|
416 |
-
'line-height' => ( isset( $attr[ $l_ht_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Mobile' ], $attr[ $l_ht_type_slug ] ) : '',
|
417 |
-
);
|
418 |
-
|
419 |
-
$typo_css_mobile[ $selector ] = array_merge(
|
420 |
-
$typo_css_mobile[ $selector ],
|
421 |
-
$already_selectors_mobile
|
422 |
-
);
|
423 |
-
|
424 |
-
return array(
|
425 |
-
'desktop' => array_merge(
|
426 |
-
$combined_selectors['desktop'],
|
427 |
-
$typo_css_desktop
|
428 |
-
),
|
429 |
-
'tablet' => array_merge(
|
430 |
-
$combined_selectors['tablet'],
|
431 |
-
$typo_css_tablet
|
432 |
-
),
|
433 |
-
'mobile' => array_merge(
|
434 |
-
$combined_selectors['mobile'],
|
435 |
-
$typo_css_mobile
|
436 |
-
),
|
437 |
-
);
|
438 |
-
}
|
439 |
-
|
440 |
-
/**
|
441 |
-
* Get CSS value
|
442 |
-
*
|
443 |
-
* Syntax:
|
444 |
-
*
|
445 |
-
* get_css_value( VALUE, UNIT );
|
446 |
-
*
|
447 |
-
* E.g.
|
448 |
-
*
|
449 |
-
* get_css_value( VALUE, 'em' );
|
450 |
-
*
|
451 |
-
* @param string $value CSS value.
|
452 |
-
* @param string $unit CSS unit.
|
453 |
-
* @since x.x.x
|
454 |
-
*/
|
455 |
-
public static function get_css_value( $value = '', $unit = '' ) {
|
456 |
-
|
457 |
-
$css_val = '';
|
458 |
-
|
459 |
-
if ( '' !== $value ) {
|
460 |
-
$css_val = esc_attr( $value ) . $unit;
|
461 |
-
}
|
462 |
-
|
463 |
-
return $css_val;
|
464 |
-
}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* Parse CSS into correct CSS syntax.
|
468 |
-
*
|
469 |
-
* @param array $combined_selectors The combined selector array.
|
470 |
-
* @param string $id The selector ID.
|
471 |
-
* @since x.x.x
|
472 |
-
*/
|
473 |
-
public static function generate_all_css( $combined_selectors, $id ) {
|
474 |
-
|
475 |
-
return array(
|
476 |
-
'desktop' => self::generate_css( $combined_selectors['desktop'], $id ),
|
477 |
-
'tablet' => self::generate_css( $combined_selectors['tablet'], $id ),
|
478 |
-
'mobile' => self::generate_css( $combined_selectors['mobile'], $id ),
|
479 |
-
);
|
480 |
-
}
|
481 |
-
|
482 |
-
/**
|
483 |
-
* Parse CSS into correct CSS syntax.
|
484 |
-
*
|
485 |
-
* @param array $selectors The block selectors.
|
486 |
-
* @param string $id The selector ID.
|
487 |
-
* @since x.x.x
|
488 |
-
*/
|
489 |
-
public static function generate_css( $selectors, $id ) {
|
490 |
-
$styling_css = '';
|
491 |
-
|
492 |
-
if ( ! empty( $selectors ) ) {
|
493 |
-
foreach ( $selectors as $key => $value ) {
|
494 |
-
|
495 |
-
$css = '';
|
496 |
-
|
497 |
-
foreach ( $value as $j => $val ) {
|
498 |
-
|
499 |
-
if ( 'font-family' === $j && 'Default' === $val ) {
|
500 |
-
continue;
|
501 |
-
}
|
502 |
-
|
503 |
-
if ( ! empty( $val ) || 0 === $val ) {
|
504 |
-
if ( 'font-family' === $j ) {
|
505 |
-
$css .= $j . ': "' . $val . '";';
|
506 |
-
} else {
|
507 |
-
$css .= $j . ': ' . $val . ';';
|
508 |
-
}
|
509 |
-
}
|
510 |
-
}
|
511 |
-
|
512 |
-
if ( ! empty( $css ) ) {
|
513 |
-
$styling_css .= $id;
|
514 |
-
$styling_css .= $key . '{';
|
515 |
-
$styling_css .= $css . '}';
|
516 |
-
}
|
517 |
-
}
|
518 |
-
}
|
519 |
-
|
520 |
-
return $styling_css;
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Adds Google fonts all blocks.
|
525 |
-
*
|
526 |
-
* @param array $load_google_font the blocks attr.
|
527 |
-
* @param array $font_family the blocks attr.
|
528 |
-
* @param array $font_weight the blocks attr.
|
529 |
-
* @param array $font_subset the blocks attr.
|
530 |
-
*/
|
531 |
-
public static function blocks_google_font( $load_google_font, $font_family, $font_weight, $font_subset ) {
|
532 |
-
|
533 |
-
if ( true === $load_google_font ) {
|
534 |
-
if ( ! array_key_exists( $font_family, self::$gfonts ) ) {
|
535 |
-
$add_font = array(
|
536 |
-
'fontfamily' => $font_family,
|
537 |
-
'fontvariants' => ( isset( $font_weight ) && ! empty( $font_weight ) ? array( $font_weight ) : array() ),
|
538 |
-
'fontsubsets' => ( isset( $font_subset ) && ! empty( $font_subset ) ? array( $font_subset ) : array() ),
|
539 |
-
);
|
540 |
-
self::$gfonts[ $font_family ] = $add_font;
|
541 |
-
} else {
|
542 |
-
if ( isset( $font_weight ) && ! empty( $font_weight ) && ! in_array( $font_weight, self::$gfonts[ $font_family ]['fontvariants'], true ) ) {
|
543 |
-
array_push( self::$gfonts[ $font_family ]['fontvariants'], $font_weight );
|
544 |
-
}
|
545 |
-
if ( isset( $font_subset ) && ! empty( $font_subset ) && ! in_array( $font_subset, self::$gfonts[ $font_family ]['fontsubsets'], true ) ) {
|
546 |
-
array_push( self::$gfonts[ $font_family ]['fontsubsets'], $font_subset );
|
547 |
-
}
|
548 |
-
}
|
549 |
-
}
|
550 |
-
}
|
551 |
-
|
552 |
-
|
553 |
-
/**
|
554 |
-
* Generates CSS recurrsively.
|
555 |
-
*
|
556 |
-
* @param object $block The block object.
|
557 |
-
* @since x.x.x
|
558 |
-
*/
|
559 |
-
public function get_block_css_and_js( $block ) {
|
560 |
-
|
561 |
-
$block = (array) $block;
|
562 |
-
|
563 |
-
$name = $block['blockName'];
|
564 |
-
$css = array();
|
565 |
-
$js = '';
|
566 |
-
$block_id = '';
|
567 |
-
|
568 |
-
if ( isset( $name ) ) {
|
569 |
-
|
570 |
-
if ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) {
|
571 |
-
$blockattr = $block['attrs'];
|
572 |
-
if ( isset( $blockattr['block_id'] ) ) {
|
573 |
-
$block_id = $blockattr['block_id'];
|
574 |
-
}
|
575 |
-
}
|
576 |
-
|
577 |
-
self::$current_block_list[] = $name;
|
578 |
-
|
579 |
-
if ( strpos( $name, 'wcfb/' ) !== false ) {
|
580 |
-
self::$cf_flag = true;
|
581 |
-
}
|
582 |
-
|
583 |
-
switch ( $name ) {
|
584 |
-
case 'wcfb/next-step-button':
|
585 |
-
$css = Cartflows_Block_Helper::get_next_step_button_css( $blockattr, $block_id );
|
586 |
-
Cartflows_Block_JS::blocks_next_step_button_gfont( $blockattr );
|
587 |
-
break;
|
588 |
-
|
589 |
-
case 'wcfb/order-detail-form':
|
590 |
-
$css = Cartflows_Block_Helper::get_order_detail_form_css( $blockattr, $block_id );
|
591 |
-
Cartflows_Block_JS::blocks_order_detail_form_gfont( $blockattr );
|
592 |
-
break;
|
593 |
-
|
594 |
-
case 'wcfb/checkout-form':
|
595 |
-
$css = Cartflows_Block_Helper::get_checkout_form_css( $blockattr, $block_id );
|
596 |
-
Cartflows_Block_JS::blocks_checkout_form_gfont( $blockattr );
|
597 |
-
break;
|
598 |
-
|
599 |
-
case 'wcfb/optin-form':
|
600 |
-
$css = Cartflows_Block_Helper::get_optin_form_css( $blockattr, $block_id );
|
601 |
-
Cartflows_Block_JS::blocks_optin_form_gfont( $blockattr );
|
602 |
-
break;
|
603 |
-
|
604 |
-
default:
|
605 |
-
// Nothing to do here.
|
606 |
-
break;
|
607 |
-
}
|
608 |
-
|
609 |
-
if ( isset( $block['innerBlocks'] ) ) {
|
610 |
-
foreach ( $block['innerBlocks'] as $j => $inner_block ) {
|
611 |
-
if ( 'core/block' === $inner_block['blockName'] ) {
|
612 |
-
$id = ( isset( $inner_block['attrs']['ref'] ) ) ? $inner_block['attrs']['ref'] : 0;
|
613 |
-
|
614 |
-
if ( $id ) {
|
615 |
-
$content = get_post_field( 'post_content', $id );
|
616 |
-
|
617 |
-
$reusable_blocks = $this->parse( $content );
|
618 |
-
|
619 |
-
$assets = $this->get_assets( $reusable_blocks );
|
620 |
-
|
621 |
-
self::$stylesheet .= $assets['css'];
|
622 |
-
self::$script .= $assets['js'];
|
623 |
-
}
|
624 |
-
} else {
|
625 |
-
// Get CSS for the Block.
|
626 |
-
$inner_assets = $this->get_block_css_and_js( $inner_block );
|
627 |
-
$inner_block_css = $inner_assets['css'];
|
628 |
-
|
629 |
-
$css_desktop = ( isset( $css['desktop'] ) ? $css['desktop'] : '' );
|
630 |
-
$css_tablet = ( isset( $css['tablet'] ) ? $css['tablet'] : '' );
|
631 |
-
$css_mobile = ( isset( $css['mobile'] ) ? $css['mobile'] : '' );
|
632 |
-
|
633 |
-
if ( isset( $inner_block_css['desktop'] ) ) {
|
634 |
-
$css['desktop'] = $css_desktop . $inner_block_css['desktop'];
|
635 |
-
$css['tablet'] = $css_tablet . $inner_block_css['tablet'];
|
636 |
-
$css['mobile'] = $css_mobile . $inner_block_css['mobile'];
|
637 |
-
}
|
638 |
-
|
639 |
-
$js .= $inner_assets['js'];
|
640 |
-
}
|
641 |
-
}
|
642 |
-
}
|
643 |
-
|
644 |
-
self::$current_block_list = array_unique( self::$current_block_list );
|
645 |
-
}
|
646 |
-
|
647 |
-
return array(
|
648 |
-
'css' => $css,
|
649 |
-
'js' => $js,
|
650 |
-
);
|
651 |
-
|
652 |
-
}
|
653 |
-
|
654 |
-
|
655 |
-
}
|
656 |
-
/**
|
657 |
-
* Prepare if class 'Cartflows_Gb_Helper' exist.
|
658 |
-
* Kicking this off by calling 'get_instance()' method
|
659 |
-
*/
|
660 |
-
Cartflows_Gb_Helper::get_instance();
|
661 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Gb Helper.
|
4 |
+
*
|
5 |
+
* @package Cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'Cartflows_Gb_Helper' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Cartflows_Gb_Helper.
|
16 |
+
*/
|
17 |
+
final class Cartflows_Gb_Helper {
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Member Variable
|
22 |
+
*
|
23 |
+
* @since x.x.x
|
24 |
+
* @var instance
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Member Variable
|
30 |
+
*
|
31 |
+
* @since x.x.x
|
32 |
+
* @var instance
|
33 |
+
*/
|
34 |
+
public static $block_list;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Current Block List
|
38 |
+
*
|
39 |
+
* @since x.x.x
|
40 |
+
* @var current_block_list
|
41 |
+
*/
|
42 |
+
public static $current_block_list = array();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Page Blocks Variable
|
46 |
+
*
|
47 |
+
* @since x.x.x
|
48 |
+
* @var instance
|
49 |
+
*/
|
50 |
+
public static $page_blocks;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Stylesheet
|
54 |
+
*
|
55 |
+
* @since x.x.x
|
56 |
+
* @var stylesheet
|
57 |
+
*/
|
58 |
+
public static $stylesheet;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Script
|
62 |
+
*
|
63 |
+
* @since x.x.x
|
64 |
+
* @var script
|
65 |
+
*/
|
66 |
+
public static $script;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Cartflows Block Flag
|
70 |
+
*
|
71 |
+
* @since x.x.x
|
72 |
+
* @var cf_flag
|
73 |
+
*/
|
74 |
+
public static $cf_flag = false;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Google fonts to enqueue
|
78 |
+
*
|
79 |
+
* @var array
|
80 |
+
*/
|
81 |
+
public static $gfonts = array();
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Initiator
|
85 |
+
*
|
86 |
+
* @since x.x.x
|
87 |
+
*/
|
88 |
+
public static function get_instance() {
|
89 |
+
if ( ! isset( self::$instance ) ) {
|
90 |
+
self::$instance = new self();
|
91 |
+
}
|
92 |
+
return self::$instance;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Constructor
|
97 |
+
*/
|
98 |
+
public function __construct() {
|
99 |
+
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-config.php';
|
100 |
+
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-helper.php';
|
101 |
+
require CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-block-js.php';
|
102 |
+
|
103 |
+
self::$block_list = Cartflows_Block_Config::get_block_attributes();
|
104 |
+
|
105 |
+
add_action( 'wp', array( $this, 'wp_actions' ), 10 );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* WP Actions.
|
110 |
+
*/
|
111 |
+
public function wp_actions() {
|
112 |
+
|
113 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
114 |
+
|
115 |
+
$this->generate_assets();
|
116 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'block_assets' ), 10 );
|
117 |
+
add_action( 'wp_head', array( $this, 'frontend_gfonts' ), 120 );
|
118 |
+
add_action( 'wp_head', array( $this, 'print_stylesheet' ), 80 );
|
119 |
+
add_action( 'wp_footer', array( $this, 'print_script' ), 1000 );
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Load the front end Google Fonts.
|
126 |
+
*/
|
127 |
+
public function frontend_gfonts() {
|
128 |
+
|
129 |
+
if ( empty( self::$gfonts ) ) {
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
$show_google_fonts = apply_filters( 'cf_blocks_show_google_fonts', true );
|
133 |
+
if ( ! $show_google_fonts ) {
|
134 |
+
return;
|
135 |
+
}
|
136 |
+
$link = '';
|
137 |
+
$subsets = array();
|
138 |
+
foreach ( self::$gfonts as $key => $gfont_values ) {
|
139 |
+
if ( ! empty( $link ) ) {
|
140 |
+
$link .= '%7C'; // Append a new font to the string.
|
141 |
+
}
|
142 |
+
$link .= $gfont_values['fontfamily'];
|
143 |
+
if ( ! empty( $gfont_values['fontvariants'] ) ) {
|
144 |
+
$link .= ':';
|
145 |
+
$link .= implode( ',', $gfont_values['fontvariants'] );
|
146 |
+
}
|
147 |
+
if ( ! empty( $gfont_values['fontsubsets'] ) ) {
|
148 |
+
foreach ( $gfont_values['fontsubsets'] as $subset ) {
|
149 |
+
if ( ! in_array( $subset, $subsets, true ) ) {
|
150 |
+
array_push( $subsets, $subset );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
if ( ! empty( $subsets ) ) {
|
156 |
+
$link .= '&subset=' . implode( ',', $subsets );
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( isset( $link ) && ! empty( $link ) ) {
|
160 |
+
echo '<link id="cf_show_google_fonts" href="//fonts.googleapis.com/css?family=' . esc_attr( str_replace( '|', '%7C', $link ) ) . '" rel="stylesheet">'; //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Print the Script in footer.
|
166 |
+
*/
|
167 |
+
public function print_script() {
|
168 |
+
|
169 |
+
if ( is_null( self::$script ) || '' === self::$script ) {
|
170 |
+
return;
|
171 |
+
}
|
172 |
+
|
173 |
+
ob_start();
|
174 |
+
?>
|
175 |
+
<script type="text/javascript" id="cf-script-frontend"><?php echo self::$script; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></script>
|
176 |
+
<?php
|
177 |
+
ob_end_flush();
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Print the Stylesheet in header.
|
182 |
+
*/
|
183 |
+
public function print_stylesheet() {
|
184 |
+
|
185 |
+
if ( is_null( self::$stylesheet ) || '' === self::$stylesheet ) {
|
186 |
+
return;
|
187 |
+
}
|
188 |
+
|
189 |
+
ob_start();
|
190 |
+
?>
|
191 |
+
<style id="cf-style-frontend"><?php echo self::$stylesheet; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></style>
|
192 |
+
<?php
|
193 |
+
ob_end_flush();
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Generates stylesheet and appends in head tag.
|
199 |
+
*
|
200 |
+
* @since x.x.x
|
201 |
+
*/
|
202 |
+
public function generate_assets() {
|
203 |
+
|
204 |
+
$this_post = array();
|
205 |
+
|
206 |
+
global $post;
|
207 |
+
$this_post = $post;
|
208 |
+
|
209 |
+
if ( ! is_object( $this_post ) ) {
|
210 |
+
return;
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Filters the post to build stylesheet for.
|
215 |
+
*
|
216 |
+
* @param \WP_Post $this_post The global post.
|
217 |
+
*/
|
218 |
+
$this_post = apply_filters( 'cf_post_for_stylesheet', $this_post );
|
219 |
+
|
220 |
+
$this->get_generated_stylesheet( $this_post );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Generates stylesheet in loop.
|
225 |
+
*
|
226 |
+
* @param object $this_post Current Post Object.
|
227 |
+
* @since x.x.x
|
228 |
+
*/
|
229 |
+
public function get_generated_stylesheet( $this_post ) {
|
230 |
+
|
231 |
+
if ( is_object( $this_post ) && isset( $this_post->ID ) && has_blocks( $this_post->ID ) && isset( $this_post->post_content ) ) {
|
232 |
+
|
233 |
+
$blocks = $this->parse( $this_post->post_content );
|
234 |
+
|
235 |
+
self::$page_blocks = $blocks;
|
236 |
+
|
237 |
+
if ( ! is_array( $blocks ) || empty( $blocks ) ) {
|
238 |
+
return;
|
239 |
+
}
|
240 |
+
|
241 |
+
$assets = $this->get_assets( $blocks );
|
242 |
+
|
243 |
+
self::$stylesheet .= $assets['css'];
|
244 |
+
self::$script .= $assets['js'];
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Enqueue Gutenberg block assets for both frontend + backend.
|
250 |
+
*
|
251 |
+
* @since x.x.x
|
252 |
+
*/
|
253 |
+
public function block_assets() {
|
254 |
+
|
255 |
+
$block_list_for_assets = self::$current_block_list;
|
256 |
+
|
257 |
+
$blocks = Cartflows_Block_Config::get_block_attributes();
|
258 |
+
|
259 |
+
foreach ( $block_list_for_assets as $key => $curr_block_name ) {
|
260 |
+
|
261 |
+
$js_assets = ( isset( $blocks[ $curr_block_name ]['js_assets'] ) ) ? $blocks[ $curr_block_name ]['js_assets'] : array();
|
262 |
+
|
263 |
+
$css_assets = ( isset( $blocks[ $curr_block_name ]['css_assets'] ) ) ? $blocks[ $curr_block_name ]['css_assets'] : array();
|
264 |
+
|
265 |
+
foreach ( $js_assets as $asset_handle => $val ) {
|
266 |
+
// Scripts.
|
267 |
+
wp_enqueue_script( $val );
|
268 |
+
}
|
269 |
+
|
270 |
+
foreach ( $css_assets as $asset_handle => $val ) {
|
271 |
+
// Styles.
|
272 |
+
wp_enqueue_style( $val );
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Parse Guten Block.
|
280 |
+
*
|
281 |
+
* @param string $content the content string.
|
282 |
+
* @since x.x.x
|
283 |
+
*/
|
284 |
+
public function parse( $content ) {
|
285 |
+
|
286 |
+
global $wp_version;
|
287 |
+
|
288 |
+
return ( version_compare( $wp_version, '5', '>=' ) ) ? parse_blocks( $content ) : gutenberg_parse_blocks( $content );
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Generates stylesheet for reusable blocks.
|
293 |
+
*
|
294 |
+
* @param array $blocks Blocks array.
|
295 |
+
* @since x.x.x
|
296 |
+
*/
|
297 |
+
public function get_assets( $blocks ) {
|
298 |
+
|
299 |
+
$desktop = '';
|
300 |
+
$tablet = '';
|
301 |
+
$mobile = '';
|
302 |
+
|
303 |
+
$tab_styling_css = '';
|
304 |
+
$mob_styling_css = '';
|
305 |
+
|
306 |
+
$js = '';
|
307 |
+
|
308 |
+
foreach ( $blocks as $i => $block ) {
|
309 |
+
|
310 |
+
if ( is_array( $block ) ) {
|
311 |
+
|
312 |
+
if ( '' === $block['blockName'] ) {
|
313 |
+
continue;
|
314 |
+
}
|
315 |
+
if ( 'core/block' === $block['blockName'] ) {
|
316 |
+
$id = ( isset( $block['attrs']['ref'] ) ) ? $block['attrs']['ref'] : 0;
|
317 |
+
|
318 |
+
if ( $id ) {
|
319 |
+
$content = get_post_field( 'post_content', $id );
|
320 |
+
|
321 |
+
$reusable_blocks = $this->parse( $content );
|
322 |
+
|
323 |
+
$assets = $this->get_assets( $reusable_blocks );
|
324 |
+
|
325 |
+
self::$stylesheet .= $assets['css'];
|
326 |
+
self::$script .= $assets['js'];
|
327 |
+
|
328 |
+
}
|
329 |
+
} else {
|
330 |
+
|
331 |
+
$block_assets = $this->get_block_css_and_js( $block );
|
332 |
+
// Get CSS for the Block.
|
333 |
+
$css = $block_assets['css'];
|
334 |
+
|
335 |
+
if ( isset( $css['desktop'] ) ) {
|
336 |
+
$desktop .= $css['desktop'];
|
337 |
+
$tablet .= $css['tablet'];
|
338 |
+
$mobile .= $css['mobile'];
|
339 |
+
}
|
340 |
+
|
341 |
+
$js .= $block_assets['js'];
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
if ( ! empty( $tablet ) ) {
|
347 |
+
$tab_styling_css .= '@media only screen and (max-width: ' . CF_TABLET_BREAKPOINT . 'px) {';
|
348 |
+
$tab_styling_css .= $tablet;
|
349 |
+
$tab_styling_css .= '}';
|
350 |
+
}
|
351 |
+
|
352 |
+
if ( ! empty( $mobile ) ) {
|
353 |
+
$mob_styling_css .= '@media only screen and (max-width: ' . CF_MOBILE_BREAKPOINT . 'px) {';
|
354 |
+
$mob_styling_css .= $mobile;
|
355 |
+
$mob_styling_css .= '}';
|
356 |
+
}
|
357 |
+
|
358 |
+
return array(
|
359 |
+
'css' => $desktop . $tab_styling_css . $mob_styling_css,
|
360 |
+
'js' => $js,
|
361 |
+
);
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Get Typography Dynamic CSS.
|
366 |
+
*
|
367 |
+
* @param array $attr The Attribute array.
|
368 |
+
* @param string $slug The field slug.
|
369 |
+
* @param string $selector The selector array.
|
370 |
+
* @param array $combined_selectors The combined selector array.
|
371 |
+
* @since x.x.x
|
372 |
+
* @return bool|string
|
373 |
+
*/
|
374 |
+
public static function get_typography_css( $attr, $slug, $selector, $combined_selectors ) {
|
375 |
+
|
376 |
+
$typo_css_desktop = array();
|
377 |
+
$typo_css_tablet = array();
|
378 |
+
$typo_css_mobile = array();
|
379 |
+
|
380 |
+
$already_selectors_desktop = ( isset( $combined_selectors['desktop'][ $selector ] ) ) ? $combined_selectors['desktop'][ $selector ] : array();
|
381 |
+
$already_selectors_tablet = ( isset( $combined_selectors['tablet'][ $selector ] ) ) ? $combined_selectors['tablet'][ $selector ] : array();
|
382 |
+
$already_selectors_mobile = ( isset( $combined_selectors['mobile'][ $selector ] ) ) ? $combined_selectors['mobile'][ $selector ] : array();
|
383 |
+
|
384 |
+
$family_slug = ( '' === $slug ) ? 'fontFamily' : $slug . 'FontFamily';
|
385 |
+
$weight_slug = ( '' === $slug ) ? 'fontWeight' : $slug . 'FontWeight';
|
386 |
+
|
387 |
+
$l_ht_slug = ( '' === $slug ) ? 'lineHeight' : $slug . 'LineHeight';
|
388 |
+
$f_sz_slug = ( '' === $slug ) ? 'fontSize' : $slug . 'FontSize';
|
389 |
+
$l_ht_type_slug = ( '' === $slug ) ? 'lineHeightType' : $slug . 'LineHeightType';
|
390 |
+
$f_sz_type_slug = ( '' === $slug ) ? 'fontSizeType' : $slug . 'FontSizeType';
|
391 |
+
|
392 |
+
$typo_css_desktop[ $selector ] = array(
|
393 |
+
'font-family' => $attr[ $family_slug ],
|
394 |
+
'font-weight' => $attr[ $weight_slug ],
|
395 |
+
'font-size' => ( isset( $attr[ $f_sz_slug ] ) ) ? self::get_css_value( $attr[ $f_sz_slug ], $attr[ $f_sz_type_slug ] ) : '',
|
396 |
+
'line-height' => ( isset( $attr[ $l_ht_slug ] ) ) ? self::get_css_value( $attr[ $l_ht_slug ], $attr[ $l_ht_type_slug ] ) : '',
|
397 |
+
);
|
398 |
+
|
399 |
+
$typo_css_desktop[ $selector ] = array_merge(
|
400 |
+
$typo_css_desktop[ $selector ],
|
401 |
+
$already_selectors_desktop
|
402 |
+
);
|
403 |
+
|
404 |
+
$typo_css_tablet[ $selector ] = array(
|
405 |
+
'font-size' => ( isset( $attr[ $f_sz_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Tablet' ], $attr[ $f_sz_type_slug ] ) : '',
|
406 |
+
'line-height' => ( isset( $attr[ $l_ht_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Tablet' ], $attr[ $l_ht_type_slug ] ) : '',
|
407 |
+
);
|
408 |
+
|
409 |
+
$typo_css_tablet[ $selector ] = array_merge(
|
410 |
+
$typo_css_tablet[ $selector ],
|
411 |
+
$already_selectors_tablet
|
412 |
+
);
|
413 |
+
|
414 |
+
$typo_css_mobile[ $selector ] = array(
|
415 |
+
'font-size' => ( isset( $attr[ $f_sz_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Mobile' ], $attr[ $f_sz_type_slug ] ) : '',
|
416 |
+
'line-height' => ( isset( $attr[ $l_ht_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Mobile' ], $attr[ $l_ht_type_slug ] ) : '',
|
417 |
+
);
|
418 |
+
|
419 |
+
$typo_css_mobile[ $selector ] = array_merge(
|
420 |
+
$typo_css_mobile[ $selector ],
|
421 |
+
$already_selectors_mobile
|
422 |
+
);
|
423 |
+
|
424 |
+
return array(
|
425 |
+
'desktop' => array_merge(
|
426 |
+
$combined_selectors['desktop'],
|
427 |
+
$typo_css_desktop
|
428 |
+
),
|
429 |
+
'tablet' => array_merge(
|
430 |
+
$combined_selectors['tablet'],
|
431 |
+
$typo_css_tablet
|
432 |
+
),
|
433 |
+
'mobile' => array_merge(
|
434 |
+
$combined_selectors['mobile'],
|
435 |
+
$typo_css_mobile
|
436 |
+
),
|
437 |
+
);
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Get CSS value
|
442 |
+
*
|
443 |
+
* Syntax:
|
444 |
+
*
|
445 |
+
* get_css_value( VALUE, UNIT );
|
446 |
+
*
|
447 |
+
* E.g.
|
448 |
+
*
|
449 |
+
* get_css_value( VALUE, 'em' );
|
450 |
+
*
|
451 |
+
* @param string $value CSS value.
|
452 |
+
* @param string $unit CSS unit.
|
453 |
+
* @since x.x.x
|
454 |
+
*/
|
455 |
+
public static function get_css_value( $value = '', $unit = '' ) {
|
456 |
+
|
457 |
+
$css_val = '';
|
458 |
+
|
459 |
+
if ( '' !== $value ) {
|
460 |
+
$css_val = esc_attr( $value ) . $unit;
|
461 |
+
}
|
462 |
+
|
463 |
+
return $css_val;
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Parse CSS into correct CSS syntax.
|
468 |
+
*
|
469 |
+
* @param array $combined_selectors The combined selector array.
|
470 |
+
* @param string $id The selector ID.
|
471 |
+
* @since x.x.x
|
472 |
+
*/
|
473 |
+
public static function generate_all_css( $combined_selectors, $id ) {
|
474 |
+
|
475 |
+
return array(
|
476 |
+
'desktop' => self::generate_css( $combined_selectors['desktop'], $id ),
|
477 |
+
'tablet' => self::generate_css( $combined_selectors['tablet'], $id ),
|
478 |
+
'mobile' => self::generate_css( $combined_selectors['mobile'], $id ),
|
479 |
+
);
|
480 |
+
}
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Parse CSS into correct CSS syntax.
|
484 |
+
*
|
485 |
+
* @param array $selectors The block selectors.
|
486 |
+
* @param string $id The selector ID.
|
487 |
+
* @since x.x.x
|
488 |
+
*/
|
489 |
+
public static function generate_css( $selectors, $id ) {
|
490 |
+
$styling_css = '';
|
491 |
+
|
492 |
+
if ( ! empty( $selectors ) ) {
|
493 |
+
foreach ( $selectors as $key => $value ) {
|
494 |
+
|
495 |
+
$css = '';
|
496 |
+
|
497 |
+
foreach ( $value as $j => $val ) {
|
498 |
+
|
499 |
+
if ( 'font-family' === $j && 'Default' === $val ) {
|
500 |
+
continue;
|
501 |
+
}
|
502 |
+
|
503 |
+
if ( ! empty( $val ) || 0 === $val ) {
|
504 |
+
if ( 'font-family' === $j ) {
|
505 |
+
$css .= $j . ': "' . $val . '";';
|
506 |
+
} else {
|
507 |
+
$css .= $j . ': ' . $val . ';';
|
508 |
+
}
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
if ( ! empty( $css ) ) {
|
513 |
+
$styling_css .= $id;
|
514 |
+
$styling_css .= $key . '{';
|
515 |
+
$styling_css .= $css . '}';
|
516 |
+
}
|
517 |
+
}
|
518 |
+
}
|
519 |
+
|
520 |
+
return $styling_css;
|
521 |
+
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Adds Google fonts all blocks.
|
525 |
+
*
|
526 |
+
* @param array $load_google_font the blocks attr.
|
527 |
+
* @param array $font_family the blocks attr.
|
528 |
+
* @param array $font_weight the blocks attr.
|
529 |
+
* @param array $font_subset the blocks attr.
|
530 |
+
*/
|
531 |
+
public static function blocks_google_font( $load_google_font, $font_family, $font_weight, $font_subset ) {
|
532 |
+
|
533 |
+
if ( true === $load_google_font ) {
|
534 |
+
if ( ! array_key_exists( $font_family, self::$gfonts ) ) {
|
535 |
+
$add_font = array(
|
536 |
+
'fontfamily' => $font_family,
|
537 |
+
'fontvariants' => ( isset( $font_weight ) && ! empty( $font_weight ) ? array( $font_weight ) : array() ),
|
538 |
+
'fontsubsets' => ( isset( $font_subset ) && ! empty( $font_subset ) ? array( $font_subset ) : array() ),
|
539 |
+
);
|
540 |
+
self::$gfonts[ $font_family ] = $add_font;
|
541 |
+
} else {
|
542 |
+
if ( isset( $font_weight ) && ! empty( $font_weight ) && ! in_array( $font_weight, self::$gfonts[ $font_family ]['fontvariants'], true ) ) {
|
543 |
+
array_push( self::$gfonts[ $font_family ]['fontvariants'], $font_weight );
|
544 |
+
}
|
545 |
+
if ( isset( $font_subset ) && ! empty( $font_subset ) && ! in_array( $font_subset, self::$gfonts[ $font_family ]['fontsubsets'], true ) ) {
|
546 |
+
array_push( self::$gfonts[ $font_family ]['fontsubsets'], $font_subset );
|
547 |
+
}
|
548 |
+
}
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
|
553 |
+
/**
|
554 |
+
* Generates CSS recurrsively.
|
555 |
+
*
|
556 |
+
* @param object $block The block object.
|
557 |
+
* @since x.x.x
|
558 |
+
*/
|
559 |
+
public function get_block_css_and_js( $block ) {
|
560 |
+
|
561 |
+
$block = (array) $block;
|
562 |
+
|
563 |
+
$name = $block['blockName'];
|
564 |
+
$css = array();
|
565 |
+
$js = '';
|
566 |
+
$block_id = '';
|
567 |
+
|
568 |
+
if ( isset( $name ) ) {
|
569 |
+
|
570 |
+
if ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) {
|
571 |
+
$blockattr = $block['attrs'];
|
572 |
+
if ( isset( $blockattr['block_id'] ) ) {
|
573 |
+
$block_id = $blockattr['block_id'];
|
574 |
+
}
|
575 |
+
}
|
576 |
+
|
577 |
+
self::$current_block_list[] = $name;
|
578 |
+
|
579 |
+
if ( strpos( $name, 'wcfb/' ) !== false ) {
|
580 |
+
self::$cf_flag = true;
|
581 |
+
}
|
582 |
+
|
583 |
+
switch ( $name ) {
|
584 |
+
case 'wcfb/next-step-button':
|
585 |
+
$css = Cartflows_Block_Helper::get_next_step_button_css( $blockattr, $block_id );
|
586 |
+
Cartflows_Block_JS::blocks_next_step_button_gfont( $blockattr );
|
587 |
+
break;
|
588 |
+
|
589 |
+
case 'wcfb/order-detail-form':
|
590 |
+
$css = Cartflows_Block_Helper::get_order_detail_form_css( $blockattr, $block_id );
|
591 |
+
Cartflows_Block_JS::blocks_order_detail_form_gfont( $blockattr );
|
592 |
+
break;
|
593 |
+
|
594 |
+
case 'wcfb/checkout-form':
|
595 |
+
$css = Cartflows_Block_Helper::get_checkout_form_css( $blockattr, $block_id );
|
596 |
+
Cartflows_Block_JS::blocks_checkout_form_gfont( $blockattr );
|
597 |
+
break;
|
598 |
+
|
599 |
+
case 'wcfb/optin-form':
|
600 |
+
$css = Cartflows_Block_Helper::get_optin_form_css( $blockattr, $block_id );
|
601 |
+
Cartflows_Block_JS::blocks_optin_form_gfont( $blockattr );
|
602 |
+
break;
|
603 |
+
|
604 |
+
default:
|
605 |
+
// Nothing to do here.
|
606 |
+
break;
|
607 |
+
}
|
608 |
+
|
609 |
+
if ( isset( $block['innerBlocks'] ) ) {
|
610 |
+
foreach ( $block['innerBlocks'] as $j => $inner_block ) {
|
611 |
+
if ( 'core/block' === $inner_block['blockName'] ) {
|
612 |
+
$id = ( isset( $inner_block['attrs']['ref'] ) ) ? $inner_block['attrs']['ref'] : 0;
|
613 |
+
|
614 |
+
if ( $id ) {
|
615 |
+
$content = get_post_field( 'post_content', $id );
|
616 |
+
|
617 |
+
$reusable_blocks = $this->parse( $content );
|
618 |
+
|
619 |
+
$assets = $this->get_assets( $reusable_blocks );
|
620 |
+
|
621 |
+
self::$stylesheet .= $assets['css'];
|
622 |
+
self::$script .= $assets['js'];
|
623 |
+
}
|
624 |
+
} else {
|
625 |
+
// Get CSS for the Block.
|
626 |
+
$inner_assets = $this->get_block_css_and_js( $inner_block );
|
627 |
+
$inner_block_css = $inner_assets['css'];
|
628 |
+
|
629 |
+
$css_desktop = ( isset( $css['desktop'] ) ? $css['desktop'] : '' );
|
630 |
+
$css_tablet = ( isset( $css['tablet'] ) ? $css['tablet'] : '' );
|
631 |
+
$css_mobile = ( isset( $css['mobile'] ) ? $css['mobile'] : '' );
|
632 |
+
|
633 |
+
if ( isset( $inner_block_css['desktop'] ) ) {
|
634 |
+
$css['desktop'] = $css_desktop . $inner_block_css['desktop'];
|
635 |
+
$css['tablet'] = $css_tablet . $inner_block_css['tablet'];
|
636 |
+
$css['mobile'] = $css_mobile . $inner_block_css['mobile'];
|
637 |
+
}
|
638 |
+
|
639 |
+
$js .= $inner_assets['js'];
|
640 |
+
}
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
self::$current_block_list = array_unique( self::$current_block_list );
|
645 |
+
}
|
646 |
+
|
647 |
+
return array(
|
648 |
+
'css' => $css,
|
649 |
+
'js' => $js,
|
650 |
+
);
|
651 |
+
|
652 |
+
}
|
653 |
+
|
654 |
+
|
655 |
+
}
|
656 |
+
/**
|
657 |
+
* Prepare if class 'Cartflows_Gb_Helper' exist.
|
658 |
+
* Kicking this off by calling 'get_instance()' method
|
659 |
+
*/
|
660 |
+
Cartflows_Gb_Helper::get_instance();
|
661 |
+
}
|
modules/gutenberg/classes/class-cartflows-gutenberg-editor.php
CHANGED
@@ -1,129 +1,129 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Gutenburg Editor Compatibility.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Checkout Markup
|
10 |
-
*
|
11 |
-
* @since x.x.x
|
12 |
-
*/
|
13 |
-
class Cartflows_Gutenberg_Editor {
|
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 |
-
|
27 |
-
if ( ! isset( self::$instance ) ) {
|
28 |
-
self::$instance = new self();
|
29 |
-
}
|
30 |
-
|
31 |
-
return self::$instance;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Constructor
|
36 |
-
*/
|
37 |
-
public function __construct() {
|
38 |
-
|
39 |
-
add_action( 'admin_init', array( $this, 'gutenberg_editor_compatibility' ) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Gutenburg editor compatibility.
|
44 |
-
*/
|
45 |
-
public function gutenberg_editor_compatibility() {
|
46 |
-
|
47 |
-
if ( is_admin() && isset( $_REQUEST['action'] ) ) { //phpcs:ignore
|
48 |
-
|
49 |
-
$current_post_id = false;
|
50 |
-
|
51 |
-
if ( 'edit' === $_REQUEST['action'] && isset( $_GET['post'] ) ) { //phpcs:ignore
|
52 |
-
$current_post_id = intval( $_GET['post'] ); //phpcs:ignore
|
53 |
-
} elseif ( isset( $_REQUEST['cartflows_gb'] ) && isset( $_POST['id'] ) ){ //phpcs:ignore
|
54 |
-
$current_post_id = intval( $_POST['id'] ); //phpcs:ignore
|
55 |
-
}
|
56 |
-
|
57 |
-
if ( $current_post_id ) {
|
58 |
-
|
59 |
-
$current_post_type = get_post_type( $current_post_id );
|
60 |
-
|
61 |
-
if ( wcf()->utils->is_step_post_type( $current_post_type ) ) {
|
62 |
-
|
63 |
-
if ( wcf()->is_woo_active ) {
|
64 |
-
|
65 |
-
$this->maybe_init_cart();
|
66 |
-
|
67 |
-
/* Load woo templates from plugin */
|
68 |
-
$cf_frontend = Cartflows_Frontend::get_instance();
|
69 |
-
add_filter( 'woocommerce_locate_template', array( $cf_frontend, 'override_woo_template' ), 20, 3 );
|
70 |
-
|
71 |
-
add_action( 'cartflows_gutenberg_before_checkout_shortcode', array( $this, 'before_gb_checkout_shortcode_actions' ) );
|
72 |
-
|
73 |
-
add_action( 'cartflows_gutenberg_before_optin_shortcode', array( $this, 'before_gb_optin_shortcode_actions' ) );
|
74 |
-
}
|
75 |
-
|
76 |
-
do_action( 'cartflows_gutenberg_editor_compatibility', $current_post_id );
|
77 |
-
}
|
78 |
-
}
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Before checkout shortcode actions.
|
85 |
-
*/
|
86 |
-
public function maybe_init_cart() {
|
87 |
-
|
88 |
-
wc()->frontend_includes();
|
89 |
-
|
90 |
-
$has_cart = is_a( WC()->cart, 'WC_Cart' );
|
91 |
-
|
92 |
-
if ( ! $has_cart ) {
|
93 |
-
$session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' );
|
94 |
-
WC()->session = new $session_class();
|
95 |
-
WC()->session->init();
|
96 |
-
WC()->cart = new \WC_Cart();
|
97 |
-
WC()->customer = new \WC_Customer( get_current_user_id(), true );
|
98 |
-
|
99 |
-
}
|
100 |
-
|
101 |
-
/* For preview */
|
102 |
-
add_filter( 'woocommerce_checkout_redirect_empty_cart', '__return_false' );
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Before checkout shortcode actions.
|
107 |
-
*
|
108 |
-
* @param int $checkout_id checkout id.
|
109 |
-
*/
|
110 |
-
public function before_gb_checkout_shortcode_actions( $checkout_id ) {
|
111 |
-
|
112 |
-
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Before optin shortcode actions.
|
117 |
-
*
|
118 |
-
* @param int $checkout_id checkout id.
|
119 |
-
*/
|
120 |
-
public function before_gb_optin_shortcode_actions( $checkout_id ) {
|
121 |
-
|
122 |
-
do_action( 'cartflows_optin_before_shortcode', $checkout_id );
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Kicking this off by calling 'get_instance()' method
|
128 |
-
*/
|
129 |
-
Cartflows_Gutenberg_Editor::get_instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Gutenburg Editor Compatibility.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Checkout Markup
|
10 |
+
*
|
11 |
+
* @since x.x.x
|
12 |
+
*/
|
13 |
+
class Cartflows_Gutenberg_Editor {
|
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 |
+
|
27 |
+
if ( ! isset( self::$instance ) ) {
|
28 |
+
self::$instance = new self();
|
29 |
+
}
|
30 |
+
|
31 |
+
return self::$instance;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Constructor
|
36 |
+
*/
|
37 |
+
public function __construct() {
|
38 |
+
|
39 |
+
add_action( 'admin_init', array( $this, 'gutenberg_editor_compatibility' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Gutenburg editor compatibility.
|
44 |
+
*/
|
45 |
+
public function gutenberg_editor_compatibility() {
|
46 |
+
|
47 |
+
if ( is_admin() && isset( $_REQUEST['action'] ) ) { //phpcs:ignore
|
48 |
+
|
49 |
+
$current_post_id = false;
|
50 |
+
|
51 |
+
if ( 'edit' === $_REQUEST['action'] && isset( $_GET['post'] ) ) { //phpcs:ignore
|
52 |
+
$current_post_id = intval( $_GET['post'] ); //phpcs:ignore
|
53 |
+
} elseif ( isset( $_REQUEST['cartflows_gb'] ) && isset( $_POST['id'] ) ){ //phpcs:ignore
|
54 |
+
$current_post_id = intval( $_POST['id'] ); //phpcs:ignore
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( $current_post_id ) {
|
58 |
+
|
59 |
+
$current_post_type = get_post_type( $current_post_id );
|
60 |
+
|
61 |
+
if ( wcf()->utils->is_step_post_type( $current_post_type ) ) {
|
62 |
+
|
63 |
+
if ( wcf()->is_woo_active ) {
|
64 |
+
|
65 |
+
$this->maybe_init_cart();
|
66 |
+
|
67 |
+
/* Load woo templates from plugin */
|
68 |
+
$cf_frontend = Cartflows_Frontend::get_instance();
|
69 |
+
add_filter( 'woocommerce_locate_template', array( $cf_frontend, 'override_woo_template' ), 20, 3 );
|
70 |
+
|
71 |
+
add_action( 'cartflows_gutenberg_before_checkout_shortcode', array( $this, 'before_gb_checkout_shortcode_actions' ) );
|
72 |
+
|
73 |
+
add_action( 'cartflows_gutenberg_before_optin_shortcode', array( $this, 'before_gb_optin_shortcode_actions' ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
do_action( 'cartflows_gutenberg_editor_compatibility', $current_post_id );
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Before checkout shortcode actions.
|
85 |
+
*/
|
86 |
+
public function maybe_init_cart() {
|
87 |
+
|
88 |
+
wc()->frontend_includes();
|
89 |
+
|
90 |
+
$has_cart = is_a( WC()->cart, 'WC_Cart' );
|
91 |
+
|
92 |
+
if ( ! $has_cart ) {
|
93 |
+
$session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' );
|
94 |
+
WC()->session = new $session_class();
|
95 |
+
WC()->session->init();
|
96 |
+
WC()->cart = new \WC_Cart();
|
97 |
+
WC()->customer = new \WC_Customer( get_current_user_id(), true );
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
/* For preview */
|
102 |
+
add_filter( 'woocommerce_checkout_redirect_empty_cart', '__return_false' );
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Before checkout shortcode actions.
|
107 |
+
*
|
108 |
+
* @param int $checkout_id checkout id.
|
109 |
+
*/
|
110 |
+
public function before_gb_checkout_shortcode_actions( $checkout_id ) {
|
111 |
+
|
112 |
+
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Before optin shortcode actions.
|
117 |
+
*
|
118 |
+
* @param int $checkout_id checkout id.
|
119 |
+
*/
|
120 |
+
public function before_gb_optin_shortcode_actions( $checkout_id ) {
|
121 |
+
|
122 |
+
do_action( 'cartflows_optin_before_shortcode', $checkout_id );
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Kicking this off by calling 'get_instance()' method
|
128 |
+
*/
|
129 |
+
Cartflows_Gutenberg_Editor::get_instance();
|
modules/gutenberg/classes/class-cartflows-init-blocks.php
CHANGED
@@ -1,339 +1,339 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cartflows Blocks Initializer
|
4 |
-
*
|
5 |
-
* Enqueue CSS/JS of all the blocks.
|
6 |
-
*
|
7 |
-
* @since x.x.x
|
8 |
-
* @package Cartflows
|
9 |
-
*/
|
10 |
-
|
11 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
-
exit; // Exit if accessed directly.
|
13 |
-
}
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Cartflows_Init_Blocks.
|
17 |
-
*
|
18 |
-
* @package Cartflows
|
19 |
-
*/
|
20 |
-
class Cartflows_Init_Blocks {
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Member Variable
|
24 |
-
*
|
25 |
-
* @var instance
|
26 |
-
*/
|
27 |
-
private static $instance;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Initiator
|
31 |
-
*/
|
32 |
-
public static function get_instance() {
|
33 |
-
if ( ! isset( self::$instance ) ) {
|
34 |
-
self::$instance = new self();
|
35 |
-
}
|
36 |
-
return self::$instance;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Constructor
|
41 |
-
*/
|
42 |
-
public function __construct() {
|
43 |
-
|
44 |
-
// Hook: Frontend assets.
|
45 |
-
add_action( 'enqueue_block_assets', array( $this, 'block_assets' ) );
|
46 |
-
|
47 |
-
// Hook: Editor assets.
|
48 |
-
add_action( 'enqueue_block_editor_assets', array( $this, 'editor_assets' ) );
|
49 |
-
|
50 |
-
add_filter( 'block_categories', array( $this, 'register_block_category' ), 10, 2 );
|
51 |
-
|
52 |
-
add_action( 'wp_ajax_wpcf_order_detail_form_shortcode', array( $this, 'order_detail_form_shortcode' ) );
|
53 |
-
add_action( 'wp_ajax_wpcf_order_checkout_form_shortcode', array( $this, 'order_checkout_form_shortcode' ) );
|
54 |
-
add_action( 'wp_ajax_wpcf_optin_form_shortcode', array( $this, 'optin_form_shortcode' ) );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Renders the Order Detail Form shortcode.
|
59 |
-
*
|
60 |
-
* @since x.x.x
|
61 |
-
*/
|
62 |
-
public function order_detail_form_shortcode() {
|
63 |
-
|
64 |
-
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
65 |
-
|
66 |
-
add_filter(
|
67 |
-
'cartflows_show_demo_order_details',
|
68 |
-
function() {
|
69 |
-
return true;
|
70 |
-
}
|
71 |
-
);
|
72 |
-
|
73 |
-
if ( ! empty( $_POST['thanyouText'] ) ) {
|
74 |
-
|
75 |
-
add_filter(
|
76 |
-
'cartflows_thankyou_meta_wcf-tq-text',
|
77 |
-
function( $text ) {
|
78 |
-
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
79 |
-
|
80 |
-
$text = isset( $_POST['thanyouText'] ) ? sanitize_text_field( wp_unslash( $_POST['thanyouText'] ) ) : '';
|
81 |
-
|
82 |
-
return $text;
|
83 |
-
},
|
84 |
-
10,
|
85 |
-
1
|
86 |
-
);
|
87 |
-
}
|
88 |
-
|
89 |
-
$data['html'] = do_shortcode( '[cartflows_order_details]' );
|
90 |
-
|
91 |
-
wp_send_json_success( $data );
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Renders the Order Checkout Form shortcode.
|
96 |
-
*
|
97 |
-
* @since x.x.x
|
98 |
-
*/
|
99 |
-
public function order_checkout_form_shortcode() {
|
100 |
-
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
101 |
-
|
102 |
-
add_filter(
|
103 |
-
'cartflows_show_demo_checkout',
|
104 |
-
function() {
|
105 |
-
return true;
|
106 |
-
}
|
107 |
-
);
|
108 |
-
|
109 |
-
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
110 |
-
$checkout_id = intval( $_POST['id'] ); //phpcs:ignore
|
111 |
-
}
|
112 |
-
|
113 |
-
$products = wcf()->utils->get_selected_checkout_products( $checkout_id );
|
114 |
-
|
115 |
-
if ( ! is_array( $products ) || empty( $products[0]['product'] ) ) {
|
116 |
-
wc_clear_notices();
|
117 |
-
wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
|
118 |
-
}
|
119 |
-
|
120 |
-
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
121 |
-
|
122 |
-
add_action( 'woocommerce_checkout_order_review', array( Cartflows_Checkout_Markup::get_instance(), 'display_custom_coupon_field' ) );
|
123 |
-
|
124 |
-
$attributes['layout'] = isset( $_POST['layout'] ) ? sanitize_title( wp_unslash( $_POST['layout'] ) ) : '';
|
125 |
-
$attributes['obposition'] = isset( $_POST['obposition'] ) ? sanitize_title( wp_unslash( $_POST['obposition'] ) ) : '';
|
126 |
-
$attributes['orderBumpSkin'] = isset( $_POST['orderBumpSkin'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpSkin'] ) ) : '';
|
127 |
-
$attributes['orderBumpCheckboxArrow'] = isset( $_POST['orderBumpCheckboxArrow'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpCheckboxArrow'] ) ) : '';
|
128 |
-
$attributes['orderBumpCheckboxArrowAnimation'] = isset( $_POST['orderBumpCheckboxArrowAnimation'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpCheckboxArrowAnimation'] ) ) : '';
|
129 |
-
$attributes['sectionposition'] = isset( $_POST['sectionposition'] ) ? sanitize_title( wp_unslash( $_POST['sectionposition'] ) ) : '';
|
130 |
-
$attributes['productOptionsSkin'] = isset( $_POST['productOptionsSkin'] ) ? sanitize_title( wp_unslash( $_POST['productOptionsSkin'] ) ) : '';
|
131 |
-
$attributes['productOptionsImages'] = isset( $_POST['productOptionsImages'] ) ? sanitize_title( wp_unslash( $_POST['productOptionsImages'] ) ) : '';
|
132 |
-
$attributes['productOptionsSectionTitleText'] = isset( $_POST['productOptionsSectionTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['productOptionsSectionTitleText'] ) ) : '';
|
133 |
-
$attributes['PreSkipText'] = isset( $_POST['PreSkipText'] ) ? sanitize_title( wp_unslash( $_POST['PreSkipText'] ) ) : '';
|
134 |
-
$attributes['PreOrderText'] = isset( $_POST['PreOrderText'] ) ? sanitize_title( wp_unslash( $_POST['PreOrderText'] ) ) : '';
|
135 |
-
$attributes['PreProductTitleText'] = isset( $_POST['PreProductTitleText'] ) ? sanitize_title( wp_unslash( $_POST['PreProductTitleText'] ) ) : '';
|
136 |
-
$attributes['preSubTitleText'] = isset( $_POST['preSubTitleText'] ) ? sanitize_title( wp_unslash( $_POST['preSubTitleText'] ) ) : '';
|
137 |
-
$attributes['preTitleText'] = isset( $_POST['preTitleText'] ) ? sanitize_title( wp_unslash( $_POST['preTitleText'] ) ) : '';
|
138 |
-
$attributes['PreProductDescText'] = isset( $_POST['PreProductDescText'] ) ? sanitize_title( wp_unslash( $_POST['PreProductDescText'] ) ) : '';
|
139 |
-
$attributes['orderBumpCheckboxLabel'] = isset( $_POST['orderBumpCheckboxLabel'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpCheckboxLabel'] ) ) : '';
|
140 |
-
$attributes['orderBumpHighlightText'] = isset( $_POST['orderBumpHighlightText'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpHighlightText'] ) ) : '';
|
141 |
-
$attributes['orderBumpCheckboxProductDescription'] = isset( $_POST['orderBumpCheckboxProductDescription'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpCheckboxProductDescription'] ) ) : '';
|
142 |
-
$attributes['inputSkins'] = isset( $_POST['inputSkins'] ) ? sanitize_title( wp_unslash( $_POST['inputSkins'] ) ) : '';
|
143 |
-
$attributes['enableNote'] = isset( $_POST['enableNote'] ) ? sanitize_title( wp_unslash( $_POST['enableNote'] ) ) : '';
|
144 |
-
$attributes['noteText'] = isset( $_POST['noteText'] ) ? sanitize_text_field( wp_unslash( $_POST['noteText'] ) ) : '';
|
145 |
-
$attributes['stepOneTitleText'] = isset( $_POST['stepOneTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepOneTitleText'] ) ) : '';
|
146 |
-
$attributes['stepOneSubTitleText'] = isset( $_POST['stepOneSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepOneSubTitleText'] ) ) : '';
|
147 |
-
$attributes['stepTwoTitleText'] = isset( $_POST['stepTwoTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepTwoTitleText'] ) ) : '';
|
148 |
-
$attributes['stepTwoSubTitleText'] = isset( $_POST['stepTwoSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepTwoSubTitleText'] ) ) : '';
|
149 |
-
$attributes['offerButtonTitleText'] = isset( $_POST['offerButtonTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['offerButtonTitleText'] ) ) : '';
|
150 |
-
$attributes['offerButtonSubTitleText'] = isset( $_POST['offerButtonSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['offerButtonSubTitleText'] ) ) : '';
|
151 |
-
|
152 |
-
do_action( 'cartflows_gutenberg_checkout_options_filters', $attributes );
|
153 |
-
|
154 |
-
$data['html'] = do_shortcode( '[cartflows_checkout]' );
|
155 |
-
|
156 |
-
wp_send_json_success( $data );
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Renders the Optin Form shortcode.
|
161 |
-
*
|
162 |
-
* @since x.x.x
|
163 |
-
*/
|
164 |
-
public function optin_form_shortcode() {
|
165 |
-
|
166 |
-
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
167 |
-
|
168 |
-
add_filter(
|
169 |
-
'cartflows_show_demo_optin_form',
|
170 |
-
function() {
|
171 |
-
return true;
|
172 |
-
}
|
173 |
-
);
|
174 |
-
|
175 |
-
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
176 |
-
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
177 |
-
}
|
178 |
-
|
179 |
-
$products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
|
180 |
-
if ( is_array( $products ) && count( $products ) < 1 ) {
|
181 |
-
wc_clear_notices();
|
182 |
-
wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
|
183 |
-
}
|
184 |
-
|
185 |
-
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
|
186 |
-
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
|
187 |
-
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
|
188 |
-
|
189 |
-
$data['html'] = do_shortcode( '[cartflows_optin]' );
|
190 |
-
$data['buttonText'] = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
|
191 |
-
wp_send_json_success( $data );
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Enqueue Gutenberg block assets for both frontend + backend.
|
196 |
-
*
|
197 |
-
* @since x.x.x
|
198 |
-
*/
|
199 |
-
public function block_assets() {
|
200 |
-
|
201 |
-
global $post;
|
202 |
-
|
203 |
-
if ( $post && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
204 |
-
|
205 |
-
// Register block styles for both frontend + backend.
|
206 |
-
wp_enqueue_style(
|
207 |
-
'CF_block-cartflows-style-css', // Handle.
|
208 |
-
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.style.build.css',
|
209 |
-
is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it.
|
210 |
-
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
|
211 |
-
);
|
212 |
-
}
|
213 |
-
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Enqueue assets for both backend.
|
218 |
-
*
|
219 |
-
* @since x.x.x
|
220 |
-
*/
|
221 |
-
public function editor_assets() {
|
222 |
-
|
223 |
-
$post_id = isset( $_GET['post'] ) ? intval( $_GET['post'] ) : 0; //phpcs:ignore
|
224 |
-
$post_type = get_post_type( $post_id );
|
225 |
-
|
226 |
-
if ( CARTFLOWS_STEP_POST_TYPE === $post_type ) {
|
227 |
-
|
228 |
-
$wpcf_ajax_nonce = wp_create_nonce( 'wpcf_ajax_nonce' );
|
229 |
-
$step_type = wcf()->utils->get_step_type( $post_id );
|
230 |
-
$show_checkout_pro_opt = apply_filters( 'cartflows_show_checkout_pro_opt', false );
|
231 |
-
|
232 |
-
if ( 'optin' === $step_type ) {
|
233 |
-
wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
|
234 |
-
}
|
235 |
-
if ( 'checkout' === $step_type ) {
|
236 |
-
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
237 |
-
}
|
238 |
-
|
239 |
-
// Register block editor script for backend.
|
240 |
-
wp_register_script(
|
241 |
-
'CF_block-cartflows-block-js', // Handle.
|
242 |
-
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.build.js',
|
243 |
-
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), // Dependencies, defined above.
|
244 |
-
CARTFLOWS_VER, // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime — Gets file modification time.
|
245 |
-
true // Enqueue the script in the footer.
|
246 |
-
);
|
247 |
-
|
248 |
-
// Register block editor styles for backend.
|
249 |
-
wp_register_style(
|
250 |
-
'CF_block-cartflows-block-editor-css', // Handle.
|
251 |
-
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.editor.build.css',
|
252 |
-
array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
|
253 |
-
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
|
254 |
-
);
|
255 |
-
|
256 |
-
// Common Editor style.
|
257 |
-
wp_enqueue_style(
|
258 |
-
'CF_block-common-editor-css', // Handle.
|
259 |
-
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.commoneditorstyle.build.css',
|
260 |
-
array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
|
261 |
-
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
|
262 |
-
);
|
263 |
-
|
264 |
-
// Enqueue frontend CSS in editor.
|
265 |
-
wp_enqueue_style( 'CF_block-cartflows-frotend-style', CARTFLOWS_URL . 'assets/css/frontend.css', array(), CARTFLOWS_VER );
|
266 |
-
|
267 |
-
// WP Localized globals. Use dynamic PHP stuff in JavaScript via `cartflowsGlobal` object.
|
268 |
-
wp_localize_script(
|
269 |
-
'CF_block-cartflows-block-js',
|
270 |
-
'cf_blocks_info', // Array containing dynamic data for a JS Global.
|
271 |
-
array(
|
272 |
-
'pluginDirPath' => plugin_dir_path( __DIR__ ),
|
273 |
-
'pluginDirUrl' => plugin_dir_url( __DIR__ ),
|
274 |
-
'category' => 'cartflows',
|
275 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
276 |
-
'wpcf_ajax_nonce' => $wpcf_ajax_nonce,
|
277 |
-
'blocks' => Cartflows_Block_Config::get_block_attributes(),
|
278 |
-
'tablet_breakpoint' => CF_TABLET_BREAKPOINT,
|
279 |
-
'mobile_breakpoint' => CF_MOBILE_BREAKPOINT,
|
280 |
-
'show_checkout_pro_opt' => $show_checkout_pro_opt,
|
281 |
-
'ID' => $post_id,
|
282 |
-
'step_type' => $step_type,
|
283 |
-
'is_cartflows_pro_install' => _is_cartflows_pro(),
|
284 |
-
'is_woo_active' => wcf()->is_woo_active,
|
285 |
-
// Add more data here that you want to access from `cartflowsGlobal` object.
|
286 |
-
)
|
287 |
-
);
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Register Gutenberg block on server-side.
|
291 |
-
*
|
292 |
-
* Register the block on server-side to ensure that the block
|
293 |
-
* scripts and styles for both frontend and backend are
|
294 |
-
* enqueued when the editor loads.
|
295 |
-
*
|
296 |
-
* @link https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type#enqueuing-block-scripts
|
297 |
-
* @since x.x.x
|
298 |
-
*/
|
299 |
-
register_block_type(
|
300 |
-
'wcfb/next-step-button',
|
301 |
-
array(
|
302 |
-
// Enqueue blocks.build.js in the editor only.
|
303 |
-
'editor_script' => 'CF_block-cartflows-block-js',
|
304 |
-
// Enqueue blocks.editor.build.css in the editor only.
|
305 |
-
'style' => 'CF_block-cartflows-block-editor-css',
|
306 |
-
// Enqueue blocks.commoneditorstyle.build.css in the editor only.
|
307 |
-
'editor_style' => 'CF_block-common-editor-css',
|
308 |
-
)
|
309 |
-
);
|
310 |
-
|
311 |
-
}
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Gutenberg block category for WCFB.
|
316 |
-
*
|
317 |
-
* @param array $categories Block categories.
|
318 |
-
* @param object $post Post object.
|
319 |
-
* @since x.x.x
|
320 |
-
*/
|
321 |
-
public function register_block_category( $categories, $post ) {
|
322 |
-
return array_merge(
|
323 |
-
$categories,
|
324 |
-
array(
|
325 |
-
array(
|
326 |
-
'slug' => 'cartflows',
|
327 |
-
'title' => __( 'Cartflows', 'cartflows' ),
|
328 |
-
),
|
329 |
-
)
|
330 |
-
);
|
331 |
-
}
|
332 |
-
|
333 |
-
}
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Prepare if class 'Cartflows_Init_Blocks' exist.
|
337 |
-
* Kicking this off by calling 'get_instance()' method
|
338 |
-
*/
|
339 |
-
Cartflows_Init_Blocks::get_instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows Blocks Initializer
|
4 |
+
*
|
5 |
+
* Enqueue CSS/JS of all the blocks.
|
6 |
+
*
|
7 |
+
* @since x.x.x
|
8 |
+
* @package Cartflows
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly.
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Cartflows_Init_Blocks.
|
17 |
+
*
|
18 |
+
* @package Cartflows
|
19 |
+
*/
|
20 |
+
class Cartflows_Init_Blocks {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Member Variable
|
24 |
+
*
|
25 |
+
* @var instance
|
26 |
+
*/
|
27 |
+
private static $instance;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Initiator
|
31 |
+
*/
|
32 |
+
public static function get_instance() {
|
33 |
+
if ( ! isset( self::$instance ) ) {
|
34 |
+
self::$instance = new self();
|
35 |
+
}
|
36 |
+
return self::$instance;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Constructor
|
41 |
+
*/
|
42 |
+
public function __construct() {
|
43 |
+
|
44 |
+
// Hook: Frontend assets.
|
45 |
+
add_action( 'enqueue_block_assets', array( $this, 'block_assets' ) );
|
46 |
+
|
47 |
+
// Hook: Editor assets.
|
48 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'editor_assets' ) );
|
49 |
+
|
50 |
+
add_filter( 'block_categories', array( $this, 'register_block_category' ), 10, 2 );
|
51 |
+
|
52 |
+
add_action( 'wp_ajax_wpcf_order_detail_form_shortcode', array( $this, 'order_detail_form_shortcode' ) );
|
53 |
+
add_action( 'wp_ajax_wpcf_order_checkout_form_shortcode', array( $this, 'order_checkout_form_shortcode' ) );
|
54 |
+
add_action( 'wp_ajax_wpcf_optin_form_shortcode', array( $this, 'optin_form_shortcode' ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Renders the Order Detail Form shortcode.
|
59 |
+
*
|
60 |
+
* @since x.x.x
|
61 |
+
*/
|
62 |
+
public function order_detail_form_shortcode() {
|
63 |
+
|
64 |
+
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
65 |
+
|
66 |
+
add_filter(
|
67 |
+
'cartflows_show_demo_order_details',
|
68 |
+
function() {
|
69 |
+
return true;
|
70 |
+
}
|
71 |
+
);
|
72 |
+
|
73 |
+
if ( ! empty( $_POST['thanyouText'] ) ) {
|
74 |
+
|
75 |
+
add_filter(
|
76 |
+
'cartflows_thankyou_meta_wcf-tq-text',
|
77 |
+
function( $text ) {
|
78 |
+
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
79 |
+
|
80 |
+
$text = isset( $_POST['thanyouText'] ) ? sanitize_text_field( wp_unslash( $_POST['thanyouText'] ) ) : '';
|
81 |
+
|
82 |
+
return $text;
|
83 |
+
},
|
84 |
+
10,
|
85 |
+
1
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
$data['html'] = do_shortcode( '[cartflows_order_details]' );
|
90 |
+
|
91 |
+
wp_send_json_success( $data );
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Renders the Order Checkout Form shortcode.
|
96 |
+
*
|
97 |
+
* @since x.x.x
|
98 |
+
*/
|
99 |
+
public function order_checkout_form_shortcode() {
|
100 |
+
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
101 |
+
|
102 |
+
add_filter(
|
103 |
+
'cartflows_show_demo_checkout',
|
104 |
+
function() {
|
105 |
+
return true;
|
106 |
+
}
|
107 |
+
);
|
108 |
+
|
109 |
+
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
110 |
+
$checkout_id = intval( $_POST['id'] ); //phpcs:ignore
|
111 |
+
}
|
112 |
+
|
113 |
+
$products = wcf()->utils->get_selected_checkout_products( $checkout_id );
|
114 |
+
|
115 |
+
if ( ! is_array( $products ) || empty( $products[0]['product'] ) ) {
|
116 |
+
wc_clear_notices();
|
117 |
+
wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
|
118 |
+
}
|
119 |
+
|
120 |
+
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
121 |
+
|
122 |
+
add_action( 'woocommerce_checkout_order_review', array( Cartflows_Checkout_Markup::get_instance(), 'display_custom_coupon_field' ) );
|
123 |
+
|
124 |
+
$attributes['layout'] = isset( $_POST['layout'] ) ? sanitize_title( wp_unslash( $_POST['layout'] ) ) : '';
|
125 |
+
$attributes['obposition'] = isset( $_POST['obposition'] ) ? sanitize_title( wp_unslash( $_POST['obposition'] ) ) : '';
|
126 |
+
$attributes['orderBumpSkin'] = isset( $_POST['orderBumpSkin'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpSkin'] ) ) : '';
|
127 |
+
$attributes['orderBumpCheckboxArrow'] = isset( $_POST['orderBumpCheckboxArrow'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpCheckboxArrow'] ) ) : '';
|
128 |
+
$attributes['orderBumpCheckboxArrowAnimation'] = isset( $_POST['orderBumpCheckboxArrowAnimation'] ) ? sanitize_title( wp_unslash( $_POST['orderBumpCheckboxArrowAnimation'] ) ) : '';
|
129 |
+
$attributes['sectionposition'] = isset( $_POST['sectionposition'] ) ? sanitize_title( wp_unslash( $_POST['sectionposition'] ) ) : '';
|
130 |
+
$attributes['productOptionsSkin'] = isset( $_POST['productOptionsSkin'] ) ? sanitize_title( wp_unslash( $_POST['productOptionsSkin'] ) ) : '';
|
131 |
+
$attributes['productOptionsImages'] = isset( $_POST['productOptionsImages'] ) ? sanitize_title( wp_unslash( $_POST['productOptionsImages'] ) ) : '';
|
132 |
+
$attributes['productOptionsSectionTitleText'] = isset( $_POST['productOptionsSectionTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['productOptionsSectionTitleText'] ) ) : '';
|
133 |
+
$attributes['PreSkipText'] = isset( $_POST['PreSkipText'] ) ? sanitize_title( wp_unslash( $_POST['PreSkipText'] ) ) : '';
|
134 |
+
$attributes['PreOrderText'] = isset( $_POST['PreOrderText'] ) ? sanitize_title( wp_unslash( $_POST['PreOrderText'] ) ) : '';
|
135 |
+
$attributes['PreProductTitleText'] = isset( $_POST['PreProductTitleText'] ) ? sanitize_title( wp_unslash( $_POST['PreProductTitleText'] ) ) : '';
|
136 |
+
$attributes['preSubTitleText'] = isset( $_POST['preSubTitleText'] ) ? sanitize_title( wp_unslash( $_POST['preSubTitleText'] ) ) : '';
|
137 |
+
$attributes['preTitleText'] = isset( $_POST['preTitleText'] ) ? sanitize_title( wp_unslash( $_POST['preTitleText'] ) ) : '';
|
138 |
+
$attributes['PreProductDescText'] = isset( $_POST['PreProductDescText'] ) ? sanitize_title( wp_unslash( $_POST['PreProductDescText'] ) ) : '';
|
139 |
+
$attributes['orderBumpCheckboxLabel'] = isset( $_POST['orderBumpCheckboxLabel'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpCheckboxLabel'] ) ) : '';
|
140 |
+
$attributes['orderBumpHighlightText'] = isset( $_POST['orderBumpHighlightText'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpHighlightText'] ) ) : '';
|
141 |
+
$attributes['orderBumpCheckboxProductDescription'] = isset( $_POST['orderBumpCheckboxProductDescription'] ) ? sanitize_text_field( wp_unslash( $_POST['orderBumpCheckboxProductDescription'] ) ) : '';
|
142 |
+
$attributes['inputSkins'] = isset( $_POST['inputSkins'] ) ? sanitize_title( wp_unslash( $_POST['inputSkins'] ) ) : '';
|
143 |
+
$attributes['enableNote'] = isset( $_POST['enableNote'] ) ? sanitize_title( wp_unslash( $_POST['enableNote'] ) ) : '';
|
144 |
+
$attributes['noteText'] = isset( $_POST['noteText'] ) ? sanitize_text_field( wp_unslash( $_POST['noteText'] ) ) : '';
|
145 |
+
$attributes['stepOneTitleText'] = isset( $_POST['stepOneTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepOneTitleText'] ) ) : '';
|
146 |
+
$attributes['stepOneSubTitleText'] = isset( $_POST['stepOneSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepOneSubTitleText'] ) ) : '';
|
147 |
+
$attributes['stepTwoTitleText'] = isset( $_POST['stepTwoTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepTwoTitleText'] ) ) : '';
|
148 |
+
$attributes['stepTwoSubTitleText'] = isset( $_POST['stepTwoSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['stepTwoSubTitleText'] ) ) : '';
|
149 |
+
$attributes['offerButtonTitleText'] = isset( $_POST['offerButtonTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['offerButtonTitleText'] ) ) : '';
|
150 |
+
$attributes['offerButtonSubTitleText'] = isset( $_POST['offerButtonSubTitleText'] ) ? sanitize_text_field( wp_unslash( $_POST['offerButtonSubTitleText'] ) ) : '';
|
151 |
+
|
152 |
+
do_action( 'cartflows_gutenberg_checkout_options_filters', $attributes );
|
153 |
+
|
154 |
+
$data['html'] = do_shortcode( '[cartflows_checkout]' );
|
155 |
+
|
156 |
+
wp_send_json_success( $data );
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Renders the Optin Form shortcode.
|
161 |
+
*
|
162 |
+
* @since x.x.x
|
163 |
+
*/
|
164 |
+
public function optin_form_shortcode() {
|
165 |
+
|
166 |
+
check_ajax_referer( 'wpcf_ajax_nonce', 'nonce' );
|
167 |
+
|
168 |
+
add_filter(
|
169 |
+
'cartflows_show_demo_optin_form',
|
170 |
+
function() {
|
171 |
+
return true;
|
172 |
+
}
|
173 |
+
);
|
174 |
+
|
175 |
+
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
176 |
+
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
177 |
+
}
|
178 |
+
|
179 |
+
$products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
|
180 |
+
if ( is_array( $products ) && count( $products ) < 1 ) {
|
181 |
+
wc_clear_notices();
|
182 |
+
wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
|
183 |
+
}
|
184 |
+
|
185 |
+
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
|
186 |
+
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
|
187 |
+
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
|
188 |
+
|
189 |
+
$data['html'] = do_shortcode( '[cartflows_optin]' );
|
190 |
+
$data['buttonText'] = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
|
191 |
+
wp_send_json_success( $data );
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Enqueue Gutenberg block assets for both frontend + backend.
|
196 |
+
*
|
197 |
+
* @since x.x.x
|
198 |
+
*/
|
199 |
+
public function block_assets() {
|
200 |
+
|
201 |
+
global $post;
|
202 |
+
|
203 |
+
if ( $post && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
204 |
+
|
205 |
+
// Register block styles for both frontend + backend.
|
206 |
+
wp_enqueue_style(
|
207 |
+
'CF_block-cartflows-style-css', // Handle.
|
208 |
+
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.style.build.css',
|
209 |
+
is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it.
|
210 |
+
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
|
211 |
+
);
|
212 |
+
}
|
213 |
+
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Enqueue assets for both backend.
|
218 |
+
*
|
219 |
+
* @since x.x.x
|
220 |
+
*/
|
221 |
+
public function editor_assets() {
|
222 |
+
|
223 |
+
$post_id = isset( $_GET['post'] ) ? intval( $_GET['post'] ) : 0; //phpcs:ignore
|
224 |
+
$post_type = get_post_type( $post_id );
|
225 |
+
|
226 |
+
if ( CARTFLOWS_STEP_POST_TYPE === $post_type ) {
|
227 |
+
|
228 |
+
$wpcf_ajax_nonce = wp_create_nonce( 'wpcf_ajax_nonce' );
|
229 |
+
$step_type = wcf()->utils->get_step_type( $post_id );
|
230 |
+
$show_checkout_pro_opt = apply_filters( 'cartflows_show_checkout_pro_opt', false );
|
231 |
+
|
232 |
+
if ( 'optin' === $step_type ) {
|
233 |
+
wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
|
234 |
+
}
|
235 |
+
if ( 'checkout' === $step_type ) {
|
236 |
+
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
237 |
+
}
|
238 |
+
|
239 |
+
// Register block editor script for backend.
|
240 |
+
wp_register_script(
|
241 |
+
'CF_block-cartflows-block-js', // Handle.
|
242 |
+
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.build.js',
|
243 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), // Dependencies, defined above.
|
244 |
+
CARTFLOWS_VER, // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime — Gets file modification time.
|
245 |
+
true // Enqueue the script in the footer.
|
246 |
+
);
|
247 |
+
|
248 |
+
// Register block editor styles for backend.
|
249 |
+
wp_register_style(
|
250 |
+
'CF_block-cartflows-block-editor-css', // Handle.
|
251 |
+
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.editor.build.css',
|
252 |
+
array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
|
253 |
+
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
|
254 |
+
);
|
255 |
+
|
256 |
+
// Common Editor style.
|
257 |
+
wp_enqueue_style(
|
258 |
+
'CF_block-common-editor-css', // Handle.
|
259 |
+
CARTFLOWS_URL . 'modules/gutenberg/dist/blocks.commoneditorstyle.build.css',
|
260 |
+
array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
|
261 |
+
CARTFLOWS_VER // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
|
262 |
+
);
|
263 |
+
|
264 |
+
// Enqueue frontend CSS in editor.
|
265 |
+
wp_enqueue_style( 'CF_block-cartflows-frotend-style', CARTFLOWS_URL . 'assets/css/frontend.css', array(), CARTFLOWS_VER );
|
266 |
+
|
267 |
+
// WP Localized globals. Use dynamic PHP stuff in JavaScript via `cartflowsGlobal` object.
|
268 |
+
wp_localize_script(
|
269 |
+
'CF_block-cartflows-block-js',
|
270 |
+
'cf_blocks_info', // Array containing dynamic data for a JS Global.
|
271 |
+
array(
|
272 |
+
'pluginDirPath' => plugin_dir_path( __DIR__ ),
|
273 |
+
'pluginDirUrl' => plugin_dir_url( __DIR__ ),
|
274 |
+
'category' => 'cartflows',
|
275 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
276 |
+
'wpcf_ajax_nonce' => $wpcf_ajax_nonce,
|
277 |
+
'blocks' => Cartflows_Block_Config::get_block_attributes(),
|
278 |
+
'tablet_breakpoint' => CF_TABLET_BREAKPOINT,
|
279 |
+
'mobile_breakpoint' => CF_MOBILE_BREAKPOINT,
|
280 |
+
'show_checkout_pro_opt' => $show_checkout_pro_opt,
|
281 |
+
'ID' => $post_id,
|
282 |
+
'step_type' => $step_type,
|
283 |
+
'is_cartflows_pro_install' => _is_cartflows_pro(),
|
284 |
+
'is_woo_active' => wcf()->is_woo_active,
|
285 |
+
// Add more data here that you want to access from `cartflowsGlobal` object.
|
286 |
+
)
|
287 |
+
);
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Register Gutenberg block on server-side.
|
291 |
+
*
|
292 |
+
* Register the block on server-side to ensure that the block
|
293 |
+
* scripts and styles for both frontend and backend are
|
294 |
+
* enqueued when the editor loads.
|
295 |
+
*
|
296 |
+
* @link https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type#enqueuing-block-scripts
|
297 |
+
* @since x.x.x
|
298 |
+
*/
|
299 |
+
register_block_type(
|
300 |
+
'wcfb/next-step-button',
|
301 |
+
array(
|
302 |
+
// Enqueue blocks.build.js in the editor only.
|
303 |
+
'editor_script' => 'CF_block-cartflows-block-js',
|
304 |
+
// Enqueue blocks.editor.build.css in the editor only.
|
305 |
+
'style' => 'CF_block-cartflows-block-editor-css',
|
306 |
+
// Enqueue blocks.commoneditorstyle.build.css in the editor only.
|
307 |
+
'editor_style' => 'CF_block-common-editor-css',
|
308 |
+
)
|
309 |
+
);
|
310 |
+
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Gutenberg block category for WCFB.
|
316 |
+
*
|
317 |
+
* @param array $categories Block categories.
|
318 |
+
* @param object $post Post object.
|
319 |
+
* @since x.x.x
|
320 |
+
*/
|
321 |
+
public function register_block_category( $categories, $post ) {
|
322 |
+
return array_merge(
|
323 |
+
$categories,
|
324 |
+
array(
|
325 |
+
array(
|
326 |
+
'slug' => 'cartflows',
|
327 |
+
'title' => __( 'Cartflows', 'cartflows' ),
|
328 |
+
),
|
329 |
+
)
|
330 |
+
);
|
331 |
+
}
|
332 |
+
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Prepare if class 'Cartflows_Init_Blocks' exist.
|
337 |
+
* Kicking this off by calling 'get_instance()' method
|
338 |
+
*/
|
339 |
+
Cartflows_Init_Blocks::get_instance();
|
modules/gutenberg/dist/blocks/checkout-form/class-wcfb-checkout-form.php
CHANGED
@@ -1,581 +1,581 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WCFB - Checkout Form Styler.
|
4 |
-
*
|
5 |
-
* @package WCFB
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'WCFB_Checkout_Form' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class WCFB_Checkout_Form.
|
16 |
-
*/
|
17 |
-
class WCFB_Checkout_Form {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Member Variable
|
21 |
-
*
|
22 |
-
* @var 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
|
38 |
-
*/
|
39 |
-
public function __construct() {
|
40 |
-
|
41 |
-
// Activation hook.
|
42 |
-
add_action( 'init', array( $this, 'register_blocks' ) );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Registers the `core/latest-posts` block on server.
|
47 |
-
*
|
48 |
-
* @since 0.0.1
|
49 |
-
*/
|
50 |
-
public function register_blocks() {
|
51 |
-
|
52 |
-
// Check if the register function exists.
|
53 |
-
if ( ! function_exists( 'register_block_type' ) ) {
|
54 |
-
return;
|
55 |
-
}
|
56 |
-
|
57 |
-
$attr = array(
|
58 |
-
'block_id' => array(
|
59 |
-
'type' => 'string',
|
60 |
-
'default' => '',
|
61 |
-
),
|
62 |
-
'className' => array(
|
63 |
-
'type' => 'string',
|
64 |
-
),
|
65 |
-
'boxShadowColor' => array(
|
66 |
-
'type' => 'string',
|
67 |
-
'default' => '',
|
68 |
-
),
|
69 |
-
'boxShadowHOffset' => array(
|
70 |
-
'type' => 'number',
|
71 |
-
'default' => 0,
|
72 |
-
),
|
73 |
-
'boxShadowVOffset' => array(
|
74 |
-
'type' => 'number',
|
75 |
-
'default' => 0,
|
76 |
-
),
|
77 |
-
'boxShadowBlur' => array(
|
78 |
-
'type' => 'number',
|
79 |
-
'default' => 0,
|
80 |
-
),
|
81 |
-
'boxShadowSpread' => array(
|
82 |
-
'type' => 'number',
|
83 |
-
'default' => 0,
|
84 |
-
),
|
85 |
-
'boxShadowPosition' => array(
|
86 |
-
'type' => 'string',
|
87 |
-
'default' => 'outset',
|
88 |
-
),
|
89 |
-
'isHtml' => array(
|
90 |
-
'type' => 'boolean',
|
91 |
-
),
|
92 |
-
'showprecheckoutoffer' => array(
|
93 |
-
'type' => 'boolean',
|
94 |
-
'default' => false,
|
95 |
-
),
|
96 |
-
'formJson' => array(
|
97 |
-
'type' => 'object',
|
98 |
-
'default' => null,
|
99 |
-
),
|
100 |
-
'fieldVrPadding' => array(
|
101 |
-
'type' => 'number',
|
102 |
-
'default' => 10,
|
103 |
-
),
|
104 |
-
'fieldHrPadding' => array(
|
105 |
-
'type' => 'number',
|
106 |
-
'default' => 10,
|
107 |
-
),
|
108 |
-
'headBgColor' => array(
|
109 |
-
'type' => 'string',
|
110 |
-
'default' => '',
|
111 |
-
),
|
112 |
-
'fieldBgColor' => array(
|
113 |
-
'type' => 'string',
|
114 |
-
'default' => '',
|
115 |
-
),
|
116 |
-
'fieldLabelColor' => array(
|
117 |
-
'type' => 'string',
|
118 |
-
'default' => '',
|
119 |
-
),
|
120 |
-
'fieldInputColor' => array(
|
121 |
-
'type' => 'string',
|
122 |
-
'default' => '',
|
123 |
-
),
|
124 |
-
'fieldBorderStyle' => array(
|
125 |
-
'type' => 'string',
|
126 |
-
'default' => '',
|
127 |
-
),
|
128 |
-
'fieldBorderWidth' => array(
|
129 |
-
'type' => 'number',
|
130 |
-
'default' => '',
|
131 |
-
),
|
132 |
-
'fieldBorderRadius' => array(
|
133 |
-
'type' => 'number',
|
134 |
-
'default' => '',
|
135 |
-
),
|
136 |
-
'fieldBorderColor' => array(
|
137 |
-
'type' => 'string',
|
138 |
-
'default' => '',
|
139 |
-
),
|
140 |
-
'fieldBorderFocusColor' => array(
|
141 |
-
'type' => 'string',
|
142 |
-
'default' => '',
|
143 |
-
),
|
144 |
-
'buttonAlignment' => array(
|
145 |
-
'type' => 'string',
|
146 |
-
'default' => 'left',
|
147 |
-
),
|
148 |
-
'buttonVrPadding' => array(
|
149 |
-
'type' => 'number',
|
150 |
-
'default' => 10,
|
151 |
-
),
|
152 |
-
'buttonHrPadding' => array(
|
153 |
-
'type' => 'number',
|
154 |
-
'default' => 25,
|
155 |
-
),
|
156 |
-
'buttonBorderStyle' => array(
|
157 |
-
'type' => 'string',
|
158 |
-
'default' => '',
|
159 |
-
),
|
160 |
-
'buttonBorderWidth' => array(
|
161 |
-
'type' => 'number',
|
162 |
-
'default' => 1,
|
163 |
-
),
|
164 |
-
'buttonBorderRadius' => array(
|
165 |
-
'type' => 'number',
|
166 |
-
'default' => 0,
|
167 |
-
),
|
168 |
-
'buttonBorderColor' => array(
|
169 |
-
'type' => 'string',
|
170 |
-
'default' => '',
|
171 |
-
),
|
172 |
-
'buttonTextColor' => array(
|
173 |
-
'type' => 'string',
|
174 |
-
'default' => '',
|
175 |
-
),
|
176 |
-
'buttonBgColor' => array(
|
177 |
-
'type' => 'string',
|
178 |
-
'default' => '',
|
179 |
-
),
|
180 |
-
'buttonBorderHoverColor' => array(
|
181 |
-
'type' => 'string',
|
182 |
-
'default' => '',
|
183 |
-
),
|
184 |
-
'buttonTextHoverColor' => array(
|
185 |
-
'type' => 'string',
|
186 |
-
'default' => '',
|
187 |
-
),
|
188 |
-
'buttonBgHoverColor' => array(
|
189 |
-
'type' => 'string',
|
190 |
-
'default' => '',
|
191 |
-
),
|
192 |
-
'fieldSpacing' => array(
|
193 |
-
'type' => 'number',
|
194 |
-
'default' => '',
|
195 |
-
),
|
196 |
-
'fieldLabelSpacing' => array(
|
197 |
-
'type' => 'number',
|
198 |
-
'default' => '',
|
199 |
-
),
|
200 |
-
'inputFontSize' => array(
|
201 |
-
'type' => 'number',
|
202 |
-
'default' => '',
|
203 |
-
),
|
204 |
-
'inputFontSizeType' => array(
|
205 |
-
'type' => 'string',
|
206 |
-
'default' => 'px',
|
207 |
-
),
|
208 |
-
'inputFontSizeTablet' => array(
|
209 |
-
'type' => 'number',
|
210 |
-
),
|
211 |
-
'inputFontSizeMobile' => array(
|
212 |
-
'type' => 'number',
|
213 |
-
),
|
214 |
-
'inputFontFamily' => array(
|
215 |
-
'type' => 'string',
|
216 |
-
'default' => 'Default',
|
217 |
-
),
|
218 |
-
'inputFontWeight' => array(
|
219 |
-
'type' => 'string',
|
220 |
-
),
|
221 |
-
'inputFontSubset' => array(
|
222 |
-
'type' => 'string',
|
223 |
-
),
|
224 |
-
'inputLineHeightType' => array(
|
225 |
-
'type' => 'string',
|
226 |
-
'default' => 'em',
|
227 |
-
),
|
228 |
-
'inputLineHeight' => array(
|
229 |
-
'type' => 'number',
|
230 |
-
),
|
231 |
-
'inputLineHeightTablet' => array(
|
232 |
-
'type' => 'number',
|
233 |
-
),
|
234 |
-
'inputLineHeightMobile' => array(
|
235 |
-
'type' => 'number',
|
236 |
-
),
|
237 |
-
'inputLoadGoogleFonts' => array(
|
238 |
-
'type' => 'boolean',
|
239 |
-
'default' => false,
|
240 |
-
),
|
241 |
-
'buttonFontSize' => array(
|
242 |
-
'type' => 'number',
|
243 |
-
'default' => '',
|
244 |
-
),
|
245 |
-
'buttonFontSizeType' => array(
|
246 |
-
'type' => 'string',
|
247 |
-
'default' => 'px',
|
248 |
-
),
|
249 |
-
'buttonFontSizeTablet' => array(
|
250 |
-
'type' => 'number',
|
251 |
-
),
|
252 |
-
'buttonFontSizeMobile' => array(
|
253 |
-
'type' => 'number',
|
254 |
-
),
|
255 |
-
'buttonFontFamily' => array(
|
256 |
-
'type' => 'string',
|
257 |
-
'default' => 'Default',
|
258 |
-
),
|
259 |
-
'buttonFontWeight' => array(
|
260 |
-
'type' => 'string',
|
261 |
-
),
|
262 |
-
'buttonFontSubset' => array(
|
263 |
-
'type' => 'string',
|
264 |
-
),
|
265 |
-
'buttonLineHeightType' => array(
|
266 |
-
'type' => 'string',
|
267 |
-
'default' => 'em',
|
268 |
-
),
|
269 |
-
'buttonLineHeight' => array(
|
270 |
-
'type' => 'number',
|
271 |
-
),
|
272 |
-
'buttonLineHeightTablet' => array(
|
273 |
-
'type' => 'number',
|
274 |
-
),
|
275 |
-
'buttonLineHeightMobile' => array(
|
276 |
-
'type' => 'number',
|
277 |
-
),
|
278 |
-
'buttonLoadGoogleFonts' => array(
|
279 |
-
'type' => 'boolean',
|
280 |
-
'default' => false,
|
281 |
-
),
|
282 |
-
'errorMsgColor' => array(
|
283 |
-
'type' => 'string',
|
284 |
-
'default' => '',
|
285 |
-
),
|
286 |
-
'errorMsgBgColor' => array(
|
287 |
-
'type' => 'string',
|
288 |
-
'default' => '',
|
289 |
-
),
|
290 |
-
'errorMsgBorderColor' => array(
|
291 |
-
'type' => 'string',
|
292 |
-
'default' => '',
|
293 |
-
),
|
294 |
-
'msgBorderSize' => array(
|
295 |
-
'type' => 'number',
|
296 |
-
'default' => '',
|
297 |
-
),
|
298 |
-
'msgBorderRadius' => array(
|
299 |
-
'type' => 'number',
|
300 |
-
'default' => '',
|
301 |
-
),
|
302 |
-
'msgVrPadding' => array(
|
303 |
-
'type' => 'number',
|
304 |
-
'default' => '',
|
305 |
-
),
|
306 |
-
'msgHrPadding' => array(
|
307 |
-
'type' => 'number',
|
308 |
-
'default' => '',
|
309 |
-
),
|
310 |
-
'msgBorderRadiusType' => array(
|
311 |
-
'type' => 'string',
|
312 |
-
'default' => 'px',
|
313 |
-
),
|
314 |
-
'fieldBorderRadiusType' => array(
|
315 |
-
'type' => 'string',
|
316 |
-
'default' => 'px',
|
317 |
-
),
|
318 |
-
'buttonBorderRadiusType' => array(
|
319 |
-
'type' => 'string',
|
320 |
-
'default' => 'px',
|
321 |
-
),
|
322 |
-
'paymentdescriptionColor' => array(
|
323 |
-
'type' => 'string',
|
324 |
-
'default' => '',
|
325 |
-
),
|
326 |
-
'paymenttitleColor' => array(
|
327 |
-
'type' => 'string',
|
328 |
-
'default' => '',
|
329 |
-
),
|
330 |
-
'sectionbgColor' => array(
|
331 |
-
'type' => 'string',
|
332 |
-
'default' => '',
|
333 |
-
),
|
334 |
-
'informationbgColor' => array(
|
335 |
-
'type' => 'string',
|
336 |
-
'default' => 'px',
|
337 |
-
),
|
338 |
-
'sectionBorderRadius' => array(
|
339 |
-
'type' => 'number',
|
340 |
-
'default' => '',
|
341 |
-
),
|
342 |
-
'sectionhrPadding' => array(
|
343 |
-
'type' => 'string',
|
344 |
-
'default' => '',
|
345 |
-
),
|
346 |
-
'sectionvrPadding' => array(
|
347 |
-
'type' => 'string',
|
348 |
-
'default' => '',
|
349 |
-
),
|
350 |
-
'sectionhrMargin' => array(
|
351 |
-
'type' => 'string',
|
352 |
-
'default' => '',
|
353 |
-
),
|
354 |
-
'sectionvrMargin' => array(
|
355 |
-
'type' => 'string',
|
356 |
-
'default' => '',
|
357 |
-
),
|
358 |
-
'headFontSize' => array(
|
359 |
-
'type' => 'string',
|
360 |
-
'default' => '',
|
361 |
-
),
|
362 |
-
'headFontSizeType' => array(
|
363 |
-
'type' => 'string',
|
364 |
-
'default' => 'px',
|
365 |
-
),
|
366 |
-
'headFontSizeTablet' => array(
|
367 |
-
'type' => 'string',
|
368 |
-
'default' => '',
|
369 |
-
),
|
370 |
-
'headFontSizeMobile' => array(
|
371 |
-
'type' => 'string',
|
372 |
-
'default' => '',
|
373 |
-
),
|
374 |
-
'headFontFamily' => array(
|
375 |
-
'type' => 'string',
|
376 |
-
'default' => '',
|
377 |
-
),
|
378 |
-
'headFontWeight' => array(
|
379 |
-
'type' => 'string',
|
380 |
-
'default' => '',
|
381 |
-
),
|
382 |
-
'headFontSubset' => array(
|
383 |
-
'type' => 'string',
|
384 |
-
'default' => '',
|
385 |
-
),
|
386 |
-
'headLineHeightType' => array(
|
387 |
-
'type' => 'string',
|
388 |
-
'default' => '',
|
389 |
-
),
|
390 |
-
'headLineHeight' => array(
|
391 |
-
'type' => 'string',
|
392 |
-
'default' => '',
|
393 |
-
),
|
394 |
-
'headLineHeightTablet' => array(
|
395 |
-
'type' => 'string',
|
396 |
-
'default' => '',
|
397 |
-
),
|
398 |
-
'headLineHeightMobile' => array(
|
399 |
-
'type' => 'string',
|
400 |
-
'default' => '',
|
401 |
-
),
|
402 |
-
'headLoadGoogleFonts' => array(
|
403 |
-
'type' => 'string',
|
404 |
-
'default' => '',
|
405 |
-
),
|
406 |
-
'globaltextColor' => array(
|
407 |
-
'type' => 'string',
|
408 |
-
'default' => '',
|
409 |
-
),
|
410 |
-
'globalbgColor' => array(
|
411 |
-
'type' => 'string',
|
412 |
-
'default' => '',
|
413 |
-
),
|
414 |
-
'globalFontSize' => array(
|
415 |
-
'type' => 'number',
|
416 |
-
'default' => '',
|
417 |
-
),
|
418 |
-
'globalFontSizeType' => array(
|
419 |
-
'type' => 'string',
|
420 |
-
'default' => 'px',
|
421 |
-
),
|
422 |
-
'globalFontSizeTablet' => array(
|
423 |
-
'type' => 'number',
|
424 |
-
),
|
425 |
-
'globalFontSizeMobile' => array(
|
426 |
-
'type' => 'number',
|
427 |
-
),
|
428 |
-
'globalFontFamily' => array(
|
429 |
-
'type' => 'string',
|
430 |
-
'default' => 'Default',
|
431 |
-
),
|
432 |
-
'globalFontWeight' => array(
|
433 |
-
'type' => 'string',
|
434 |
-
),
|
435 |
-
'globalFontSubset' => array(
|
436 |
-
'type' => 'string',
|
437 |
-
),
|
438 |
-
'globalLineHeightType' => array(
|
439 |
-
'type' => 'string',
|
440 |
-
'default' => 'em',
|
441 |
-
),
|
442 |
-
'globalLineHeight' => array(
|
443 |
-
'type' => 'number',
|
444 |
-
),
|
445 |
-
'globalLineHeightTablet' => array(
|
446 |
-
'type' => 'number',
|
447 |
-
),
|
448 |
-
'globalLineHeightMobile' => array(
|
449 |
-
'type' => 'number',
|
450 |
-
),
|
451 |
-
'globalLoadGoogleFonts' => array(
|
452 |
-
'type' => 'boolean',
|
453 |
-
'default' => false,
|
454 |
-
),
|
455 |
-
'backgroundType' => array(
|
456 |
-
'type' => 'string',
|
457 |
-
'default' => 'color',
|
458 |
-
),
|
459 |
-
'backgroundImage' => array(
|
460 |
-
'type' => 'object',
|
461 |
-
),
|
462 |
-
'backgroundPosition' => array(
|
463 |
-
'type' => 'string',
|
464 |
-
'default' => 'center-center',
|
465 |
-
),
|
466 |
-
'backgroundSize' => array(
|
467 |
-
'type' => 'string',
|
468 |
-
'default' => 'cover',
|
469 |
-
),
|
470 |
-
'backgroundRepeat' => array(
|
471 |
-
'type' => 'string',
|
472 |
-
'default' => 'no-repeat',
|
473 |
-
),
|
474 |
-
'backgroundAttachment' => array(
|
475 |
-
'type' => 'string',
|
476 |
-
'default' => 'scroll',
|
477 |
-
),
|
478 |
-
'backgroundOpacity' => array(
|
479 |
-
'type' => 'number',
|
480 |
-
),
|
481 |
-
'backgroundImageColor' => array(
|
482 |
-
'type' => 'string',
|
483 |
-
'default' => '',
|
484 |
-
),
|
485 |
-
'backgroundColor' => array(
|
486 |
-
'type' => 'string',
|
487 |
-
'default' => '',
|
488 |
-
),
|
489 |
-
'backgroundHoverColor' => array(
|
490 |
-
'type' => 'string',
|
491 |
-
'default' => '',
|
492 |
-
),
|
493 |
-
'gradientColor1' => array(
|
494 |
-
'type' => 'string',
|
495 |
-
'default' => '#f16334',
|
496 |
-
),
|
497 |
-
'gradientColor2' => array(
|
498 |
-
'type' => 'string',
|
499 |
-
'default' => '#f16334',
|
500 |
-
),
|
501 |
-
'gradientType' => array(
|
502 |
-
'type' => 'string',
|
503 |
-
'default' => 'linear',
|
504 |
-
),
|
505 |
-
'gradientLocation1' => array(
|
506 |
-
'type' => 'number',
|
507 |
-
'default' => 0,
|
508 |
-
),
|
509 |
-
'gradientLocation2' => array(
|
510 |
-
'type' => 'number',
|
511 |
-
'default' => 100,
|
512 |
-
),
|
513 |
-
'gradientAngle' => array(
|
514 |
-
'type' => 'number',
|
515 |
-
'default' => 0,
|
516 |
-
),
|
517 |
-
'gradientPosition' => array(
|
518 |
-
'type' => 'string',
|
519 |
-
'default' => 'center center',
|
520 |
-
),
|
521 |
-
'gradientValue' => array(
|
522 |
-
'type' => 'string',
|
523 |
-
'default' => '',
|
524 |
-
),
|
525 |
-
'errorLabelColor' => array(
|
526 |
-
'type' => 'string',
|
527 |
-
'default' => '',
|
528 |
-
),
|
529 |
-
'errorFieldBorderColor' => array(
|
530 |
-
'type' => 'string',
|
531 |
-
'default' => '',
|
532 |
-
),
|
533 |
-
);
|
534 |
-
|
535 |
-
$attributes = apply_filters( 'cartflows_gutenberg_cf_attributes_filters', $attr );
|
536 |
-
|
537 |
-
register_block_type(
|
538 |
-
'wcfb/checkout-form',
|
539 |
-
array(
|
540 |
-
'attributes' => $attributes,
|
541 |
-
'render_callback' => array( $this, 'render_html' ),
|
542 |
-
)
|
543 |
-
);
|
544 |
-
}
|
545 |
-
|
546 |
-
/**
|
547 |
-
* Render CF HTML.
|
548 |
-
*
|
549 |
-
* @param array $attributes Array of block attributes.
|
550 |
-
*
|
551 |
-
* @since x.x.x
|
552 |
-
*/
|
553 |
-
public function render_html( $attributes ) {
|
554 |
-
|
555 |
-
$main_classes = array(
|
556 |
-
'wcf-gb-checkout-form cartflows-gutenberg__checkout-form',
|
557 |
-
'cf-block-' . $attributes['block_id'],
|
558 |
-
);
|
559 |
-
|
560 |
-
if ( isset( $attributes['className'] ) ) {
|
561 |
-
$main_classes[] = $attributes['className'];
|
562 |
-
}
|
563 |
-
|
564 |
-
do_action( 'cartflows_gutenberg_checkout_options_filters', $attributes );
|
565 |
-
|
566 |
-
ob_start();
|
567 |
-
?>
|
568 |
-
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
569 |
-
<?php echo do_shortcode( '[cartflows_checkout]' ); ?>
|
570 |
-
</div>
|
571 |
-
<?php
|
572 |
-
return ob_get_clean();
|
573 |
-
}
|
574 |
-
}
|
575 |
-
|
576 |
-
/**
|
577 |
-
* Prepare if class 'WCFB_Checkout_Form' exist.
|
578 |
-
* Kicking this off by calling 'get_instance()' method
|
579 |
-
*/
|
580 |
-
WCFB_Checkout_Form::get_instance();
|
581 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WCFB - Checkout Form Styler.
|
4 |
+
*
|
5 |
+
* @package WCFB
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'WCFB_Checkout_Form' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WCFB_Checkout_Form.
|
16 |
+
*/
|
17 |
+
class WCFB_Checkout_Form {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Member Variable
|
21 |
+
*
|
22 |
+
* @var 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
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
|
41 |
+
// Activation hook.
|
42 |
+
add_action( 'init', array( $this, 'register_blocks' ) );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Registers the `core/latest-posts` block on server.
|
47 |
+
*
|
48 |
+
* @since 0.0.1
|
49 |
+
*/
|
50 |
+
public function register_blocks() {
|
51 |
+
|
52 |
+
// Check if the register function exists.
|
53 |
+
if ( ! function_exists( 'register_block_type' ) ) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
|
57 |
+
$attr = array(
|
58 |
+
'block_id' => array(
|
59 |
+
'type' => 'string',
|
60 |
+
'default' => '',
|
61 |
+
),
|
62 |
+
'className' => array(
|
63 |
+
'type' => 'string',
|
64 |
+
),
|
65 |
+
'boxShadowColor' => array(
|
66 |
+
'type' => 'string',
|
67 |
+
'default' => '',
|
68 |
+
),
|
69 |
+
'boxShadowHOffset' => array(
|
70 |
+
'type' => 'number',
|
71 |
+
'default' => 0,
|
72 |
+
),
|
73 |
+
'boxShadowVOffset' => array(
|
74 |
+
'type' => 'number',
|
75 |
+
'default' => 0,
|
76 |
+
),
|
77 |
+
'boxShadowBlur' => array(
|
78 |
+
'type' => 'number',
|
79 |
+
'default' => 0,
|
80 |
+
),
|
81 |
+
'boxShadowSpread' => array(
|
82 |
+
'type' => 'number',
|
83 |
+
'default' => 0,
|
84 |
+
),
|
85 |
+
'boxShadowPosition' => array(
|
86 |
+
'type' => 'string',
|
87 |
+
'default' => 'outset',
|
88 |
+
),
|
89 |
+
'isHtml' => array(
|
90 |
+
'type' => 'boolean',
|
91 |
+
),
|
92 |
+
'showprecheckoutoffer' => array(
|
93 |
+
'type' => 'boolean',
|
94 |
+
'default' => false,
|
95 |
+
),
|
96 |
+
'formJson' => array(
|
97 |
+
'type' => 'object',
|
98 |
+
'default' => null,
|
99 |
+
),
|
100 |
+
'fieldVrPadding' => array(
|
101 |
+
'type' => 'number',
|
102 |
+
'default' => 10,
|
103 |
+
),
|
104 |
+
'fieldHrPadding' => array(
|
105 |
+
'type' => 'number',
|
106 |
+
'default' => 10,
|
107 |
+
),
|
108 |
+
'headBgColor' => array(
|
109 |
+
'type' => 'string',
|
110 |
+
'default' => '',
|
111 |
+
),
|
112 |
+
'fieldBgColor' => array(
|
113 |
+
'type' => 'string',
|
114 |
+
'default' => '',
|
115 |
+
),
|
116 |
+
'fieldLabelColor' => array(
|
117 |
+
'type' => 'string',
|
118 |
+
'default' => '',
|
119 |
+
),
|
120 |
+
'fieldInputColor' => array(
|
121 |
+
'type' => 'string',
|
122 |
+
'default' => '',
|
123 |
+
),
|
124 |
+
'fieldBorderStyle' => array(
|
125 |
+
'type' => 'string',
|
126 |
+
'default' => '',
|
127 |
+
),
|
128 |
+
'fieldBorderWidth' => array(
|
129 |
+
'type' => 'number',
|
130 |
+
'default' => '',
|
131 |
+
),
|
132 |
+
'fieldBorderRadius' => array(
|
133 |
+
'type' => 'number',
|
134 |
+
'default' => '',
|
135 |
+
),
|
136 |
+
'fieldBorderColor' => array(
|
137 |
+
'type' => 'string',
|
138 |
+
'default' => '',
|
139 |
+
),
|
140 |
+
'fieldBorderFocusColor' => array(
|
141 |
+
'type' => 'string',
|
142 |
+
'default' => '',
|
143 |
+
),
|
144 |
+
'buttonAlignment' => array(
|
145 |
+
'type' => 'string',
|
146 |
+
'default' => 'left',
|
147 |
+
),
|
148 |
+
'buttonVrPadding' => array(
|
149 |
+
'type' => 'number',
|
150 |
+
'default' => 10,
|
151 |
+
),
|
152 |
+
'buttonHrPadding' => array(
|
153 |
+
'type' => 'number',
|
154 |
+
'default' => 25,
|
155 |
+
),
|
156 |
+
'buttonBorderStyle' => array(
|
157 |
+
'type' => 'string',
|
158 |
+
'default' => '',
|
159 |
+
),
|
160 |
+
'buttonBorderWidth' => array(
|
161 |
+
'type' => 'number',
|
162 |
+
'default' => 1,
|
163 |
+
),
|
164 |
+
'buttonBorderRadius' => array(
|
165 |
+
'type' => 'number',
|
166 |
+
'default' => 0,
|
167 |
+
),
|
168 |
+
'buttonBorderColor' => array(
|
169 |
+
'type' => 'string',
|
170 |
+
'default' => '',
|
171 |
+
),
|
172 |
+
'buttonTextColor' => array(
|
173 |
+
'type' => 'string',
|
174 |
+
'default' => '',
|
175 |
+
),
|
176 |
+
'buttonBgColor' => array(
|
177 |
+
'type' => 'string',
|
178 |
+
'default' => '',
|
179 |
+
),
|
180 |
+
'buttonBorderHoverColor' => array(
|
181 |
+
'type' => 'string',
|
182 |
+
'default' => '',
|
183 |
+
),
|
184 |
+
'buttonTextHoverColor' => array(
|
185 |
+
'type' => 'string',
|
186 |
+
'default' => '',
|
187 |
+
),
|
188 |
+
'buttonBgHoverColor' => array(
|
189 |
+
'type' => 'string',
|
190 |
+
'default' => '',
|
191 |
+
),
|
192 |
+
'fieldSpacing' => array(
|
193 |
+
'type' => 'number',
|
194 |
+
'default' => '',
|
195 |
+
),
|
196 |
+
'fieldLabelSpacing' => array(
|
197 |
+
'type' => 'number',
|
198 |
+
'default' => '',
|
199 |
+
),
|
200 |
+
'inputFontSize' => array(
|
201 |
+
'type' => 'number',
|
202 |
+
'default' => '',
|
203 |
+
),
|
204 |
+
'inputFontSizeType' => array(
|
205 |
+
'type' => 'string',
|
206 |
+
'default' => 'px',
|
207 |
+
),
|
208 |
+
'inputFontSizeTablet' => array(
|
209 |
+
'type' => 'number',
|
210 |
+
),
|
211 |
+
'inputFontSizeMobile' => array(
|
212 |
+
'type' => 'number',
|
213 |
+
),
|
214 |
+
'inputFontFamily' => array(
|
215 |
+
'type' => 'string',
|
216 |
+
'default' => 'Default',
|
217 |
+
),
|
218 |
+
'inputFontWeight' => array(
|
219 |
+
'type' => 'string',
|
220 |
+
),
|
221 |
+
'inputFontSubset' => array(
|
222 |
+
'type' => 'string',
|
223 |
+
),
|
224 |
+
'inputLineHeightType' => array(
|
225 |
+
'type' => 'string',
|
226 |
+
'default' => 'em',
|
227 |
+
),
|
228 |
+
'inputLineHeight' => array(
|
229 |
+
'type' => 'number',
|
230 |
+
),
|
231 |
+
'inputLineHeightTablet' => array(
|
232 |
+
'type' => 'number',
|
233 |
+
),
|
234 |
+
'inputLineHeightMobile' => array(
|
235 |
+
'type' => 'number',
|
236 |
+
),
|
237 |
+
'inputLoadGoogleFonts' => array(
|
238 |
+
'type' => 'boolean',
|
239 |
+
'default' => false,
|
240 |
+
),
|
241 |
+
'buttonFontSize' => array(
|
242 |
+
'type' => 'number',
|
243 |
+
'default' => '',
|
244 |
+
),
|
245 |
+
'buttonFontSizeType' => array(
|
246 |
+
'type' => 'string',
|
247 |
+
'default' => 'px',
|
248 |
+
),
|
249 |
+
'buttonFontSizeTablet' => array(
|
250 |
+
'type' => 'number',
|
251 |
+
),
|
252 |
+
'buttonFontSizeMobile' => array(
|
253 |
+
'type' => 'number',
|
254 |
+
),
|
255 |
+
'buttonFontFamily' => array(
|
256 |
+
'type' => 'string',
|
257 |
+
'default' => 'Default',
|
258 |
+
),
|
259 |
+
'buttonFontWeight' => array(
|
260 |
+
'type' => 'string',
|
261 |
+
),
|
262 |
+
'buttonFontSubset' => array(
|
263 |
+
'type' => 'string',
|
264 |
+
),
|
265 |
+
'buttonLineHeightType' => array(
|
266 |
+
'type' => 'string',
|
267 |
+
'default' => 'em',
|
268 |
+
),
|
269 |
+
'buttonLineHeight' => array(
|
270 |
+
'type' => 'number',
|
271 |
+
),
|
272 |
+
'buttonLineHeightTablet' => array(
|
273 |
+
'type' => 'number',
|
274 |
+
),
|
275 |
+
'buttonLineHeightMobile' => array(
|
276 |
+
'type' => 'number',
|
277 |
+
),
|
278 |
+
'buttonLoadGoogleFonts' => array(
|
279 |
+
'type' => 'boolean',
|
280 |
+
'default' => false,
|
281 |
+
),
|
282 |
+
'errorMsgColor' => array(
|
283 |
+
'type' => 'string',
|
284 |
+
'default' => '',
|
285 |
+
),
|
286 |
+
'errorMsgBgColor' => array(
|
287 |
+
'type' => 'string',
|
288 |
+
'default' => '',
|
289 |
+
),
|
290 |
+
'errorMsgBorderColor' => array(
|
291 |
+
'type' => 'string',
|
292 |
+
'default' => '',
|
293 |
+
),
|
294 |
+
'msgBorderSize' => array(
|
295 |
+
'type' => 'number',
|
296 |
+
'default' => '',
|
297 |
+
),
|
298 |
+
'msgBorderRadius' => array(
|
299 |
+
'type' => 'number',
|
300 |
+
'default' => '',
|
301 |
+
),
|
302 |
+
'msgVrPadding' => array(
|
303 |
+
'type' => 'number',
|
304 |
+
'default' => '',
|
305 |
+
),
|
306 |
+
'msgHrPadding' => array(
|
307 |
+
'type' => 'number',
|
308 |
+
'default' => '',
|
309 |
+
),
|
310 |
+
'msgBorderRadiusType' => array(
|
311 |
+
'type' => 'string',
|
312 |
+
'default' => 'px',
|
313 |
+
),
|
314 |
+
'fieldBorderRadiusType' => array(
|
315 |
+
'type' => 'string',
|
316 |
+
'default' => 'px',
|
317 |
+
),
|
318 |
+
'buttonBorderRadiusType' => array(
|
319 |
+
'type' => 'string',
|
320 |
+
'default' => 'px',
|
321 |
+
),
|
322 |
+
'paymentdescriptionColor' => array(
|
323 |
+
'type' => 'string',
|
324 |
+
'default' => '',
|
325 |
+
),
|
326 |
+
'paymenttitleColor' => array(
|
327 |
+
'type' => 'string',
|
328 |
+
'default' => '',
|
329 |
+
),
|
330 |
+
'sectionbgColor' => array(
|
331 |
+
'type' => 'string',
|
332 |
+
'default' => '',
|
333 |
+
),
|
334 |
+
'informationbgColor' => array(
|
335 |
+
'type' => 'string',
|
336 |
+
'default' => 'px',
|
337 |
+
),
|
338 |
+
'sectionBorderRadius' => array(
|
339 |
+
'type' => 'number',
|
340 |
+
'default' => '',
|
341 |
+
),
|
342 |
+
'sectionhrPadding' => array(
|
343 |
+
'type' => 'string',
|
344 |
+
'default' => '',
|
345 |
+
),
|
346 |
+
'sectionvrPadding' => array(
|
347 |
+
'type' => 'string',
|
348 |
+
'default' => '',
|
349 |
+
),
|
350 |
+
'sectionhrMargin' => array(
|
351 |
+
'type' => 'string',
|
352 |
+
'default' => '',
|
353 |
+
),
|
354 |
+
'sectionvrMargin' => array(
|
355 |
+
'type' => 'string',
|
356 |
+
'default' => '',
|
357 |
+
),
|
358 |
+
'headFontSize' => array(
|
359 |
+
'type' => 'string',
|
360 |
+
'default' => '',
|
361 |
+
),
|
362 |
+
'headFontSizeType' => array(
|
363 |
+
'type' => 'string',
|
364 |
+
'default' => 'px',
|
365 |
+
),
|
366 |
+
'headFontSizeTablet' => array(
|
367 |
+
'type' => 'string',
|
368 |
+
'default' => '',
|
369 |
+
),
|
370 |
+
'headFontSizeMobile' => array(
|
371 |
+
'type' => 'string',
|
372 |
+
'default' => '',
|
373 |
+
),
|
374 |
+
'headFontFamily' => array(
|
375 |
+
'type' => 'string',
|
376 |
+
'default' => '',
|
377 |
+
),
|
378 |
+
'headFontWeight' => array(
|
379 |
+
'type' => 'string',
|
380 |
+
'default' => '',
|
381 |
+
),
|
382 |
+
'headFontSubset' => array(
|
383 |
+
'type' => 'string',
|
384 |
+
'default' => '',
|
385 |
+
),
|
386 |
+
'headLineHeightType' => array(
|
387 |
+
'type' => 'string',
|
388 |
+
'default' => '',
|
389 |
+
),
|
390 |
+
'headLineHeight' => array(
|
391 |
+
'type' => 'string',
|
392 |
+
'default' => '',
|
393 |
+
),
|
394 |
+
'headLineHeightTablet' => array(
|
395 |
+
'type' => 'string',
|
396 |
+
'default' => '',
|
397 |
+
),
|
398 |
+
'headLineHeightMobile' => array(
|
399 |
+
'type' => 'string',
|
400 |
+
'default' => '',
|
401 |
+
),
|
402 |
+
'headLoadGoogleFonts' => array(
|
403 |
+
'type' => 'string',
|
404 |
+
'default' => '',
|
405 |
+
),
|
406 |
+
'globaltextColor' => array(
|
407 |
+
'type' => 'string',
|
408 |
+
'default' => '',
|
409 |
+
),
|
410 |
+
'globalbgColor' => array(
|
411 |
+
'type' => 'string',
|
412 |
+
'default' => '',
|
413 |
+
),
|
414 |
+
'globalFontSize' => array(
|
415 |
+
'type' => 'number',
|
416 |
+
'default' => '',
|
417 |
+
),
|
418 |
+
'globalFontSizeType' => array(
|
419 |
+
'type' => 'string',
|
420 |
+
'default' => 'px',
|
421 |
+
),
|
422 |
+
'globalFontSizeTablet' => array(
|
423 |
+
'type' => 'number',
|
424 |
+
),
|
425 |
+
'globalFontSizeMobile' => array(
|
426 |
+
'type' => 'number',
|
427 |
+
),
|
428 |
+
'globalFontFamily' => array(
|
429 |
+
'type' => 'string',
|
430 |
+
'default' => 'Default',
|
431 |
+
),
|
432 |
+
'globalFontWeight' => array(
|
433 |
+
'type' => 'string',
|
434 |
+
),
|
435 |
+
'globalFontSubset' => array(
|
436 |
+
'type' => 'string',
|
437 |
+
),
|
438 |
+
'globalLineHeightType' => array(
|
439 |
+
'type' => 'string',
|
440 |
+
'default' => 'em',
|
441 |
+
),
|
442 |
+
'globalLineHeight' => array(
|
443 |
+
'type' => 'number',
|
444 |
+
),
|
445 |
+
'globalLineHeightTablet' => array(
|
446 |
+
'type' => 'number',
|
447 |
+
),
|
448 |
+
'globalLineHeightMobile' => array(
|
449 |
+
'type' => 'number',
|
450 |
+
),
|
451 |
+
'globalLoadGoogleFonts' => array(
|
452 |
+
'type' => 'boolean',
|
453 |
+
'default' => false,
|
454 |
+
),
|
455 |
+
'backgroundType' => array(
|
456 |
+
'type' => 'string',
|
457 |
+
'default' => 'color',
|
458 |
+
),
|
459 |
+
'backgroundImage' => array(
|
460 |
+
'type' => 'object',
|
461 |
+
),
|
462 |
+
'backgroundPosition' => array(
|
463 |
+
'type' => 'string',
|
464 |
+
'default' => 'center-center',
|
465 |
+
),
|
466 |
+
'backgroundSize' => array(
|
467 |
+
'type' => 'string',
|
468 |
+
'default' => 'cover',
|
469 |
+
),
|
470 |
+
'backgroundRepeat' => array(
|
471 |
+
'type' => 'string',
|
472 |
+
'default' => 'no-repeat',
|
473 |
+
),
|
474 |
+
'backgroundAttachment' => array(
|
475 |
+
'type' => 'string',
|
476 |
+
'default' => 'scroll',
|
477 |
+
),
|
478 |
+
'backgroundOpacity' => array(
|
479 |
+
'type' => 'number',
|
480 |
+
),
|
481 |
+
'backgroundImageColor' => array(
|
482 |
+
'type' => 'string',
|
483 |
+
'default' => '',
|
484 |
+
),
|
485 |
+
'backgroundColor' => array(
|
486 |
+
'type' => 'string',
|
487 |
+
'default' => '',
|
488 |
+
),
|
489 |
+
'backgroundHoverColor' => array(
|
490 |
+
'type' => 'string',
|
491 |
+
'default' => '',
|
492 |
+
),
|
493 |
+
'gradientColor1' => array(
|
494 |
+
'type' => 'string',
|
495 |
+
'default' => '#f16334',
|
496 |
+
),
|
497 |
+
'gradientColor2' => array(
|
498 |
+
'type' => 'string',
|
499 |
+
'default' => '#f16334',
|
500 |
+
),
|
501 |
+
'gradientType' => array(
|
502 |
+
'type' => 'string',
|
503 |
+
'default' => 'linear',
|
504 |
+
),
|
505 |
+
'gradientLocation1' => array(
|
506 |
+
'type' => 'number',
|
507 |
+
'default' => 0,
|
508 |
+
),
|
509 |
+
'gradientLocation2' => array(
|
510 |
+
'type' => 'number',
|
511 |
+
'default' => 100,
|
512 |
+
),
|
513 |
+
'gradientAngle' => array(
|
514 |
+
'type' => 'number',
|
515 |
+
'default' => 0,
|
516 |
+
),
|
517 |
+
'gradientPosition' => array(
|
518 |
+
'type' => 'string',
|
519 |
+
'default' => 'center center',
|
520 |
+
),
|
521 |
+
'gradientValue' => array(
|
522 |
+
'type' => 'string',
|
523 |
+
'default' => '',
|
524 |
+
),
|
525 |
+
'errorLabelColor' => array(
|
526 |
+
'type' => 'string',
|
527 |
+
'default' => '',
|
528 |
+
),
|
529 |
+
'errorFieldBorderColor' => array(
|
530 |
+
'type' => 'string',
|
531 |
+
'default' => '',
|
532 |
+
),
|
533 |
+
);
|
534 |
+
|
535 |
+
$attributes = apply_filters( 'cartflows_gutenberg_cf_attributes_filters', $attr );
|
536 |
+
|
537 |
+
register_block_type(
|
538 |
+
'wcfb/checkout-form',
|
539 |
+
array(
|
540 |
+
'attributes' => $attributes,
|
541 |
+
'render_callback' => array( $this, 'render_html' ),
|
542 |
+
)
|
543 |
+
);
|
544 |
+
}
|
545 |
+
|
546 |
+
/**
|
547 |
+
* Render CF HTML.
|
548 |
+
*
|
549 |
+
* @param array $attributes Array of block attributes.
|
550 |
+
*
|
551 |
+
* @since x.x.x
|
552 |
+
*/
|
553 |
+
public function render_html( $attributes ) {
|
554 |
+
|
555 |
+
$main_classes = array(
|
556 |
+
'wcf-gb-checkout-form cartflows-gutenberg__checkout-form',
|
557 |
+
'cf-block-' . $attributes['block_id'],
|
558 |
+
);
|
559 |
+
|
560 |
+
if ( isset( $attributes['className'] ) ) {
|
561 |
+
$main_classes[] = $attributes['className'];
|
562 |
+
}
|
563 |
+
|
564 |
+
do_action( 'cartflows_gutenberg_checkout_options_filters', $attributes );
|
565 |
+
|
566 |
+
ob_start();
|
567 |
+
?>
|
568 |
+
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
569 |
+
<?php echo do_shortcode( '[cartflows_checkout]' ); ?>
|
570 |
+
</div>
|
571 |
+
<?php
|
572 |
+
return ob_get_clean();
|
573 |
+
}
|
574 |
+
}
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Prepare if class 'WCFB_Checkout_Form' exist.
|
578 |
+
* Kicking this off by calling 'get_instance()' method
|
579 |
+
*/
|
580 |
+
WCFB_Checkout_Form::get_instance();
|
581 |
+
}
|
modules/gutenberg/dist/blocks/optin-form/class-wcfb-optin-form.php
CHANGED
@@ -1,395 +1,395 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WCFB - Optin Detail Form.
|
4 |
-
*
|
5 |
-
* @package UAGB
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'WCFB_Optin_Form' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class WCFB_Optin_Form.
|
16 |
-
*/
|
17 |
-
class WCFB_Optin_Form {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Member Variable
|
21 |
-
*
|
22 |
-
* @var instance
|
23 |
-
*/
|
24 |
-
private static $instance;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Initiator
|
28 |
-
*/
|
29 |
-
public static function get_instance() {
|
30 |
-
|
31 |
-
if ( ! isset( self::$instance ) ) {
|
32 |
-
self::$instance = new self();
|
33 |
-
}
|
34 |
-
return self::$instance;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Constructor
|
39 |
-
*/
|
40 |
-
public function __construct() {
|
41 |
-
|
42 |
-
// Activation hook.
|
43 |
-
add_action( 'init', array( $this, 'register_blocks' ) );
|
44 |
-
add_action( 'init', array( $this, 'dynamic_options_ajax_filters' ), 1 );
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Registers the `core/latest-posts` block on server.
|
49 |
-
*
|
50 |
-
* @since x.x.x
|
51 |
-
*/
|
52 |
-
public function register_blocks() {
|
53 |
-
|
54 |
-
// Check if the register function exists.
|
55 |
-
if ( ! function_exists( 'register_block_type' ) ) {
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
|
59 |
-
$attr = array(
|
60 |
-
'block_id' => array(
|
61 |
-
'type' => 'string',
|
62 |
-
),
|
63 |
-
'classMigrate' => array(
|
64 |
-
'type' => 'boolean',
|
65 |
-
'default' => false,
|
66 |
-
),
|
67 |
-
'className' => array(
|
68 |
-
'type' => 'string',
|
69 |
-
),
|
70 |
-
// General.
|
71 |
-
'generalPrimaryColor' => array(
|
72 |
-
'type' => 'string',
|
73 |
-
'default' => '',
|
74 |
-
),
|
75 |
-
// general font family.
|
76 |
-
'generalLoadGoogleFonts' => array(
|
77 |
-
'type' => 'boolean',
|
78 |
-
'default' => false,
|
79 |
-
),
|
80 |
-
'generalFontFamily' => array(
|
81 |
-
'type' => 'string',
|
82 |
-
),
|
83 |
-
'generalFontWeight' => array(
|
84 |
-
'type' => 'string',
|
85 |
-
),
|
86 |
-
'generalFontSubset' => array(
|
87 |
-
'type' => 'string',
|
88 |
-
),
|
89 |
-
// general font size.
|
90 |
-
'generalFontSize' => array(
|
91 |
-
'type' => 'number',
|
92 |
-
),
|
93 |
-
'generalFontSizeType' => array(
|
94 |
-
'type' => 'string',
|
95 |
-
'default' => 'px',
|
96 |
-
),
|
97 |
-
'generalFontSizeTablet' => array(
|
98 |
-
'type' => 'number',
|
99 |
-
),
|
100 |
-
'generalFontSizeMobile' => array(
|
101 |
-
'type' => 'number',
|
102 |
-
),
|
103 |
-
// general line height.
|
104 |
-
'generalLineHeightType' => array(
|
105 |
-
'type' => 'string',
|
106 |
-
'default' => 'em',
|
107 |
-
),
|
108 |
-
'generalLineHeight' => array(
|
109 |
-
'type' => 'number',
|
110 |
-
),
|
111 |
-
'generalLineHeightTablet' => array(
|
112 |
-
'type' => 'number',
|
113 |
-
),
|
114 |
-
'generalLineHeightMobile' => array(
|
115 |
-
'type' => 'number',
|
116 |
-
),
|
117 |
-
// Input Fields.
|
118 |
-
// input field font family.
|
119 |
-
'inputFieldLoadGoogleFonts' => array(
|
120 |
-
'type' => 'boolean',
|
121 |
-
'default' => false,
|
122 |
-
),
|
123 |
-
'inputFieldFontFamily' => array(
|
124 |
-
'type' => 'string',
|
125 |
-
),
|
126 |
-
'inputFieldFontWeight' => array(
|
127 |
-
'type' => 'string',
|
128 |
-
),
|
129 |
-
'inputFieldFontSubset' => array(
|
130 |
-
'type' => 'string',
|
131 |
-
),
|
132 |
-
// input field font size.
|
133 |
-
'inputFieldFontSize' => array(
|
134 |
-
'type' => 'number',
|
135 |
-
),
|
136 |
-
'inputFieldFontSizeType' => array(
|
137 |
-
'type' => 'string',
|
138 |
-
'default' => 'px',
|
139 |
-
),
|
140 |
-
'inputFieldFontSizeTablet' => array(
|
141 |
-
'type' => 'number',
|
142 |
-
),
|
143 |
-
'inputFieldFontSizeMobile' => array(
|
144 |
-
'type' => 'number',
|
145 |
-
),
|
146 |
-
// input field line height.
|
147 |
-
'inputFieldLineHeightType' => array(
|
148 |
-
'type' => 'string',
|
149 |
-
'default' => 'em',
|
150 |
-
),
|
151 |
-
'inputFieldLineHeight' => array(
|
152 |
-
'type' => 'number',
|
153 |
-
),
|
154 |
-
'inputFieldLineHeightTablet' => array(
|
155 |
-
'type' => 'number',
|
156 |
-
),
|
157 |
-
'inputFieldLineHeightMobile' => array(
|
158 |
-
'type' => 'number',
|
159 |
-
),
|
160 |
-
'inputFieldLabelColor' => array(
|
161 |
-
'type' => 'string',
|
162 |
-
'default' => '',
|
163 |
-
),
|
164 |
-
'inputFieldBackgroundColor' => array(
|
165 |
-
'type' => 'string',
|
166 |
-
'default' => '',
|
167 |
-
),
|
168 |
-
'inputFieldTextPlaceholderColor' => array(
|
169 |
-
'type' => 'string',
|
170 |
-
'default' => '',
|
171 |
-
),
|
172 |
-
// border.
|
173 |
-
'inputFieldBorderStyle' => array(
|
174 |
-
'type' => 'string',
|
175 |
-
'default' => '',
|
176 |
-
),
|
177 |
-
'inputFieldBorderWidth' => array(
|
178 |
-
'type' => 'number',
|
179 |
-
),
|
180 |
-
'inputFieldBorderRadius' => array(
|
181 |
-
'type' => 'number',
|
182 |
-
),
|
183 |
-
'inputFieldBorderColor' => array(
|
184 |
-
'type' => 'string',
|
185 |
-
'default' => '',
|
186 |
-
),
|
187 |
-
// Submit Button.
|
188 |
-
// submit button font family.
|
189 |
-
'submitButtonText' => array(
|
190 |
-
'type' => 'string',
|
191 |
-
'default' => '',
|
192 |
-
),
|
193 |
-
'submitButtonLoadGoogleFonts' => array(
|
194 |
-
'type' => 'boolean',
|
195 |
-
'default' => false,
|
196 |
-
),
|
197 |
-
'submitButtonFontFamily' => array(
|
198 |
-
'type' => 'string',
|
199 |
-
),
|
200 |
-
'submitButtonFontWeight' => array(
|
201 |
-
'type' => 'string',
|
202 |
-
),
|
203 |
-
'submitButtonFontSubset' => array(
|
204 |
-
'type' => 'string',
|
205 |
-
),
|
206 |
-
// submit button font size.
|
207 |
-
'submitButtonFontSize' => array(
|
208 |
-
'type' => 'number',
|
209 |
-
),
|
210 |
-
'submitButtonFontSizeType' => array(
|
211 |
-
'type' => 'string',
|
212 |
-
'default' => 'px',
|
213 |
-
),
|
214 |
-
'submitButtonFontSizeTablet' => array(
|
215 |
-
'type' => 'number',
|
216 |
-
),
|
217 |
-
'submitButtonFontSizeMobile' => array(
|
218 |
-
'type' => 'number',
|
219 |
-
),
|
220 |
-
// submit button line height.
|
221 |
-
'submitButtonLineHeightType' => array(
|
222 |
-
'type' => 'string',
|
223 |
-
'default' => 'em',
|
224 |
-
),
|
225 |
-
'submitButtonLineHeight' => array(
|
226 |
-
'type' => 'number',
|
227 |
-
),
|
228 |
-
'submitButtonLineHeightTablet' => array(
|
229 |
-
'type' => 'number',
|
230 |
-
),
|
231 |
-
'submitButtonLineHeightMobile' => array(
|
232 |
-
'type' => 'number',
|
233 |
-
),
|
234 |
-
'submitButtonTextColor' => array(
|
235 |
-
'type' => 'string',
|
236 |
-
'default' => '',
|
237 |
-
),
|
238 |
-
'submitButtonBackgroundColor' => array(
|
239 |
-
'type' => 'string',
|
240 |
-
'default' => '',
|
241 |
-
),
|
242 |
-
'submitButtonTextHoverColor' => array(
|
243 |
-
'type' => 'string',
|
244 |
-
'default' => '',
|
245 |
-
),
|
246 |
-
'submitButtonBackgroundHoverColor' => array(
|
247 |
-
'type' => 'string',
|
248 |
-
'default' => '',
|
249 |
-
),
|
250 |
-
// border.
|
251 |
-
'submitButtonBorderStyle' => array(
|
252 |
-
'type' => 'string',
|
253 |
-
'default' => '',
|
254 |
-
),
|
255 |
-
'submitButtonBorderWidth' => array(
|
256 |
-
'type' => 'number',
|
257 |
-
),
|
258 |
-
'submitButtonBorderRadius' => array(
|
259 |
-
'type' => 'number',
|
260 |
-
),
|
261 |
-
'submitButtonBorderColor' => array(
|
262 |
-
'type' => 'string',
|
263 |
-
'default' => '',
|
264 |
-
),
|
265 |
-
'submitButtonBorderHoverColor' => array(
|
266 |
-
'type' => 'string',
|
267 |
-
'default' => '',
|
268 |
-
),
|
269 |
-
'boxShadowColor' => array(
|
270 |
-
'type' => 'string',
|
271 |
-
'default' => '',
|
272 |
-
),
|
273 |
-
'boxShadowHOffset' => array(
|
274 |
-
'type' => 'number',
|
275 |
-
),
|
276 |
-
'boxShadowVOffset' => array(
|
277 |
-
'type' => 'number',
|
278 |
-
),
|
279 |
-
'boxShadowBlur' => array(
|
280 |
-
'type' => 'number',
|
281 |
-
),
|
282 |
-
'boxShadowSpread' => array(
|
283 |
-
'type' => 'number',
|
284 |
-
),
|
285 |
-
'boxShadowPosition' => array(
|
286 |
-
'type' => 'string',
|
287 |
-
'default' => 'outset',
|
288 |
-
),
|
289 |
-
);
|
290 |
-
|
291 |
-
$attributes = apply_filters( 'cartflows_gutenberg_optin_attributes_filters', $attr );
|
292 |
-
|
293 |
-
register_block_type(
|
294 |
-
'wcfb/optin-form',
|
295 |
-
array(
|
296 |
-
'attributes' => $attributes,
|
297 |
-
'render_callback' => array( $this, 'render_html' ),
|
298 |
-
)
|
299 |
-
);
|
300 |
-
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Dynamic options ajax filters actions.
|
305 |
-
*/
|
306 |
-
public function dynamic_options_ajax_filters() {
|
307 |
-
|
308 |
-
add_action(
|
309 |
-
'cartflows_woo_checkout_update_order_review_init',
|
310 |
-
function( $post_data ) {
|
311 |
-
if ( ! empty( $post_data['_wcf_submitButtonText'] ) ) {
|
312 |
-
$setting_name = $post_data['_wcf_submitButtonText'];
|
313 |
-
add_filter(
|
314 |
-
'cartflows_optin_meta_wcf-submit-button-text',
|
315 |
-
function ( $value ) use ( $setting_name ) {
|
316 |
-
$value = $setting_name;
|
317 |
-
|
318 |
-
return $value;
|
319 |
-
},
|
320 |
-
99,
|
321 |
-
1
|
322 |
-
);
|
323 |
-
}
|
324 |
-
}
|
325 |
-
);
|
326 |
-
}
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Settings
|
330 |
-
*
|
331 |
-
* @since x.x.x
|
332 |
-
* @var object $settings
|
333 |
-
*/
|
334 |
-
public static $settings;
|
335 |
-
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Render Optin Detail Form HTML.
|
339 |
-
*
|
340 |
-
* @param array $attributes Array of block attributes.
|
341 |
-
*
|
342 |
-
* @since x.x.x
|
343 |
-
*/
|
344 |
-
public function render_html( $attributes ) {
|
345 |
-
|
346 |
-
self::$settings = $attributes;
|
347 |
-
|
348 |
-
$main_classes = array(
|
349 |
-
'cf-block-' . $attributes['block_id'],
|
350 |
-
);
|
351 |
-
|
352 |
-
if ( isset( $attributes['className'] ) ) {
|
353 |
-
$main_classes[] = $attributes['className'];
|
354 |
-
}
|
355 |
-
|
356 |
-
$classes = array(
|
357 |
-
'wpcf__optin-form',
|
358 |
-
);
|
359 |
-
|
360 |
-
do_action( 'cartflows_gutenberg_optin_options_filters', $attributes );
|
361 |
-
|
362 |
-
add_action(
|
363 |
-
'woocommerce_after_order_notes',
|
364 |
-
function () {
|
365 |
-
|
366 |
-
echo '<input type="hidden" class="input-hidden" name="_wcf_submitButtonText" value="' . esc_attr( self::$settings['submitButtonText'] ) . '">';
|
367 |
-
|
368 |
-
},
|
369 |
-
99
|
370 |
-
);
|
371 |
-
|
372 |
-
ob_start();
|
373 |
-
|
374 |
-
?>
|
375 |
-
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
376 |
-
<div class = "<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
377 |
-
<?php
|
378 |
-
echo do_shortcode( '[cartflows_optin]' );
|
379 |
-
?>
|
380 |
-
</div>
|
381 |
-
</div>
|
382 |
-
<?php
|
383 |
-
|
384 |
-
return ob_get_clean();
|
385 |
-
}
|
386 |
-
|
387 |
-
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Prepare if class 'WCFB_Optin_Form' exist.
|
392 |
-
* Kicking this off by calling 'get_instance()' method
|
393 |
-
*/
|
394 |
-
WCFB_Optin_Form::get_instance();
|
395 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WCFB - Optin Detail Form.
|
4 |
+
*
|
5 |
+
* @package UAGB
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'WCFB_Optin_Form' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WCFB_Optin_Form.
|
16 |
+
*/
|
17 |
+
class WCFB_Optin_Form {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Member Variable
|
21 |
+
*
|
22 |
+
* @var instance
|
23 |
+
*/
|
24 |
+
private static $instance;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Initiator
|
28 |
+
*/
|
29 |
+
public static function get_instance() {
|
30 |
+
|
31 |
+
if ( ! isset( self::$instance ) ) {
|
32 |
+
self::$instance = new self();
|
33 |
+
}
|
34 |
+
return self::$instance;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Constructor
|
39 |
+
*/
|
40 |
+
public function __construct() {
|
41 |
+
|
42 |
+
// Activation hook.
|
43 |
+
add_action( 'init', array( $this, 'register_blocks' ) );
|
44 |
+
add_action( 'init', array( $this, 'dynamic_options_ajax_filters' ), 1 );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Registers the `core/latest-posts` block on server.
|
49 |
+
*
|
50 |
+
* @since x.x.x
|
51 |
+
*/
|
52 |
+
public function register_blocks() {
|
53 |
+
|
54 |
+
// Check if the register function exists.
|
55 |
+
if ( ! function_exists( 'register_block_type' ) ) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
$attr = array(
|
60 |
+
'block_id' => array(
|
61 |
+
'type' => 'string',
|
62 |
+
),
|
63 |
+
'classMigrate' => array(
|
64 |
+
'type' => 'boolean',
|
65 |
+
'default' => false,
|
66 |
+
),
|
67 |
+
'className' => array(
|
68 |
+
'type' => 'string',
|
69 |
+
),
|
70 |
+
// General.
|
71 |
+
'generalPrimaryColor' => array(
|
72 |
+
'type' => 'string',
|
73 |
+
'default' => '',
|
74 |
+
),
|
75 |
+
// general font family.
|
76 |
+
'generalLoadGoogleFonts' => array(
|
77 |
+
'type' => 'boolean',
|
78 |
+
'default' => false,
|
79 |
+
),
|
80 |
+
'generalFontFamily' => array(
|
81 |
+
'type' => 'string',
|
82 |
+
),
|
83 |
+
'generalFontWeight' => array(
|
84 |
+
'type' => 'string',
|
85 |
+
),
|
86 |
+
'generalFontSubset' => array(
|
87 |
+
'type' => 'string',
|
88 |
+
),
|
89 |
+
// general font size.
|
90 |
+
'generalFontSize' => array(
|
91 |
+
'type' => 'number',
|
92 |
+
),
|
93 |
+
'generalFontSizeType' => array(
|
94 |
+
'type' => 'string',
|
95 |
+
'default' => 'px',
|
96 |
+
),
|
97 |
+
'generalFontSizeTablet' => array(
|
98 |
+
'type' => 'number',
|
99 |
+
),
|
100 |
+
'generalFontSizeMobile' => array(
|
101 |
+
'type' => 'number',
|
102 |
+
),
|
103 |
+
// general line height.
|
104 |
+
'generalLineHeightType' => array(
|
105 |
+
'type' => 'string',
|
106 |
+
'default' => 'em',
|
107 |
+
),
|
108 |
+
'generalLineHeight' => array(
|
109 |
+
'type' => 'number',
|
110 |
+
),
|
111 |
+
'generalLineHeightTablet' => array(
|
112 |
+
'type' => 'number',
|
113 |
+
),
|
114 |
+
'generalLineHeightMobile' => array(
|
115 |
+
'type' => 'number',
|
116 |
+
),
|
117 |
+
// Input Fields.
|
118 |
+
// input field font family.
|
119 |
+
'inputFieldLoadGoogleFonts' => array(
|
120 |
+
'type' => 'boolean',
|
121 |
+
'default' => false,
|
122 |
+
),
|
123 |
+
'inputFieldFontFamily' => array(
|
124 |
+
'type' => 'string',
|
125 |
+
),
|
126 |
+
'inputFieldFontWeight' => array(
|
127 |
+
'type' => 'string',
|
128 |
+
),
|
129 |
+
'inputFieldFontSubset' => array(
|
130 |
+
'type' => 'string',
|
131 |
+
),
|
132 |
+
// input field font size.
|
133 |
+
'inputFieldFontSize' => array(
|
134 |
+
'type' => 'number',
|
135 |
+
),
|
136 |
+
'inputFieldFontSizeType' => array(
|
137 |
+
'type' => 'string',
|
138 |
+
'default' => 'px',
|
139 |
+
),
|
140 |
+
'inputFieldFontSizeTablet' => array(
|
141 |
+
'type' => 'number',
|
142 |
+
),
|
143 |
+
'inputFieldFontSizeMobile' => array(
|
144 |
+
'type' => 'number',
|
145 |
+
),
|
146 |
+
// input field line height.
|
147 |
+
'inputFieldLineHeightType' => array(
|
148 |
+
'type' => 'string',
|
149 |
+
'default' => 'em',
|
150 |
+
),
|
151 |
+
'inputFieldLineHeight' => array(
|
152 |
+
'type' => 'number',
|
153 |
+
),
|
154 |
+
'inputFieldLineHeightTablet' => array(
|
155 |
+
'type' => 'number',
|
156 |
+
),
|
157 |
+
'inputFieldLineHeightMobile' => array(
|
158 |
+
'type' => 'number',
|
159 |
+
),
|
160 |
+
'inputFieldLabelColor' => array(
|
161 |
+
'type' => 'string',
|
162 |
+
'default' => '',
|
163 |
+
),
|
164 |
+
'inputFieldBackgroundColor' => array(
|
165 |
+
'type' => 'string',
|
166 |
+
'default' => '',
|
167 |
+
),
|
168 |
+
'inputFieldTextPlaceholderColor' => array(
|
169 |
+
'type' => 'string',
|
170 |
+
'default' => '',
|
171 |
+
),
|
172 |
+
// border.
|
173 |
+
'inputFieldBorderStyle' => array(
|
174 |
+
'type' => 'string',
|
175 |
+
'default' => '',
|
176 |
+
),
|
177 |
+
'inputFieldBorderWidth' => array(
|
178 |
+
'type' => 'number',
|
179 |
+
),
|
180 |
+
'inputFieldBorderRadius' => array(
|
181 |
+
'type' => 'number',
|
182 |
+
),
|
183 |
+
'inputFieldBorderColor' => array(
|
184 |
+
'type' => 'string',
|
185 |
+
'default' => '',
|
186 |
+
),
|
187 |
+
// Submit Button.
|
188 |
+
// submit button font family.
|
189 |
+
'submitButtonText' => array(
|
190 |
+
'type' => 'string',
|
191 |
+
'default' => '',
|
192 |
+
),
|
193 |
+
'submitButtonLoadGoogleFonts' => array(
|
194 |
+
'type' => 'boolean',
|
195 |
+
'default' => false,
|
196 |
+
),
|
197 |
+
'submitButtonFontFamily' => array(
|
198 |
+
'type' => 'string',
|
199 |
+
),
|
200 |
+
'submitButtonFontWeight' => array(
|
201 |
+
'type' => 'string',
|
202 |
+
),
|
203 |
+
'submitButtonFontSubset' => array(
|
204 |
+
'type' => 'string',
|
205 |
+
),
|
206 |
+
// submit button font size.
|
207 |
+
'submitButtonFontSize' => array(
|
208 |
+
'type' => 'number',
|
209 |
+
),
|
210 |
+
'submitButtonFontSizeType' => array(
|
211 |
+
'type' => 'string',
|
212 |
+
'default' => 'px',
|
213 |
+
),
|
214 |
+
'submitButtonFontSizeTablet' => array(
|
215 |
+
'type' => 'number',
|
216 |
+
),
|
217 |
+
'submitButtonFontSizeMobile' => array(
|
218 |
+
'type' => 'number',
|
219 |
+
),
|
220 |
+
// submit button line height.
|
221 |
+
'submitButtonLineHeightType' => array(
|
222 |
+
'type' => 'string',
|
223 |
+
'default' => 'em',
|
224 |
+
),
|
225 |
+
'submitButtonLineHeight' => array(
|
226 |
+
'type' => 'number',
|
227 |
+
),
|
228 |
+
'submitButtonLineHeightTablet' => array(
|
229 |
+
'type' => 'number',
|
230 |
+
),
|
231 |
+
'submitButtonLineHeightMobile' => array(
|
232 |
+
'type' => 'number',
|
233 |
+
),
|
234 |
+
'submitButtonTextColor' => array(
|
235 |
+
'type' => 'string',
|
236 |
+
'default' => '',
|
237 |
+
),
|
238 |
+
'submitButtonBackgroundColor' => array(
|
239 |
+
'type' => 'string',
|
240 |
+
'default' => '',
|
241 |
+
),
|
242 |
+
'submitButtonTextHoverColor' => array(
|
243 |
+
'type' => 'string',
|
244 |
+
'default' => '',
|
245 |
+
),
|
246 |
+
'submitButtonBackgroundHoverColor' => array(
|
247 |
+
'type' => 'string',
|
248 |
+
'default' => '',
|
249 |
+
),
|
250 |
+
// border.
|
251 |
+
'submitButtonBorderStyle' => array(
|
252 |
+
'type' => 'string',
|
253 |
+
'default' => '',
|
254 |
+
),
|
255 |
+
'submitButtonBorderWidth' => array(
|
256 |
+
'type' => 'number',
|
257 |
+
),
|
258 |
+
'submitButtonBorderRadius' => array(
|
259 |
+
'type' => 'number',
|
260 |
+
),
|
261 |
+
'submitButtonBorderColor' => array(
|
262 |
+
'type' => 'string',
|
263 |
+
'default' => '',
|
264 |
+
),
|
265 |
+
'submitButtonBorderHoverColor' => array(
|
266 |
+
'type' => 'string',
|
267 |
+
'default' => '',
|
268 |
+
),
|
269 |
+
'boxShadowColor' => array(
|
270 |
+
'type' => 'string',
|
271 |
+
'default' => '',
|
272 |
+
),
|
273 |
+
'boxShadowHOffset' => array(
|
274 |
+
'type' => 'number',
|
275 |
+
),
|
276 |
+
'boxShadowVOffset' => array(
|
277 |
+
'type' => 'number',
|
278 |
+
),
|
279 |
+
'boxShadowBlur' => array(
|
280 |
+
'type' => 'number',
|
281 |
+
),
|
282 |
+
'boxShadowSpread' => array(
|
283 |
+
'type' => 'number',
|
284 |
+
),
|
285 |
+
'boxShadowPosition' => array(
|
286 |
+
'type' => 'string',
|
287 |
+
'default' => 'outset',
|
288 |
+
),
|
289 |
+
);
|
290 |
+
|
291 |
+
$attributes = apply_filters( 'cartflows_gutenberg_optin_attributes_filters', $attr );
|
292 |
+
|
293 |
+
register_block_type(
|
294 |
+
'wcfb/optin-form',
|
295 |
+
array(
|
296 |
+
'attributes' => $attributes,
|
297 |
+
'render_callback' => array( $this, 'render_html' ),
|
298 |
+
)
|
299 |
+
);
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Dynamic options ajax filters actions.
|
305 |
+
*/
|
306 |
+
public function dynamic_options_ajax_filters() {
|
307 |
+
|
308 |
+
add_action(
|
309 |
+
'cartflows_woo_checkout_update_order_review_init',
|
310 |
+
function( $post_data ) {
|
311 |
+
if ( ! empty( $post_data['_wcf_submitButtonText'] ) ) {
|
312 |
+
$setting_name = $post_data['_wcf_submitButtonText'];
|
313 |
+
add_filter(
|
314 |
+
'cartflows_optin_meta_wcf-submit-button-text',
|
315 |
+
function ( $value ) use ( $setting_name ) {
|
316 |
+
$value = $setting_name;
|
317 |
+
|
318 |
+
return $value;
|
319 |
+
},
|
320 |
+
99,
|
321 |
+
1
|
322 |
+
);
|
323 |
+
}
|
324 |
+
}
|
325 |
+
);
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Settings
|
330 |
+
*
|
331 |
+
* @since x.x.x
|
332 |
+
* @var object $settings
|
333 |
+
*/
|
334 |
+
public static $settings;
|
335 |
+
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Render Optin Detail Form HTML.
|
339 |
+
*
|
340 |
+
* @param array $attributes Array of block attributes.
|
341 |
+
*
|
342 |
+
* @since x.x.x
|
343 |
+
*/
|
344 |
+
public function render_html( $attributes ) {
|
345 |
+
|
346 |
+
self::$settings = $attributes;
|
347 |
+
|
348 |
+
$main_classes = array(
|
349 |
+
'cf-block-' . $attributes['block_id'],
|
350 |
+
);
|
351 |
+
|
352 |
+
if ( isset( $attributes['className'] ) ) {
|
353 |
+
$main_classes[] = $attributes['className'];
|
354 |
+
}
|
355 |
+
|
356 |
+
$classes = array(
|
357 |
+
'wpcf__optin-form',
|
358 |
+
);
|
359 |
+
|
360 |
+
do_action( 'cartflows_gutenberg_optin_options_filters', $attributes );
|
361 |
+
|
362 |
+
add_action(
|
363 |
+
'woocommerce_after_order_notes',
|
364 |
+
function () {
|
365 |
+
|
366 |
+
echo '<input type="hidden" class="input-hidden" name="_wcf_submitButtonText" value="' . esc_attr( self::$settings['submitButtonText'] ) . '">';
|
367 |
+
|
368 |
+
},
|
369 |
+
99
|
370 |
+
);
|
371 |
+
|
372 |
+
ob_start();
|
373 |
+
|
374 |
+
?>
|
375 |
+
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
376 |
+
<div class = "<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
377 |
+
<?php
|
378 |
+
echo do_shortcode( '[cartflows_optin]' );
|
379 |
+
?>
|
380 |
+
</div>
|
381 |
+
</div>
|
382 |
+
<?php
|
383 |
+
|
384 |
+
return ob_get_clean();
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Prepare if class 'WCFB_Optin_Form' exist.
|
392 |
+
* Kicking this off by calling 'get_instance()' method
|
393 |
+
*/
|
394 |
+
WCFB_Optin_Form::get_instance();
|
395 |
+
}
|
modules/gutenberg/dist/blocks/order-detail-form/class-wcfb-order-detail-form.php
CHANGED
@@ -1,834 +1,834 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WCFB - Order Detail Form.
|
4 |
-
*
|
5 |
-
* @package UAGB
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'WCFB_Order_Detail_Form' ) ) {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class WCFB_Order_Detail_Form.
|
16 |
-
*/
|
17 |
-
class WCFB_Order_Detail_Form {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Member Variable
|
21 |
-
*
|
22 |
-
* @var instance
|
23 |
-
*/
|
24 |
-
private static $instance;
|
25 |
-
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Settings
|
29 |
-
*
|
30 |
-
* @since x.x.x
|
31 |
-
* @var object $settings
|
32 |
-
*/
|
33 |
-
public static $settings;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Initiator
|
37 |
-
*/
|
38 |
-
public static function get_instance() {
|
39 |
-
|
40 |
-
if ( ! isset( self::$instance ) ) {
|
41 |
-
self::$instance = new self();
|
42 |
-
}
|
43 |
-
return self::$instance;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Constructor
|
48 |
-
*/
|
49 |
-
public function __construct() {
|
50 |
-
|
51 |
-
// Activation hook.
|
52 |
-
add_action( 'init', array( $this, 'register_blocks' ) );
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Registers the `core/latest-posts` block on server.
|
57 |
-
*
|
58 |
-
* @since x.x.x
|
59 |
-
*/
|
60 |
-
public function register_blocks() {
|
61 |
-
|
62 |
-
// Check if the register function exists.
|
63 |
-
if ( ! function_exists( 'register_block_type' ) ) {
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
-
register_block_type(
|
68 |
-
'wcfb/order-detail-form',
|
69 |
-
array(
|
70 |
-
'attributes' => array(
|
71 |
-
'block_id' => array(
|
72 |
-
'type' => 'string',
|
73 |
-
),
|
74 |
-
'classMigrate' => array(
|
75 |
-
'type' => 'boolean',
|
76 |
-
'default' => false,
|
77 |
-
),
|
78 |
-
'className' => array(
|
79 |
-
'type' => 'string',
|
80 |
-
),
|
81 |
-
// Genaral.
|
82 |
-
'orderOverview' => array(
|
83 |
-
'type' => 'boolean',
|
84 |
-
'default' => true,
|
85 |
-
),
|
86 |
-
'orderDetails' => array(
|
87 |
-
'type' => 'boolean',
|
88 |
-
'default' => true,
|
89 |
-
),
|
90 |
-
'billingAddress' => array(
|
91 |
-
'type' => 'boolean',
|
92 |
-
'default' => true,
|
93 |
-
),
|
94 |
-
'shippingAddress' => array(
|
95 |
-
'type' => 'boolean',
|
96 |
-
'default' => true,
|
97 |
-
),
|
98 |
-
// Spacing.
|
99 |
-
'headingBottomSpacing' => array(
|
100 |
-
'type' => 'number',
|
101 |
-
),
|
102 |
-
'sectionSpacing' => array(
|
103 |
-
'type' => 'number',
|
104 |
-
),
|
105 |
-
// Heading.
|
106 |
-
'thanyouText' => array(
|
107 |
-
'type' => 'string',
|
108 |
-
'default' => '',
|
109 |
-
),
|
110 |
-
'headingAlignment' => array(
|
111 |
-
'type' => 'string',
|
112 |
-
'default' => 'center',
|
113 |
-
),
|
114 |
-
'headingColor' => array(
|
115 |
-
'type' => 'string',
|
116 |
-
'default' => '',
|
117 |
-
),
|
118 |
-
// heading font family.
|
119 |
-
'headingLoadGoogleFonts' => array(
|
120 |
-
'type' => 'boolean',
|
121 |
-
'default' => false,
|
122 |
-
),
|
123 |
-
'headingFontFamily' => array(
|
124 |
-
'type' => 'string',
|
125 |
-
),
|
126 |
-
'headingFontWeight' => array(
|
127 |
-
'type' => 'string',
|
128 |
-
),
|
129 |
-
'headingFontSubset' => array(
|
130 |
-
'type' => 'string',
|
131 |
-
),
|
132 |
-
// heading font size.
|
133 |
-
'headingFontSize' => array(
|
134 |
-
'type' => 'number',
|
135 |
-
),
|
136 |
-
'headingFontSizeType' => array(
|
137 |
-
'type' => 'string',
|
138 |
-
'default' => 'px',
|
139 |
-
),
|
140 |
-
'headingFontSizeTablet' => array(
|
141 |
-
'type' => 'number',
|
142 |
-
),
|
143 |
-
'headingFontSizeMobile' => array(
|
144 |
-
'type' => 'number',
|
145 |
-
),
|
146 |
-
// heading line height.
|
147 |
-
'headingLineHeightType' => array(
|
148 |
-
'type' => 'string',
|
149 |
-
'default' => 'em',
|
150 |
-
),
|
151 |
-
'headingLineHeight' => array(
|
152 |
-
'type' => 'number',
|
153 |
-
),
|
154 |
-
'headingLineHeightTablet' => array(
|
155 |
-
'type' => 'number',
|
156 |
-
),
|
157 |
-
'headingLineHeightMobile' => array(
|
158 |
-
'type' => 'number',
|
159 |
-
),
|
160 |
-
// Sections.
|
161 |
-
'sectionHeadingColor' => array(
|
162 |
-
'type' => 'string',
|
163 |
-
),
|
164 |
-
// section heading font family.
|
165 |
-
'sectionHeadingLoadGoogleFonts' => array(
|
166 |
-
'type' => 'boolean',
|
167 |
-
'default' => false,
|
168 |
-
),
|
169 |
-
'sectionHeadingFontFamily' => array(
|
170 |
-
'type' => 'string',
|
171 |
-
),
|
172 |
-
'sectionHeadingFontWeight' => array(
|
173 |
-
'type' => 'string',
|
174 |
-
),
|
175 |
-
'sectionHeadingFontSubset' => array(
|
176 |
-
'type' => 'string',
|
177 |
-
),
|
178 |
-
// section heading font size.
|
179 |
-
'sectionHeadingFontSize' => array(
|
180 |
-
'type' => 'number',
|
181 |
-
),
|
182 |
-
'sectionHeadingFontSizeType' => array(
|
183 |
-
'type' => 'string',
|
184 |
-
'default' => 'px',
|
185 |
-
),
|
186 |
-
'sectionHeadingFontSizeTablet' => array(
|
187 |
-
'type' => 'number',
|
188 |
-
),
|
189 |
-
'sectionHeadingFontSizeMobile' => array(
|
190 |
-
'type' => 'number',
|
191 |
-
),
|
192 |
-
// section heading line height.
|
193 |
-
'sectionHeadingLineHeightType' => array(
|
194 |
-
'type' => 'string',
|
195 |
-
'default' => 'em',
|
196 |
-
),
|
197 |
-
'sectionHeadingLineHeight' => array(
|
198 |
-
'type' => 'number',
|
199 |
-
),
|
200 |
-
'sectionHeadingLineHeightTablet' => array(
|
201 |
-
'type' => 'number',
|
202 |
-
),
|
203 |
-
'sectionHeadingLineHeightMobile' => array(
|
204 |
-
'type' => 'number',
|
205 |
-
),
|
206 |
-
'sectionContentColor' => array(
|
207 |
-
'type' => 'string',
|
208 |
-
),
|
209 |
-
// section content font family.
|
210 |
-
'sectionContentLoadGoogleFonts' => array(
|
211 |
-
'type' => 'boolean',
|
212 |
-
'default' => false,
|
213 |
-
),
|
214 |
-
'sectionContentFontFamily' => array(
|
215 |
-
'type' => 'string',
|
216 |
-
),
|
217 |
-
'sectionContentFontWeight' => array(
|
218 |
-
'type' => 'string',
|
219 |
-
),
|
220 |
-
'sectionContentFontSubset' => array(
|
221 |
-
'type' => 'string',
|
222 |
-
),
|
223 |
-
// section content font size.
|
224 |
-
'sectionContentFontSize' => array(
|
225 |
-
'type' => 'number',
|
226 |
-
),
|
227 |
-
'sectionContentFontSizeType' => array(
|
228 |
-
'type' => 'string',
|
229 |
-
'default' => 'px',
|
230 |
-
),
|
231 |
-
'sectionContentFontSizeTablet' => array(
|
232 |
-
'type' => 'number',
|
233 |
-
),
|
234 |
-
'sectionContentFontSizeMobile' => array(
|
235 |
-
'type' => 'number',
|
236 |
-
),
|
237 |
-
// section content line height.
|
238 |
-
'sectionContentLineHeightType' => array(
|
239 |
-
'type' => 'string',
|
240 |
-
'default' => 'em',
|
241 |
-
),
|
242 |
-
'sectionContentLineHeight' => array(
|
243 |
-
'type' => 'number',
|
244 |
-
),
|
245 |
-
'sectionContentLineHeightTablet' => array(
|
246 |
-
'type' => 'number',
|
247 |
-
),
|
248 |
-
'sectionContentLineHeightMobile' => array(
|
249 |
-
'type' => 'number',
|
250 |
-
),
|
251 |
-
'sectionBackgroundColor' => array(
|
252 |
-
'type' => 'string',
|
253 |
-
),
|
254 |
-
// Order Overview.
|
255 |
-
'orderOverviewTextColor' => array(
|
256 |
-
'type' => 'string',
|
257 |
-
),
|
258 |
-
'orderOverviewBackgroundColor' => array(
|
259 |
-
'type' => 'string',
|
260 |
-
),
|
261 |
-
// order overview font family.
|
262 |
-
'orderOverviewLoadGoogleFonts' => array(
|
263 |
-
'type' => 'boolean',
|
264 |
-
'default' => false,
|
265 |
-
),
|
266 |
-
'orderOverviewFontFamily' => array(
|
267 |
-
'type' => 'string',
|
268 |
-
),
|
269 |
-
'orderOverviewFontWeight' => array(
|
270 |
-
'type' => 'string',
|
271 |
-
),
|
272 |
-
'orderOverviewFontSubset' => array(
|
273 |
-
'type' => 'string',
|
274 |
-
),
|
275 |
-
// order overview font size.
|
276 |
-
'orderOverviewFontSize' => array(
|
277 |
-
'type' => 'number',
|
278 |
-
),
|
279 |
-
'orderOverviewFontSizeType' => array(
|
280 |
-
'type' => 'string',
|
281 |
-
'default' => 'px',
|
282 |
-
),
|
283 |
-
'orderOverviewFontSizeTablet' => array(
|
284 |
-
'type' => 'number',
|
285 |
-
),
|
286 |
-
'orderOverviewFontSizeMobile' => array(
|
287 |
-
'type' => 'number',
|
288 |
-
),
|
289 |
-
// order overview line height.
|
290 |
-
'orderOverviewLineHeightType' => array(
|
291 |
-
'type' => 'string',
|
292 |
-
'default' => 'em',
|
293 |
-
),
|
294 |
-
'orderOverviewLineHeight' => array(
|
295 |
-
'type' => 'number',
|
296 |
-
),
|
297 |
-
'orderOverviewLineHeightTablet' => array(
|
298 |
-
'type' => 'number',
|
299 |
-
),
|
300 |
-
'orderOverviewLineHeightMobile' => array(
|
301 |
-
'type' => 'number',
|
302 |
-
),
|
303 |
-
// Downloads.
|
304 |
-
'downloadHeadingColor' => array(
|
305 |
-
'type' => 'string',
|
306 |
-
),
|
307 |
-
// download heading font family.
|
308 |
-
'downloadHeadingLoadGoogleFonts' => array(
|
309 |
-
'type' => 'boolean',
|
310 |
-
'default' => false,
|
311 |
-
),
|
312 |
-
'downloadHeadingFontFamily' => array(
|
313 |
-
'type' => 'string',
|
314 |
-
),
|
315 |
-
'downloadHeadingFontWeight' => array(
|
316 |
-
'type' => 'string',
|
317 |
-
),
|
318 |
-
'downloadHeadingFontSubset' => array(
|
319 |
-
'type' => 'string',
|
320 |
-
),
|
321 |
-
// download heading font size.
|
322 |
-
'downloadHeadingFontSize' => array(
|
323 |
-
'type' => 'number',
|
324 |
-
),
|
325 |
-
'downloadHeadingFontSizeType' => array(
|
326 |
-
'type' => 'string',
|
327 |
-
'default' => 'px',
|
328 |
-
),
|
329 |
-
'downloadHeadingFontSizeTablet' => array(
|
330 |
-
'type' => 'number',
|
331 |
-
),
|
332 |
-
'downloadHeadingFontSizeMobile' => array(
|
333 |
-
'type' => 'number',
|
334 |
-
),
|
335 |
-
// download heading line height.
|
336 |
-
'downloadHeadingLineHeightType' => array(
|
337 |
-
'type' => 'string',
|
338 |
-
'default' => 'em',
|
339 |
-
),
|
340 |
-
'downloadHeadingLineHeight' => array(
|
341 |
-
'type' => 'number',
|
342 |
-
),
|
343 |
-
'downloadHeadingLineHeightTablet' => array(
|
344 |
-
'type' => 'number',
|
345 |
-
),
|
346 |
-
'downloadHeadingLineHeightMobile' => array(
|
347 |
-
'type' => 'number',
|
348 |
-
),
|
349 |
-
'downloadContentColor' => array(
|
350 |
-
'type' => 'string',
|
351 |
-
),
|
352 |
-
// download content font family.
|
353 |
-
'downloadContentLoadGoogleFonts' => array(
|
354 |
-
'type' => 'boolean',
|
355 |
-
'default' => false,
|
356 |
-
),
|
357 |
-
'downloadContentFontFamily' => array(
|
358 |
-
'type' => 'string',
|
359 |
-
),
|
360 |
-
'downloadContentFontWeight' => array(
|
361 |
-
'type' => 'string',
|
362 |
-
),
|
363 |
-
'downloadContentFontSubset' => array(
|
364 |
-
'type' => 'string',
|
365 |
-
),
|
366 |
-
// download content font size.
|
367 |
-
'downloadContentFontSize' => array(
|
368 |
-
'type' => 'number',
|
369 |
-
),
|
370 |
-
'downloadContentFontSizeType' => array(
|
371 |
-
'type' => 'string',
|
372 |
-
'default' => 'px',
|
373 |
-
),
|
374 |
-
'downloadContentFontSizeTablet' => array(
|
375 |
-
'type' => 'number',
|
376 |
-
),
|
377 |
-
'downloadContentFontSizeMobile' => array(
|
378 |
-
'type' => 'number',
|
379 |
-
),
|
380 |
-
// download content line height.
|
381 |
-
'downloadContentLineHeightType' => array(
|
382 |
-
'type' => 'string',
|
383 |
-
'default' => 'em',
|
384 |
-
),
|
385 |
-
'downloadContentLineHeight' => array(
|
386 |
-
'type' => 'number',
|
387 |
-
),
|
388 |
-
'downloadContentLineHeightTablet' => array(
|
389 |
-
'type' => 'number',
|
390 |
-
),
|
391 |
-
'downloadContentLineHeightMobile' => array(
|
392 |
-
'type' => 'number',
|
393 |
-
),
|
394 |
-
'downloadBackgroundColor' => array(
|
395 |
-
'type' => 'string',
|
396 |
-
),
|
397 |
-
// Order Details.
|
398 |
-
'orderDetailHeadingColor' => array(
|
399 |
-
'type' => 'string',
|
400 |
-
),
|
401 |
-
// order details heading font family.
|
402 |
-
'orderDetailHeadingLoadGoogleFonts' => array(
|
403 |
-
'type' => 'boolean',
|
404 |
-
'default' => false,
|
405 |
-
),
|
406 |
-
'orderDetailHeadingFontFamily' => array(
|
407 |
-
'type' => 'string',
|
408 |
-
),
|
409 |
-
'orderDetailHeadingFontWeight' => array(
|
410 |
-
'type' => 'string',
|
411 |
-
),
|
412 |
-
'orderDetailHeadingFontSubset' => array(
|
413 |
-
'type' => 'string',
|
414 |
-
),
|
415 |
-
// order details heading font size.
|
416 |
-
'orderDetailHeadingFontSize' => array(
|
417 |
-
'type' => 'number',
|
418 |
-
),
|
419 |
-
'orderDetailHeadingFontSizeType' => array(
|
420 |
-
'type' => 'string',
|
421 |
-
'default' => 'px',
|
422 |
-
),
|
423 |
-
'orderDetailHeadingFontSizeTablet' => array(
|
424 |
-
'type' => 'number',
|
425 |
-
),
|
426 |
-
'orderDetailHeadingFontSizeMobile' => array(
|
427 |
-
'type' => 'number',
|
428 |
-
),
|
429 |
-
// order details heading line height.
|
430 |
-
'orderDetailHeadingLineHeightType' => array(
|
431 |
-
'type' => 'string',
|
432 |
-
'default' => 'em',
|
433 |
-
),
|
434 |
-
'orderDetailHeadingLineHeight' => array(
|
435 |
-
'type' => 'number',
|
436 |
-
),
|
437 |
-
'orderDetailHeadingLineHeightTablet' => array(
|
438 |
-
'type' => 'number',
|
439 |
-
),
|
440 |
-
'orderDetailHeadingLineHeightMobile' => array(
|
441 |
-
'type' => 'number',
|
442 |
-
),
|
443 |
-
'orderDetailContentColor' => array(
|
444 |
-
'type' => 'string',
|
445 |
-
),
|
446 |
-
// order details content font family.
|
447 |
-
'orderDetailContentLoadGoogleFonts' => array(
|
448 |
-
'type' => 'boolean',
|
449 |
-
'default' => false,
|
450 |
-
),
|
451 |
-
'orderDetailContentFontFamily' => array(
|
452 |
-
'type' => 'string',
|
453 |
-
),
|
454 |
-
'orderDetailContentFontWeight' => array(
|
455 |
-
'type' => 'string',
|
456 |
-
),
|
457 |
-
'orderDetailContentFontSubset' => array(
|
458 |
-
'type' => 'string',
|
459 |
-
),
|
460 |
-
// order details content font size.
|
461 |
-
'orderDetailContentFontSize' => array(
|
462 |
-
'type' => 'number',
|
463 |
-
),
|
464 |
-
'orderDetailContentFontSizeType' => array(
|
465 |
-
'type' => 'string',
|
466 |
-
'default' => 'px',
|
467 |
-
),
|
468 |
-
'orderDetailContentFontSizeTablet' => array(
|
469 |
-
'type' => 'number',
|
470 |
-
),
|
471 |
-
'orderDetailContentFontSizeMobile' => array(
|
472 |
-
'type' => 'number',
|
473 |
-
),
|
474 |
-
// order details content line height.
|
475 |
-
'orderDetailContentLineHeightType' => array(
|
476 |
-
'type' => 'string',
|
477 |
-
'default' => 'em',
|
478 |
-
),
|
479 |
-
'orderDetailContentLineHeight' => array(
|
480 |
-
'type' => 'number',
|
481 |
-
),
|
482 |
-
'orderDetailContentLineHeightTablet' => array(
|
483 |
-
'type' => 'number',
|
484 |
-
),
|
485 |
-
'orderDetailContentLineHeightMobile' => array(
|
486 |
-
'type' => 'number',
|
487 |
-
),
|
488 |
-
'orderDetailBackgroundColor' => array(
|
489 |
-
'type' => 'string',
|
490 |
-
),
|
491 |
-
// Customer Details.
|
492 |
-
'customerDetailHeadingColor' => array(
|
493 |
-
'type' => 'string',
|
494 |
-
),
|
495 |
-
// customer details heading font family.
|
496 |
-
'customerDetailHeadingLoadGoogleFonts' => array(
|
497 |
-
'type' => 'boolean',
|
498 |
-
'default' => false,
|
499 |
-
),
|
500 |
-
'customerDetailHeadingFontFamily' => array(
|
501 |
-
'type' => 'string',
|
502 |
-
),
|
503 |
-
'customerDetailHeadingFontWeight' => array(
|
504 |
-
'type' => 'string',
|
505 |
-
),
|
506 |
-
'customerDetailHeadingFontSubset' => array(
|
507 |
-
'type' => 'string',
|
508 |
-
),
|
509 |
-
// customer details heading font size.
|
510 |
-
'customerDetailHeadingFontSize' => array(
|
511 |
-
'type' => 'number',
|
512 |
-
),
|
513 |
-
'customerDetailHeadingFontSizeType' => array(
|
514 |
-
'type' => 'string',
|
515 |
-
'default' => 'px',
|
516 |
-
),
|
517 |
-
'customerDetailHeadingFontSizeTablet' => array(
|
518 |
-
'type' => 'number',
|
519 |
-
),
|
520 |
-
'customerDetailHeadingFontSizeMobile' => array(
|
521 |
-
'type' => 'number',
|
522 |
-
),
|
523 |
-
// customer details heading line height.
|
524 |
-
'customerDetailHeadingLineHeightType' => array(
|
525 |
-
'type' => 'string',
|
526 |
-
'default' => 'em',
|
527 |
-
),
|
528 |
-
'customerDetailHeadingLineHeight' => array(
|
529 |
-
'type' => 'number',
|
530 |
-
),
|
531 |
-
'customerDetailHeadingLineHeightTablet' => array(
|
532 |
-
'type' => 'number',
|
533 |
-
),
|
534 |
-
'customerDetailHeadingLineHeightMobile' => array(
|
535 |
-
'type' => 'number',
|
536 |
-
),
|
537 |
-
'customerDetailContentColor' => array(
|
538 |
-
'type' => 'string',
|
539 |
-
),
|
540 |
-
// customer details content font family.
|
541 |
-
'customerDetailContentLoadGoogleFonts' => array(
|
542 |
-
'type' => 'boolean',
|
543 |
-
'default' => false,
|
544 |
-
),
|
545 |
-
'customerDetailContentFontFamily' => array(
|
546 |
-
'type' => 'string',
|
547 |
-
),
|
548 |
-
'customerDetailContentFontWeight' => array(
|
549 |
-
'type' => 'string',
|
550 |
-
),
|
551 |
-
'customerDetailContentFontSubset' => array(
|
552 |
-
'type' => 'string',
|
553 |
-
),
|
554 |
-
// customer details content font size.
|
555 |
-
'customerDetailContentFontSize' => array(
|
556 |
-
'type' => 'number',
|
557 |
-
),
|
558 |
-
'customerDetailContentFontSizeType' => array(
|
559 |
-
'type' => 'string',
|
560 |
-
'default' => 'px',
|
561 |
-
),
|
562 |
-
'customerDetailContentFontSizeTablet' => array(
|
563 |
-
'type' => 'number',
|
564 |
-
),
|
565 |
-
'customerDetailContentFontSizeMobile' => array(
|
566 |
-
'type' => 'number',
|
567 |
-
),
|
568 |
-
// customer details content line height.
|
569 |
-
'customerDetailContentLineHeightType' => array(
|
570 |
-
'type' => 'string',
|
571 |
-
'default' => 'em',
|
572 |
-
),
|
573 |
-
'customerDetailContentLineHeight' => array(
|
574 |
-
'type' => 'number',
|
575 |
-
),
|
576 |
-
'customerDetailContentLineHeightTablet' => array(
|
577 |
-
'type' => 'number',
|
578 |
-
),
|
579 |
-
'customerDetailContentLineHeightMobile' => array(
|
580 |
-
'type' => 'number',
|
581 |
-
),
|
582 |
-
'customerDetailBackgroundColor' => array(
|
583 |
-
'type' => 'string',
|
584 |
-
),
|
585 |
-
'backgroundType' => array(
|
586 |
-
'type' => 'string',
|
587 |
-
'default' => 'color',
|
588 |
-
),
|
589 |
-
'backgroundImage' => array(
|
590 |
-
'type' => 'object',
|
591 |
-
),
|
592 |
-
'backgroundPosition' => array(
|
593 |
-
'type' => 'string',
|
594 |
-
'default' => 'center-center',
|
595 |
-
),
|
596 |
-
'backgroundSize' => array(
|
597 |
-
'type' => 'string',
|
598 |
-
'default' => 'cover',
|
599 |
-
),
|
600 |
-
'backgroundRepeat' => array(
|
601 |
-
'type' => 'string',
|
602 |
-
'default' => 'no-repeat',
|
603 |
-
),
|
604 |
-
'backgroundAttachment' => array(
|
605 |
-
'type' => 'string',
|
606 |
-
'default' => 'scroll',
|
607 |
-
),
|
608 |
-
'backgroundOpacity' => array(
|
609 |
-
'type' => 'number',
|
610 |
-
),
|
611 |
-
'backgroundImageColor' => array(
|
612 |
-
'type' => 'string',
|
613 |
-
'default' => '',
|
614 |
-
),
|
615 |
-
'backgroundColor' => array(
|
616 |
-
'type' => 'string',
|
617 |
-
'default' => '',
|
618 |
-
),
|
619 |
-
'odbackgroundType' => array(
|
620 |
-
'type' => 'string',
|
621 |
-
'default' => 'color',
|
622 |
-
),
|
623 |
-
'odbackgroundImage' => array(
|
624 |
-
'type' => 'object',
|
625 |
-
),
|
626 |
-
'odbackgroundPosition' => array(
|
627 |
-
'type' => 'string',
|
628 |
-
'default' => 'center-center',
|
629 |
-
),
|
630 |
-
'odbackgroundSize' => array(
|
631 |
-
'type' => 'string',
|
632 |
-
'default' => 'cover',
|
633 |
-
),
|
634 |
-
'odbackgroundRepeat' => array(
|
635 |
-
'type' => 'string',
|
636 |
-
'default' => 'no-repeat',
|
637 |
-
),
|
638 |
-
'odbackgroundAttachment' => array(
|
639 |
-
'type' => 'string',
|
640 |
-
'default' => 'scroll',
|
641 |
-
),
|
642 |
-
'odbackgroundOpacity' => array(
|
643 |
-
'type' => 'number',
|
644 |
-
),
|
645 |
-
'odbackgroundImageColor' => array(
|
646 |
-
'type' => 'string',
|
647 |
-
'default' => '',
|
648 |
-
),
|
649 |
-
'odbackgroundColor' => array(
|
650 |
-
'type' => 'string',
|
651 |
-
'default' => '',
|
652 |
-
),
|
653 |
-
'dbackgroundType' => array(
|
654 |
-
'type' => 'string',
|
655 |
-
'default' => 'color',
|
656 |
-
),
|
657 |
-
'dbackgroundImage' => array(
|
658 |
-
'type' => 'object',
|
659 |
-
),
|
660 |
-
'dbackgroundPosition' => array(
|
661 |
-
'type' => 'string',
|
662 |
-
'default' => 'center-center',
|
663 |
-
),
|
664 |
-
'dbackgroundSize' => array(
|
665 |
-
'type' => 'string',
|
666 |
-
'default' => 'cover',
|
667 |
-
),
|
668 |
-
'dbackgroundRepeat' => array(
|
669 |
-
'type' => 'string',
|
670 |
-
'default' => 'no-repeat',
|
671 |
-
),
|
672 |
-
'dbackgroundAttachment' => array(
|
673 |
-
'type' => 'string',
|
674 |
-
'default' => 'scroll',
|
675 |
-
),
|
676 |
-
'dbackgroundOpacity' => array(
|
677 |
-
'type' => 'number',
|
678 |
-
),
|
679 |
-
'dbackgroundImageColor' => array(
|
680 |
-
'type' => 'string',
|
681 |
-
'default' => '',
|
682 |
-
),
|
683 |
-
'dbackgroundColor' => array(
|
684 |
-
'type' => 'string',
|
685 |
-
'default' => '',
|
686 |
-
),
|
687 |
-
'odetailbackgroundType' => array(
|
688 |
-
'type' => 'string',
|
689 |
-
'default' => 'color',
|
690 |
-
),
|
691 |
-
'odetailbackgroundImage' => array(
|
692 |
-
'type' => 'object',
|
693 |
-
),
|
694 |
-
'odetailbackgroundPosition' => array(
|
695 |
-
'type' => 'string',
|
696 |
-
'default' => 'center-center',
|
697 |
-
),
|
698 |
-
'odetailbackgroundSize' => array(
|
699 |
-
'type' => 'string',
|
700 |
-
'default' => 'cover',
|
701 |
-
),
|
702 |
-
'odetailbackgroundRepeat' => array(
|
703 |
-
'type' => 'string',
|
704 |
-
'default' => 'no-repeat',
|
705 |
-
),
|
706 |
-
'odetailbackgroundAttachment' => array(
|
707 |
-
'type' => 'string',
|
708 |
-
'default' => 'scroll',
|
709 |
-
),
|
710 |
-
'odetailbackgroundOpacity' => array(
|
711 |
-
'type' => 'number',
|
712 |
-
),
|
713 |
-
'odetailbackgroundImageColor' => array(
|
714 |
-
'type' => 'string',
|
715 |
-
'default' => '',
|
716 |
-
),
|
717 |
-
'odetailbackgroundColor' => array(
|
718 |
-
'type' => 'string',
|
719 |
-
'default' => '',
|
720 |
-
),
|
721 |
-
'cdetailbackgroundType' => array(
|
722 |
-
'type' => 'string',
|
723 |
-
'default' => 'color',
|
724 |
-
),
|
725 |
-
'cdetailbackgroundImage' => array(
|
726 |
-
'type' => 'object',
|
727 |
-
),
|
728 |
-
'cdetailbackgroundPosition' => array(
|
729 |
-
'type' => 'string',
|
730 |
-
'default' => 'center-center',
|
731 |
-
),
|
732 |
-
'cdetailbackgroundSize' => array(
|
733 |
-
'type' => 'string',
|
734 |
-
'default' => 'cover',
|
735 |
-
),
|
736 |
-
'cdetailbackgroundRepeat' => array(
|
737 |
-
'type' => 'string',
|
738 |
-
'default' => 'no-repeat',
|
739 |
-
),
|
740 |
-
'cdetailbackgroundAttachment' => array(
|
741 |
-
'type' => 'string',
|
742 |
-
'default' => 'scroll',
|
743 |
-
),
|
744 |
-
'cdetailbackgroundOpacity' => array(
|
745 |
-
'type' => 'number',
|
746 |
-
),
|
747 |
-
'cdetailbackgroundImageColor' => array(
|
748 |
-
'type' => 'string',
|
749 |
-
'default' => '',
|
750 |
-
),
|
751 |
-
'cdetailbackgroundColor' => array(
|
752 |
-
'type' => 'string',
|
753 |
-
'default' => '',
|
754 |
-
),
|
755 |
-
),
|
756 |
-
'render_callback' => array( $this, 'render_html' ),
|
757 |
-
)
|
758 |
-
);
|
759 |
-
|
760 |
-
}
|
761 |
-
|
762 |
-
|
763 |
-
/**
|
764 |
-
* Render Order Detail Form HTML.
|
765 |
-
*
|
766 |
-
* @param array $attributes Array of block attributes.
|
767 |
-
*
|
768 |
-
* @since x.x.x
|
769 |
-
*/
|
770 |
-
public function render_html( $attributes ) {
|
771 |
-
|
772 |
-
$main_classes = array(
|
773 |
-
'cf-block-' . $attributes['block_id'],
|
774 |
-
);
|
775 |
-
|
776 |
-
if ( isset( $attributes['className'] ) ) {
|
777 |
-
$main_classes[] = $attributes['className'];
|
778 |
-
}
|
779 |
-
|
780 |
-
$classes = array(
|
781 |
-
'wpcf__order-detail-form',
|
782 |
-
);
|
783 |
-
|
784 |
-
$this->dynamic_option_filters( $attributes );
|
785 |
-
|
786 |
-
ob_start();
|
787 |
-
|
788 |
-
?>
|
789 |
-
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
790 |
-
<div class = "<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
791 |
-
<?php echo do_shortcode( '[cartflows_order_details]' ); ?>
|
792 |
-
</div>
|
793 |
-
</div>
|
794 |
-
<?php
|
795 |
-
|
796 |
-
return ob_get_clean();
|
797 |
-
}
|
798 |
-
|
799 |
-
/**
|
800 |
-
* Dynamic options of elementor and add filters.
|
801 |
-
*
|
802 |
-
* @param array $attributes Array of block attributes.
|
803 |
-
*
|
804 |
-
* @since x.x.x
|
805 |
-
*/
|
806 |
-
public function dynamic_option_filters( $attributes ) {
|
807 |
-
|
808 |
-
self::$settings = $attributes;
|
809 |
-
|
810 |
-
if ( ! empty( self::$settings['thanyouText'] ) ) {
|
811 |
-
|
812 |
-
add_filter(
|
813 |
-
'cartflows_thankyou_meta_wcf-tq-text',
|
814 |
-
function( $text ) {
|
815 |
-
|
816 |
-
$text = self::$settings['thanyouText'];
|
817 |
-
|
818 |
-
return $text;
|
819 |
-
},
|
820 |
-
10,
|
821 |
-
1
|
822 |
-
);
|
823 |
-
}
|
824 |
-
|
825 |
-
}
|
826 |
-
|
827 |
-
}
|
828 |
-
|
829 |
-
/**
|
830 |
-
* Prepare if class 'WCFB_Order_Detail_Form' exist.
|
831 |
-
* Kicking this off by calling 'get_instance()' method
|
832 |
-
*/
|
833 |
-
WCFB_Order_Detail_Form::get_instance();
|
834 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WCFB - Order Detail Form.
|
4 |
+
*
|
5 |
+
* @package UAGB
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'WCFB_Order_Detail_Form' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WCFB_Order_Detail_Form.
|
16 |
+
*/
|
17 |
+
class WCFB_Order_Detail_Form {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Member Variable
|
21 |
+
*
|
22 |
+
* @var instance
|
23 |
+
*/
|
24 |
+
private static $instance;
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Settings
|
29 |
+
*
|
30 |
+
* @since x.x.x
|
31 |
+
* @var object $settings
|
32 |
+
*/
|
33 |
+
public static $settings;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Initiator
|
37 |
+
*/
|
38 |
+
public static function get_instance() {
|
39 |
+
|
40 |
+
if ( ! isset( self::$instance ) ) {
|
41 |
+
self::$instance = new self();
|
42 |
+
}
|
43 |
+
return self::$instance;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Constructor
|
48 |
+
*/
|
49 |
+
public function __construct() {
|
50 |
+
|
51 |
+
// Activation hook.
|
52 |
+
add_action( 'init', array( $this, 'register_blocks' ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Registers the `core/latest-posts` block on server.
|
57 |
+
*
|
58 |
+
* @since x.x.x
|
59 |
+
*/
|
60 |
+
public function register_blocks() {
|
61 |
+
|
62 |
+
// Check if the register function exists.
|
63 |
+
if ( ! function_exists( 'register_block_type' ) ) {
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
register_block_type(
|
68 |
+
'wcfb/order-detail-form',
|
69 |
+
array(
|
70 |
+
'attributes' => array(
|
71 |
+
'block_id' => array(
|
72 |
+
'type' => 'string',
|
73 |
+
),
|
74 |
+
'classMigrate' => array(
|
75 |
+
'type' => 'boolean',
|
76 |
+
'default' => false,
|
77 |
+
),
|
78 |
+
'className' => array(
|
79 |
+
'type' => 'string',
|
80 |
+
),
|
81 |
+
// Genaral.
|
82 |
+
'orderOverview' => array(
|
83 |
+
'type' => 'boolean',
|
84 |
+
'default' => true,
|
85 |
+
),
|
86 |
+
'orderDetails' => array(
|
87 |
+
'type' => 'boolean',
|
88 |
+
'default' => true,
|
89 |
+
),
|
90 |
+
'billingAddress' => array(
|
91 |
+
'type' => 'boolean',
|
92 |
+
'default' => true,
|
93 |
+
),
|
94 |
+
'shippingAddress' => array(
|
95 |
+
'type' => 'boolean',
|
96 |
+
'default' => true,
|
97 |
+
),
|
98 |
+
// Spacing.
|
99 |
+
'headingBottomSpacing' => array(
|
100 |
+
'type' => 'number',
|
101 |
+
),
|
102 |
+
'sectionSpacing' => array(
|
103 |
+
'type' => 'number',
|
104 |
+
),
|
105 |
+
// Heading.
|
106 |
+
'thanyouText' => array(
|
107 |
+
'type' => 'string',
|
108 |
+
'default' => '',
|
109 |
+
),
|
110 |
+
'headingAlignment' => array(
|
111 |
+
'type' => 'string',
|
112 |
+
'default' => 'center',
|
113 |
+
),
|
114 |
+
'headingColor' => array(
|
115 |
+
'type' => 'string',
|
116 |
+
'default' => '',
|
117 |
+
),
|
118 |
+
// heading font family.
|
119 |
+
'headingLoadGoogleFonts' => array(
|
120 |
+
'type' => 'boolean',
|
121 |
+
'default' => false,
|
122 |
+
),
|
123 |
+
'headingFontFamily' => array(
|
124 |
+
'type' => 'string',
|
125 |
+
),
|
126 |
+
'headingFontWeight' => array(
|
127 |
+
'type' => 'string',
|
128 |
+
),
|
129 |
+
'headingFontSubset' => array(
|
130 |
+
'type' => 'string',
|
131 |
+
),
|
132 |
+
// heading font size.
|
133 |
+
'headingFontSize' => array(
|
134 |
+
'type' => 'number',
|
135 |
+
),
|
136 |
+
'headingFontSizeType' => array(
|
137 |
+
'type' => 'string',
|
138 |
+
'default' => 'px',
|
139 |
+
),
|
140 |
+
'headingFontSizeTablet' => array(
|
141 |
+
'type' => 'number',
|
142 |
+
),
|
143 |
+
'headingFontSizeMobile' => array(
|
144 |
+
'type' => 'number',
|
145 |
+
),
|
146 |
+
// heading line height.
|
147 |
+
'headingLineHeightType' => array(
|
148 |
+
'type' => 'string',
|
149 |
+
'default' => 'em',
|
150 |
+
),
|
151 |
+
'headingLineHeight' => array(
|
152 |
+
'type' => 'number',
|
153 |
+
),
|
154 |
+
'headingLineHeightTablet' => array(
|
155 |
+
'type' => 'number',
|
156 |
+
),
|
157 |
+
'headingLineHeightMobile' => array(
|
158 |
+
'type' => 'number',
|
159 |
+
),
|
160 |
+
// Sections.
|
161 |
+
'sectionHeadingColor' => array(
|
162 |
+
'type' => 'string',
|
163 |
+
),
|
164 |
+
// section heading font family.
|
165 |
+
'sectionHeadingLoadGoogleFonts' => array(
|
166 |
+
'type' => 'boolean',
|
167 |
+
'default' => false,
|
168 |
+
),
|
169 |
+
'sectionHeadingFontFamily' => array(
|
170 |
+
'type' => 'string',
|
171 |
+
),
|
172 |
+
'sectionHeadingFontWeight' => array(
|
173 |
+
'type' => 'string',
|
174 |
+
),
|
175 |
+
'sectionHeadingFontSubset' => array(
|
176 |
+
'type' => 'string',
|
177 |
+
),
|
178 |
+
// section heading font size.
|
179 |
+
'sectionHeadingFontSize' => array(
|
180 |
+
'type' => 'number',
|
181 |
+
),
|
182 |
+
'sectionHeadingFontSizeType' => array(
|
183 |
+
'type' => 'string',
|
184 |
+
'default' => 'px',
|
185 |
+
),
|
186 |
+
'sectionHeadingFontSizeTablet' => array(
|
187 |
+
'type' => 'number',
|
188 |
+
),
|
189 |
+
'sectionHeadingFontSizeMobile' => array(
|
190 |
+
'type' => 'number',
|
191 |
+
),
|
192 |
+
// section heading line height.
|
193 |
+
'sectionHeadingLineHeightType' => array(
|
194 |
+
'type' => 'string',
|
195 |
+
'default' => 'em',
|
196 |
+
),
|
197 |
+
'sectionHeadingLineHeight' => array(
|
198 |
+
'type' => 'number',
|
199 |
+
),
|
200 |
+
'sectionHeadingLineHeightTablet' => array(
|
201 |
+
'type' => 'number',
|
202 |
+
),
|
203 |
+
'sectionHeadingLineHeightMobile' => array(
|
204 |
+
'type' => 'number',
|
205 |
+
),
|
206 |
+
'sectionContentColor' => array(
|
207 |
+
'type' => 'string',
|
208 |
+
),
|
209 |
+
// section content font family.
|
210 |
+
'sectionContentLoadGoogleFonts' => array(
|
211 |
+
'type' => 'boolean',
|
212 |
+
'default' => false,
|
213 |
+
),
|
214 |
+
'sectionContentFontFamily' => array(
|
215 |
+
'type' => 'string',
|
216 |
+
),
|
217 |
+
'sectionContentFontWeight' => array(
|
218 |
+
'type' => 'string',
|
219 |
+
),
|
220 |
+
'sectionContentFontSubset' => array(
|
221 |
+
'type' => 'string',
|
222 |
+
),
|
223 |
+
// section content font size.
|
224 |
+
'sectionContentFontSize' => array(
|
225 |
+
'type' => 'number',
|
226 |
+
),
|
227 |
+
'sectionContentFontSizeType' => array(
|
228 |
+
'type' => 'string',
|
229 |
+
'default' => 'px',
|
230 |
+
),
|
231 |
+
'sectionContentFontSizeTablet' => array(
|
232 |
+
'type' => 'number',
|
233 |
+
),
|
234 |
+
'sectionContentFontSizeMobile' => array(
|
235 |
+
'type' => 'number',
|
236 |
+
),
|
237 |
+
// section content line height.
|
238 |
+
'sectionContentLineHeightType' => array(
|
239 |
+
'type' => 'string',
|
240 |
+
'default' => 'em',
|
241 |
+
),
|
242 |
+
'sectionContentLineHeight' => array(
|
243 |
+
'type' => 'number',
|
244 |
+
),
|
245 |
+
'sectionContentLineHeightTablet' => array(
|
246 |
+
'type' => 'number',
|
247 |
+
),
|
248 |
+
'sectionContentLineHeightMobile' => array(
|
249 |
+
'type' => 'number',
|
250 |
+
),
|
251 |
+
'sectionBackgroundColor' => array(
|
252 |
+
'type' => 'string',
|
253 |
+
),
|
254 |
+
// Order Overview.
|
255 |
+
'orderOverviewTextColor' => array(
|
256 |
+
'type' => 'string',
|
257 |
+
),
|
258 |
+
'orderOverviewBackgroundColor' => array(
|
259 |
+
'type' => 'string',
|
260 |
+
),
|
261 |
+
// order overview font family.
|
262 |
+
'orderOverviewLoadGoogleFonts' => array(
|
263 |
+
'type' => 'boolean',
|
264 |
+
'default' => false,
|
265 |
+
),
|
266 |
+
'orderOverviewFontFamily' => array(
|
267 |
+
'type' => 'string',
|
268 |
+
),
|
269 |
+
'orderOverviewFontWeight' => array(
|
270 |
+
'type' => 'string',
|
271 |
+
),
|
272 |
+
'orderOverviewFontSubset' => array(
|
273 |
+
'type' => 'string',
|
274 |
+
),
|
275 |
+
// order overview font size.
|
276 |
+
'orderOverviewFontSize' => array(
|
277 |
+
'type' => 'number',
|
278 |
+
),
|
279 |
+
'orderOverviewFontSizeType' => array(
|
280 |
+
'type' => 'string',
|
281 |
+
'default' => 'px',
|
282 |
+
),
|
283 |
+
'orderOverviewFontSizeTablet' => array(
|
284 |
+
'type' => 'number',
|
285 |
+
),
|
286 |
+
'orderOverviewFontSizeMobile' => array(
|
287 |
+
'type' => 'number',
|
288 |
+
),
|
289 |
+
// order overview line height.
|
290 |
+
'orderOverviewLineHeightType' => array(
|
291 |
+
'type' => 'string',
|
292 |
+
'default' => 'em',
|
293 |
+
),
|
294 |
+
'orderOverviewLineHeight' => array(
|
295 |
+
'type' => 'number',
|
296 |
+
),
|
297 |
+
'orderOverviewLineHeightTablet' => array(
|
298 |
+
'type' => 'number',
|
299 |
+
),
|
300 |
+
'orderOverviewLineHeightMobile' => array(
|
301 |
+
'type' => 'number',
|
302 |
+
),
|
303 |
+
// Downloads.
|
304 |
+
'downloadHeadingColor' => array(
|
305 |
+
'type' => 'string',
|
306 |
+
),
|
307 |
+
// download heading font family.
|
308 |
+
'downloadHeadingLoadGoogleFonts' => array(
|
309 |
+
'type' => 'boolean',
|
310 |
+
'default' => false,
|
311 |
+
),
|
312 |
+
'downloadHeadingFontFamily' => array(
|
313 |
+
'type' => 'string',
|
314 |
+
),
|
315 |
+
'downloadHeadingFontWeight' => array(
|
316 |
+
'type' => 'string',
|
317 |
+
),
|
318 |
+
'downloadHeadingFontSubset' => array(
|
319 |
+
'type' => 'string',
|
320 |
+
),
|
321 |
+
// download heading font size.
|
322 |
+
'downloadHeadingFontSize' => array(
|
323 |
+
'type' => 'number',
|
324 |
+
),
|
325 |
+
'downloadHeadingFontSizeType' => array(
|
326 |
+
'type' => 'string',
|
327 |
+
'default' => 'px',
|
328 |
+
),
|
329 |
+
'downloadHeadingFontSizeTablet' => array(
|
330 |
+
'type' => 'number',
|
331 |
+
),
|
332 |
+
'downloadHeadingFontSizeMobile' => array(
|
333 |
+
'type' => 'number',
|
334 |
+
),
|
335 |
+
// download heading line height.
|
336 |
+
'downloadHeadingLineHeightType' => array(
|
337 |
+
'type' => 'string',
|
338 |
+
'default' => 'em',
|
339 |
+
),
|
340 |
+
'downloadHeadingLineHeight' => array(
|
341 |
+
'type' => 'number',
|
342 |
+
),
|
343 |
+
'downloadHeadingLineHeightTablet' => array(
|
344 |
+
'type' => 'number',
|
345 |
+
),
|
346 |
+
'downloadHeadingLineHeightMobile' => array(
|
347 |
+
'type' => 'number',
|
348 |
+
),
|
349 |
+
'downloadContentColor' => array(
|
350 |
+
'type' => 'string',
|
351 |
+
),
|
352 |
+
// download content font family.
|
353 |
+
'downloadContentLoadGoogleFonts' => array(
|
354 |
+
'type' => 'boolean',
|
355 |
+
'default' => false,
|
356 |
+
),
|
357 |
+
'downloadContentFontFamily' => array(
|
358 |
+
'type' => 'string',
|
359 |
+
),
|
360 |
+
'downloadContentFontWeight' => array(
|
361 |
+
'type' => 'string',
|
362 |
+
),
|
363 |
+
'downloadContentFontSubset' => array(
|
364 |
+
'type' => 'string',
|
365 |
+
),
|
366 |
+
// download content font size.
|
367 |
+
'downloadContentFontSize' => array(
|
368 |
+
'type' => 'number',
|
369 |
+
),
|
370 |
+
'downloadContentFontSizeType' => array(
|
371 |
+
'type' => 'string',
|
372 |
+
'default' => 'px',
|
373 |
+
),
|
374 |
+
'downloadContentFontSizeTablet' => array(
|
375 |
+
'type' => 'number',
|
376 |
+
),
|
377 |
+
'downloadContentFontSizeMobile' => array(
|
378 |
+
'type' => 'number',
|
379 |
+
),
|
380 |
+
// download content line height.
|
381 |
+
'downloadContentLineHeightType' => array(
|
382 |
+
'type' => 'string',
|
383 |
+
'default' => 'em',
|
384 |
+
),
|
385 |
+
'downloadContentLineHeight' => array(
|
386 |
+
'type' => 'number',
|
387 |
+
),
|
388 |
+
'downloadContentLineHeightTablet' => array(
|
389 |
+
'type' => 'number',
|
390 |
+
),
|
391 |
+
'downloadContentLineHeightMobile' => array(
|
392 |
+
'type' => 'number',
|
393 |
+
),
|
394 |
+
'downloadBackgroundColor' => array(
|
395 |
+
'type' => 'string',
|
396 |
+
),
|
397 |
+
// Order Details.
|
398 |
+
'orderDetailHeadingColor' => array(
|
399 |
+
'type' => 'string',
|
400 |
+
),
|
401 |
+
// order details heading font family.
|
402 |
+
'orderDetailHeadingLoadGoogleFonts' => array(
|
403 |
+
'type' => 'boolean',
|
404 |
+
'default' => false,
|
405 |
+
),
|
406 |
+
'orderDetailHeadingFontFamily' => array(
|
407 |
+
'type' => 'string',
|
408 |
+
),
|
409 |
+
'orderDetailHeadingFontWeight' => array(
|
410 |
+
'type' => 'string',
|
411 |
+
),
|
412 |
+
'orderDetailHeadingFontSubset' => array(
|
413 |
+
'type' => 'string',
|
414 |
+
),
|
415 |
+
// order details heading font size.
|
416 |
+
'orderDetailHeadingFontSize' => array(
|
417 |
+
'type' => 'number',
|
418 |
+
),
|
419 |
+
'orderDetailHeadingFontSizeType' => array(
|
420 |
+
'type' => 'string',
|
421 |
+
'default' => 'px',
|
422 |
+
),
|
423 |
+
'orderDetailHeadingFontSizeTablet' => array(
|
424 |
+
'type' => 'number',
|
425 |
+
),
|
426 |
+
'orderDetailHeadingFontSizeMobile' => array(
|
427 |
+
'type' => 'number',
|
428 |
+
),
|
429 |
+
// order details heading line height.
|
430 |
+
'orderDetailHeadingLineHeightType' => array(
|
431 |
+
'type' => 'string',
|
432 |
+
'default' => 'em',
|
433 |
+
),
|
434 |
+
'orderDetailHeadingLineHeight' => array(
|
435 |
+
'type' => 'number',
|
436 |
+
),
|
437 |
+
'orderDetailHeadingLineHeightTablet' => array(
|
438 |
+
'type' => 'number',
|
439 |
+
),
|
440 |
+
'orderDetailHeadingLineHeightMobile' => array(
|
441 |
+
'type' => 'number',
|
442 |
+
),
|
443 |
+
'orderDetailContentColor' => array(
|
444 |
+
'type' => 'string',
|
445 |
+
),
|
446 |
+
// order details content font family.
|
447 |
+
'orderDetailContentLoadGoogleFonts' => array(
|
448 |
+
'type' => 'boolean',
|
449 |
+
'default' => false,
|
450 |
+
),
|
451 |
+
'orderDetailContentFontFamily' => array(
|
452 |
+
'type' => 'string',
|
453 |
+
),
|
454 |
+
'orderDetailContentFontWeight' => array(
|
455 |
+
'type' => 'string',
|
456 |
+
),
|
457 |
+
'orderDetailContentFontSubset' => array(
|
458 |
+
'type' => 'string',
|
459 |
+
),
|
460 |
+
// order details content font size.
|
461 |
+
'orderDetailContentFontSize' => array(
|
462 |
+
'type' => 'number',
|
463 |
+
),
|
464 |
+
'orderDetailContentFontSizeType' => array(
|
465 |
+
'type' => 'string',
|
466 |
+
'default' => 'px',
|
467 |
+
),
|
468 |
+
'orderDetailContentFontSizeTablet' => array(
|
469 |
+
'type' => 'number',
|
470 |
+
),
|
471 |
+
'orderDetailContentFontSizeMobile' => array(
|
472 |
+
'type' => 'number',
|
473 |
+
),
|
474 |
+
// order details content line height.
|
475 |
+
'orderDetailContentLineHeightType' => array(
|
476 |
+
'type' => 'string',
|
477 |
+
'default' => 'em',
|
478 |
+
),
|
479 |
+
'orderDetailContentLineHeight' => array(
|
480 |
+
'type' => 'number',
|
481 |
+
),
|
482 |
+
'orderDetailContentLineHeightTablet' => array(
|
483 |
+
'type' => 'number',
|
484 |
+
),
|
485 |
+
'orderDetailContentLineHeightMobile' => array(
|
486 |
+
'type' => 'number',
|
487 |
+
),
|
488 |
+
'orderDetailBackgroundColor' => array(
|
489 |
+
'type' => 'string',
|
490 |
+
),
|
491 |
+
// Customer Details.
|
492 |
+
'customerDetailHeadingColor' => array(
|
493 |
+
'type' => 'string',
|
494 |
+
),
|
495 |
+
// customer details heading font family.
|
496 |
+
'customerDetailHeadingLoadGoogleFonts' => array(
|
497 |
+
'type' => 'boolean',
|
498 |
+
'default' => false,
|
499 |
+
),
|
500 |
+
'customerDetailHeadingFontFamily' => array(
|
501 |
+
'type' => 'string',
|
502 |
+
),
|
503 |
+
'customerDetailHeadingFontWeight' => array(
|
504 |
+
'type' => 'string',
|
505 |
+
),
|
506 |
+
'customerDetailHeadingFontSubset' => array(
|
507 |
+
'type' => 'string',
|
508 |
+
),
|
509 |
+
// customer details heading font size.
|
510 |
+
'customerDetailHeadingFontSize' => array(
|
511 |
+
'type' => 'number',
|
512 |
+
),
|
513 |
+
'customerDetailHeadingFontSizeType' => array(
|
514 |
+
'type' => 'string',
|
515 |
+
'default' => 'px',
|
516 |
+
),
|
517 |
+
'customerDetailHeadingFontSizeTablet' => array(
|
518 |
+
'type' => 'number',
|
519 |
+
),
|
520 |
+
'customerDetailHeadingFontSizeMobile' => array(
|
521 |
+
'type' => 'number',
|
522 |
+
),
|
523 |
+
// customer details heading line height.
|
524 |
+
'customerDetailHeadingLineHeightType' => array(
|
525 |
+
'type' => 'string',
|
526 |
+
'default' => 'em',
|
527 |
+
),
|
528 |
+
'customerDetailHeadingLineHeight' => array(
|
529 |
+
'type' => 'number',
|
530 |
+
),
|
531 |
+
'customerDetailHeadingLineHeightTablet' => array(
|
532 |
+
'type' => 'number',
|
533 |
+
),
|
534 |
+
'customerDetailHeadingLineHeightMobile' => array(
|
535 |
+
'type' => 'number',
|
536 |
+
),
|
537 |
+
'customerDetailContentColor' => array(
|
538 |
+
'type' => 'string',
|
539 |
+
),
|
540 |
+
// customer details content font family.
|
541 |
+
'customerDetailContentLoadGoogleFonts' => array(
|
542 |
+
'type' => 'boolean',
|
543 |
+
'default' => false,
|
544 |
+
),
|
545 |
+
'customerDetailContentFontFamily' => array(
|
546 |
+
'type' => 'string',
|
547 |
+
),
|
548 |
+
'customerDetailContentFontWeight' => array(
|
549 |
+
'type' => 'string',
|
550 |
+
),
|
551 |
+
'customerDetailContentFontSubset' => array(
|
552 |
+
'type' => 'string',
|
553 |
+
),
|
554 |
+
// customer details content font size.
|
555 |
+
'customerDetailContentFontSize' => array(
|
556 |
+
'type' => 'number',
|
557 |
+
),
|
558 |
+
'customerDetailContentFontSizeType' => array(
|
559 |
+
'type' => 'string',
|
560 |
+
'default' => 'px',
|
561 |
+
),
|
562 |
+
'customerDetailContentFontSizeTablet' => array(
|
563 |
+
'type' => 'number',
|
564 |
+
),
|
565 |
+
'customerDetailContentFontSizeMobile' => array(
|
566 |
+
'type' => 'number',
|
567 |
+
),
|
568 |
+
// customer details content line height.
|
569 |
+
'customerDetailContentLineHeightType' => array(
|
570 |
+
'type' => 'string',
|
571 |
+
'default' => 'em',
|
572 |
+
),
|
573 |
+
'customerDetailContentLineHeight' => array(
|
574 |
+
'type' => 'number',
|
575 |
+
),
|
576 |
+
'customerDetailContentLineHeightTablet' => array(
|
577 |
+
'type' => 'number',
|
578 |
+
),
|
579 |
+
'customerDetailContentLineHeightMobile' => array(
|
580 |
+
'type' => 'number',
|
581 |
+
),
|
582 |
+
'customerDetailBackgroundColor' => array(
|
583 |
+
'type' => 'string',
|
584 |
+
),
|
585 |
+
'backgroundType' => array(
|
586 |
+
'type' => 'string',
|
587 |
+
'default' => 'color',
|
588 |
+
),
|
589 |
+
'backgroundImage' => array(
|
590 |
+
'type' => 'object',
|
591 |
+
),
|
592 |
+
'backgroundPosition' => array(
|
593 |
+
'type' => 'string',
|
594 |
+
'default' => 'center-center',
|
595 |
+
),
|
596 |
+
'backgroundSize' => array(
|
597 |
+
'type' => 'string',
|
598 |
+
'default' => 'cover',
|
599 |
+
),
|
600 |
+
'backgroundRepeat' => array(
|
601 |
+
'type' => 'string',
|
602 |
+
'default' => 'no-repeat',
|
603 |
+
),
|
604 |
+
'backgroundAttachment' => array(
|
605 |
+
'type' => 'string',
|
606 |
+
'default' => 'scroll',
|
607 |
+
),
|
608 |
+
'backgroundOpacity' => array(
|
609 |
+
'type' => 'number',
|
610 |
+
),
|
611 |
+
'backgroundImageColor' => array(
|
612 |
+
'type' => 'string',
|
613 |
+
'default' => '',
|
614 |
+
),
|
615 |
+
'backgroundColor' => array(
|
616 |
+
'type' => 'string',
|
617 |
+
'default' => '',
|
618 |
+
),
|
619 |
+
'odbackgroundType' => array(
|
620 |
+
'type' => 'string',
|
621 |
+
'default' => 'color',
|
622 |
+
),
|
623 |
+
'odbackgroundImage' => array(
|
624 |
+
'type' => 'object',
|
625 |
+
),
|
626 |
+
'odbackgroundPosition' => array(
|
627 |
+
'type' => 'string',
|
628 |
+
'default' => 'center-center',
|
629 |
+
),
|
630 |
+
'odbackgroundSize' => array(
|
631 |
+
'type' => 'string',
|
632 |
+
'default' => 'cover',
|
633 |
+
),
|
634 |
+
'odbackgroundRepeat' => array(
|
635 |
+
'type' => 'string',
|
636 |
+
'default' => 'no-repeat',
|
637 |
+
),
|
638 |
+
'odbackgroundAttachment' => array(
|
639 |
+
'type' => 'string',
|
640 |
+
'default' => 'scroll',
|
641 |
+
),
|
642 |
+
'odbackgroundOpacity' => array(
|
643 |
+
'type' => 'number',
|
644 |
+
),
|
645 |
+
'odbackgroundImageColor' => array(
|
646 |
+
'type' => 'string',
|
647 |
+
'default' => '',
|
648 |
+
),
|
649 |
+
'odbackgroundColor' => array(
|
650 |
+
'type' => 'string',
|
651 |
+
'default' => '',
|
652 |
+
),
|
653 |
+
'dbackgroundType' => array(
|
654 |
+
'type' => 'string',
|
655 |
+
'default' => 'color',
|
656 |
+
),
|
657 |
+
'dbackgroundImage' => array(
|
658 |
+
'type' => 'object',
|
659 |
+
),
|
660 |
+
'dbackgroundPosition' => array(
|
661 |
+
'type' => 'string',
|
662 |
+
'default' => 'center-center',
|
663 |
+
),
|
664 |
+
'dbackgroundSize' => array(
|
665 |
+
'type' => 'string',
|
666 |
+
'default' => 'cover',
|
667 |
+
),
|
668 |
+
'dbackgroundRepeat' => array(
|
669 |
+
'type' => 'string',
|
670 |
+
'default' => 'no-repeat',
|
671 |
+
),
|
672 |
+
'dbackgroundAttachment' => array(
|
673 |
+
'type' => 'string',
|
674 |
+
'default' => 'scroll',
|
675 |
+
),
|
676 |
+
'dbackgroundOpacity' => array(
|
677 |
+
'type' => 'number',
|
678 |
+
),
|
679 |
+
'dbackgroundImageColor' => array(
|
680 |
+
'type' => 'string',
|
681 |
+
'default' => '',
|
682 |
+
),
|
683 |
+
'dbackgroundColor' => array(
|
684 |
+
'type' => 'string',
|
685 |
+
'default' => '',
|
686 |
+
),
|
687 |
+
'odetailbackgroundType' => array(
|
688 |
+
'type' => 'string',
|
689 |
+
'default' => 'color',
|
690 |
+
),
|
691 |
+
'odetailbackgroundImage' => array(
|
692 |
+
'type' => 'object',
|
693 |
+
),
|
694 |
+
'odetailbackgroundPosition' => array(
|
695 |
+
'type' => 'string',
|
696 |
+
'default' => 'center-center',
|
697 |
+
),
|
698 |
+
'odetailbackgroundSize' => array(
|
699 |
+
'type' => 'string',
|
700 |
+
'default' => 'cover',
|
701 |
+
),
|
702 |
+
'odetailbackgroundRepeat' => array(
|
703 |
+
'type' => 'string',
|
704 |
+
'default' => 'no-repeat',
|
705 |
+
),
|
706 |
+
'odetailbackgroundAttachment' => array(
|
707 |
+
'type' => 'string',
|
708 |
+
'default' => 'scroll',
|
709 |
+
),
|
710 |
+
'odetailbackgroundOpacity' => array(
|
711 |
+
'type' => 'number',
|
712 |
+
),
|
713 |
+
'odetailbackgroundImageColor' => array(
|
714 |
+
'type' => 'string',
|
715 |
+
'default' => '',
|
716 |
+
),
|
717 |
+
'odetailbackgroundColor' => array(
|
718 |
+
'type' => 'string',
|
719 |
+
'default' => '',
|
720 |
+
),
|
721 |
+
'cdetailbackgroundType' => array(
|
722 |
+
'type' => 'string',
|
723 |
+
'default' => 'color',
|
724 |
+
),
|
725 |
+
'cdetailbackgroundImage' => array(
|
726 |
+
'type' => 'object',
|
727 |
+
),
|
728 |
+
'cdetailbackgroundPosition' => array(
|
729 |
+
'type' => 'string',
|
730 |
+
'default' => 'center-center',
|
731 |
+
),
|
732 |
+
'cdetailbackgroundSize' => array(
|
733 |
+
'type' => 'string',
|
734 |
+
'default' => 'cover',
|
735 |
+
),
|
736 |
+
'cdetailbackgroundRepeat' => array(
|
737 |
+
'type' => 'string',
|
738 |
+
'default' => 'no-repeat',
|
739 |
+
),
|
740 |
+
'cdetailbackgroundAttachment' => array(
|
741 |
+
'type' => 'string',
|
742 |
+
'default' => 'scroll',
|
743 |
+
),
|
744 |
+
'cdetailbackgroundOpacity' => array(
|
745 |
+
'type' => 'number',
|
746 |
+
),
|
747 |
+
'cdetailbackgroundImageColor' => array(
|
748 |
+
'type' => 'string',
|
749 |
+
'default' => '',
|
750 |
+
),
|
751 |
+
'cdetailbackgroundColor' => array(
|
752 |
+
'type' => 'string',
|
753 |
+
'default' => '',
|
754 |
+
),
|
755 |
+
),
|
756 |
+
'render_callback' => array( $this, 'render_html' ),
|
757 |
+
)
|
758 |
+
);
|
759 |
+
|
760 |
+
}
|
761 |
+
|
762 |
+
|
763 |
+
/**
|
764 |
+
* Render Order Detail Form HTML.
|
765 |
+
*
|
766 |
+
* @param array $attributes Array of block attributes.
|
767 |
+
*
|
768 |
+
* @since x.x.x
|
769 |
+
*/
|
770 |
+
public function render_html( $attributes ) {
|
771 |
+
|
772 |
+
$main_classes = array(
|
773 |
+
'cf-block-' . $attributes['block_id'],
|
774 |
+
);
|
775 |
+
|
776 |
+
if ( isset( $attributes['className'] ) ) {
|
777 |
+
$main_classes[] = $attributes['className'];
|
778 |
+
}
|
779 |
+
|
780 |
+
$classes = array(
|
781 |
+
'wpcf__order-detail-form',
|
782 |
+
);
|
783 |
+
|
784 |
+
$this->dynamic_option_filters( $attributes );
|
785 |
+
|
786 |
+
ob_start();
|
787 |
+
|
788 |
+
?>
|
789 |
+
<div class = "<?php echo esc_attr( implode( ' ', $main_classes ) ); ?>">
|
790 |
+
<div class = "<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
791 |
+
<?php echo do_shortcode( '[cartflows_order_details]' ); ?>
|
792 |
+
</div>
|
793 |
+
</div>
|
794 |
+
<?php
|
795 |
+
|
796 |
+
return ob_get_clean();
|
797 |
+
}
|
798 |
+
|
799 |
+
/**
|
800 |
+
* Dynamic options of elementor and add filters.
|
801 |
+
*
|
802 |
+
* @param array $attributes Array of block attributes.
|
803 |
+
*
|
804 |
+
* @since x.x.x
|
805 |
+
*/
|
806 |
+
public function dynamic_option_filters( $attributes ) {
|
807 |
+
|
808 |
+
self::$settings = $attributes;
|
809 |
+
|
810 |
+
if ( ! empty( self::$settings['thanyouText'] ) ) {
|
811 |
+
|
812 |
+
add_filter(
|
813 |
+
'cartflows_thankyou_meta_wcf-tq-text',
|
814 |
+
function( $text ) {
|
815 |
+
|
816 |
+
$text = self::$settings['thanyouText'];
|
817 |
+
|
818 |
+
return $text;
|
819 |
+
},
|
820 |
+
10,
|
821 |
+
1
|
822 |
+
);
|
823 |
+
}
|
824 |
+
|
825 |
+
}
|
826 |
+
|
827 |
+
}
|
828 |
+
|
829 |
+
/**
|
830 |
+
* Prepare if class 'WCFB_Order_Detail_Form' exist.
|
831 |
+
* Kicking this off by calling 'get_instance()' method
|
832 |
+
*/
|
833 |
+
WCFB_Order_Detail_Form::get_instance();
|
834 |
+
}
|
modules/optin/classes/class-cartflows-optin-markup.php
CHANGED
@@ -1,824 +1,824 @@
|
|
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_Optin_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_optin_fields' ), 10, 2 );
|
41 |
-
|
42 |
-
/* Optin Shortcode */
|
43 |
-
add_shortcode( 'cartflows_optin', array( $this, 'optin_shortcode_markup' ) );
|
44 |
-
|
45 |
-
/* Preconfigured cart data */
|
46 |
-
add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
|
47 |
-
|
48 |
-
/* Optin shortcode data */
|
49 |
-
add_action( 'wp', array( $this, 'shortcode_load_data' ), 1000 );
|
50 |
-
|
51 |
-
/* Ajax Endpoint */
|
52 |
-
add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
|
53 |
-
add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
|
54 |
-
|
55 |
-
/* Optin Fields */
|
56 |
-
add_filter( 'woocommerce_default_address_fields', array( $this, 'set_optin_default_fields' ), 1000 );
|
57 |
-
|
58 |
-
/** It may required later
|
59 |
-
* add_filter( 'woocommerce_checkout_fields', array( $this, 'set_optin_fields' ) );
|
60 |
-
*/
|
61 |
-
add_filter( 'woocommerce_billing_fields', array( $this, 'billing_optin_fields' ), 1000, 2 );
|
62 |
-
|
63 |
-
add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'change_field_label_in_required_notice' ), 100, 2 );
|
64 |
-
|
65 |
-
add_action( 'init', array( $this, 'remove_woo_actions' ) );
|
66 |
-
|
67 |
-
$this->elementor_editor_compatibility();
|
68 |
-
|
69 |
-
$this->gutenberg_editor_compatibility();
|
70 |
-
|
71 |
-
$this->bb_editor_compatibility();
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Elementor editor compatibility.
|
76 |
-
*/
|
77 |
-
public function elementor_editor_compatibility() {
|
78 |
-
|
79 |
-
add_action(
|
80 |
-
'cartflows_elementor_editor_compatibility',
|
81 |
-
function( $post_id, $elementor_ajax ) {
|
82 |
-
|
83 |
-
add_action( 'cartflows_elementor_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
84 |
-
},
|
85 |
-
10,
|
86 |
-
2
|
87 |
-
);
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Beaver Builder editor compatibility.
|
92 |
-
*/
|
93 |
-
public function bb_editor_compatibility() {
|
94 |
-
|
95 |
-
add_action(
|
96 |
-
'cartflows_bb_editor_compatibility',
|
97 |
-
function( $post_id ) {
|
98 |
-
add_action( 'cartflows_bb_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
99 |
-
},
|
100 |
-
10,
|
101 |
-
1
|
102 |
-
);
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Gutenburg editor compatibility.
|
107 |
-
*/
|
108 |
-
public function gutenberg_editor_compatibility() {
|
109 |
-
|
110 |
-
add_action( 'cartflows_gutenberg_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Remove login and registration actions.
|
115 |
-
*/
|
116 |
-
public function remove_woo_actions() {
|
117 |
-
|
118 |
-
if ( _is_wcf_doing_optin_ajax() ) {
|
119 |
-
|
120 |
-
if ( isset( $_POST['billing_email'] ) && ! empty( $_POST['billing_email'] ) ) { //phpcs:ignore
|
121 |
-
|
122 |
-
if ( email_exists( sanitize_email( wp_unslash( $_POST['billing_email'] ) ) ) ) { // phpcs:ignore
|
123 |
-
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
124 |
-
}
|
125 |
-
}
|
126 |
-
|
127 |
-
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
128 |
-
}
|
129 |
-
|
130 |
-
add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'filter_remove_woo_data' ) );
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Filter or remove woo data on update order review ajax call.
|
135 |
-
*
|
136 |
-
* @param string $post_data post data woo.
|
137 |
-
* @return void
|
138 |
-
*/
|
139 |
-
public function filter_remove_woo_data( $post_data ) {
|
140 |
-
|
141 |
-
if ( isset( $post_data['_wcf_optin_id'] ) ) {
|
142 |
-
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
143 |
-
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 1 );
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Change order button text .
|
149 |
-
*
|
150 |
-
* @param string $button_text place order.
|
151 |
-
* @return string
|
152 |
-
*/
|
153 |
-
public function place_order_button_text( $button_text ) {
|
154 |
-
|
155 |
-
$optin_id = get_the_ID();
|
156 |
-
|
157 |
-
if ( ! $optin_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] ) ) {
|
158 |
-
$optin_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] );
|
159 |
-
}
|
160 |
-
|
161 |
-
if ( $optin_id ) {
|
162 |
-
|
163 |
-
$wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
|
164 |
-
|
165 |
-
if ( ! empty( $wcf_order_button_text ) ) {
|
166 |
-
$button_text = $wcf_order_button_text;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
return $button_text;
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Display all WooCommerce notices.
|
175 |
-
*
|
176 |
-
* @since 1.1.5
|
177 |
-
*/
|
178 |
-
public function display_woo_notices() {
|
179 |
-
|
180 |
-
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
181 |
-
woocommerce_output_all_notices();
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Check for checkout flag
|
187 |
-
*
|
188 |
-
* @param bool $is_checkout is checkout.
|
189 |
-
*
|
190 |
-
* @return bool
|
191 |
-
*/
|
192 |
-
public function woo_checkout_flag( $is_checkout ) {
|
193 |
-
|
194 |
-
if ( ! is_admin() ) {
|
195 |
-
|
196 |
-
if ( _is_wcf_optin_type() ) {
|
197 |
-
|
198 |
-
$is_checkout = true;
|
199 |
-
}
|
200 |
-
}
|
201 |
-
|
202 |
-
return $is_checkout;
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Render checkout shortcode markup.
|
207 |
-
*
|
208 |
-
* @param array $atts attributes.
|
209 |
-
* @return string
|
210 |
-
*/
|
211 |
-
public function optin_shortcode_markup( $atts ) {
|
212 |
-
|
213 |
-
if ( ! function_exists( 'wc_print_notices' ) ) {
|
214 |
-
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
215 |
-
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
216 |
-
|
217 |
-
return $notice_out;
|
218 |
-
}
|
219 |
-
|
220 |
-
$atts = shortcode_atts(
|
221 |
-
array(
|
222 |
-
'id' => 0,
|
223 |
-
),
|
224 |
-
$atts
|
225 |
-
);
|
226 |
-
|
227 |
-
$optin_id = intval( $atts['id'] );
|
228 |
-
|
229 |
-
$show_optin_preview = false;
|
230 |
-
|
231 |
-
if ( is_admin() ) {
|
232 |
-
|
233 |
-
$show_optin_preview = apply_filters( 'cartflows_show_demo_optin_form', false );
|
234 |
-
|
235 |
-
if ( $show_optin_preview && 0 === $optin_id ) {
|
236 |
-
|
237 |
-
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
238 |
-
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
239 |
-
}
|
240 |
-
}
|
241 |
-
}
|
242 |
-
|
243 |
-
if ( empty( $optin_id ) && ! is_admin() ) {
|
244 |
-
|
245 |
-
if ( ! _is_wcf_optin_type() && ! $show_optin_preview ) {
|
246 |
-
|
247 |
-
return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>';
|
248 |
-
}
|
249 |
-
|
250 |
-
global $post;
|
251 |
-
$optin_id = intval( $post->ID );
|
252 |
-
|
253 |
-
}
|
254 |
-
|
255 |
-
$output = '';
|
256 |
-
|
257 |
-
ob_start();
|
258 |
-
|
259 |
-
do_action( 'cartflows_optin_form_before', $optin_id );
|
260 |
-
|
261 |
-
$optin_layout = 'default';
|
262 |
-
|
263 |
-
$template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php';
|
264 |
-
|
265 |
-
include $template_default;
|
266 |
-
|
267 |
-
$output .= ob_get_clean();
|
268 |
-
|
269 |
-
return $output;
|
270 |
-
}
|
271 |
-
|
272 |
-
/**
|
273 |
-
* Configure Cart Data.
|
274 |
-
*
|
275 |
-
* @since 1.0.0
|
276 |
-
*
|
277 |
-
* @return void
|
278 |
-
*/
|
279 |
-
public function preconfigured_cart_data() {
|
280 |
-
|
281 |
-
if ( is_admin() ) {
|
282 |
-
return;
|
283 |
-
}
|
284 |
-
|
285 |
-
global $post;
|
286 |
-
|
287 |
-
if ( _is_wcf_optin_type() ) {
|
288 |
-
|
289 |
-
if ( wp_doing_ajax() ) {
|
290 |
-
return;
|
291 |
-
} else {
|
292 |
-
|
293 |
-
$optin_id = $post->ID;
|
294 |
-
|
295 |
-
do_action( 'cartflows_optin_before_configure_cart', $optin_id );
|
296 |
-
|
297 |
-
$products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
|
298 |
-
|
299 |
-
if ( ! is_array( $products ) ) {
|
300 |
-
return;
|
301 |
-
}
|
302 |
-
|
303 |
-
/* Empty the current cart */
|
304 |
-
WC()->cart->empty_cart();
|
305 |
-
|
306 |
-
if ( is_array( $products ) && count( $products ) < 1 ) {
|
307 |
-
wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
|
308 |
-
return;
|
309 |
-
}
|
310 |
-
|
311 |
-
/* Set customer session if not set */
|
312 |
-
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
313 |
-
WC()->session->set_customer_session_cookie( true );
|
314 |
-
}
|
315 |
-
|
316 |
-
$product_id = reset( $products );
|
317 |
-
$_product = wc_get_product( $product_id );
|
318 |
-
|
319 |
-
if ( ! empty( $_product ) ) {
|
320 |
-
|
321 |
-
if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) {
|
322 |
-
|
323 |
-
if ( $_product->get_price() > 0 ) {
|
324 |
-
wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' );
|
325 |
-
} else {
|
326 |
-
|
327 |
-
$quantity = 1;
|
328 |
-
|
329 |
-
WC()->cart->add_to_cart( $product_id, $quantity );
|
330 |
-
}
|
331 |
-
} else {
|
332 |
-
|
333 |
-
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
334 |
-
}
|
335 |
-
} else {
|
336 |
-
|
337 |
-
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
338 |
-
}
|
339 |
-
|
340 |
-
do_action( 'cartflows_optin_after_configure_cart', $optin_id );
|
341 |
-
}
|
342 |
-
}
|
343 |
-
}
|
344 |
-
|
345 |
-
/**
|
346 |
-
* Load shortcode data.
|
347 |
-
*
|
348 |
-
* @return void
|
349 |
-
*/
|
350 |
-
public function shortcode_load_data() {
|
351 |
-
|
352 |
-
if ( _is_wcf_optin_type() ) {
|
353 |
-
|
354 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
355 |
-
|
356 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
357 |
-
|
358 |
-
$this->before_optin_shortcode_actions();
|
359 |
-
|
360 |
-
global $post;
|
361 |
-
|
362 |
-
$optin_id = $post->ID;
|
363 |
-
|
364 |
-
do_action( 'cartflows_optin_before_shortcode', $optin_id );
|
365 |
-
|
366 |
-
}
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* Before option shortcode actions.
|
371 |
-
*/
|
372 |
-
public function before_optin_shortcode_actions() {
|
373 |
-
|
374 |
-
/* Show notices if cart has errors */
|
375 |
-
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
376 |
-
|
377 |
-
// Outputting the hidden field in checkout page.
|
378 |
-
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
379 |
-
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
380 |
-
|
381 |
-
/* Remove unnecessary option */
|
382 |
-
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
|
383 |
-
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
|
384 |
-
|
385 |
-
remove_all_actions( 'woocommerce_before_checkout_form' );
|
386 |
-
remove_all_actions( 'woocommerce_checkout_billing' );
|
387 |
-
remove_all_actions( 'woocommerce_checkout_shipping' );
|
388 |
-
remove_all_actions( 'woocommerce_checkout_before_order_review' );
|
389 |
-
remove_all_actions( 'woocommerce_checkout_order_review' );
|
390 |
-
remove_all_actions( 'woocommerce_checkout_after_order_review' );
|
391 |
-
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
|
392 |
-
add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) );
|
393 |
-
|
394 |
-
/* Paypal Expresss remove */
|
395 |
-
if ( function_exists( 'wc_gateway_ppec' ) ) {
|
396 |
-
remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) );
|
397 |
-
}
|
398 |
-
|
399 |
-
// Hook in actions once.
|
400 |
-
add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 );
|
401 |
-
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
402 |
-
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
403 |
-
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
|
404 |
-
|
405 |
-
/* Submit Button */
|
406 |
-
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
407 |
-
|
408 |
-
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
409 |
-
|
410 |
-
/* Remove login actions */
|
411 |
-
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
412 |
-
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Disable payment gateways.
|
417 |
-
*
|
418 |
-
* @param array $available_gateways gateways.
|
419 |
-
* @return array
|
420 |
-
*/
|
421 |
-
public function disable_payment_gateways( $available_gateways ) {
|
422 |
-
|
423 |
-
if ( ! is_admin() ) {
|
424 |
-
|
425 |
-
$available_gateways = array();
|
426 |
-
}
|
427 |
-
|
428 |
-
return $available_gateways;
|
429 |
-
}
|
430 |
-
|
431 |
-
/**
|
432 |
-
* Render checkout ID hidden field.
|
433 |
-
*
|
434 |
-
* @param array $checkout checkout session data.
|
435 |
-
* @return void
|
436 |
-
*/
|
437 |
-
public function checkout_shortcode_post_id( $checkout ) {
|
438 |
-
|
439 |
-
if ( ! _is_wcf_optin_type() ) {
|
440 |
-
return;
|
441 |
-
}
|
442 |
-
|
443 |
-
global $post;
|
444 |
-
|
445 |
-
$optin_id = $post->ID;
|
446 |
-
|
447 |
-
$flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true );
|
448 |
-
|
449 |
-
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
450 |
-
echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">';
|
451 |
-
}
|
452 |
-
|
453 |
-
/**
|
454 |
-
* Load shortcode scripts.
|
455 |
-
*
|
456 |
-
* @return void
|
457 |
-
*/
|
458 |
-
public function shortcode_scripts() {
|
459 |
-
|
460 |
-
wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
|
461 |
-
|
462 |
-
wp_enqueue_script(
|
463 |
-
'wcf-optin-template',
|
464 |
-
wcf()->utils->get_js_url( 'optin-template' ),
|
465 |
-
array( 'jquery' ),
|
466 |
-
CARTFLOWS_VER,
|
467 |
-
true
|
468 |
-
);
|
469 |
-
|
470 |
-
do_action( 'cartflows_optin_scripts' );
|
471 |
-
|
472 |
-
$optin_dynamic_css = apply_filters( 'cartflows_optin_enable_dynamic_css', true );
|
473 |
-
|
474 |
-
if ( $optin_dynamic_css ) {
|
475 |
-
|
476 |
-
$style = $this->generate_style();
|
477 |
-
|
478 |
-
wp_add_inline_style( 'wcf-optin-template', $style );
|
479 |
-
}
|
480 |
-
}
|
481 |
-
|
482 |
-
/**
|
483 |
-
* Load compatibility scripts.
|
484 |
-
*
|
485 |
-
* @return void
|
486 |
-
*/
|
487 |
-
public function compatibility_scripts() {
|
488 |
-
|
489 |
-
global $post;
|
490 |
-
|
491 |
-
$optin_id = $post->ID;
|
492 |
-
|
493 |
-
// Add DIVI Compatibility css if DIVI theme is enabled.
|
494 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
495 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id )
|
496 |
-
) {
|
497 |
-
wp_enqueue_style( 'wcf-optin-template-divi', wcf()->utils->get_css_url( 'optin-template-divi' ), '', CARTFLOWS_VER );
|
498 |
-
}
|
499 |
-
}
|
500 |
-
|
501 |
-
/**
|
502 |
-
* Generate styles.
|
503 |
-
*
|
504 |
-
* @return string
|
505 |
-
*/
|
506 |
-
public function generate_style() {
|
507 |
-
|
508 |
-
global $post;
|
509 |
-
|
510 |
-
$optin_id = $post->ID;
|
511 |
-
|
512 |
-
/* Load all fonts */
|
513 |
-
CartFlows_Font_Families::render_fonts( $optin_id );
|
514 |
-
|
515 |
-
$r = '';
|
516 |
-
$g = '';
|
517 |
-
$b = '';
|
518 |
-
$output = '';
|
519 |
-
|
520 |
-
/* Global */
|
521 |
-
$primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' );
|
522 |
-
$base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' );
|
523 |
-
|
524 |
-
/* Input Fields */
|
525 |
-
$input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' );
|
526 |
-
$input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' );
|
527 |
-
$field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' );
|
528 |
-
$field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' );
|
529 |
-
$field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' );
|
530 |
-
$field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' );
|
531 |
-
$field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' );
|
532 |
-
$field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' );
|
533 |
-
$field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' );
|
534 |
-
|
535 |
-
if ( 'custom' == $field_input_size ) {
|
536 |
-
$field_input_size = '38px';
|
537 |
-
}
|
538 |
-
|
539 |
-
/* Submit Button */
|
540 |
-
$submit_button_width = '100%';
|
541 |
-
$optin_button_position = '';
|
542 |
-
$button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' );
|
543 |
-
$button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' );
|
544 |
-
$button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' );
|
545 |
-
$submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' );
|
546 |
-
$submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' );
|
547 |
-
$submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' );
|
548 |
-
$submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' );
|
549 |
-
$submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' );
|
550 |
-
$submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' );
|
551 |
-
$submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color );
|
552 |
-
$submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color );
|
553 |
-
$submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color );
|
554 |
-
$submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color );
|
555 |
-
|
556 |
-
if ( 'custom' == $submit_button_height ) {
|
557 |
-
$submit_button_height = '38px';
|
558 |
-
$submit_button_width = 'auto';
|
559 |
-
|
560 |
-
switch ( $submit_button_position ) {
|
561 |
-
case 'left':
|
562 |
-
$optin_button_position = '0 auto 0 0';
|
563 |
-
break;
|
564 |
-
case 'center':
|
565 |
-
$optin_button_position = '0 auto';
|
566 |
-
break;
|
567 |
-
case 'right':
|
568 |
-
$optin_button_position = '0 0 0 auto';
|
569 |
-
break;
|
570 |
-
|
571 |
-
default:
|
572 |
-
$optin_button_position = '0 auto';
|
573 |
-
break;
|
574 |
-
}
|
575 |
-
}
|
576 |
-
|
577 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
578 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) {
|
579 |
-
|
580 |
-
include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-divi-css.php';
|
581 |
-
|
582 |
-
} else {
|
583 |
-
include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-css.php';
|
584 |
-
}
|
585 |
-
|
586 |
-
return $output;
|
587 |
-
}
|
588 |
-
|
589 |
-
/**
|
590 |
-
* Get ajax end points.
|
591 |
-
*
|
592 |
-
* @param string $endpoint_url end point URL.
|
593 |
-
* @param string $request end point request.
|
594 |
-
* @return string
|
595 |
-
*/
|
596 |
-
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
597 |
-
|
598 |
-
global $post;
|
599 |
-
|
600 |
-
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
601 |
-
|
602 |
-
if ( _is_wcf_optin_type() ) {
|
603 |
-
|
604 |
-
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
605 |
-
|
606 |
-
if ( '' === $request ) {
|
607 |
-
$query_args = array(
|
608 |
-
'wc-ajax' => '%%endpoint%%',
|
609 |
-
);
|
610 |
-
} else {
|
611 |
-
$query_args = array(
|
612 |
-
'wc-ajax' => $request,
|
613 |
-
);
|
614 |
-
}
|
615 |
-
|
616 |
-
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
617 |
-
$uri = $uri[0];
|
618 |
-
|
619 |
-
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
620 |
-
}
|
621 |
-
}
|
622 |
-
}
|
623 |
-
|
624 |
-
return $endpoint_url;
|
625 |
-
}
|
626 |
-
|
627 |
-
|
628 |
-
/**
|
629 |
-
* Save checkout fields.
|
630 |
-
*
|
631 |
-
* @param int $order_id order id.
|
632 |
-
* @param array $posted posted data.
|
633 |
-
* @return void
|
634 |
-
*/
|
635 |
-
public function save_optin_fields( $order_id, $posted ) {
|
636 |
-
|
637 |
-
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
638 |
-
|
639 |
-
$optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore
|
640 |
-
|
641 |
-
update_post_meta( $order_id, '_wcf_optin_id', $optin_id );
|
642 |
-
|
643 |
-
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
644 |
-
|
645 |
-
$flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
646 |
-
|
647 |
-
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
648 |
-
}
|
649 |
-
}
|
650 |
-
|
651 |
-
}
|
652 |
-
|
653 |
-
/**
|
654 |
-
* Redirect users to our checkout if hidden param
|
655 |
-
*
|
656 |
-
* @param string $redirect redirect url.
|
657 |
-
* @param object $user user.
|
658 |
-
* @return string
|
659 |
-
*/
|
660 |
-
public function after_login_redirect( $redirect, $user ) {
|
661 |
-
|
662 |
-
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
663 |
-
|
664 |
-
$optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore
|
665 |
-
|
666 |
-
$redirect = get_permalink( $optin_id );
|
667 |
-
}
|
668 |
-
|
669 |
-
return $redirect;
|
670 |
-
}
|
671 |
-
|
672 |
-
|
673 |
-
/**
|
674 |
-
* Add custom class to the fields to change the UI to three column.
|
675 |
-
*
|
676 |
-
* @param array $fields fields.
|
677 |
-
*/
|
678 |
-
public function set_optin_default_fields( $fields ) {
|
679 |
-
|
680 |
-
if ( _is_wcf_optin_type() ) {
|
681 |
-
|
682 |
-
global $post;
|
683 |
-
|
684 |
-
$optin_id = $post->ID;
|
685 |
-
} else {
|
686 |
-
|
687 |
-
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
688 |
-
|
689 |
-
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
690 |
-
} else {
|
691 |
-
return $fields;
|
692 |
-
}
|
693 |
-
}
|
694 |
-
|
695 |
-
$first_name = $fields['first_name'];
|
696 |
-
$last_name = $fields['last_name'];
|
697 |
-
|
698 |
-
/* Make fields required */
|
699 |
-
$first_name['required'] = true;
|
700 |
-
$last_name['required'] = true;
|
701 |
-
|
702 |
-
$fields = array(
|
703 |
-
'first_name' => $first_name,
|
704 |
-
'last_name' => $last_name,
|
705 |
-
);
|
706 |
-
|
707 |
-
return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id );
|
708 |
-
}
|
709 |
-
|
710 |
-
/**
|
711 |
-
* Add custom class to the fields to change the UI to three column.
|
712 |
-
*
|
713 |
-
* @param array $fields fields.
|
714 |
-
*/
|
715 |
-
public function set_optin_fields( $fields ) {
|
716 |
-
|
717 |
-
if ( _is_wcf_optin_type() ) {
|
718 |
-
|
719 |
-
global $post;
|
720 |
-
|
721 |
-
$optin_id = $post->ID;
|
722 |
-
} else {
|
723 |
-
|
724 |
-
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
725 |
-
|
726 |
-
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
727 |
-
} else {
|
728 |
-
return $fields;
|
729 |
-
}
|
730 |
-
}
|
731 |
-
|
732 |
-
$billing_first_name = $fields['billing']['billing_first_name'];
|
733 |
-
$billing_last_name = $fields['billing']['billing_last_name'];
|
734 |
-
$billing_email = $fields['billing']['billing_email'];
|
735 |
-
|
736 |
-
$fields['billing'] = array(
|
737 |
-
'billing_first_name' => $billing_first_name,
|
738 |
-
'billing_last_name' => $billing_last_name,
|
739 |
-
'billing_email' => $billing_email,
|
740 |
-
);
|
741 |
-
|
742 |
-
return apply_filters( 'cartflows_optin_fields', $fields, $optin_id );
|
743 |
-
}
|
744 |
-
|
745 |
-
/**
|
746 |
-
* Billing field customization.
|
747 |
-
*
|
748 |
-
* @param array $fields fields data.
|
749 |
-
* @param string $country country name.
|
750 |
-
* @return array
|
751 |
-
*/
|
752 |
-
public function billing_optin_fields( $fields, $country ) {
|
753 |
-
|
754 |
-
$show_optin_preview = false;
|
755 |
-
|
756 |
-
if ( is_admin() ) {
|
757 |
-
$show_optin_preview = apply_filters( 'cartflows_show_demo_optin_form', false );
|
758 |
-
}
|
759 |
-
|
760 |
-
if ( _is_wcf_optin_type() || $show_optin_preview ) {
|
761 |
-
|
762 |
-
global $post;
|
763 |
-
|
764 |
-
if ( $post ) {
|
765 |
-
$optin_id = $post->ID;
|
766 |
-
} else {
|
767 |
-
|
768 |
-
if( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore
|
769 |
-
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
770 |
-
}
|
771 |
-
}
|
772 |
-
} else {
|
773 |
-
|
774 |
-
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
775 |
-
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
776 |
-
} else {
|
777 |
-
return $fields;
|
778 |
-
}
|
779 |
-
}
|
780 |
-
|
781 |
-
if ( is_wc_endpoint_url( 'edit-address' ) ) {
|
782 |
-
return $fields;
|
783 |
-
}
|
784 |
-
|
785 |
-
$billing_first_name = $fields['billing_first_name'];
|
786 |
-
$billing_last_name = $fields['billing_last_name'];
|
787 |
-
$billing_email = $fields['billing_email'];
|
788 |
-
|
789 |
-
/* Make fields required */
|
790 |
-
$billing_first_name['required'] = true;
|
791 |
-
$billing_last_name['required'] = true;
|
792 |
-
|
793 |
-
$fields = array(
|
794 |
-
'billing_first_name' => $billing_first_name,
|
795 |
-
'billing_last_name' => $billing_last_name,
|
796 |
-
'billing_email' => $billing_email,
|
797 |
-
);
|
798 |
-
|
799 |
-
return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id );
|
800 |
-
}
|
801 |
-
|
802 |
-
|
803 |
-
/**
|
804 |
-
* Replace billing label.
|
805 |
-
*
|
806 |
-
* @param string $notice Notice.
|
807 |
-
* @param string $field_label Field name.
|
808 |
-
* @return string
|
809 |
-
*/
|
810 |
-
public function change_field_label_in_required_notice( $notice, $field_label ) {
|
811 |
-
|
812 |
-
if ( _is_wcf_doing_optin_ajax() ) {
|
813 |
-
|
814 |
-
$notice = str_replace( 'Billing ', '', $notice );
|
815 |
-
}
|
816 |
-
|
817 |
-
return $notice;
|
818 |
-
}
|
819 |
-
}
|
820 |
-
|
821 |
-
/**
|
822 |
-
* Kicking this off by calling 'get_instance()' method
|
823 |
-
*/
|
824 |
-
Cartflows_Optin_Markup::get_instance();
|
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_Optin_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_optin_fields' ), 10, 2 );
|
41 |
+
|
42 |
+
/* Optin Shortcode */
|
43 |
+
add_shortcode( 'cartflows_optin', array( $this, 'optin_shortcode_markup' ) );
|
44 |
+
|
45 |
+
/* Preconfigured cart data */
|
46 |
+
add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
|
47 |
+
|
48 |
+
/* Optin shortcode data */
|
49 |
+
add_action( 'wp', array( $this, 'shortcode_load_data' ), 1000 );
|
50 |
+
|
51 |
+
/* Ajax Endpoint */
|
52 |
+
add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
|
53 |
+
add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
|
54 |
+
|
55 |
+
/* Optin Fields */
|
56 |
+
add_filter( 'woocommerce_default_address_fields', array( $this, 'set_optin_default_fields' ), 1000 );
|
57 |
+
|
58 |
+
/** It may required later
|
59 |
+
* add_filter( 'woocommerce_checkout_fields', array( $this, 'set_optin_fields' ) );
|
60 |
+
*/
|
61 |
+
add_filter( 'woocommerce_billing_fields', array( $this, 'billing_optin_fields' ), 1000, 2 );
|
62 |
+
|
63 |
+
add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'change_field_label_in_required_notice' ), 100, 2 );
|
64 |
+
|
65 |
+
add_action( 'init', array( $this, 'remove_woo_actions' ) );
|
66 |
+
|
67 |
+
$this->elementor_editor_compatibility();
|
68 |
+
|
69 |
+
$this->gutenberg_editor_compatibility();
|
70 |
+
|
71 |
+
$this->bb_editor_compatibility();
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Elementor editor compatibility.
|
76 |
+
*/
|
77 |
+
public function elementor_editor_compatibility() {
|
78 |
+
|
79 |
+
add_action(
|
80 |
+
'cartflows_elementor_editor_compatibility',
|
81 |
+
function( $post_id, $elementor_ajax ) {
|
82 |
+
|
83 |
+
add_action( 'cartflows_elementor_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
84 |
+
},
|
85 |
+
10,
|
86 |
+
2
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Beaver Builder editor compatibility.
|
92 |
+
*/
|
93 |
+
public function bb_editor_compatibility() {
|
94 |
+
|
95 |
+
add_action(
|
96 |
+
'cartflows_bb_editor_compatibility',
|
97 |
+
function( $post_id ) {
|
98 |
+
add_action( 'cartflows_bb_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
99 |
+
},
|
100 |
+
10,
|
101 |
+
1
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gutenburg editor compatibility.
|
107 |
+
*/
|
108 |
+
public function gutenberg_editor_compatibility() {
|
109 |
+
|
110 |
+
add_action( 'cartflows_gutenberg_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Remove login and registration actions.
|
115 |
+
*/
|
116 |
+
public function remove_woo_actions() {
|
117 |
+
|
118 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
119 |
+
|
120 |
+
if ( isset( $_POST['billing_email'] ) && ! empty( $_POST['billing_email'] ) ) { //phpcs:ignore
|
121 |
+
|
122 |
+
if ( email_exists( sanitize_email( wp_unslash( $_POST['billing_email'] ) ) ) ) { // phpcs:ignore
|
123 |
+
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
128 |
+
}
|
129 |
+
|
130 |
+
add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'filter_remove_woo_data' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Filter or remove woo data on update order review ajax call.
|
135 |
+
*
|
136 |
+
* @param string $post_data post data woo.
|
137 |
+
* @return void
|
138 |
+
*/
|
139 |
+
public function filter_remove_woo_data( $post_data ) {
|
140 |
+
|
141 |
+
if ( isset( $post_data['_wcf_optin_id'] ) ) {
|
142 |
+
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
143 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 1 );
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Change order button text .
|
149 |
+
*
|
150 |
+
* @param string $button_text place order.
|
151 |
+
* @return string
|
152 |
+
*/
|
153 |
+
public function place_order_button_text( $button_text ) {
|
154 |
+
|
155 |
+
$optin_id = get_the_ID();
|
156 |
+
|
157 |
+
if ( ! $optin_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] ) ) {
|
158 |
+
$optin_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] );
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( $optin_id ) {
|
162 |
+
|
163 |
+
$wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
|
164 |
+
|
165 |
+
if ( ! empty( $wcf_order_button_text ) ) {
|
166 |
+
$button_text = $wcf_order_button_text;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
return $button_text;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Display all WooCommerce notices.
|
175 |
+
*
|
176 |
+
* @since 1.1.5
|
177 |
+
*/
|
178 |
+
public function display_woo_notices() {
|
179 |
+
|
180 |
+
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
181 |
+
woocommerce_output_all_notices();
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Check for checkout flag
|
187 |
+
*
|
188 |
+
* @param bool $is_checkout is checkout.
|
189 |
+
*
|
190 |
+
* @return bool
|
191 |
+
*/
|
192 |
+
public function woo_checkout_flag( $is_checkout ) {
|
193 |
+
|
194 |
+
if ( ! is_admin() ) {
|
195 |
+
|
196 |
+
if ( _is_wcf_optin_type() ) {
|
197 |
+
|
198 |
+
$is_checkout = true;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
return $is_checkout;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Render checkout shortcode markup.
|
207 |
+
*
|
208 |
+
* @param array $atts attributes.
|
209 |
+
* @return string
|
210 |
+
*/
|
211 |
+
public function optin_shortcode_markup( $atts ) {
|
212 |
+
|
213 |
+
if ( ! function_exists( 'wc_print_notices' ) ) {
|
214 |
+
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
215 |
+
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
216 |
+
|
217 |
+
return $notice_out;
|
218 |
+
}
|
219 |
+
|
220 |
+
$atts = shortcode_atts(
|
221 |
+
array(
|
222 |
+
'id' => 0,
|
223 |
+
),
|
224 |
+
$atts
|
225 |
+
);
|
226 |
+
|
227 |
+
$optin_id = intval( $atts['id'] );
|
228 |
+
|
229 |
+
$show_optin_preview = false;
|
230 |
+
|
231 |
+
if ( is_admin() ) {
|
232 |
+
|
233 |
+
$show_optin_preview = apply_filters( 'cartflows_show_demo_optin_form', false );
|
234 |
+
|
235 |
+
if ( $show_optin_preview && 0 === $optin_id ) {
|
236 |
+
|
237 |
+
if( isset( $_POST['id'] ) ){ //phpcs:ignore
|
238 |
+
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( empty( $optin_id ) && ! is_admin() ) {
|
244 |
+
|
245 |
+
if ( ! _is_wcf_optin_type() && ! $show_optin_preview ) {
|
246 |
+
|
247 |
+
return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>';
|
248 |
+
}
|
249 |
+
|
250 |
+
global $post;
|
251 |
+
$optin_id = intval( $post->ID );
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
$output = '';
|
256 |
+
|
257 |
+
ob_start();
|
258 |
+
|
259 |
+
do_action( 'cartflows_optin_form_before', $optin_id );
|
260 |
+
|
261 |
+
$optin_layout = 'default';
|
262 |
+
|
263 |
+
$template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php';
|
264 |
+
|
265 |
+
include $template_default;
|
266 |
+
|
267 |
+
$output .= ob_get_clean();
|
268 |
+
|
269 |
+
return $output;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Configure Cart Data.
|
274 |
+
*
|
275 |
+
* @since 1.0.0
|
276 |
+
*
|
277 |
+
* @return void
|
278 |
+
*/
|
279 |
+
public function preconfigured_cart_data() {
|
280 |
+
|
281 |
+
if ( is_admin() ) {
|
282 |
+
return;
|
283 |
+
}
|
284 |
+
|
285 |
+
global $post;
|
286 |
+
|
287 |
+
if ( _is_wcf_optin_type() ) {
|
288 |
+
|
289 |
+
if ( wp_doing_ajax() ) {
|
290 |
+
return;
|
291 |
+
} else {
|
292 |
+
|
293 |
+
$optin_id = $post->ID;
|
294 |
+
|
295 |
+
do_action( 'cartflows_optin_before_configure_cart', $optin_id );
|
296 |
+
|
297 |
+
$products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
|
298 |
+
|
299 |
+
if ( ! is_array( $products ) ) {
|
300 |
+
return;
|
301 |
+
}
|
302 |
+
|
303 |
+
/* Empty the current cart */
|
304 |
+
WC()->cart->empty_cart();
|
305 |
+
|
306 |
+
if ( is_array( $products ) && count( $products ) < 1 ) {
|
307 |
+
wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
|
308 |
+
return;
|
309 |
+
}
|
310 |
+
|
311 |
+
/* Set customer session if not set */
|
312 |
+
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
313 |
+
WC()->session->set_customer_session_cookie( true );
|
314 |
+
}
|
315 |
+
|
316 |
+
$product_id = reset( $products );
|
317 |
+
$_product = wc_get_product( $product_id );
|
318 |
+
|
319 |
+
if ( ! empty( $_product ) ) {
|
320 |
+
|
321 |
+
if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) {
|
322 |
+
|
323 |
+
if ( $_product->get_price() > 0 ) {
|
324 |
+
wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' );
|
325 |
+
} else {
|
326 |
+
|
327 |
+
$quantity = 1;
|
328 |
+
|
329 |
+
WC()->cart->add_to_cart( $product_id, $quantity );
|
330 |
+
}
|
331 |
+
} else {
|
332 |
+
|
333 |
+
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
334 |
+
}
|
335 |
+
} else {
|
336 |
+
|
337 |
+
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
338 |
+
}
|
339 |
+
|
340 |
+
do_action( 'cartflows_optin_after_configure_cart', $optin_id );
|
341 |
+
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Load shortcode data.
|
347 |
+
*
|
348 |
+
* @return void
|
349 |
+
*/
|
350 |
+
public function shortcode_load_data() {
|
351 |
+
|
352 |
+
if ( _is_wcf_optin_type() ) {
|
353 |
+
|
354 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
355 |
+
|
356 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
357 |
+
|
358 |
+
$this->before_optin_shortcode_actions();
|
359 |
+
|
360 |
+
global $post;
|
361 |
+
|
362 |
+
$optin_id = $post->ID;
|
363 |
+
|
364 |
+
do_action( 'cartflows_optin_before_shortcode', $optin_id );
|
365 |
+
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Before option shortcode actions.
|
371 |
+
*/
|
372 |
+
public function before_optin_shortcode_actions() {
|
373 |
+
|
374 |
+
/* Show notices if cart has errors */
|
375 |
+
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
376 |
+
|
377 |
+
// Outputting the hidden field in checkout page.
|
378 |
+
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
379 |
+
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
380 |
+
|
381 |
+
/* Remove unnecessary option */
|
382 |
+
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
|
383 |
+
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
|
384 |
+
|
385 |
+
remove_all_actions( 'woocommerce_before_checkout_form' );
|
386 |
+
remove_all_actions( 'woocommerce_checkout_billing' );
|
387 |
+
remove_all_actions( 'woocommerce_checkout_shipping' );
|
388 |
+
remove_all_actions( 'woocommerce_checkout_before_order_review' );
|
389 |
+
remove_all_actions( 'woocommerce_checkout_order_review' );
|
390 |
+
remove_all_actions( 'woocommerce_checkout_after_order_review' );
|
391 |
+
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
|
392 |
+
add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) );
|
393 |
+
|
394 |
+
/* Paypal Expresss remove */
|
395 |
+
if ( function_exists( 'wc_gateway_ppec' ) ) {
|
396 |
+
remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) );
|
397 |
+
}
|
398 |
+
|
399 |
+
// Hook in actions once.
|
400 |
+
add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 );
|
401 |
+
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
402 |
+
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
403 |
+
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
|
404 |
+
|
405 |
+
/* Submit Button */
|
406 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
407 |
+
|
408 |
+
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
409 |
+
|
410 |
+
/* Remove login actions */
|
411 |
+
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
412 |
+
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Disable payment gateways.
|
417 |
+
*
|
418 |
+
* @param array $available_gateways gateways.
|
419 |
+
* @return array
|
420 |
+
*/
|
421 |
+
public function disable_payment_gateways( $available_gateways ) {
|
422 |
+
|
423 |
+
if ( ! is_admin() ) {
|
424 |
+
|
425 |
+
$available_gateways = array();
|
426 |
+
}
|
427 |
+
|
428 |
+
return $available_gateways;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Render checkout ID hidden field.
|
433 |
+
*
|
434 |
+
* @param array $checkout checkout session data.
|
435 |
+
* @return void
|
436 |
+
*/
|
437 |
+
public function checkout_shortcode_post_id( $checkout ) {
|
438 |
+
|
439 |
+
if ( ! _is_wcf_optin_type() ) {
|
440 |
+
return;
|
441 |
+
}
|
442 |
+
|
443 |
+
global $post;
|
444 |
+
|
445 |
+
$optin_id = $post->ID;
|
446 |
+
|
447 |
+
$flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true );
|
448 |
+
|
449 |
+
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
450 |
+
echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">';
|
451 |
+
}
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Load shortcode scripts.
|
455 |
+
*
|
456 |
+
* @return void
|
457 |
+
*/
|
458 |
+
public function shortcode_scripts() {
|
459 |
+
|
460 |
+
wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
|
461 |
+
|
462 |
+
wp_enqueue_script(
|
463 |
+
'wcf-optin-template',
|
464 |
+
wcf()->utils->get_js_url( 'optin-template' ),
|
465 |
+
array( 'jquery' ),
|
466 |
+
CARTFLOWS_VER,
|
467 |
+
true
|
468 |
+
);
|
469 |
+
|
470 |
+
do_action( 'cartflows_optin_scripts' );
|
471 |
+
|
472 |
+
$optin_dynamic_css = apply_filters( 'cartflows_optin_enable_dynamic_css', true );
|
473 |
+
|
474 |
+
if ( $optin_dynamic_css ) {
|
475 |
+
|
476 |
+
$style = $this->generate_style();
|
477 |
+
|
478 |
+
wp_add_inline_style( 'wcf-optin-template', $style );
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Load compatibility scripts.
|
484 |
+
*
|
485 |
+
* @return void
|
486 |
+
*/
|
487 |
+
public function compatibility_scripts() {
|
488 |
+
|
489 |
+
global $post;
|
490 |
+
|
491 |
+
$optin_id = $post->ID;
|
492 |
+
|
493 |
+
// Add DIVI Compatibility css if DIVI theme is enabled.
|
494 |
+
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
495 |
+
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id )
|
496 |
+
) {
|
497 |
+
wp_enqueue_style( 'wcf-optin-template-divi', wcf()->utils->get_css_url( 'optin-template-divi' ), '', CARTFLOWS_VER );
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Generate styles.
|
503 |
+
*
|
504 |
+
* @return string
|
505 |
+
*/
|
506 |
+
public function generate_style() {
|
507 |
+
|
508 |
+
global $post;
|
509 |
+
|
510 |
+
$optin_id = $post->ID;
|
511 |
+
|
512 |
+
/* Load all fonts */
|
513 |
+
CartFlows_Font_Families::render_fonts( $optin_id );
|
514 |
+
|
515 |
+
$r = '';
|
516 |
+
$g = '';
|
517 |
+
$b = '';
|
518 |
+
$output = '';
|
519 |
+
|
520 |
+
/* Global */
|
521 |
+
$primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' );
|
522 |
+
$base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' );
|
523 |
+
|
524 |
+
/* Input Fields */
|
525 |
+
$input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' );
|
526 |
+
$input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' );
|
527 |
+
$field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' );
|
528 |
+
$field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' );
|
529 |
+
$field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' );
|
530 |
+
$field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' );
|
531 |
+
$field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' );
|
532 |
+
$field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' );
|
533 |
+
$field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' );
|
534 |
+
|
535 |
+
if ( 'custom' == $field_input_size ) {
|
536 |
+
$field_input_size = '38px';
|
537 |
+
}
|
538 |
+
|
539 |
+
/* Submit Button */
|
540 |
+
$submit_button_width = '100%';
|
541 |
+
$optin_button_position = '';
|
542 |
+
$button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' );
|
543 |
+
$button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' );
|
544 |
+
$button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' );
|
545 |
+
$submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' );
|
546 |
+
$submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' );
|
547 |
+
$submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' );
|
548 |
+
$submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' );
|
549 |
+
$submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' );
|
550 |
+
$submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' );
|
551 |
+
$submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color );
|
552 |
+
$submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color );
|
553 |
+
$submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color );
|
554 |
+
$submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color );
|
555 |
+
|
556 |
+
if ( 'custom' == $submit_button_height ) {
|
557 |
+
$submit_button_height = '38px';
|
558 |
+
$submit_button_width = 'auto';
|
559 |
+
|
560 |
+
switch ( $submit_button_position ) {
|
561 |
+
case 'left':
|
562 |
+
$optin_button_position = '0 auto 0 0';
|
563 |
+
break;
|
564 |
+
case 'center':
|
565 |
+
$optin_button_position = '0 auto';
|
566 |
+
break;
|
567 |
+
case 'right':
|
568 |
+
$optin_button_position = '0 0 0 auto';
|
569 |
+
break;
|
570 |
+
|
571 |
+
default:
|
572 |
+
$optin_button_position = '0 auto';
|
573 |
+
break;
|
574 |
+
}
|
575 |
+
}
|
576 |
+
|
577 |
+
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
578 |
+
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) {
|
579 |
+
|
580 |
+
include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-divi-css.php';
|
581 |
+
|
582 |
+
} else {
|
583 |
+
include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-css.php';
|
584 |
+
}
|
585 |
+
|
586 |
+
return $output;
|
587 |
+
}
|
588 |
+
|
589 |
+
/**
|
590 |
+
* Get ajax end points.
|
591 |
+
*
|
592 |
+
* @param string $endpoint_url end point URL.
|
593 |
+
* @param string $request end point request.
|
594 |
+
* @return string
|
595 |
+
*/
|
596 |
+
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
597 |
+
|
598 |
+
global $post;
|
599 |
+
|
600 |
+
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
601 |
+
|
602 |
+
if ( _is_wcf_optin_type() ) {
|
603 |
+
|
604 |
+
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
605 |
+
|
606 |
+
if ( '' === $request ) {
|
607 |
+
$query_args = array(
|
608 |
+
'wc-ajax' => '%%endpoint%%',
|
609 |
+
);
|
610 |
+
} else {
|
611 |
+
$query_args = array(
|
612 |
+
'wc-ajax' => $request,
|
613 |
+
);
|
614 |
+
}
|
615 |
+
|
616 |
+
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
617 |
+
$uri = $uri[0];
|
618 |
+
|
619 |
+
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
620 |
+
}
|
621 |
+
}
|
622 |
+
}
|
623 |
+
|
624 |
+
return $endpoint_url;
|
625 |
+
}
|
626 |
+
|
627 |
+
|
628 |
+
/**
|
629 |
+
* Save checkout fields.
|
630 |
+
*
|
631 |
+
* @param int $order_id order id.
|
632 |
+
* @param array $posted posted data.
|
633 |
+
* @return void
|
634 |
+
*/
|
635 |
+
public function save_optin_fields( $order_id, $posted ) {
|
636 |
+
|
637 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
638 |
+
|
639 |
+
$optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore
|
640 |
+
|
641 |
+
update_post_meta( $order_id, '_wcf_optin_id', $optin_id );
|
642 |
+
|
643 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
644 |
+
|
645 |
+
$flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
646 |
+
|
647 |
+
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
+
}
|
652 |
+
|
653 |
+
/**
|
654 |
+
* Redirect users to our checkout if hidden param
|
655 |
+
*
|
656 |
+
* @param string $redirect redirect url.
|
657 |
+
* @param object $user user.
|
658 |
+
* @return string
|
659 |
+
*/
|
660 |
+
public function after_login_redirect( $redirect, $user ) {
|
661 |
+
|
662 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
663 |
+
|
664 |
+
$optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore
|
665 |
+
|
666 |
+
$redirect = get_permalink( $optin_id );
|
667 |
+
}
|
668 |
+
|
669 |
+
return $redirect;
|
670 |
+
}
|
671 |
+
|
672 |
+
|
673 |
+
/**
|
674 |
+
* Add custom class to the fields to change the UI to three column.
|
675 |
+
*
|
676 |
+
* @param array $fields fields.
|
677 |
+
*/
|
678 |
+
public function set_optin_default_fields( $fields ) {
|
679 |
+
|
680 |
+
if ( _is_wcf_optin_type() ) {
|
681 |
+
|
682 |
+
global $post;
|
683 |
+
|
684 |
+
$optin_id = $post->ID;
|
685 |
+
} else {
|
686 |
+
|
687 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
688 |
+
|
689 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
690 |
+
} else {
|
691 |
+
return $fields;
|
692 |
+
}
|
693 |
+
}
|
694 |
+
|
695 |
+
$first_name = $fields['first_name'];
|
696 |
+
$last_name = $fields['last_name'];
|
697 |
+
|
698 |
+
/* Make fields required */
|
699 |
+
$first_name['required'] = true;
|
700 |
+
$last_name['required'] = true;
|
701 |
+
|
702 |
+
$fields = array(
|
703 |
+
'first_name' => $first_name,
|
704 |
+
'last_name' => $last_name,
|
705 |
+
);
|
706 |
+
|
707 |
+
return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id );
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Add custom class to the fields to change the UI to three column.
|
712 |
+
*
|
713 |
+
* @param array $fields fields.
|
714 |
+
*/
|
715 |
+
public function set_optin_fields( $fields ) {
|
716 |
+
|
717 |
+
if ( _is_wcf_optin_type() ) {
|
718 |
+
|
719 |
+
global $post;
|
720 |
+
|
721 |
+
$optin_id = $post->ID;
|
722 |
+
} else {
|
723 |
+
|
724 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
725 |
+
|
726 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
727 |
+
} else {
|
728 |
+
return $fields;
|
729 |
+
}
|
730 |
+
}
|
731 |
+
|
732 |
+
$billing_first_name = $fields['billing']['billing_first_name'];
|
733 |
+
$billing_last_name = $fields['billing']['billing_last_name'];
|
734 |
+
$billing_email = $fields['billing']['billing_email'];
|
735 |
+
|
736 |
+
$fields['billing'] = array(
|
737 |
+
'billing_first_name' => $billing_first_name,
|
738 |
+
'billing_last_name' => $billing_last_name,
|
739 |
+
'billing_email' => $billing_email,
|
740 |
+
);
|
741 |
+
|
742 |
+
return apply_filters( 'cartflows_optin_fields', $fields, $optin_id );
|
743 |
+
}
|
744 |
+
|
745 |
+
/**
|
746 |
+
* Billing field customization.
|
747 |
+
*
|
748 |
+
* @param array $fields fields data.
|
749 |
+
* @param string $country country name.
|
750 |
+
* @return array
|
751 |
+
*/
|
752 |
+
public function billing_optin_fields( $fields, $country ) {
|
753 |
+
|
754 |
+
$show_optin_preview = false;
|
755 |
+
|
756 |
+
if ( is_admin() ) {
|
757 |
+
$show_optin_preview = apply_filters( 'cartflows_show_demo_optin_form', false );
|
758 |
+
}
|
759 |
+
|
760 |
+
if ( _is_wcf_optin_type() || $show_optin_preview ) {
|
761 |
+
|
762 |
+
global $post;
|
763 |
+
|
764 |
+
if ( $post ) {
|
765 |
+
$optin_id = $post->ID;
|
766 |
+
} else {
|
767 |
+
|
768 |
+
if( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore
|
769 |
+
$optin_id = intval( $_POST['id'] ); //phpcs:ignore
|
770 |
+
}
|
771 |
+
}
|
772 |
+
} else {
|
773 |
+
|
774 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
775 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
776 |
+
} else {
|
777 |
+
return $fields;
|
778 |
+
}
|
779 |
+
}
|
780 |
+
|
781 |
+
if ( is_wc_endpoint_url( 'edit-address' ) ) {
|
782 |
+
return $fields;
|
783 |
+
}
|
784 |
+
|
785 |
+
$billing_first_name = $fields['billing_first_name'];
|
786 |
+
$billing_last_name = $fields['billing_last_name'];
|
787 |
+
$billing_email = $fields['billing_email'];
|
788 |
+
|
789 |
+
/* Make fields required */
|
790 |
+
$billing_first_name['required'] = true;
|
791 |
+
$billing_last_name['required'] = true;
|
792 |
+
|
793 |
+
$fields = array(
|
794 |
+
'billing_first_name' => $billing_first_name,
|
795 |
+
'billing_last_name' => $billing_last_name,
|
796 |
+
'billing_email' => $billing_email,
|
797 |
+
);
|
798 |
+
|
799 |
+
return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id );
|
800 |
+
}
|
801 |
+
|
802 |
+
|
803 |
+
/**
|
804 |
+
* Replace billing label.
|
805 |
+
*
|
806 |
+
* @param string $notice Notice.
|
807 |
+
* @param string $field_label Field name.
|
808 |
+
* @return string
|
809 |
+
*/
|
810 |
+
public function change_field_label_in_required_notice( $notice, $field_label ) {
|
811 |
+
|
812 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
813 |
+
|
814 |
+
$notice = str_replace( 'Billing ', '', $notice );
|
815 |
+
}
|
816 |
+
|
817 |
+
return $notice;
|
818 |
+
}
|
819 |
+
}
|
820 |
+
|
821 |
+
/**
|
822 |
+
* Kicking this off by calling 'get_instance()' method
|
823 |
+
*/
|
824 |
+
Cartflows_Optin_Markup::get_instance();
|
modules/thankyou/classes/class-cartflows-thankyou-markup.php
CHANGED
@@ -1,336 +1,336 @@
|
|
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 |
-
/**
|
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 |
-
/* Downsell Shortcode */
|
39 |
-
add_shortcode( 'cartflows_order_details', array( $this, 'cartflows_order_details_shortcode_markup' ) );
|
40 |
-
|
41 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'thank_you_scripts' ), 21 );
|
42 |
-
|
43 |
-
add_action( 'woocommerce_is_order_received_page', array( $this, 'set_order_received_page' ) );
|
44 |
-
|
45 |
-
/* Set is checkout flag */
|
46 |
-
add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
|
47 |
-
|
48 |
-
/* Custom redirection of thank you page */
|
49 |
-
add_action( 'template_redirect', array( $this, 'redirect_tq_page_to_custom_url' ) );
|
50 |
-
|
51 |
-
add_action( 'cartflows_thank_you_scripts', array( $this, 'add_divi_compatibility_css' ) );
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Redirect to custom url instead of thank you page.
|
56 |
-
*/
|
57 |
-
public function redirect_tq_page_to_custom_url() {
|
58 |
-
global $post;
|
59 |
-
|
60 |
-
if ( _is_wcf_thankyou_type() ) {
|
61 |
-
|
62 |
-
$thank_you_id = $post->ID;
|
63 |
-
$enable_redirection = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-tq-redirect-section' );
|
64 |
-
$redirect_link = wp_http_validate_url( wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-redirect-link' ) );
|
65 |
-
|
66 |
-
if ( 'yes' === $enable_redirection && ! empty( $redirect_link ) ) {
|
67 |
-
exit( wp_redirect( $redirect_link ) ); //phpcs:ignore
|
68 |
-
}
|
69 |
-
}
|
70 |
-
}
|
71 |
-
/**
|
72 |
-
* Order shortcode markup
|
73 |
-
*
|
74 |
-
* @param array $atts attributes.
|
75 |
-
* @since 1.0.0
|
76 |
-
*/
|
77 |
-
public function cartflows_order_details_shortcode_markup( $atts ) {
|
78 |
-
|
79 |
-
$output = '';
|
80 |
-
|
81 |
-
$show_demo_order = false;
|
82 |
-
|
83 |
-
// Allow to execute the order detais shortcode for modules.
|
84 |
-
if ( is_admin() ) {
|
85 |
-
$show_demo_order = apply_filters( 'cartflows_show_demo_order_details', false );
|
86 |
-
}
|
87 |
-
|
88 |
-
if ( _is_wcf_thankyou_type() || $show_demo_order ) {
|
89 |
-
/* Remove order item link */
|
90 |
-
add_filter( 'woocommerce_order_item_permalink', '__return_false' );
|
91 |
-
|
92 |
-
/* Change order text */
|
93 |
-
add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'custom_tq_text' ), 10, 2 );
|
94 |
-
|
95 |
-
if ( ! function_exists( 'wc_print_notices' ) ) {
|
96 |
-
|
97 |
-
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
98 |
-
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
99 |
-
|
100 |
-
return $notice_out;
|
101 |
-
}
|
102 |
-
|
103 |
-
$order = false;
|
104 |
-
|
105 |
-
$id_param = 'wcf-order';
|
106 |
-
$key_param = 'wcf-key';
|
107 |
-
|
108 |
-
if ( isset( $_GET['wcf-opt-order'] ) ) { //phpcs:ignore
|
109 |
-
$id_param = 'wcf-opt-order';
|
110 |
-
$key_param = 'wcf-opt-key';
|
111 |
-
}
|
112 |
-
|
113 |
-
if ( ! isset( $_GET[ $id_param ] ) && ( wcf()->flow->is_flow_testmode() || $show_demo_order ) ) { //phpcs:ignore
|
114 |
-
$args = array(
|
115 |
-
'limit' => 1,
|
116 |
-
'order' => 'DESC',
|
117 |
-
'post_type' => 'shop_order',
|
118 |
-
'status' => array( 'completed', 'processing' ),
|
119 |
-
);
|
120 |
-
|
121 |
-
$latest_order = wc_get_orders( $args );
|
122 |
-
|
123 |
-
$order_id = ( ! empty( $latest_order ) ) ? current( $latest_order )->get_id() : 0;
|
124 |
-
|
125 |
-
if ( $order_id > 0 ) {
|
126 |
-
$order = wc_get_order( $order_id );
|
127 |
-
|
128 |
-
if ( ! $order ) {
|
129 |
-
$order = false;
|
130 |
-
}
|
131 |
-
} else {
|
132 |
-
return '<p class="woocommerce-notice">' . __( 'No completed or processing order found to show the order details form demo.', 'cartflows' ) . '</p>';
|
133 |
-
}
|
134 |
-
} else {
|
135 |
-
if ( ! isset( $_GET[ $id_param ] ) ) { //phpcs:ignore
|
136 |
-
return '<p class="woocommerce-notice">' . __( 'Order not found. You cannot access this page directly.', 'cartflows' ) . '</p>';
|
137 |
-
}
|
138 |
-
|
139 |
-
// Get the order.
|
140 |
-
$order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET[ $id_param ] ) ? 0 : intval( $_GET[ $id_param ] ) ); //phpcs:ignore
|
141 |
-
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET[ $key_param ] ) ? '' : wc_clean( wp_unslash( $_GET[ $key_param ] ) ) ); //phpcs:ignore
|
142 |
-
|
143 |
-
if ( $order_id > 0 ) {
|
144 |
-
$order = wc_get_order( $order_id );
|
145 |
-
|
146 |
-
if ( ! $order || $order->get_order_key() !== $order_key ) {
|
147 |
-
$order = false;
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
// Empty awaiting payment session.
|
153 |
-
unset( WC()->session->order_awaiting_payment );
|
154 |
-
|
155 |
-
if ( null !== WC()->session ) {
|
156 |
-
if ( ! isset( WC()->cart ) || '' === WC()->cart ) {
|
157 |
-
WC()->cart = new WC_Cart();
|
158 |
-
}
|
159 |
-
|
160 |
-
if ( ! WC()->cart->is_empty() ) {
|
161 |
-
// wc_empty_cart();
|
162 |
-
// Empty current cart.
|
163 |
-
WC()->cart->empty_cart( true );
|
164 |
-
|
165 |
-
wc_clear_notices();
|
166 |
-
}
|
167 |
-
|
168 |
-
wc_print_notices();
|
169 |
-
}
|
170 |
-
|
171 |
-
do_action( 'cartflows_thankyou_details_before', $order );
|
172 |
-
|
173 |
-
ob_start();
|
174 |
-
echo "<div class='wcf-thankyou-wrap' id='wcf-thankyou-wrap'>";
|
175 |
-
wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) );
|
176 |
-
echo '</div>';
|
177 |
-
$output = ob_get_clean();
|
178 |
-
}
|
179 |
-
|
180 |
-
return $output;
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Load Thank You scripts.
|
185 |
-
*
|
186 |
-
* @return void
|
187 |
-
*/
|
188 |
-
public function thank_you_scripts() {
|
189 |
-
|
190 |
-
if ( _is_wcf_thankyou_type() ) {
|
191 |
-
|
192 |
-
do_action( 'cartflows_thank_you_scripts' );
|
193 |
-
|
194 |
-
$thank_you_dynamic_css = apply_filters( 'cartflows_thank_you_enable_dynamic_css', true );
|
195 |
-
|
196 |
-
if ( $thank_you_dynamic_css ) {
|
197 |
-
|
198 |
-
$style = $this->generate_thank_you_style();
|
199 |
-
|
200 |
-
wp_add_inline_style( 'wcf-frontend-global', $style );
|
201 |
-
|
202 |
-
}
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Load DIVI compatibility Thank You style.
|
208 |
-
*
|
209 |
-
* @return void
|
210 |
-
*/
|
211 |
-
public function add_divi_compatibility_css() {
|
212 |
-
|
213 |
-
global $post;
|
214 |
-
|
215 |
-
$thank_you_id = $post->ID;
|
216 |
-
|
217 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
218 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id )
|
219 |
-
) {
|
220 |
-
wp_enqueue_style( 'wcf-frontend-global-divi', wcf()->utils->get_css_url( 'frontend-divi' ), array(), CARTFLOWS_VER );
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Set thank you as a order received page.
|
226 |
-
*
|
227 |
-
* @param boolean $is_order_page order page.
|
228 |
-
* @return boolean
|
229 |
-
*/
|
230 |
-
public function set_order_received_page( $is_order_page ) {
|
231 |
-
|
232 |
-
if ( _is_wcf_thankyou_type() ) {
|
233 |
-
$is_order_page = true;
|
234 |
-
}
|
235 |
-
|
236 |
-
return $is_order_page;
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* Generate Thank You Styles.
|
241 |
-
*
|
242 |
-
* @return string
|
243 |
-
*/
|
244 |
-
public function generate_thank_you_style() {
|
245 |
-
|
246 |
-
global $post;
|
247 |
-
|
248 |
-
if ( _is_wcf_thankyou_type() ) {
|
249 |
-
$thank_you_id = $post->ID;
|
250 |
-
} else {
|
251 |
-
$thank_you_id = _get_wcf_thankyou_id( $post->post_content );
|
252 |
-
}
|
253 |
-
|
254 |
-
CartFlows_Font_Families::render_fonts( $thank_you_id );
|
255 |
-
|
256 |
-
$text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
|
257 |
-
$text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
|
258 |
-
$text_font_size = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-size' );
|
259 |
-
$heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
|
260 |
-
$heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
|
261 |
-
$heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
|
262 |
-
$container_width = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-container-width' );
|
263 |
-
$section_bg_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-section-bg-color' );
|
264 |
-
|
265 |
-
$show_order_review = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-overview-section' );
|
266 |
-
|
267 |
-
$show_order_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-details-section' );
|
268 |
-
|
269 |
-
$show_billing_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-billing-section' );
|
270 |
-
|
271 |
-
$show_shipping_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-shipping-section' );
|
272 |
-
|
273 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
274 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id ) ) {
|
275 |
-
|
276 |
-
include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-divi-css.php';
|
277 |
-
|
278 |
-
} else {
|
279 |
-
include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-css.php';
|
280 |
-
}
|
281 |
-
|
282 |
-
return $output;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Set as a checkout page if it is thank you page.
|
287 |
-
* Thank you page need to be set as a checkout page.
|
288 |
-
* Becauye ayment gateways will not load if it is not checkout.
|
289 |
-
*
|
290 |
-
* @param bool $is_checkout is checkout.
|
291 |
-
*
|
292 |
-
* @return bool
|
293 |
-
*/
|
294 |
-
public function woo_checkout_flag( $is_checkout ) {
|
295 |
-
|
296 |
-
if ( ! is_admin() ) {
|
297 |
-
if ( _is_wcf_thankyou_type() ) {
|
298 |
-
$is_checkout = true;
|
299 |
-
}
|
300 |
-
}
|
301 |
-
|
302 |
-
return $is_checkout;
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Add custom text on thank you page.
|
307 |
-
*
|
308 |
-
* @param string $woo_text Default text.
|
309 |
-
* @param int $order order.
|
310 |
-
*/
|
311 |
-
public function custom_tq_text( $woo_text, $order ) {
|
312 |
-
|
313 |
-
global $post;
|
314 |
-
|
315 |
-
if ( $post ) {
|
316 |
-
$thank_you_id = $post->ID;
|
317 |
-
} else {
|
318 |
-
if( is_admin() && isset( $_POST['id'] ) ){ //phpcs:ignore
|
319 |
-
$thank_you_id = intval( $_POST['id'] ); //phpcs:ignore
|
320 |
-
}
|
321 |
-
}
|
322 |
-
|
323 |
-
$new_text = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text' );
|
324 |
-
|
325 |
-
if ( ! empty( $new_text ) ) {
|
326 |
-
$woo_text = do_shortcode( $new_text );
|
327 |
-
}
|
328 |
-
|
329 |
-
return $woo_text;
|
330 |
-
}
|
331 |
-
}
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Kicking this off by calling 'get_instance()' method
|
335 |
-
*/
|
336 |
-
Cartflows_Thankyou_Markup::get_instance();
|
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 |
+
/**
|
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 |
+
/* Downsell Shortcode */
|
39 |
+
add_shortcode( 'cartflows_order_details', array( $this, 'cartflows_order_details_shortcode_markup' ) );
|
40 |
+
|
41 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'thank_you_scripts' ), 21 );
|
42 |
+
|
43 |
+
add_action( 'woocommerce_is_order_received_page', array( $this, 'set_order_received_page' ) );
|
44 |
+
|
45 |
+
/* Set is checkout flag */
|
46 |
+
add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
|
47 |
+
|
48 |
+
/* Custom redirection of thank you page */
|
49 |
+
add_action( 'template_redirect', array( $this, 'redirect_tq_page_to_custom_url' ) );
|
50 |
+
|
51 |
+
add_action( 'cartflows_thank_you_scripts', array( $this, 'add_divi_compatibility_css' ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Redirect to custom url instead of thank you page.
|
56 |
+
*/
|
57 |
+
public function redirect_tq_page_to_custom_url() {
|
58 |
+
global $post;
|
59 |
+
|
60 |
+
if ( _is_wcf_thankyou_type() ) {
|
61 |
+
|
62 |
+
$thank_you_id = $post->ID;
|
63 |
+
$enable_redirection = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-tq-redirect-section' );
|
64 |
+
$redirect_link = wp_http_validate_url( wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-redirect-link' ) );
|
65 |
+
|
66 |
+
if ( 'yes' === $enable_redirection && ! empty( $redirect_link ) ) {
|
67 |
+
exit( wp_redirect( $redirect_link ) ); //phpcs:ignore
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
/**
|
72 |
+
* Order shortcode markup
|
73 |
+
*
|
74 |
+
* @param array $atts attributes.
|
75 |
+
* @since 1.0.0
|
76 |
+
*/
|
77 |
+
public function cartflows_order_details_shortcode_markup( $atts ) {
|
78 |
+
|
79 |
+
$output = '';
|
80 |
+
|
81 |
+
$show_demo_order = false;
|
82 |
+
|
83 |
+
// Allow to execute the order detais shortcode for modules.
|
84 |
+
if ( is_admin() ) {
|
85 |
+
$show_demo_order = apply_filters( 'cartflows_show_demo_order_details', false );
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( _is_wcf_thankyou_type() || $show_demo_order ) {
|
89 |
+
/* Remove order item link */
|
90 |
+
add_filter( 'woocommerce_order_item_permalink', '__return_false' );
|
91 |
+
|
92 |
+
/* Change order text */
|
93 |
+
add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'custom_tq_text' ), 10, 2 );
|
94 |
+
|
95 |
+
if ( ! function_exists( 'wc_print_notices' ) ) {
|
96 |
+
|
97 |
+
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
98 |
+
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
99 |
+
|
100 |
+
return $notice_out;
|
101 |
+
}
|
102 |
+
|
103 |
+
$order = false;
|
104 |
+
|
105 |
+
$id_param = 'wcf-order';
|
106 |
+
$key_param = 'wcf-key';
|
107 |
+
|
108 |
+
if ( isset( $_GET['wcf-opt-order'] ) ) { //phpcs:ignore
|
109 |
+
$id_param = 'wcf-opt-order';
|
110 |
+
$key_param = 'wcf-opt-key';
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( ! isset( $_GET[ $id_param ] ) && ( wcf()->flow->is_flow_testmode() || $show_demo_order ) ) { //phpcs:ignore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|