Version Description
Download this release
Release Info
Developer | sandesh055 |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 1.4.0
- admin/assets/css/global-admin-rtl.css +1 -0
- admin/assets/css/global-admin.css +1 -0
- admin/assets/js/global-admin.js +158 -19
- admin/meta-assets/js/admin-edit.js +1 -191
- assets/css/checkout-template-divi-rtl.css +2 -53
- assets/css/checkout-template-divi.css +2 -53
- assets/css/checkout-template-rtl.css +3 -6
- assets/css/checkout-template.css +3 -6
- assets/css/import-rtl.css +3 -2
- assets/css/import.css +3 -2
- assets/css/optin-template-rtl.css +757 -0
- assets/css/optin-template.css +757 -0
- assets/js/import.js +11 -6
- assets/js/optin-template.js +125 -0
- assets/min-css/checkout-template-divi-rtl.min.css +1 -1
- assets/min-css/checkout-template-divi.min.css +1 -1
- assets/min-css/checkout-template-rtl.min.css +1 -1
- assets/min-css/checkout-template.min.css +1 -1
- assets/min-css/import-rtl.min.css +1 -1
- assets/min-css/import.min.css +1 -1
- assets/min-css/optin-template-rtl.min.css +1 -0
- assets/min-css/optin-template.min.css +1 -0
- assets/min-js/import.min.js +1 -1
- assets/min-js/optin-template.min.js +1 -0
- cartflows.php +2 -2
- changelog.txt +5 -0
- classes/class-cartflows-admin.php +620 -620
- classes/class-cartflows-compatibility.php +410 -410
- classes/class-cartflows-default-meta.php +209 -264
- classes/class-cartflows-elementor-compatibility.php +100 -66
- classes/class-cartflows-flow-frontend.php +247 -206
- classes/class-cartflows-frontend.php +107 -13
- classes/class-cartflows-functions.php +76 -0
- classes/class-cartflows-importer.php +7 -0
- classes/class-cartflows-loader.php +4 -22
- classes/class-cartflows-meta-fields.php +816 -1491
- classes/class-cartflows-metabox.php +97 -97
- classes/class-cartflows-utils.php +30 -0
- classes/class-cartflows-wizard.php +679 -679
- includes/admin/cartflows-admin.php +35 -35
- includes/admin/cartflows-general.php +370 -370
- languages/cartflows.pot +324 -204
- modules/checkout/classes/class-cartflows-checkout-markup.php +1300 -1300
- modules/checkout/classes/class-cartflows-checkout-meta.php +915 -881
- modules/flow/classes/class-cartflows-flow-post-type.php +383 -383
- modules/flow/classes/class-cartflows-permalink.php +159 -159
- modules/flow/classes/class-cartflows-step-post-type.php +7 -0
- modules/flow/view/meta-flow-steps.php +1 -0
- modules/optin/class-cartflows-optin.php +47 -0
- modules/optin/classes/class-cartflows-optin-markup.php +802 -0
- modules/optin/classes/class-cartflows-optin-meta.php +672 -0
- modules/optin/templates/optin-template-simple.php +33 -0
- modules/thankyou/classes/class-cartflows-thankyou-markup.php +18 -6
- modules/thankyou/classes/class-cartflows-thankyou-meta.php +8 -0
- readme.txt +6 -1
admin/assets/css/global-admin-rtl.css
CHANGED
@@ -572,6 +572,7 @@ input[type="text"].error:focus{
|
|
572 |
#wcf-checkout-settings .inside,
|
573 |
#wcf-offer-settings .inside,
|
574 |
#wcf-upsell-settings .inside,
|
|
|
575 |
#wcf-thankyou-settings .inside{
|
576 |
margin:0px;
|
577 |
padding: 0px;
|
572 |
#wcf-checkout-settings .inside,
|
573 |
#wcf-offer-settings .inside,
|
574 |
#wcf-upsell-settings .inside,
|
575 |
+
#wcf-optin-settings .inside,
|
576 |
#wcf-thankyou-settings .inside{
|
577 |
margin:0px;
|
578 |
padding: 0px;
|
admin/assets/css/global-admin.css
CHANGED
@@ -572,6 +572,7 @@ input[type="text"].error:focus{
|
|
572 |
#wcf-checkout-settings .inside,
|
573 |
#wcf-offer-settings .inside,
|
574 |
#wcf-upsell-settings .inside,
|
|
|
575 |
#wcf-thankyou-settings .inside{
|
576 |
margin:0px;
|
577 |
padding: 0px;
|
572 |
#wcf-checkout-settings .inside,
|
573 |
#wcf-offer-settings .inside,
|
574 |
#wcf-upsell-settings .inside,
|
575 |
+
#wcf-optin-settings .inside,
|
576 |
#wcf-thankyou-settings .inside{
|
577 |
margin:0px;
|
578 |
padding: 0px;
|
admin/assets/js/global-admin.js
CHANGED
@@ -6,9 +6,56 @@
|
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
/* Show Hide Custom Options for input types */
|
11 |
-
var
|
12 |
var default_value = $('.field-wcf-input-field-size select').val();
|
13 |
|
14 |
if( 'custom' == default_value ){
|
@@ -40,23 +87,68 @@
|
|
40 |
}
|
41 |
|
42 |
/* Show Hide Custom Options for Buttons */
|
43 |
-
var
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
if( 'custom' == default_value ){
|
47 |
-
|
48 |
-
|
49 |
}else{
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$('.field-wcf-submit-tb-padding').hide();
|
54 |
-
$('.field-wcf-submit-lr-padding').hide();
|
55 |
}
|
56 |
|
57 |
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
e.preventDefault();
|
62 |
|
@@ -64,16 +156,18 @@
|
|
64 |
selected_value = $this.val();
|
65 |
|
66 |
if(selected_value == 'custom' ){
|
67 |
-
|
68 |
-
|
|
|
69 |
}else{
|
70 |
-
|
71 |
-
|
|
|
72 |
}
|
73 |
});
|
74 |
}
|
75 |
|
76 |
-
function
|
77 |
// Prevent inputs in meta box headings opening/closing contents.
|
78 |
$( '#wcf-checkout-settings' ).find( '.hndle' ).unbind( 'click.postboxes' );
|
79 |
|
@@ -152,18 +246,63 @@
|
|
152 |
});
|
153 |
}
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
$( document ).ready(function() {
|
|
|
|
|
|
|
156 |
//alert("Before Stattement");
|
157 |
$( '#field-wcf-shortcode' ).appendTo( '#wcf-checkout-settings .hndle span' );
|
158 |
$( '#field-wcf-shortcode' ).css( "display", "inline" );
|
159 |
//alert("After Stattement");
|
160 |
|
161 |
-
|
|
|
|
|
|
|
162 |
|
163 |
-
|
164 |
|
165 |
-
|
|
|
|
|
166 |
|
|
|
167 |
add_tool_tip_msg();
|
168 |
|
169 |
highlight_the_metabox();
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
9 |
+
/* Toogle fields logic for all fields */
|
10 |
+
var wcf_toggle_fields_general_logic = function() {
|
11 |
+
|
12 |
+
var fields = $('[toggle]');
|
13 |
+
|
14 |
+
if ( fields.length < 1 ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
fields.each(function( i ) {
|
19 |
+
console.log( $(this) );
|
20 |
+
});
|
21 |
+
|
22 |
+
// if( 'custom' == default_value ){
|
23 |
+
// $('.field-wcf-field-tb-padding').show();
|
24 |
+
// $('.field-wcf-field-lr-padding').show();
|
25 |
+
// }else{
|
26 |
+
// $('.field-wcf-field-tb-padding .wcf-field-row-content input[type="number"]').val('');
|
27 |
+
// $('.field-wcf-field-lr-padding .wcf-field-row-content input[type="number"]').val('');
|
28 |
+
|
29 |
+
// $('.field-wcf-field-tb-padding').hide();
|
30 |
+
// $('.field-wcf-field-lr-padding').hide();
|
31 |
+
// }
|
32 |
+
|
33 |
+
$('.wcf-field-row input[type=checkbox]').on('change', function(e) {
|
34 |
+
|
35 |
+
e.preventDefault();
|
36 |
+
|
37 |
+
var $this = $(this),
|
38 |
+
toggle_data = $this.attr('toggle');
|
39 |
+
|
40 |
+
console.log( toggle_data );
|
41 |
+
console.log( $(this).is(':checked') );
|
42 |
+
|
43 |
+
// if(selected_value == 'custom' ){
|
44 |
+
// $('.field-wcf-field-tb-padding').show();
|
45 |
+
// $('.field-wcf-field-lr-padding').show();
|
46 |
+
// }else{
|
47 |
+
// $('.field-wcf-field-tb-padding').hide();
|
48 |
+
// $('.field-wcf-field-lr-padding').hide();
|
49 |
+
// }
|
50 |
+
});
|
51 |
+
|
52 |
+
var hide_show_fields = function() {
|
53 |
+
// body...
|
54 |
+
}
|
55 |
+
}
|
56 |
|
57 |
/* Show Hide Custom Options for input types */
|
58 |
+
var wcf_checkout_show_field_custom_options = function() {
|
59 |
var default_value = $('.field-wcf-input-field-size select').val();
|
60 |
|
61 |
if( 'custom' == default_value ){
|
87 |
}
|
88 |
|
89 |
/* Show Hide Custom Options for Buttons */
|
90 |
+
var wcf_checkout_show_button_custom_options = function() {
|
91 |
+
|
92 |
+
var wrapper = $('.wcf-checkout-table');
|
93 |
+
|
94 |
+
if ( wrapper.length < 1 ) {
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
+
var default_value = wrapper.find('.field-wcf-input-button-size select').val();
|
99 |
|
100 |
if( 'custom' == default_value ){
|
101 |
+
wrapper.find('.field-wcf-submit-tb-padding').show();
|
102 |
+
wrapper.find('.field-wcf-submit-lr-padding').show();
|
103 |
}else{
|
104 |
+
wrapper.find('.field-wcf-submit-tb-padding').hide();
|
105 |
+
wrapper.find('.field-wcf-submit-lr-padding').hide();
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
|
109 |
|
110 |
+
wrapper.find('.field-wcf-input-button-size select').on('change', function(e) {
|
111 |
+
|
112 |
+
e.preventDefault();
|
113 |
+
|
114 |
+
var $this = $(this),
|
115 |
+
selected_value = $this.val();
|
116 |
+
|
117 |
+
if(selected_value == 'custom' ){
|
118 |
+
wrapper.find('.field-wcf-submit-tb-padding').show();
|
119 |
+
wrapper.find('.field-wcf-submit-lr-padding').show();
|
120 |
+
}else{
|
121 |
+
wrapper.find('.field-wcf-submit-tb-padding').hide();
|
122 |
+
wrapper.find('.field-wcf-submit-lr-padding').hide();
|
123 |
+
}
|
124 |
+
});
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Show Hide Custom Options for Buttons */
|
128 |
+
var wcf_optin_submit_button_custom_options = function() {
|
129 |
+
|
130 |
+
var wrapper = $('.wcf-optin-table');
|
131 |
+
|
132 |
+
if ( wrapper.length < 1 ) {
|
133 |
+
return;
|
134 |
+
}
|
135 |
+
|
136 |
+
var default_value = wrapper.find('.field-wcf-submit-button-size select').val();
|
137 |
+
|
138 |
+
if( 'custom' == default_value ){
|
139 |
+
wrapper.find('.field-wcf-submit-tb-padding').show();
|
140 |
+
wrapper.find('.field-wcf-submit-lr-padding').show();
|
141 |
+
wrapper.find('.field-wcf-submit-button-position').show();
|
142 |
+
}else{
|
143 |
+
wrapper.find('.field-wcf-submit-tb-padding .wcf-field-row-content input[type="number"]').val('');
|
144 |
+
wrapper.find('.field-wcf-submit-lr-padding .wcf-field-row-content input[type="number"]').val('');
|
145 |
+
|
146 |
+
wrapper.find('.field-wcf-submit-tb-padding').hide();
|
147 |
+
wrapper.find('.field-wcf-submit-lr-padding').hide();
|
148 |
+
wrapper.find('.field-wcf-submit-button-position').hide();
|
149 |
+
}
|
150 |
+
|
151 |
+
wrapper.find('.field-wcf-submit-button-size select').on('change', function(e) {
|
152 |
|
153 |
e.preventDefault();
|
154 |
|
156 |
selected_value = $this.val();
|
157 |
|
158 |
if(selected_value == 'custom' ){
|
159 |
+
wrapper.find('.field-wcf-submit-tb-padding').show();
|
160 |
+
wrapper.find('.field-wcf-submit-lr-padding').show();
|
161 |
+
wrapper.find('.field-wcf-submit-button-position').show();
|
162 |
}else{
|
163 |
+
wrapper.find('.field-wcf-submit-tb-padding').hide();
|
164 |
+
wrapper.find('.field-wcf-submit-lr-padding').hide();
|
165 |
+
wrapper.find('.field-wcf-submit-button-position').hide();
|
166 |
}
|
167 |
});
|
168 |
}
|
169 |
|
170 |
+
var wcf_checkout_prevent_toggle_for_shortcode = function() {
|
171 |
// Prevent inputs in meta box headings opening/closing contents.
|
172 |
$( '#wcf-checkout-settings' ).find( '.hndle' ).unbind( 'click.postboxes' );
|
173 |
|
246 |
});
|
247 |
}
|
248 |
|
249 |
+
/* Optin - hide/show login */
|
250 |
+
function wcf_optin_hide_show_init(){
|
251 |
+
|
252 |
+
var wrapper = $('.wcf-optin-table');
|
253 |
+
|
254 |
+
if ( wrapper.length < 1 ) {
|
255 |
+
return;
|
256 |
+
}
|
257 |
+
|
258 |
+
var field = $('input[type=checkbox]#wcf-optin-pass-fields');
|
259 |
+
var toggle_fields = [ '.field-wcf-optin-pass-specific-fields', '.wcf-optin-pass-fields-doc' ];
|
260 |
+
|
261 |
+
if ( field.is(":checked") ) {
|
262 |
+
$.each( toggle_fields, function(i, val) {
|
263 |
+
wrapper.find( val ).show();
|
264 |
+
})
|
265 |
+
} else {
|
266 |
+
$.each( toggle_fields, function(i, val) {
|
267 |
+
wrapper.find( val ).hide();
|
268 |
+
});
|
269 |
+
}
|
270 |
+
|
271 |
+
field.on('change', function(e) {
|
272 |
+
|
273 |
+
if ( field.is(":checked") ) {
|
274 |
+
$.each( toggle_fields, function(i, val) {
|
275 |
+
wrapper.find( val ).show();
|
276 |
+
})
|
277 |
+
} else {
|
278 |
+
$.each( toggle_fields, function(i, val) {
|
279 |
+
wrapper.find( val ).hide();
|
280 |
+
});
|
281 |
+
}
|
282 |
+
});
|
283 |
+
}
|
284 |
+
|
285 |
$( document ).ready(function() {
|
286 |
+
|
287 |
+
//wcf_toggle_fields_general_logic();
|
288 |
+
|
289 |
//alert("Before Stattement");
|
290 |
$( '#field-wcf-shortcode' ).appendTo( '#wcf-checkout-settings .hndle span' );
|
291 |
$( '#field-wcf-shortcode' ).css( "display", "inline" );
|
292 |
//alert("After Stattement");
|
293 |
|
294 |
+
/* Checkout */
|
295 |
+
wcf_checkout_show_field_custom_options();
|
296 |
+
|
297 |
+
wcf_checkout_show_button_custom_options();
|
298 |
|
299 |
+
wcf_checkout_prevent_toggle_for_shortcode();
|
300 |
|
301 |
+
/* Optin */
|
302 |
+
wcf_optin_submit_button_custom_options();
|
303 |
+
wcf_optin_hide_show_init();
|
304 |
|
305 |
+
/* Other */
|
306 |
add_tool_tip_msg();
|
307 |
|
308 |
highlight_the_metabox();
|
admin/meta-assets/js/admin-edit.js
CHANGED
@@ -16,11 +16,6 @@
|
|
16 |
*/
|
17 |
_bind: function()
|
18 |
{
|
19 |
-
$( document ).on('click', '.wcf-cpf-add', CartFlowsAdminEdit._add_custom_field );
|
20 |
-
$( document ).on('click', '.wcf-pro-cpf-add', CartFlowsAdminEdit._add_pro_custom_field );
|
21 |
-
|
22 |
-
$( document ).on('click', '.wcf-cpf-action-remove', CartFlowsAdminEdit._remove_custom_field );
|
23 |
-
|
24 |
$( document ).on('change', '.wcf-field-font-family', CartFlowsAdminEdit._set_font_weight_select_options );
|
25 |
$( document ).on('change', '.wcf-field-font-weight', CartFlowsAdminEdit._set_font_weight_val );
|
26 |
},
|
@@ -161,192 +156,7 @@
|
|
161 |
event.preventDefault();
|
162 |
|
163 |
CartFlowsAdminEdit._set_font_weigths();
|
164 |
-
}
|
165 |
-
|
166 |
-
_remove_custom_field: function(e) {
|
167 |
-
|
168 |
-
e.preventDefault();
|
169 |
-
|
170 |
-
var $this = $(this),
|
171 |
-
wrap = $this.closest('.wcf-cpf-actions'),
|
172 |
-
post_id = $('#post_ID').val(),
|
173 |
-
type = wrap.data('type'),
|
174 |
-
key = wrap.data('key'),
|
175 |
-
row = $this.parents('.wcf-field-item-edit-active');
|
176 |
-
|
177 |
-
if( row.length < 1 ){
|
178 |
-
row = $this.parents('.wcf-field-row');
|
179 |
-
}
|
180 |
-
|
181 |
-
var delete_status = confirm( "This action will delete this field. Are you sure?" );
|
182 |
-
if (true == delete_status) {
|
183 |
-
$this.addClass('wp-ui-text-notification').text('Removing..');
|
184 |
-
|
185 |
-
$.ajax({
|
186 |
-
url: wcf.ajax_url,
|
187 |
-
data: {
|
188 |
-
action: "wcf_delete_checkout_custom_field",
|
189 |
-
post_id: post_id,
|
190 |
-
type : type,
|
191 |
-
key : key,
|
192 |
-
security: cartflows_admin.wcf_delete_checkout_custom_field_nonce
|
193 |
-
},
|
194 |
-
dataType: 'json',
|
195 |
-
type: 'POST',
|
196 |
-
success: function ( data ) {
|
197 |
-
row.slideUp(400, 'swing', function() {
|
198 |
-
row.remove();
|
199 |
-
});
|
200 |
-
}
|
201 |
-
});
|
202 |
-
}
|
203 |
-
},
|
204 |
-
|
205 |
-
_add_custom_field: function(e) {
|
206 |
-
|
207 |
-
e.preventDefault();
|
208 |
-
|
209 |
-
var $this = $(this),
|
210 |
-
wrap = $this.closest('.wcf-cpf-wrap'),
|
211 |
-
post_id = $('#post_ID').val(),
|
212 |
-
add_to = wrap.find( '.wcf-cpf-fields.wcf-cpf-add_to select' ).val() || '',
|
213 |
-
type = wrap.find( '.wcf-cpf-fields.wcf-cpf-type select' ).val() || '',
|
214 |
-
options = wrap.find( '.wcf-cpf-fields.wcf-cpf-options textarea' ).val() || '',
|
215 |
-
label = wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).val() || '',
|
216 |
-
name = wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).val() || '';
|
217 |
-
|
218 |
-
if( '' === label ) {
|
219 |
-
wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).focus();
|
220 |
-
return;
|
221 |
-
}
|
222 |
-
|
223 |
-
if( '' === name ) {
|
224 |
-
wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).focus();
|
225 |
-
return;
|
226 |
-
}
|
227 |
-
|
228 |
-
$this.addClass('updating-message').text('Adding Field..');
|
229 |
-
|
230 |
-
$.ajax({
|
231 |
-
url: wcf.ajax_url,
|
232 |
-
data: {
|
233 |
-
action : "wcf_add_checkout_custom_field",
|
234 |
-
post_id : post_id,
|
235 |
-
add_to : add_to,
|
236 |
-
type : type,
|
237 |
-
options : options,
|
238 |
-
label : label,
|
239 |
-
name : name,
|
240 |
-
security: cartflows_admin.wcf_add_checkout_custom_field_nonce
|
241 |
-
},
|
242 |
-
dataType: 'json',
|
243 |
-
type: 'POST',
|
244 |
-
success: function ( data ) {
|
245 |
-
|
246 |
-
if( $('.' + data.add_to_class ).length ) {
|
247 |
-
$('.' + data.add_to_class ).append( data.markup );
|
248 |
-
|
249 |
-
var new_row = $('.wcf-field-row.field-'+data.field_args.name );
|
250 |
-
|
251 |
-
$this.removeClass('updating-message').text('Added Field!');
|
252 |
-
setTimeout(function() {
|
253 |
-
$this.text('Add New Field');
|
254 |
-
}, 1500);
|
255 |
-
|
256 |
-
|
257 |
-
if( $('.wcf-field-row.field-'+data.field_args.name ).length ) {
|
258 |
-
$('html, body').animate({
|
259 |
-
scrollTop: $('.wcf-field-row.field-'+data.field_args.name ).offset().top
|
260 |
-
}, 800);
|
261 |
-
}
|
262 |
-
}
|
263 |
-
}
|
264 |
-
});
|
265 |
-
|
266 |
-
},
|
267 |
-
|
268 |
-
_add_pro_custom_field: function(e) {
|
269 |
-
|
270 |
-
e.preventDefault();
|
271 |
-
|
272 |
-
var $this = $(this),
|
273 |
-
wrap = $this.closest('.wcf-cpf-wrap'),
|
274 |
-
post_id = $('#post_ID').val(),
|
275 |
-
add_to = wrap.find( '.wcf-cpf-fields.wcf-cpf-add_to select' ).val() || '',
|
276 |
-
type = wrap.find( '.wcf-cpf-fields.wcf-cpf-type select' ).val() || '',
|
277 |
-
options = wrap.find( '.wcf-cpf-fields.wcf-cpf-options textarea' ).val() || '',
|
278 |
-
label = wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).val() || '',
|
279 |
-
width = wrap.find( '.wcf-cpf-fields.wcf-cpf-width select' ).val() || '',
|
280 |
-
placeholder = '',
|
281 |
-
is_required = wrap.find( '.wcf-cpf-fields.wcf-cpf-required input[type="checkbox"]:checked' ).val() || '';
|
282 |
-
default_value = '';
|
283 |
-
// name = wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).val() || '';
|
284 |
-
|
285 |
-
if( 'checkbox' == type ){
|
286 |
-
default_value = wrap.find( '.wcf-cpf-fields.wcf-cpf-default select' ).val() || '';
|
287 |
-
}else{
|
288 |
-
default_value = wrap.find( '.wcf-cpf-fields.wcf-cpf-default input' ).val() || '';
|
289 |
-
}
|
290 |
-
|
291 |
-
if( 'select' != type ){
|
292 |
-
placeholder = wrap.find( '.wcf-cpf-fields.wcf-cpf-placeholder input' ).val() || '';
|
293 |
-
}
|
294 |
-
|
295 |
-
if( '' === label ) {
|
296 |
-
wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).focus();
|
297 |
-
wrap.find( '.wcf-cpf-fields.wcf-cpf-label input' ).addClass('error');
|
298 |
-
wrap.find( '.wcf-cpf-fields.wcf-cpf-label #wcf-cpf-label-error-msg' ).text( ' This field is required' ).css( 'color', 'red' );
|
299 |
-
return;
|
300 |
-
}
|
301 |
-
|
302 |
-
// if( '' === name ) {
|
303 |
-
// wrap.find( '.wcf-cpf-fields.wcf-cpf-name input' ).focus();
|
304 |
-
// return;
|
305 |
-
// }
|
306 |
-
|
307 |
-
$this.addClass('updating-message').text('Adding Field..');
|
308 |
-
|
309 |
-
$.ajax({
|
310 |
-
url: wcf.ajax_url,
|
311 |
-
data: {
|
312 |
-
action : "wcf_pro_add_checkout_custom_field",
|
313 |
-
post_id : post_id,
|
314 |
-
add_to : add_to,
|
315 |
-
type : type,
|
316 |
-
options : options,
|
317 |
-
label : label,
|
318 |
-
// name : name,
|
319 |
-
placeholder : placeholder,
|
320 |
-
width : width,
|
321 |
-
default:default_value,
|
322 |
-
required: is_required,
|
323 |
-
security: cartflows_admin.wcf_pro_add_checkout_custom_field_nonce
|
324 |
-
},
|
325 |
-
dataType: 'json',
|
326 |
-
type: 'POST',
|
327 |
-
success: function ( data ) {
|
328 |
-
console.log(data);
|
329 |
-
if( $('.' + data.add_to_class ).length ) {
|
330 |
-
$('.' + data.add_to_class ).append( data.markup );
|
331 |
-
|
332 |
-
var new_row = $('.wcf-field-row.field-'+data.field_args.name );
|
333 |
-
|
334 |
-
$this.removeClass('updating-message').text('Added Field!');
|
335 |
-
setTimeout(function() {
|
336 |
-
$this.text('Add New Field');
|
337 |
-
}, 1500);
|
338 |
-
|
339 |
-
|
340 |
-
if( $('.wcf-field-row.field-'+data.field_args.name ).length ) {
|
341 |
-
$('html, body').animate({
|
342 |
-
scrollTop: $('.wcf-field-row.field-'+data.field_args.name ).offset().top
|
343 |
-
}, 800);
|
344 |
-
}
|
345 |
-
}
|
346 |
-
}
|
347 |
-
});
|
348 |
-
|
349 |
-
},
|
350 |
};
|
351 |
|
352 |
/**
|
16 |
*/
|
17 |
_bind: function()
|
18 |
{
|
|
|
|
|
|
|
|
|
|
|
19 |
$( document ).on('change', '.wcf-field-font-family', CartFlowsAdminEdit._set_font_weight_select_options );
|
20 |
$( document ).on('change', '.wcf-field-font-weight', CartFlowsAdminEdit._set_font_weight_val );
|
21 |
},
|
156 |
event.preventDefault();
|
157 |
|
158 |
CartFlowsAdminEdit._set_font_weigths();
|
159 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
};
|
161 |
|
162 |
/**
|
assets/css/checkout-template-divi-rtl.css
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
letter-spacing: 0.3px;
|
52 |
font-family: inherit;
|
53 |
font-weight: inherit;
|
54 |
-
text-transform: capitalize
|
55 |
margin-bottom: 8px;
|
56 |
}
|
57 |
|
@@ -171,7 +171,7 @@
|
|
171 |
font-family: inherit;
|
172 |
font-weight: 600;
|
173 |
font-size: 20px;
|
174 |
-
text-transform: capitalize
|
175 |
margin: 0 0 25px 0;
|
176 |
}
|
177 |
|
@@ -265,57 +265,6 @@
|
|
265 |
width: 100%;
|
266 |
}
|
267 |
|
268 |
-
/**
|
269 |
-
* *************************************
|
270 |
-
* Two Step Divi Compatibility css Start
|
271 |
-
* *************************************
|
272 |
-
*/
|
273 |
-
|
274 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,
|
275 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,
|
276 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{
|
277 |
-
display: block;
|
278 |
-
width: 100%;
|
279 |
-
float: none;
|
280 |
-
padding-left: 0;
|
281 |
-
padding: 0px;
|
282 |
-
-webkit-border-radius: 0px;
|
283 |
-
border-radius: 0px;
|
284 |
-
margin-top:10px;
|
285 |
-
margin-bottom: 20px;
|
286 |
-
}
|
287 |
-
|
288 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
289 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
|
290 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,
|
291 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
292 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
|
293 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
|
294 |
-
margin: 0px;
|
295 |
-
}
|
296 |
-
|
297 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3,
|
298 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3,
|
299 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,
|
300 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{
|
301 |
-
display: none !important;
|
302 |
-
}
|
303 |
-
|
304 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{
|
305 |
-
float: none;
|
306 |
-
width: 100%;
|
307 |
-
}
|
308 |
-
|
309 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a{
|
310 |
-
color: #fff;
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* *************************************
|
315 |
-
* Two Step Divi Compatibility css End
|
316 |
-
* *************************************
|
317 |
-
*/
|
318 |
-
|
319 |
|
320 |
/**
|
321 |
* **************************************
|
51 |
letter-spacing: 0.3px;
|
52 |
font-family: inherit;
|
53 |
font-weight: inherit;
|
54 |
+
/*text-transform: capitalize;*/
|
55 |
margin-bottom: 8px;
|
56 |
}
|
57 |
|
171 |
font-family: inherit;
|
172 |
font-weight: 600;
|
173 |
font-size: 20px;
|
174 |
+
/*text-transform: capitalize;*/
|
175 |
margin: 0 0 25px 0;
|
176 |
}
|
177 |
|
265 |
width: 100%;
|
266 |
}
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
/**
|
270 |
* **************************************
|
assets/css/checkout-template-divi.css
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
letter-spacing: 0.3px;
|
52 |
font-family: inherit;
|
53 |
font-weight: inherit;
|
54 |
-
text-transform: capitalize
|
55 |
margin-bottom: 8px;
|
56 |
}
|
57 |
|
@@ -171,7 +171,7 @@
|
|
171 |
font-family: inherit;
|
172 |
font-weight: 600;
|
173 |
font-size: 20px;
|
174 |
-
text-transform: capitalize
|
175 |
margin: 0 0 25px 0;
|
176 |
}
|
177 |
|
@@ -265,57 +265,6 @@
|
|
265 |
width: 100%;
|
266 |
}
|
267 |
|
268 |
-
/**
|
269 |
-
* *************************************
|
270 |
-
* Two Step Divi Compatibility css Start
|
271 |
-
* *************************************
|
272 |
-
*/
|
273 |
-
|
274 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,
|
275 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,
|
276 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{
|
277 |
-
display: block;
|
278 |
-
width: 100%;
|
279 |
-
float: none;
|
280 |
-
padding-right: 0;
|
281 |
-
padding: 0px;
|
282 |
-
-webkit-border-radius: 0px;
|
283 |
-
border-radius: 0px;
|
284 |
-
margin-top:10px;
|
285 |
-
margin-bottom: 20px;
|
286 |
-
}
|
287 |
-
|
288 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
289 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
|
290 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,
|
291 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
292 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
|
293 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
|
294 |
-
margin: 0px;
|
295 |
-
}
|
296 |
-
|
297 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3,
|
298 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3,
|
299 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,
|
300 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{
|
301 |
-
display: none !important;
|
302 |
-
}
|
303 |
-
|
304 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{
|
305 |
-
float: none;
|
306 |
-
width: 100%;
|
307 |
-
}
|
308 |
-
|
309 |
-
.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a{
|
310 |
-
color: #fff;
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* *************************************
|
315 |
-
* Two Step Divi Compatibility css End
|
316 |
-
* *************************************
|
317 |
-
*/
|
318 |
-
|
319 |
|
320 |
/**
|
321 |
* **************************************
|
51 |
letter-spacing: 0.3px;
|
52 |
font-family: inherit;
|
53 |
font-weight: inherit;
|
54 |
+
/*text-transform: capitalize;*/
|
55 |
margin-bottom: 8px;
|
56 |
}
|
57 |
|
171 |
font-family: inherit;
|
172 |
font-weight: 600;
|
173 |
font-size: 20px;
|
174 |
+
/*text-transform: capitalize;*/
|
175 |
margin: 0 0 25px 0;
|
176 |
}
|
177 |
|
265 |
width: 100%;
|
266 |
}
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
/**
|
270 |
* **************************************
|
assets/css/checkout-template-rtl.css
CHANGED
@@ -320,7 +320,7 @@
|
|
320 |
font-family: inherit;
|
321 |
font-weight: 600;
|
322 |
font-size: 20px;
|
323 |
-
text-transform: capitalize
|
324 |
margin:0 0 25px 0;
|
325 |
padding: 0px;
|
326 |
width: 100%;
|
@@ -542,7 +542,6 @@
|
|
542 |
padding: 18px;
|
543 |
margin-bottom: 10px;
|
544 |
width: 100%;
|
545 |
-
text-transform: uppercase;
|
546 |
}
|
547 |
|
548 |
.wcf-embed-checkout-form .woocommerce #order_review button {
|
@@ -560,7 +559,6 @@
|
|
560 |
-webkit-border-radius: 3px;
|
561 |
border-radius: 3px;
|
562 |
color: #fff;
|
563 |
-
text-transform: uppercase;
|
564 |
}
|
565 |
|
566 |
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
@@ -788,7 +786,7 @@
|
|
788 |
letter-spacing: 0.3px;
|
789 |
font-family: inherit;
|
790 |
font-weight:inherit;
|
791 |
-
text-transform: capitalize
|
792 |
margin-bottom: 8px;
|
793 |
}
|
794 |
|
@@ -799,7 +797,7 @@
|
|
799 |
|
800 |
.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
|
801 |
line-height: 20px;
|
802 |
-
text-transform:
|
803 |
}
|
804 |
|
805 |
.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
|
@@ -926,7 +924,6 @@
|
|
926 |
|
927 |
.wcf-bump-order-field-wrap .wcf-bump-order-label{
|
928 |
font-size: 16px;
|
929 |
-
text-transform: capitalize;
|
930 |
}
|
931 |
|
932 |
/* Added for pro support */
|
320 |
font-family: inherit;
|
321 |
font-weight: 600;
|
322 |
font-size: 20px;
|
323 |
+
/*text-transform: capitalize;*/
|
324 |
margin:0 0 25px 0;
|
325 |
padding: 0px;
|
326 |
width: 100%;
|
542 |
padding: 18px;
|
543 |
margin-bottom: 10px;
|
544 |
width: 100%;
|
|
|
545 |
}
|
546 |
|
547 |
.wcf-embed-checkout-form .woocommerce #order_review button {
|
559 |
-webkit-border-radius: 3px;
|
560 |
border-radius: 3px;
|
561 |
color: #fff;
|
|
|
562 |
}
|
563 |
|
564 |
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
786 |
letter-spacing: 0.3px;
|
787 |
font-family: inherit;
|
788 |
font-weight:inherit;
|
789 |
+
/*text-transform: capitalize;*/
|
790 |
margin-bottom: 8px;
|
791 |
}
|
792 |
|
797 |
|
798 |
.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
|
799 |
line-height: 20px;
|
800 |
+
text-transform: none;
|
801 |
}
|
802 |
|
803 |
.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
|
924 |
|
925 |
.wcf-bump-order-field-wrap .wcf-bump-order-label{
|
926 |
font-size: 16px;
|
|
|
927 |
}
|
928 |
|
929 |
/* Added for pro support */
|
assets/css/checkout-template.css
CHANGED
@@ -320,7 +320,7 @@
|
|
320 |
font-family: inherit;
|
321 |
font-weight: 600;
|
322 |
font-size: 20px;
|
323 |
-
text-transform: capitalize
|
324 |
margin:0 0 25px 0;
|
325 |
padding: 0px;
|
326 |
width: 100%;
|
@@ -542,7 +542,6 @@
|
|
542 |
padding: 18px;
|
543 |
margin-bottom: 10px;
|
544 |
width: 100%;
|
545 |
-
text-transform: uppercase;
|
546 |
}
|
547 |
|
548 |
.wcf-embed-checkout-form .woocommerce #order_review button {
|
@@ -560,7 +559,6 @@
|
|
560 |
-webkit-border-radius: 3px;
|
561 |
border-radius: 3px;
|
562 |
color: #fff;
|
563 |
-
text-transform: uppercase;
|
564 |
}
|
565 |
|
566 |
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
@@ -788,7 +786,7 @@
|
|
788 |
letter-spacing: 0.3px;
|
789 |
font-family: inherit;
|
790 |
font-weight:inherit;
|
791 |
-
text-transform: capitalize
|
792 |
margin-bottom: 8px;
|
793 |
}
|
794 |
|
@@ -799,7 +797,7 @@
|
|
799 |
|
800 |
.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
|
801 |
line-height: 20px;
|
802 |
-
text-transform:
|
803 |
}
|
804 |
|
805 |
.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
|
@@ -926,7 +924,6 @@
|
|
926 |
|
927 |
.wcf-bump-order-field-wrap .wcf-bump-order-label{
|
928 |
font-size: 16px;
|
929 |
-
text-transform: capitalize;
|
930 |
}
|
931 |
|
932 |
/* Added for pro support */
|
320 |
font-family: inherit;
|
321 |
font-weight: 600;
|
322 |
font-size: 20px;
|
323 |
+
/*text-transform: capitalize;*/
|
324 |
margin:0 0 25px 0;
|
325 |
padding: 0px;
|
326 |
width: 100%;
|
542 |
padding: 18px;
|
543 |
margin-bottom: 10px;
|
544 |
width: 100%;
|
|
|
545 |
}
|
546 |
|
547 |
.wcf-embed-checkout-form .woocommerce #order_review button {
|
559 |
-webkit-border-radius: 3px;
|
560 |
border-radius: 3px;
|
561 |
color: #fff;
|
|
|
562 |
}
|
563 |
|
564 |
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
786 |
letter-spacing: 0.3px;
|
787 |
font-family: inherit;
|
788 |
font-weight:inherit;
|
789 |
+
/*text-transform: capitalize;*/
|
790 |
margin-bottom: 8px;
|
791 |
}
|
792 |
|
797 |
|
798 |
.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
|
799 |
line-height: 20px;
|
800 |
+
text-transform: none;
|
801 |
}
|
802 |
|
803 |
.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
|
924 |
|
925 |
.wcf-bump-order-field-wrap .wcf-bump-order-label{
|
926 |
font-size: 16px;
|
|
|
927 |
}
|
928 |
|
929 |
/* Added for pro support */
|
assets/css/import-rtl.css
CHANGED
@@ -576,8 +576,9 @@ div#TB_window {
|
|
576 |
border-width: 1px;
|
577 |
-webkit-box-shadow: none;
|
578 |
box-shadow: none;
|
579 |
-
padding: 2px;
|
580 |
-
line-height:
|
|
|
581 |
}
|
582 |
|
583 |
#wcf-start-from-scratch .description {
|
576 |
border-width: 1px;
|
577 |
-webkit-box-shadow: none;
|
578 |
box-shadow: none;
|
579 |
+
padding: 2px 6px 2px 2px;
|
580 |
+
line-height: 25px;
|
581 |
+
width: 155px;
|
582 |
}
|
583 |
|
584 |
#wcf-start-from-scratch .description {
|
assets/css/import.css
CHANGED
@@ -576,8 +576,9 @@ div#TB_window {
|
|
576 |
border-width: 1px;
|
577 |
-webkit-box-shadow: none;
|
578 |
box-shadow: none;
|
579 |
-
padding: 2px;
|
580 |
-
line-height:
|
|
|
581 |
}
|
582 |
|
583 |
#wcf-start-from-scratch .description {
|
576 |
border-width: 1px;
|
577 |
-webkit-box-shadow: none;
|
578 |
box-shadow: none;
|
579 |
+
padding: 2px 2px 2px 6px;
|
580 |
+
line-height: 25px;
|
581 |
+
width: 155px;
|
582 |
}
|
583 |
|
584 |
#wcf-start-from-scratch .description {
|
assets/css/optin-template-rtl.css
ADDED
@@ -0,0 +1,757 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* **************
|
3 |
+
* Login & Coupon Field Layout
|
4 |
+
* **************
|
5 |
+
*/
|
6 |
+
/* Editor CSS */
|
7 |
+
.elementor-editor-active .wcf-optin-form .woocommerce #order_review #payment #place_order {
|
8 |
+
pointer-events: none !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
.cartflows-container .wcf-optin-form,
|
12 |
+
.cartflows-container .wcf-optin-form * {
|
13 |
+
-webkit-box-sizing: border-box;
|
14 |
+
-moz-box-sizing: border-box;
|
15 |
+
box-sizing: border-box;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wcf-optin-form .wc-backward {
|
19 |
+
display: none !important;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
23 |
+
.wcf-optin-form .woocommerce form .form-row-last{
|
24 |
+
width: 50%;
|
25 |
+
display: block;
|
26 |
+
}
|
27 |
+
|
28 |
+
.wcf-optin-form .woocommerce form .form-row-full{
|
29 |
+
width: 100%;
|
30 |
+
clear: both;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wcf-optin-form form .form-row-wide{
|
34 |
+
width: 100%;
|
35 |
+
}
|
36 |
+
|
37 |
+
/* To test divi and all */
|
38 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
39 |
+
.woocommerce-page form .form-row-first{
|
40 |
+
float: right;
|
41 |
+
clear: right;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wcf-optin-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
|
45 |
+
float: left;
|
46 |
+
clear: left;
|
47 |
+
}
|
48 |
+
|
49 |
+
.wcf-optin-form .woocommerce form .form-row .required{
|
50 |
+
color: red;
|
51 |
+
font-weight: 700;
|
52 |
+
border: 0!important;
|
53 |
+
text-decoration: none;
|
54 |
+
}
|
55 |
+
|
56 |
+
/* To test divi and all */
|
57 |
+
.wcf-optin-form form .form-row-first.form-row-one{
|
58 |
+
clear: both;
|
59 |
+
}
|
60 |
+
|
61 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login{
|
62 |
+
display: none;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* **************
|
67 |
+
* Common Classes
|
68 |
+
* **************
|
69 |
+
*/
|
70 |
+
|
71 |
+
.wcf-optin-form .woocommerce .blockUI.blockOverlay {
|
72 |
+
font-size: 15px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
76 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
77 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid select{
|
78 |
+
border-width: 1px;
|
79 |
+
border-color: #e2401c;
|
80 |
+
}
|
81 |
+
|
82 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated .select2-container,
|
83 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated input.input-text,
|
84 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated select{
|
85 |
+
border-width: 1px;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wcf-optin-form .select2-container--default.field-required .select2-selection--single,
|
89 |
+
.wcf-optin-form .woocommerce form .form-row input.input-text.field-required,
|
90 |
+
.wcf-optin-form .woocommerce form .form-row textarea.input-text.field-required,
|
91 |
+
.wcf-optin-form .woocommerce #order_review .input-text.field-required{
|
92 |
+
border-color: #e2401c;
|
93 |
+
}
|
94 |
+
|
95 |
+
.wcf-optin-form .woocommerce form .form-row input.field-validated{
|
96 |
+
border-right-width: 2px;
|
97 |
+
border-right-color: #69bf29;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* ************
|
102 |
+
* Main Layout
|
103 |
+
* ************
|
104 |
+
*/
|
105 |
+
|
106 |
+
/**
|
107 |
+
* ************************
|
108 |
+
* Radio Button & Checkbox
|
109 |
+
* ************************
|
110 |
+
*/
|
111 |
+
|
112 |
+
.wcf-optin-form .woocommerce #payment [type='radio']:checked + label,
|
113 |
+
.wcf-optin-form .woocommerce #payment [type='radio']:not(:checked) + label{
|
114 |
+
padding: 0px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]{
|
118 |
+
-webkit-border-radius: 50%;
|
119 |
+
border-radius: 50%;
|
120 |
+
margin-left: 4px;
|
121 |
+
line-height: 10px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
|
125 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,
|
126 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
127 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before{
|
128 |
+
content: "\e600";
|
129 |
+
margin: 0;
|
130 |
+
color: #F16334;
|
131 |
+
}
|
132 |
+
|
133 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"],
|
134 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox],
|
135 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"],
|
136 |
+
.wcf-optin-form .woocommerce #payment input[type=radio],
|
137 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]{
|
138 |
+
border: 1px solid #b4b9be;
|
139 |
+
background: #fff;
|
140 |
+
color: #555;
|
141 |
+
clear: none;
|
142 |
+
cursor: pointer;
|
143 |
+
display: inline-block;
|
144 |
+
line-height: 0;
|
145 |
+
height: 16px;
|
146 |
+
margin: -4px 0 0 4px;
|
147 |
+
outline: 0;
|
148 |
+
padding: 0!important;
|
149 |
+
text-align: center;
|
150 |
+
vertical-align: middle;
|
151 |
+
width: 16px;
|
152 |
+
min-width: 16px;
|
153 |
+
-webkit-appearance: none;
|
154 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
155 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
156 |
+
-webkit-transition: .05s border-color ease-in-out;
|
157 |
+
transition: .05s border-color ease-in-out;
|
158 |
+
}
|
159 |
+
|
160 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:focus,
|
161 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:focus,
|
162 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
|
163 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:focus,
|
164 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus{
|
165 |
+
border-color: #F16334;
|
166 |
+
-webkit-box-shadow: 0 0 2px rgba(241, 99, 52,.8);
|
167 |
+
box-shadow: 0 0 2px rgba(241, 99, 52,.8);
|
168 |
+
}
|
169 |
+
|
170 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{
|
171 |
+
background-color: #F16334;
|
172 |
+
-webkit-border-radius: 50px;
|
173 |
+
border-radius: 50px;
|
174 |
+
content: "\2022";
|
175 |
+
font-size: 24px;
|
176 |
+
height: 6px;
|
177 |
+
line-height: 16px;
|
178 |
+
margin: 4px;
|
179 |
+
text-indent: -9999px;
|
180 |
+
width: 6px;
|
181 |
+
}
|
182 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
|
183 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,
|
184 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
185 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before,
|
186 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before{
|
187 |
+
display: inline-block;
|
188 |
+
float: right;
|
189 |
+
font: normal 15px/1 cartflows-icon;
|
190 |
+
speak: none;
|
191 |
+
vertical-align: middle;
|
192 |
+
width: 6px;
|
193 |
+
-webkit-font-smoothing: antialiased;
|
194 |
+
-moz-osx-font-smoothing: grayscale;
|
195 |
+
}
|
196 |
+
|
197 |
+
.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{
|
198 |
+
min-width: 16px;
|
199 |
+
}
|
200 |
+
|
201 |
+
.wcf-optin-form .woocommerce .col2-set .col-1,
|
202 |
+
.wcf-optin-form .woocommerce .col2-set .col-2,
|
203 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,
|
204 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2 {
|
205 |
+
float: none;
|
206 |
+
width: 100%;
|
207 |
+
max-width: 100%;
|
208 |
+
padding: 0px;
|
209 |
+
-webkit-border-radius: 0px;
|
210 |
+
border-radius: 0px;
|
211 |
+
border: none;
|
212 |
+
border-color: none;
|
213 |
+
margin-bottom: 0px;
|
214 |
+
}
|
215 |
+
|
216 |
+
.wcf-optin-form .woocommerce-additional-fields > h3,
|
217 |
+
.wcf-optin-form .woocommerce-billing-fields > h3,
|
218 |
+
.wcf-optin-form #order_review_heading,
|
219 |
+
.wcf-optin-form .woocommerce #ship-to-different-address {
|
220 |
+
display: none;
|
221 |
+
}
|
222 |
+
|
223 |
+
.wcf-optin-form .woocommerce-checkout #payment {
|
224 |
+
background: unset;
|
225 |
+
-webkit-border-radius: 0;
|
226 |
+
border-radius: 0;
|
227 |
+
}
|
228 |
+
|
229 |
+
.wcf-optin-form .woocommerce-checkout #payment .form-row {
|
230 |
+
margin: 0;
|
231 |
+
padding: 0;
|
232 |
+
}
|
233 |
+
|
234 |
+
.wcf-optin-form .woocommerce-checkout #payment .form-row label.checkbox{
|
235 |
+
display: block;
|
236 |
+
margin-bottom: 1.1em;
|
237 |
+
}
|
238 |
+
|
239 |
+
.wcf-optin-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
|
240 |
+
float: none;
|
241 |
+
margin-right: 10px;
|
242 |
+
}
|
243 |
+
|
244 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box .form-row{
|
245 |
+
margin: 0 0 0.5em;
|
246 |
+
}
|
247 |
+
|
248 |
+
.wcf-optin-form .woocommerce-checkout #payment fieldset .form-row
|
249 |
+
.wcf-optin-form .woocommerce-checkout #payment fieldset p{
|
250 |
+
margin-bottom: 10px;
|
251 |
+
}
|
252 |
+
|
253 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box{
|
254 |
+
background-color: #eaeaea;
|
255 |
+
font-family: inherit;
|
256 |
+
font-weight:inherit;
|
257 |
+
margin-bottom: 0.5em;
|
258 |
+
}
|
259 |
+
|
260 |
+
.wcf-optin-form #add_payment_method #payment div.payment_box::before,
|
261 |
+
.wcf-optin-form .woocommerce-cart #payment div.payment_box::before,
|
262 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box::before{
|
263 |
+
content: '';
|
264 |
+
display: block;
|
265 |
+
border: 1em solid;
|
266 |
+
border-left-color: transparent;
|
267 |
+
border-right-color: transparent;
|
268 |
+
border-top-color: transparent;
|
269 |
+
border-bottom-color: #eaeaea;
|
270 |
+
position: absolute;
|
271 |
+
top: -.75em;
|
272 |
+
right: 0;
|
273 |
+
margin: -1em 2em 0 0;
|
274 |
+
}
|
275 |
+
|
276 |
+
/* Fields */
|
277 |
+
.wcf-optin-form .select2-container--default .select2-selection--single {
|
278 |
+
display: block;
|
279 |
+
width: 100%;
|
280 |
+
min-height: 34px;
|
281 |
+
height: auto;
|
282 |
+
padding: 11px 12px;
|
283 |
+
font-size: 14px;
|
284 |
+
line-height: 1.42857143 !important;
|
285 |
+
color: #555;
|
286 |
+
background-color: #fff;
|
287 |
+
background-image: none;
|
288 |
+
border: 1px solid;
|
289 |
+
border-color: #d4d4d4;
|
290 |
+
-webkit-border-radius: 3px;
|
291 |
+
border-radius: 3px;
|
292 |
+
-webkit-box-shadow: none;
|
293 |
+
box-shadow: none;
|
294 |
+
outline: none;
|
295 |
+
}
|
296 |
+
|
297 |
+
.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered {
|
298 |
+
color: #666;
|
299 |
+
line-height: 26px;
|
300 |
+
min-height: 26px;
|
301 |
+
overflow: visible;
|
302 |
+
padding-right: 0;
|
303 |
+
}
|
304 |
+
|
305 |
+
.wcf-optin-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
|
306 |
+
font-size: 14px;
|
307 |
+
}
|
308 |
+
|
309 |
+
.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__arrow {
|
310 |
+
height: 100%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.select2-dropdown{
|
314 |
+
border: 1px solid #d4d4d4;
|
315 |
+
}
|
316 |
+
|
317 |
+
.wcf-optin-form .woocommerce form .form-row input.input-text,
|
318 |
+
.wcf-optin-form .woocommerce form .form-row textarea,
|
319 |
+
.wcf-optin-form .woocommerce form .form-row select,
|
320 |
+
.wcf-optin-form .woocommerce #order_review .input-text{
|
321 |
+
display: block;
|
322 |
+
width: 100%;
|
323 |
+
min-height: 34px;
|
324 |
+
padding: 11px 12px;
|
325 |
+
font-family: inherit;
|
326 |
+
font-weight:inherit;
|
327 |
+
font-size: 14px;
|
328 |
+
line-height: 1.42857143 !important;
|
329 |
+
color: #555;
|
330 |
+
background-color: #fff;
|
331 |
+
background-image: none;
|
332 |
+
border: 1px solid;
|
333 |
+
border-color: #d4d4d4;
|
334 |
+
-webkit-border-radius: 3px;
|
335 |
+
border-radius: 3px;
|
336 |
+
-webkit-box-shadow: none;
|
337 |
+
box-shadow: none;
|
338 |
+
height: auto;
|
339 |
+
}
|
340 |
+
|
341 |
+
.wcf-optin-form #order_review{
|
342 |
+
padding: 0;
|
343 |
+
width: 100%;
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
.wcf-optin-form input[type="text"]:focus,
|
348 |
+
.wcf-optin-form input[type="email"]:focus,
|
349 |
+
.wcf-optin-form input[type="password"]:focus,
|
350 |
+
.wcf-optin-form input[type="tel"]:focus,
|
351 |
+
.wcf-optin-form textarea:focus,
|
352 |
+
.wcf-optin-form .select2-container--open {
|
353 |
+
border-color: #b3b3b3;
|
354 |
+
-webkit-box-shadow: none;
|
355 |
+
box-shadow: none;
|
356 |
+
outline: none;
|
357 |
+
}
|
358 |
+
|
359 |
+
.wcf-optin-form button:focus {
|
360 |
+
outline: none;
|
361 |
+
outline-color: none;
|
362 |
+
outline-style: none;
|
363 |
+
outline-width: none;
|
364 |
+
}
|
365 |
+
|
366 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button,
|
367 |
+
.wcf-optin-form form.checkout_coupon .button {
|
368 |
+
display: block;
|
369 |
+
clear: both;
|
370 |
+
border: none;
|
371 |
+
font-size: 15px;
|
372 |
+
font-family: inherit;
|
373 |
+
font-weight: inherit;
|
374 |
+
background-color: #F16334;
|
375 |
+
line-height: 9px;
|
376 |
+
padding: 18px;
|
377 |
+
margin-bottom: 10px;
|
378 |
+
width: 100%;
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
.wcf-optin-form .woocommerce #order_review #payment button {
|
383 |
+
float: none;
|
384 |
+
margin: 0 auto;
|
385 |
+
display: block;
|
386 |
+
}
|
387 |
+
|
388 |
+
.wcf-optin-form .woocommerce #order_review button {
|
389 |
+
border: 1px solid;
|
390 |
+
border-color: #F16334;
|
391 |
+
background-color: #F16334;
|
392 |
+
font-family: inherit;
|
393 |
+
font-weight:inherit;
|
394 |
+
font-size: 18px;
|
395 |
+
letter-spacing: 0.5px;
|
396 |
+
width: 100%;
|
397 |
+
padding: 16px 24px;
|
398 |
+
font-size: 16px;
|
399 |
+
line-height: 1.5;
|
400 |
+
-webkit-border-radius: 3px;
|
401 |
+
border-radius: 3px;
|
402 |
+
color: #fff;
|
403 |
+
}
|
404 |
+
|
405 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small {
|
406 |
+
padding: 8px 6px;
|
407 |
+
background-color: #c8c8c8;
|
408 |
+
border: 1px #c8c8c8 solid;
|
409 |
+
}
|
410 |
+
|
411 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{
|
412 |
+
border-color: #F16334;
|
413 |
+
background-color: #F16334;
|
414 |
+
}
|
415 |
+
.wcf-optin-form .woocommerce #payment #place_order:hover {
|
416 |
+
background-color: #F16334;
|
417 |
+
border-color: #F16334;
|
418 |
+
color: #fff;
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* ***********************
|
423 |
+
* New checkout style
|
424 |
+
* ***********************
|
425 |
+
*/
|
426 |
+
|
427 |
+
.wcf-optin-form .woocommerce-form-coupon-toggle,
|
428 |
+
.wcf-optin-form .woocommerce-additional-fields,
|
429 |
+
.wcf-optin-form table.shop_table.woocommerce-checkout-review-order-table {
|
430 |
+
display: none !important;
|
431 |
+
}
|
432 |
+
|
433 |
+
.wcf-optin-form .woocommerce-checkout{
|
434 |
+
display: inline-block;
|
435 |
+
text-align: inherit;
|
436 |
+
width: 100%;
|
437 |
+
}
|
438 |
+
|
439 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set{
|
440 |
+
display: block;
|
441 |
+
width: 100%;
|
442 |
+
float: none;
|
443 |
+
margin: 10px 0 0 0;
|
444 |
+
padding: 0px;
|
445 |
+
}
|
446 |
+
|
447 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
448 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{
|
449 |
+
margin: 0 -7px;
|
450 |
+
-ms-flex-wrap: wrap;
|
451 |
+
flex-wrap: wrap;
|
452 |
+
-js-display: flex;
|
453 |
+
display: -webkit-box;
|
454 |
+
display: -moz-box;
|
455 |
+
display: -ms-flexbox;
|
456 |
+
display: flex;
|
457 |
+
display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
|
458 |
+
flex-wrap: wrap;
|
459 |
+
-webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
|
460 |
+
}
|
461 |
+
|
462 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
|
463 |
+
margin: 0px -7px;
|
464 |
+
}
|
465 |
+
|
466 |
+
.wcf-optin-form .woocommerce form .form-row{
|
467 |
+
display: block;
|
468 |
+
margin-bottom: 1.1em;
|
469 |
+
padding: 3px 7px;
|
470 |
+
position: relative;
|
471 |
+
}
|
472 |
+
|
473 |
+
.wcf-optin-form .woocommerce form .woocommerce-account-fields {
|
474 |
+
display: none;
|
475 |
+
}
|
476 |
+
|
477 |
+
.wcf-optin-form .woocommerce form .woocommerce-account-fields .form-row{
|
478 |
+
padding: 0px;
|
479 |
+
}
|
480 |
+
|
481 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row label,
|
482 |
+
.wcf-optin-form .woocommerce-checkout .form-row label{
|
483 |
+
font-size: 13px;
|
484 |
+
line-height: 1em;
|
485 |
+
letter-spacing: 0.3px;
|
486 |
+
font-family: inherit;
|
487 |
+
font-weight:inherit;
|
488 |
+
margin-bottom: 8px;
|
489 |
+
}
|
490 |
+
|
491 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields label,
|
492 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields label{
|
493 |
+
display: inherit;
|
494 |
+
}
|
495 |
+
|
496 |
+
.wcf-optin-form .woocommerce .woocommerce-terms-and-conditions-wrapper {
|
497 |
+
display: none;
|
498 |
+
}
|
499 |
+
|
500 |
+
.wcf-optin-form .woocommerce a{
|
501 |
+
color: #F16334;
|
502 |
+
background-color: transparent;
|
503 |
+
text-decoration: none;
|
504 |
+
}
|
505 |
+
|
506 |
+
.wcf-optin-form .woocommerce .woocommerce-info,
|
507 |
+
.wcf-optin-form .woocommerce .woocommerce-error,
|
508 |
+
.wcf-optin-form .woocommerce .woocommerce-message,
|
509 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message,
|
510 |
+
.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message{
|
511 |
+
padding: 1em 2.0em 0.4em 2em;
|
512 |
+
border-top:none;
|
513 |
+
background-color: inherit;
|
514 |
+
font-size: 14px;
|
515 |
+
font-weight: 500;
|
516 |
+
text-align: right;
|
517 |
+
margin:0px;
|
518 |
+
}
|
519 |
+
|
520 |
+
.wcf-optin-form .woocommerce-info::before,
|
521 |
+
.wcf-optin-form .woocommerce-message::before{
|
522 |
+
right: 0.1em;
|
523 |
+
color: #F16334;
|
524 |
+
}
|
525 |
+
|
526 |
+
.wcf-optin-form .woocommerce .woocommerce-error,
|
527 |
+
.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
|
528 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
|
529 |
+
background-color: #fff6f6;
|
530 |
+
border: dashed 1px #a00;
|
531 |
+
padding: 25px 25px 20px;
|
532 |
+
color: #a00;
|
533 |
+
margin: 1rem 0 1rem;
|
534 |
+
font-size: 14px;
|
535 |
+
width: 100%;
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
.wcf-optin-form .woocommerce .woocommerce-error::before {
|
540 |
+
content: '';
|
541 |
+
}
|
542 |
+
|
543 |
+
.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
|
544 |
+
display: inline;
|
545 |
+
}
|
546 |
+
|
547 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
|
548 |
+
margin:1em 0 1em;
|
549 |
+
}
|
550 |
+
|
551 |
+
.wcf-optin-form .woocommerce .woocommerce-error li{
|
552 |
+
list-style: disc inside !important;
|
553 |
+
margin: 0 0 8px;
|
554 |
+
}
|
555 |
+
|
556 |
+
.wcf-optin-form .woocommerce .woocommerce-error li strong{
|
557 |
+
font-weight: 400;
|
558 |
+
}
|
559 |
+
|
560 |
+
.wcf-optin-form .woocommerce form.checkout_coupon{
|
561 |
+
border: 1px solid #d3ced2;
|
562 |
+
padding: 30px 20px 20px;
|
563 |
+
margin: 2em 0;
|
564 |
+
text-align: right;
|
565 |
+
-webkit-border-radius: 5px;
|
566 |
+
border-radius: 5px;
|
567 |
+
}
|
568 |
+
|
569 |
+
.wcf-optin-form .woocommerce .checkout_coupon p{
|
570 |
+
font-size: 14px;
|
571 |
+
}
|
572 |
+
|
573 |
+
.wcf-optin-form .woocommerce .checkout_coupon p{
|
574 |
+
font-family: inherit;
|
575 |
+
font-weight: 500;
|
576 |
+
margin-top: 0;
|
577 |
+
margin-bottom: 10px;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* **********************
|
582 |
+
* One Column Layout
|
583 |
+
* **********************
|
584 |
+
*/
|
585 |
+
|
586 |
+
.wcf-optin-form-one-column{
|
587 |
+
background: inherit;
|
588 |
+
width: 100%;
|
589 |
+
margin:0 auto;
|
590 |
+
}
|
591 |
+
|
592 |
+
.wcf-optin-form-one-column .woocommerce .col2-set .col-1,
|
593 |
+
.wcf-optin-form-one-column .woocommerce .col2-set .col-2,
|
594 |
+
.wcf-optin-form-one-column .woocommerce-checkout .shop_table,
|
595 |
+
.wcf-optin-form-one-column .woocommerce-checkout .wcf-qty-options,
|
596 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,
|
597 |
+
.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading,
|
598 |
+
.wcf-optin-form-one-column .woocommerce-checkout #payment,
|
599 |
+
.wcf-optin-form-one-column .woocommerce form.checkout_coupon,
|
600 |
+
.wcf-optin-form-one-column .woocommerce .wcf-order-wrap{
|
601 |
+
width: 100%;
|
602 |
+
}
|
603 |
+
|
604 |
+
.wcf-optin-form-one-column input[type="text"],
|
605 |
+
.wcf-optin-form-one-column input[type="email"],
|
606 |
+
.wcf-optin-form-one-column input[type="password"],
|
607 |
+
.wcf-optin-form-one-column input[type="tel"],
|
608 |
+
.wcf-optin-form-one-column textarea,
|
609 |
+
.wcf-optin-form-one-column select {
|
610 |
+
display: block;
|
611 |
+
width: 100%;
|
612 |
+
min-height: 40px;
|
613 |
+
padding: 11px 12px;
|
614 |
+
font-family: inherit;
|
615 |
+
font-weight:inherit;
|
616 |
+
font-size: 14px;
|
617 |
+
line-height: 1.42857143;
|
618 |
+
color: #555;
|
619 |
+
background-color: #fff;
|
620 |
+
background-image: none;
|
621 |
+
border: 1px solid #d4d4d4;
|
622 |
+
-webkit-border-radius: 3px;
|
623 |
+
border-radius: 3px;
|
624 |
+
-webkit-box-shadow: none;
|
625 |
+
box-shadow: none;
|
626 |
+
}
|
627 |
+
|
628 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,
|
629 |
+
.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading{
|
630 |
+
margin:20px 0 0;
|
631 |
+
}
|
632 |
+
|
633 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review{
|
634 |
+
width: 100%;
|
635 |
+
}
|
636 |
+
|
637 |
+
@media only screen and (max-width: 768px) {
|
638 |
+
|
639 |
+
.wcf-optin-form form.checkout_coupon .button{
|
640 |
+
font-size: 12px;
|
641 |
+
}
|
642 |
+
|
643 |
+
/* Added for pro support */
|
644 |
+
.wcf-optin-form .woocommerce .col2-set .col-1,
|
645 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,
|
646 |
+
.wcf-optin-form .woocommerce .wcf-order-wrap {
|
647 |
+
padding: 15px 0;
|
648 |
+
}
|
649 |
+
|
650 |
+
.wcf-optin-form .woocommerce .col2-set .col-2,
|
651 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2 {
|
652 |
+
padding: 0;
|
653 |
+
}
|
654 |
+
|
655 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
656 |
+
.wcf-optin-form .woocommerce form .form-row-last {
|
657 |
+
width: 100%;
|
658 |
+
}
|
659 |
+
|
660 |
+
.wcf-optin-form .woocommerce-additional-fields > h3,
|
661 |
+
.wcf-optin-form .woocommerce-billing-fields > h3,
|
662 |
+
.wcf-optin-form #order_review_heading,
|
663 |
+
.wcf-optin-form .woocommerce #ship-to-different-address{
|
664 |
+
font-size: 1.0em;
|
665 |
+
}
|
666 |
+
}
|
667 |
+
|
668 |
+
|
669 |
+
/**
|
670 |
+
* **********************
|
671 |
+
* Divi Css Overrite
|
672 |
+
* **********************
|
673 |
+
*/
|
674 |
+
|
675 |
+
#et-info-email:before,
|
676 |
+
#et-info-phone:before,
|
677 |
+
#et_search_icon:before,
|
678 |
+
.comment-reply-link:after,
|
679 |
+
.et-cart-info span:before,
|
680 |
+
.et-pb-arrow-next:before,
|
681 |
+
.et-pb-arrow-prev:before,
|
682 |
+
.et-social-icon a:before,
|
683 |
+
.et_audio_container .mejs-playpause-button button:before,
|
684 |
+
.et_audio_container .mejs-volume-button button:before,
|
685 |
+
.et_overlay:before,
|
686 |
+
.et_password_protected_form .et_submit_button:after,
|
687 |
+
.et_pb_button:after,
|
688 |
+
.et_pb_contact_reset:after,
|
689 |
+
.et_pb_contact_submit:after,
|
690 |
+
.et_pb_font_icon:before,
|
691 |
+
.et_pb_newsletter_button:after,
|
692 |
+
.et_pb_pricing_table_button:after,
|
693 |
+
.et_pb_promo_button:after,
|
694 |
+
.et_pb_social_icon a.icon:before,
|
695 |
+
.et_pb_testimonial:before,
|
696 |
+
.et_pb_toggle_title:before,
|
697 |
+
.form-submit .et_pb_button:after,
|
698 |
+
.mobile_menu_bar:before,
|
699 |
+
.woocommerce #content input.button.alt:after,
|
700 |
+
.woocommerce #content input.button:after,
|
701 |
+
.woocommerce #respond input#submit.alt:after,
|
702 |
+
.woocommerce #respond input#submit:after,
|
703 |
+
.woocommerce a.button.alt:after,
|
704 |
+
.woocommerce button.button.alt:after,
|
705 |
+
.woocommerce button.button:after,
|
706 |
+
.woocommerce button.single_add_to_cart_button.button:after,
|
707 |
+
.woocommerce input.button.alt:after,
|
708 |
+
.woocommerce input.button:after,
|
709 |
+
.woocommerce-page #content input.button.alt:after,
|
710 |
+
.woocommerce-page #content input.button:after,
|
711 |
+
.woocommerce-page #respond input#submit.alt:after,
|
712 |
+
.woocommerce-page #respond input#submit:after,
|
713 |
+
.woocommerce-page a.button.alt:after,
|
714 |
+
.woocommerce-page a.button:after,
|
715 |
+
.woocommerce-page button.button.alt:after,
|
716 |
+
.woocommerce-page button.button:after,
|
717 |
+
.woocommerce-page input.button.alt:after,
|
718 |
+
.woocommerce-page input.button:after,
|
719 |
+
a.et_pb_more_button:after{
|
720 |
+
text-shadow: 0 0;
|
721 |
+
font-family: none;
|
722 |
+
font-weight: 400;
|
723 |
+
font-style: normal;
|
724 |
+
font-variant: normal;
|
725 |
+
-webkit-font-smoothing: antialiased;
|
726 |
+
-moz-osx-font-smoothing: grayscale;
|
727 |
+
line-height: 1;
|
728 |
+
text-transform: none;
|
729 |
+
speak: none;
|
730 |
+
}
|
731 |
+
|
732 |
+
.comment-reply-link:hover:after,
|
733 |
+
.woocommerce #content input.button.alt:hover:after,
|
734 |
+
.woocommerce #content input.button:hover:after,
|
735 |
+
.woocommerce #respond input#submit.alt:hover:after,
|
736 |
+
.woocommerce #respond input#submit:hover:after,
|
737 |
+
.woocommerce a.button.alt:hover:after,
|
738 |
+
.woocommerce a.button:hover:after,
|
739 |
+
.woocommerce button.button.alt:hover:after,
|
740 |
+
.woocommerce button.button:hover:after,
|
741 |
+
.woocommerce input.button.alt:hover:after,
|
742 |
+
.woocommerce input.button:hover:after {
|
743 |
+
opacity: 0;
|
744 |
+
}
|
745 |
+
|
746 |
+
|
747 |
+
/**
|
748 |
+
* **************************
|
749 |
+
* Thrive Compatibility css
|
750 |
+
* **************************
|
751 |
+
*/
|
752 |
+
|
753 |
+
.thrv_wrapper .wcf-optin-form div{
|
754 |
+
-webkit-box-sizing: border-box;
|
755 |
+
-moz-box-sizing: border-box;
|
756 |
+
box-sizing: border-box;
|
757 |
+
}
|
assets/css/optin-template.css
ADDED
@@ -0,0 +1,757 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* **************
|
3 |
+
* Login & Coupon Field Layout
|
4 |
+
* **************
|
5 |
+
*/
|
6 |
+
/* Editor CSS */
|
7 |
+
.elementor-editor-active .wcf-optin-form .woocommerce #order_review #payment #place_order {
|
8 |
+
pointer-events: none !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
.cartflows-container .wcf-optin-form,
|
12 |
+
.cartflows-container .wcf-optin-form * {
|
13 |
+
-webkit-box-sizing: border-box;
|
14 |
+
-moz-box-sizing: border-box;
|
15 |
+
box-sizing: border-box;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wcf-optin-form .wc-backward {
|
19 |
+
display: none !important;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
23 |
+
.wcf-optin-form .woocommerce form .form-row-last{
|
24 |
+
width: 50%;
|
25 |
+
display: block;
|
26 |
+
}
|
27 |
+
|
28 |
+
.wcf-optin-form .woocommerce form .form-row-full{
|
29 |
+
width: 100%;
|
30 |
+
clear: both;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wcf-optin-form form .form-row-wide{
|
34 |
+
width: 100%;
|
35 |
+
}
|
36 |
+
|
37 |
+
/* To test divi and all */
|
38 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
39 |
+
.woocommerce-page form .form-row-first{
|
40 |
+
float: left;
|
41 |
+
clear: left;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wcf-optin-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
|
45 |
+
float: right;
|
46 |
+
clear: right;
|
47 |
+
}
|
48 |
+
|
49 |
+
.wcf-optin-form .woocommerce form .form-row .required{
|
50 |
+
color: red;
|
51 |
+
font-weight: 700;
|
52 |
+
border: 0!important;
|
53 |
+
text-decoration: none;
|
54 |
+
}
|
55 |
+
|
56 |
+
/* To test divi and all */
|
57 |
+
.wcf-optin-form form .form-row-first.form-row-one{
|
58 |
+
clear: both;
|
59 |
+
}
|
60 |
+
|
61 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login{
|
62 |
+
display: none;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* **************
|
67 |
+
* Common Classes
|
68 |
+
* **************
|
69 |
+
*/
|
70 |
+
|
71 |
+
.wcf-optin-form .woocommerce .blockUI.blockOverlay {
|
72 |
+
font-size: 15px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
|
76 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
|
77 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid select{
|
78 |
+
border-width: 1px;
|
79 |
+
border-color: #e2401c;
|
80 |
+
}
|
81 |
+
|
82 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated .select2-container,
|
83 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated input.input-text,
|
84 |
+
.wcf-optin-form .woocommerce form .form-row.woocommerce-validated select{
|
85 |
+
border-width: 1px;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wcf-optin-form .select2-container--default.field-required .select2-selection--single,
|
89 |
+
.wcf-optin-form .woocommerce form .form-row input.input-text.field-required,
|
90 |
+
.wcf-optin-form .woocommerce form .form-row textarea.input-text.field-required,
|
91 |
+
.wcf-optin-form .woocommerce #order_review .input-text.field-required{
|
92 |
+
border-color: #e2401c;
|
93 |
+
}
|
94 |
+
|
95 |
+
.wcf-optin-form .woocommerce form .form-row input.field-validated{
|
96 |
+
border-left-width: 2px;
|
97 |
+
border-left-color: #69bf29;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* ************
|
102 |
+
* Main Layout
|
103 |
+
* ************
|
104 |
+
*/
|
105 |
+
|
106 |
+
/**
|
107 |
+
* ************************
|
108 |
+
* Radio Button & Checkbox
|
109 |
+
* ************************
|
110 |
+
*/
|
111 |
+
|
112 |
+
.wcf-optin-form .woocommerce #payment [type='radio']:checked + label,
|
113 |
+
.wcf-optin-form .woocommerce #payment [type='radio']:not(:checked) + label{
|
114 |
+
padding: 0px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]{
|
118 |
+
-webkit-border-radius: 50%;
|
119 |
+
border-radius: 50%;
|
120 |
+
margin-right: 4px;
|
121 |
+
line-height: 10px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
|
125 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,
|
126 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
127 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before{
|
128 |
+
content: "\e600";
|
129 |
+
margin: 0;
|
130 |
+
color: #F16334;
|
131 |
+
}
|
132 |
+
|
133 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"],
|
134 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox],
|
135 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"],
|
136 |
+
.wcf-optin-form .woocommerce #payment input[type=radio],
|
137 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]{
|
138 |
+
border: 1px solid #b4b9be;
|
139 |
+
background: #fff;
|
140 |
+
color: #555;
|
141 |
+
clear: none;
|
142 |
+
cursor: pointer;
|
143 |
+
display: inline-block;
|
144 |
+
line-height: 0;
|
145 |
+
height: 16px;
|
146 |
+
margin: -4px 4px 0 0;
|
147 |
+
outline: 0;
|
148 |
+
padding: 0!important;
|
149 |
+
text-align: center;
|
150 |
+
vertical-align: middle;
|
151 |
+
width: 16px;
|
152 |
+
min-width: 16px;
|
153 |
+
-webkit-appearance: none;
|
154 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
155 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
156 |
+
-webkit-transition: .05s border-color ease-in-out;
|
157 |
+
transition: .05s border-color ease-in-out;
|
158 |
+
}
|
159 |
+
|
160 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:focus,
|
161 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:focus,
|
162 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
|
163 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:focus,
|
164 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus{
|
165 |
+
border-color: #F16334;
|
166 |
+
-webkit-box-shadow: 0 0 2px rgba(241, 99, 52,.8);
|
167 |
+
box-shadow: 0 0 2px rgba(241, 99, 52,.8);
|
168 |
+
}
|
169 |
+
|
170 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{
|
171 |
+
background-color: #F16334;
|
172 |
+
-webkit-border-radius: 50px;
|
173 |
+
border-radius: 50px;
|
174 |
+
content: "\2022";
|
175 |
+
font-size: 24px;
|
176 |
+
height: 6px;
|
177 |
+
line-height: 16px;
|
178 |
+
margin: 4px;
|
179 |
+
text-indent: -9999px;
|
180 |
+
width: 6px;
|
181 |
+
}
|
182 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
|
183 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,
|
184 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
|
185 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before,
|
186 |
+
.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before{
|
187 |
+
display: inline-block;
|
188 |
+
float: left;
|
189 |
+
font: normal 15px/1 cartflows-icon;
|
190 |
+
speak: none;
|
191 |
+
vertical-align: middle;
|
192 |
+
width: 6px;
|
193 |
+
-webkit-font-smoothing: antialiased;
|
194 |
+
-moz-osx-font-smoothing: grayscale;
|
195 |
+
}
|
196 |
+
|
197 |
+
.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{
|
198 |
+
min-width: 16px;
|
199 |
+
}
|
200 |
+
|
201 |
+
.wcf-optin-form .woocommerce .col2-set .col-1,
|
202 |
+
.wcf-optin-form .woocommerce .col2-set .col-2,
|
203 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,
|
204 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2 {
|
205 |
+
float: none;
|
206 |
+
width: 100%;
|
207 |
+
max-width: 100%;
|
208 |
+
padding: 0px;
|
209 |
+
-webkit-border-radius: 0px;
|
210 |
+
border-radius: 0px;
|
211 |
+
border: none;
|
212 |
+
border-color: none;
|
213 |
+
margin-bottom: 0px;
|
214 |
+
}
|
215 |
+
|
216 |
+
.wcf-optin-form .woocommerce-additional-fields > h3,
|
217 |
+
.wcf-optin-form .woocommerce-billing-fields > h3,
|
218 |
+
.wcf-optin-form #order_review_heading,
|
219 |
+
.wcf-optin-form .woocommerce #ship-to-different-address {
|
220 |
+
display: none;
|
221 |
+
}
|
222 |
+
|
223 |
+
.wcf-optin-form .woocommerce-checkout #payment {
|
224 |
+
background: unset;
|
225 |
+
-webkit-border-radius: 0;
|
226 |
+
border-radius: 0;
|
227 |
+
}
|
228 |
+
|
229 |
+
.wcf-optin-form .woocommerce-checkout #payment .form-row {
|
230 |
+
margin: 0;
|
231 |
+
padding: 0;
|
232 |
+
}
|
233 |
+
|
234 |
+
.wcf-optin-form .woocommerce-checkout #payment .form-row label.checkbox{
|
235 |
+
display: block;
|
236 |
+
margin-bottom: 1.1em;
|
237 |
+
}
|
238 |
+
|
239 |
+
.wcf-optin-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
|
240 |
+
float: none;
|
241 |
+
margin-left: 10px;
|
242 |
+
}
|
243 |
+
|
244 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box .form-row{
|
245 |
+
margin: 0 0 0.5em;
|
246 |
+
}
|
247 |
+
|
248 |
+
.wcf-optin-form .woocommerce-checkout #payment fieldset .form-row
|
249 |
+
.wcf-optin-form .woocommerce-checkout #payment fieldset p{
|
250 |
+
margin-bottom: 10px;
|
251 |
+
}
|
252 |
+
|
253 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box{
|
254 |
+
background-color: #eaeaea;
|
255 |
+
font-family: inherit;
|
256 |
+
font-weight:inherit;
|
257 |
+
margin-bottom: 0.5em;
|
258 |
+
}
|
259 |
+
|
260 |
+
.wcf-optin-form #add_payment_method #payment div.payment_box::before,
|
261 |
+
.wcf-optin-form .woocommerce-cart #payment div.payment_box::before,
|
262 |
+
.wcf-optin-form .woocommerce-checkout #payment div.payment_box::before{
|
263 |
+
content: '';
|
264 |
+
display: block;
|
265 |
+
border: 1em solid;
|
266 |
+
border-right-color: transparent;
|
267 |
+
border-left-color: transparent;
|
268 |
+
border-top-color: transparent;
|
269 |
+
border-bottom-color: #eaeaea;
|
270 |
+
position: absolute;
|
271 |
+
top: -.75em;
|
272 |
+
left: 0;
|
273 |
+
margin: -1em 0 0 2em;
|
274 |
+
}
|
275 |
+
|
276 |
+
/* Fields */
|
277 |
+
.wcf-optin-form .select2-container--default .select2-selection--single {
|
278 |
+
display: block;
|
279 |
+
width: 100%;
|
280 |
+
min-height: 34px;
|
281 |
+
height: auto;
|
282 |
+
padding: 11px 12px;
|
283 |
+
font-size: 14px;
|
284 |
+
line-height: 1.42857143 !important;
|
285 |
+
color: #555;
|
286 |
+
background-color: #fff;
|
287 |
+
background-image: none;
|
288 |
+
border: 1px solid;
|
289 |
+
border-color: #d4d4d4;
|
290 |
+
-webkit-border-radius: 3px;
|
291 |
+
border-radius: 3px;
|
292 |
+
-webkit-box-shadow: none;
|
293 |
+
box-shadow: none;
|
294 |
+
outline: none;
|
295 |
+
}
|
296 |
+
|
297 |
+
.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered {
|
298 |
+
color: #666;
|
299 |
+
line-height: 26px;
|
300 |
+
min-height: 26px;
|
301 |
+
overflow: visible;
|
302 |
+
padding-left: 0;
|
303 |
+
}
|
304 |
+
|
305 |
+
.wcf-optin-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
|
306 |
+
font-size: 14px;
|
307 |
+
}
|
308 |
+
|
309 |
+
.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__arrow {
|
310 |
+
height: 100%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.select2-dropdown{
|
314 |
+
border: 1px solid #d4d4d4;
|
315 |
+
}
|
316 |
+
|
317 |
+
.wcf-optin-form .woocommerce form .form-row input.input-text,
|
318 |
+
.wcf-optin-form .woocommerce form .form-row textarea,
|
319 |
+
.wcf-optin-form .woocommerce form .form-row select,
|
320 |
+
.wcf-optin-form .woocommerce #order_review .input-text{
|
321 |
+
display: block;
|
322 |
+
width: 100%;
|
323 |
+
min-height: 34px;
|
324 |
+
padding: 11px 12px;
|
325 |
+
font-family: inherit;
|
326 |
+
font-weight:inherit;
|
327 |
+
font-size: 14px;
|
328 |
+
line-height: 1.42857143 !important;
|
329 |
+
color: #555;
|
330 |
+
background-color: #fff;
|
331 |
+
background-image: none;
|
332 |
+
border: 1px solid;
|
333 |
+
border-color: #d4d4d4;
|
334 |
+
-webkit-border-radius: 3px;
|
335 |
+
border-radius: 3px;
|
336 |
+
-webkit-box-shadow: none;
|
337 |
+
box-shadow: none;
|
338 |
+
height: auto;
|
339 |
+
}
|
340 |
+
|
341 |
+
.wcf-optin-form #order_review{
|
342 |
+
padding: 0;
|
343 |
+
width: 100%;
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
.wcf-optin-form input[type="text"]:focus,
|
348 |
+
.wcf-optin-form input[type="email"]:focus,
|
349 |
+
.wcf-optin-form input[type="password"]:focus,
|
350 |
+
.wcf-optin-form input[type="tel"]:focus,
|
351 |
+
.wcf-optin-form textarea:focus,
|
352 |
+
.wcf-optin-form .select2-container--open {
|
353 |
+
border-color: #b3b3b3;
|
354 |
+
-webkit-box-shadow: none;
|
355 |
+
box-shadow: none;
|
356 |
+
outline: none;
|
357 |
+
}
|
358 |
+
|
359 |
+
.wcf-optin-form button:focus {
|
360 |
+
outline: none;
|
361 |
+
outline-color: none;
|
362 |
+
outline-style: none;
|
363 |
+
outline-width: none;
|
364 |
+
}
|
365 |
+
|
366 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button,
|
367 |
+
.wcf-optin-form form.checkout_coupon .button {
|
368 |
+
display: block;
|
369 |
+
clear: both;
|
370 |
+
border: none;
|
371 |
+
font-size: 15px;
|
372 |
+
font-family: inherit;
|
373 |
+
font-weight: inherit;
|
374 |
+
background-color: #F16334;
|
375 |
+
line-height: 9px;
|
376 |
+
padding: 18px;
|
377 |
+
margin-bottom: 10px;
|
378 |
+
width: 100%;
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
.wcf-optin-form .woocommerce #order_review #payment button {
|
383 |
+
float: none;
|
384 |
+
margin: 0 auto;
|
385 |
+
display: block;
|
386 |
+
}
|
387 |
+
|
388 |
+
.wcf-optin-form .woocommerce #order_review button {
|
389 |
+
border: 1px solid;
|
390 |
+
border-color: #F16334;
|
391 |
+
background-color: #F16334;
|
392 |
+
font-family: inherit;
|
393 |
+
font-weight:inherit;
|
394 |
+
font-size: 18px;
|
395 |
+
letter-spacing: 0.5px;
|
396 |
+
width: 100%;
|
397 |
+
padding: 16px 24px;
|
398 |
+
font-size: 16px;
|
399 |
+
line-height: 1.5;
|
400 |
+
-webkit-border-radius: 3px;
|
401 |
+
border-radius: 3px;
|
402 |
+
color: #fff;
|
403 |
+
}
|
404 |
+
|
405 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small {
|
406 |
+
padding: 8px 6px;
|
407 |
+
background-color: #c8c8c8;
|
408 |
+
border: 1px #c8c8c8 solid;
|
409 |
+
}
|
410 |
+
|
411 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{
|
412 |
+
border-color: #F16334;
|
413 |
+
background-color: #F16334;
|
414 |
+
}
|
415 |
+
.wcf-optin-form .woocommerce #payment #place_order:hover {
|
416 |
+
background-color: #F16334;
|
417 |
+
border-color: #F16334;
|
418 |
+
color: #fff;
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* ***********************
|
423 |
+
* New checkout style
|
424 |
+
* ***********************
|
425 |
+
*/
|
426 |
+
|
427 |
+
.wcf-optin-form .woocommerce-form-coupon-toggle,
|
428 |
+
.wcf-optin-form .woocommerce-additional-fields,
|
429 |
+
.wcf-optin-form table.shop_table.woocommerce-checkout-review-order-table {
|
430 |
+
display: none !important;
|
431 |
+
}
|
432 |
+
|
433 |
+
.wcf-optin-form .woocommerce-checkout{
|
434 |
+
display: inline-block;
|
435 |
+
text-align: inherit;
|
436 |
+
width: 100%;
|
437 |
+
}
|
438 |
+
|
439 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set{
|
440 |
+
display: block;
|
441 |
+
width: 100%;
|
442 |
+
float: none;
|
443 |
+
margin: 10px 0 0 0;
|
444 |
+
padding: 0px;
|
445 |
+
}
|
446 |
+
|
447 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
|
448 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{
|
449 |
+
margin: 0 -7px;
|
450 |
+
-ms-flex-wrap: wrap;
|
451 |
+
flex-wrap: wrap;
|
452 |
+
-js-display: flex;
|
453 |
+
display: -webkit-box;
|
454 |
+
display: -moz-box;
|
455 |
+
display: -ms-flexbox;
|
456 |
+
display: flex;
|
457 |
+
display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
|
458 |
+
flex-wrap: wrap;
|
459 |
+
-webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
|
460 |
+
}
|
461 |
+
|
462 |
+
.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
|
463 |
+
margin: 0px -7px;
|
464 |
+
}
|
465 |
+
|
466 |
+
.wcf-optin-form .woocommerce form .form-row{
|
467 |
+
display: block;
|
468 |
+
margin-bottom: 1.1em;
|
469 |
+
padding: 3px 7px;
|
470 |
+
position: relative;
|
471 |
+
}
|
472 |
+
|
473 |
+
.wcf-optin-form .woocommerce form .woocommerce-account-fields {
|
474 |
+
display: none;
|
475 |
+
}
|
476 |
+
|
477 |
+
.wcf-optin-form .woocommerce form .woocommerce-account-fields .form-row{
|
478 |
+
padding: 0px;
|
479 |
+
}
|
480 |
+
|
481 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row label,
|
482 |
+
.wcf-optin-form .woocommerce-checkout .form-row label{
|
483 |
+
font-size: 13px;
|
484 |
+
line-height: 1em;
|
485 |
+
letter-spacing: 0.3px;
|
486 |
+
font-family: inherit;
|
487 |
+
font-weight:inherit;
|
488 |
+
margin-bottom: 8px;
|
489 |
+
}
|
490 |
+
|
491 |
+
.wcf-optin-form .woocommerce .woocommerce-billing-fields label,
|
492 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields label{
|
493 |
+
display: inherit;
|
494 |
+
}
|
495 |
+
|
496 |
+
.wcf-optin-form .woocommerce .woocommerce-terms-and-conditions-wrapper {
|
497 |
+
display: none;
|
498 |
+
}
|
499 |
+
|
500 |
+
.wcf-optin-form .woocommerce a{
|
501 |
+
color: #F16334;
|
502 |
+
background-color: transparent;
|
503 |
+
text-decoration: none;
|
504 |
+
}
|
505 |
+
|
506 |
+
.wcf-optin-form .woocommerce .woocommerce-info,
|
507 |
+
.wcf-optin-form .woocommerce .woocommerce-error,
|
508 |
+
.wcf-optin-form .woocommerce .woocommerce-message,
|
509 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message,
|
510 |
+
.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message{
|
511 |
+
padding: 1em 2em 0.4em 2.0em;
|
512 |
+
border-top:none;
|
513 |
+
background-color: inherit;
|
514 |
+
font-size: 14px;
|
515 |
+
font-weight: 500;
|
516 |
+
text-align: left;
|
517 |
+
margin:0px;
|
518 |
+
}
|
519 |
+
|
520 |
+
.wcf-optin-form .woocommerce-info::before,
|
521 |
+
.wcf-optin-form .woocommerce-message::before{
|
522 |
+
left: 0.1em;
|
523 |
+
color: #F16334;
|
524 |
+
}
|
525 |
+
|
526 |
+
.wcf-optin-form .woocommerce .woocommerce-error,
|
527 |
+
.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
|
528 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
|
529 |
+
background-color: #fff6f6;
|
530 |
+
border: dashed 1px #a00;
|
531 |
+
padding: 25px 25px 20px;
|
532 |
+
color: #a00;
|
533 |
+
margin: 1rem 0 1rem;
|
534 |
+
font-size: 14px;
|
535 |
+
width: 100%;
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
.wcf-optin-form .woocommerce .woocommerce-error::before {
|
540 |
+
content: '';
|
541 |
+
}
|
542 |
+
|
543 |
+
.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
|
544 |
+
display: inline;
|
545 |
+
}
|
546 |
+
|
547 |
+
.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
|
548 |
+
margin:1em 0 1em;
|
549 |
+
}
|
550 |
+
|
551 |
+
.wcf-optin-form .woocommerce .woocommerce-error li{
|
552 |
+
list-style: disc inside !important;
|
553 |
+
margin: 0 0 8px;
|
554 |
+
}
|
555 |
+
|
556 |
+
.wcf-optin-form .woocommerce .woocommerce-error li strong{
|
557 |
+
font-weight: 400;
|
558 |
+
}
|
559 |
+
|
560 |
+
.wcf-optin-form .woocommerce form.checkout_coupon{
|
561 |
+
border: 1px solid #d3ced2;
|
562 |
+
padding: 30px 20px 20px;
|
563 |
+
margin: 2em 0;
|
564 |
+
text-align: left;
|
565 |
+
-webkit-border-radius: 5px;
|
566 |
+
border-radius: 5px;
|
567 |
+
}
|
568 |
+
|
569 |
+
.wcf-optin-form .woocommerce .checkout_coupon p{
|
570 |
+
font-size: 14px;
|
571 |
+
}
|
572 |
+
|
573 |
+
.wcf-optin-form .woocommerce .checkout_coupon p{
|
574 |
+
font-family: inherit;
|
575 |
+
font-weight: 500;
|
576 |
+
margin-top: 0;
|
577 |
+
margin-bottom: 10px;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* **********************
|
582 |
+
* One Column Layout
|
583 |
+
* **********************
|
584 |
+
*/
|
585 |
+
|
586 |
+
.wcf-optin-form-one-column{
|
587 |
+
background: inherit;
|
588 |
+
width: 100%;
|
589 |
+
margin:0 auto;
|
590 |
+
}
|
591 |
+
|
592 |
+
.wcf-optin-form-one-column .woocommerce .col2-set .col-1,
|
593 |
+
.wcf-optin-form-one-column .woocommerce .col2-set .col-2,
|
594 |
+
.wcf-optin-form-one-column .woocommerce-checkout .shop_table,
|
595 |
+
.wcf-optin-form-one-column .woocommerce-checkout .wcf-qty-options,
|
596 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,
|
597 |
+
.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading,
|
598 |
+
.wcf-optin-form-one-column .woocommerce-checkout #payment,
|
599 |
+
.wcf-optin-form-one-column .woocommerce form.checkout_coupon,
|
600 |
+
.wcf-optin-form-one-column .woocommerce .wcf-order-wrap{
|
601 |
+
width: 100%;
|
602 |
+
}
|
603 |
+
|
604 |
+
.wcf-optin-form-one-column input[type="text"],
|
605 |
+
.wcf-optin-form-one-column input[type="email"],
|
606 |
+
.wcf-optin-form-one-column input[type="password"],
|
607 |
+
.wcf-optin-form-one-column input[type="tel"],
|
608 |
+
.wcf-optin-form-one-column textarea,
|
609 |
+
.wcf-optin-form-one-column select {
|
610 |
+
display: block;
|
611 |
+
width: 100%;
|
612 |
+
min-height: 40px;
|
613 |
+
padding: 11px 12px;
|
614 |
+
font-family: inherit;
|
615 |
+
font-weight:inherit;
|
616 |
+
font-size: 14px;
|
617 |
+
line-height: 1.42857143;
|
618 |
+
color: #555;
|
619 |
+
background-color: #fff;
|
620 |
+
background-image: none;
|
621 |
+
border: 1px solid #d4d4d4;
|
622 |
+
-webkit-border-radius: 3px;
|
623 |
+
border-radius: 3px;
|
624 |
+
-webkit-box-shadow: none;
|
625 |
+
box-shadow: none;
|
626 |
+
}
|
627 |
+
|
628 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,
|
629 |
+
.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading{
|
630 |
+
margin:20px 0 0;
|
631 |
+
}
|
632 |
+
|
633 |
+
.wcf-optin-form-one-column .woocommerce-checkout #order_review{
|
634 |
+
width: 100%;
|
635 |
+
}
|
636 |
+
|
637 |
+
@media only screen and (max-width: 768px) {
|
638 |
+
|
639 |
+
.wcf-optin-form form.checkout_coupon .button{
|
640 |
+
font-size: 12px;
|
641 |
+
}
|
642 |
+
|
643 |
+
/* Added for pro support */
|
644 |
+
.wcf-optin-form .woocommerce .col2-set .col-1,
|
645 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,
|
646 |
+
.wcf-optin-form .woocommerce .wcf-order-wrap {
|
647 |
+
padding: 15px 0;
|
648 |
+
}
|
649 |
+
|
650 |
+
.wcf-optin-form .woocommerce .col2-set .col-2,
|
651 |
+
.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2 {
|
652 |
+
padding: 0;
|
653 |
+
}
|
654 |
+
|
655 |
+
.wcf-optin-form .woocommerce form .form-row-first,
|
656 |
+
.wcf-optin-form .woocommerce form .form-row-last {
|
657 |
+
width: 100%;
|
658 |
+
}
|
659 |
+
|
660 |
+
.wcf-optin-form .woocommerce-additional-fields > h3,
|
661 |
+
.wcf-optin-form .woocommerce-billing-fields > h3,
|
662 |
+
.wcf-optin-form #order_review_heading,
|
663 |
+
.wcf-optin-form .woocommerce #ship-to-different-address{
|
664 |
+
font-size: 1.0em;
|
665 |
+
}
|
666 |
+
}
|
667 |
+
|
668 |
+
|
669 |
+
/**
|
670 |
+
* **********************
|
671 |
+
* Divi Css Overrite
|
672 |
+
* **********************
|
673 |
+
*/
|
674 |
+
|
675 |
+
#et-info-email:before,
|
676 |
+
#et-info-phone:before,
|
677 |
+
#et_search_icon:before,
|
678 |
+
.comment-reply-link:after,
|
679 |
+
.et-cart-info span:before,
|
680 |
+
.et-pb-arrow-next:before,
|
681 |
+
.et-pb-arrow-prev:before,
|
682 |
+
.et-social-icon a:before,
|
683 |
+
.et_audio_container .mejs-playpause-button button:before,
|
684 |
+
.et_audio_container .mejs-volume-button button:before,
|
685 |
+
.et_overlay:before,
|
686 |
+
.et_password_protected_form .et_submit_button:after,
|
687 |
+
.et_pb_button:after,
|
688 |
+
.et_pb_contact_reset:after,
|
689 |
+
.et_pb_contact_submit:after,
|
690 |
+
.et_pb_font_icon:before,
|
691 |
+
.et_pb_newsletter_button:after,
|
692 |
+
.et_pb_pricing_table_button:after,
|
693 |
+
.et_pb_promo_button:after,
|
694 |
+
.et_pb_social_icon a.icon:before,
|
695 |
+
.et_pb_testimonial:before,
|
696 |
+
.et_pb_toggle_title:before,
|
697 |
+
.form-submit .et_pb_button:after,
|
698 |
+
.mobile_menu_bar:before,
|
699 |
+
.woocommerce #content input.button.alt:after,
|
700 |
+
.woocommerce #content input.button:after,
|
701 |
+
.woocommerce #respond input#submit.alt:after,
|
702 |
+
.woocommerce #respond input#submit:after,
|
703 |
+
.woocommerce a.button.alt:after,
|
704 |
+
.woocommerce button.button.alt:after,
|
705 |
+
.woocommerce button.button:after,
|
706 |
+
.woocommerce button.single_add_to_cart_button.button:after,
|
707 |
+
.woocommerce input.button.alt:after,
|
708 |
+
.woocommerce input.button:after,
|
709 |
+
.woocommerce-page #content input.button.alt:after,
|
710 |
+
.woocommerce-page #content input.button:after,
|
711 |
+
.woocommerce-page #respond input#submit.alt:after,
|
712 |
+
.woocommerce-page #respond input#submit:after,
|
713 |
+
.woocommerce-page a.button.alt:after,
|
714 |
+
.woocommerce-page a.button:after,
|
715 |
+
.woocommerce-page button.button.alt:after,
|
716 |
+
.woocommerce-page button.button:after,
|
717 |
+
.woocommerce-page input.button.alt:after,
|
718 |
+
.woocommerce-page input.button:after,
|
719 |
+
a.et_pb_more_button:after{
|
720 |
+
text-shadow: 0 0;
|
721 |
+
font-family: none;
|
722 |
+
font-weight: 400;
|
723 |
+
font-style: normal;
|
724 |
+
font-variant: normal;
|
725 |
+
-webkit-font-smoothing: antialiased;
|
726 |
+
-moz-osx-font-smoothing: grayscale;
|
727 |
+
line-height: 1;
|
728 |
+
text-transform: none;
|
729 |
+
speak: none;
|
730 |
+
}
|
731 |
+
|
732 |
+
.comment-reply-link:hover:after,
|
733 |
+
.woocommerce #content input.button.alt:hover:after,
|
734 |
+
.woocommerce #content input.button:hover:after,
|
735 |
+
.woocommerce #respond input#submit.alt:hover:after,
|
736 |
+
.woocommerce #respond input#submit:hover:after,
|
737 |
+
.woocommerce a.button.alt:hover:after,
|
738 |
+
.woocommerce a.button:hover:after,
|
739 |
+
.woocommerce button.button.alt:hover:after,
|
740 |
+
.woocommerce button.button:hover:after,
|
741 |
+
.woocommerce input.button.alt:hover:after,
|
742 |
+
.woocommerce input.button:hover:after {
|
743 |
+
opacity: 0;
|
744 |
+
}
|
745 |
+
|
746 |
+
|
747 |
+
/**
|
748 |
+
* **************************
|
749 |
+
* Thrive Compatibility css
|
750 |
+
* **************************
|
751 |
+
*/
|
752 |
+
|
753 |
+
.thrv_wrapper .wcf-optin-form div{
|
754 |
+
-webkit-box-sizing: border-box;
|
755 |
+
-moz-box-sizing: border-box;
|
756 |
+
box-sizing: border-box;
|
757 |
+
}
|
assets/js/import.js
CHANGED
@@ -95,14 +95,15 @@ var CartFlowsAjaxQueue = (function() {
|
|
95 |
remaining_steps : 0,
|
96 |
remaining_install_plugins : 0,
|
97 |
remaining_active_plugins : 0,
|
98 |
-
woo_required_steps: [ 'checkout', 'upsell', 'downsell', 'thankyou' ],
|
99 |
-
step_order: [ 'landing', 'checkout', 'upsell', 'downsell', 'thankyou' ],
|
100 |
new_step_names: {
|
101 |
'landing': 'Landing',
|
102 |
'checkout': 'Checkout (Woo)',
|
103 |
'upsell': 'Upsell (Woo)',
|
104 |
'downsell': 'Downsell (Woo)',
|
105 |
'thankyou': 'Thank You (Woo)',
|
|
|
106 |
},
|
107 |
|
108 |
/**
|
@@ -787,6 +788,10 @@ var CartFlowsAjaxQueue = (function() {
|
|
787 |
array.sort(function (a, b) {
|
788 |
var A = a[key], B = b[key];
|
789 |
|
|
|
|
|
|
|
|
|
790 |
if (order.indexOf(A) > order.indexOf(B)) {
|
791 |
return 1;
|
792 |
} else {
|
@@ -842,10 +847,10 @@ var CartFlowsAjaxQueue = (function() {
|
|
842 |
|
843 |
CartFlowsAPI._api_request( api_post, function( data ) {
|
844 |
|
845 |
-
data.items = CartFlowsImport.mapOrder( data.items, CartFlowsImport.step_order, 'slug' )
|
846 |
var step_type_response_data = data;
|
847 |
var step_types_count = data.items_count;
|
848 |
-
|
849 |
// Send other request for JS caching.
|
850 |
if( data.items ) {
|
851 |
for ( key in data.items ) {
|
@@ -884,8 +889,8 @@ var CartFlowsAjaxQueue = (function() {
|
|
884 |
var template = wp.template('cartflows-term-filters');
|
885 |
$('#wcf-categories').html(template( step_type_response_data ));
|
886 |
$('#wcf-scratch-steps-categories').html(template_dropdown( step_type_response_data ));
|
887 |
-
$('#wcf-
|
888 |
-
$('#wcf-categories').find('li
|
889 |
|
890 |
$('.wcf-page-builder-notice').remove();
|
891 |
$('#wcf-remote-content').find( '.spinner' ).remove();
|
95 |
remaining_steps : 0,
|
96 |
remaining_install_plugins : 0,
|
97 |
remaining_active_plugins : 0,
|
98 |
+
woo_required_steps: [ 'checkout', 'upsell', 'downsell', 'thankyou', 'optin' ],
|
99 |
+
step_order: [ 'landing', 'checkout', 'upsell', 'downsell', 'thankyou', 'optin' ],
|
100 |
new_step_names: {
|
101 |
'landing': 'Landing',
|
102 |
'checkout': 'Checkout (Woo)',
|
103 |
'upsell': 'Upsell (Woo)',
|
104 |
'downsell': 'Downsell (Woo)',
|
105 |
'thankyou': 'Thank You (Woo)',
|
106 |
+
'optin' : 'Optin (Woo)'
|
107 |
},
|
108 |
|
109 |
/**
|
788 |
array.sort(function (a, b) {
|
789 |
var A = a[key], B = b[key];
|
790 |
|
791 |
+
if ( order.indexOf(A) === -1 ) {
|
792 |
+
return 0;
|
793 |
+
}
|
794 |
+
|
795 |
if (order.indexOf(A) > order.indexOf(B)) {
|
796 |
return 1;
|
797 |
} else {
|
847 |
|
848 |
CartFlowsAPI._api_request( api_post, function( data ) {
|
849 |
|
850 |
+
data.items = CartFlowsImport.mapOrder( data.items, CartFlowsImport.step_order, 'slug' );
|
851 |
var step_type_response_data = data;
|
852 |
var step_types_count = data.items_count;
|
853 |
+
|
854 |
// Send other request for JS caching.
|
855 |
if( data.items ) {
|
856 |
for ( key in data.items ) {
|
889 |
var template = wp.template('cartflows-term-filters');
|
890 |
$('#wcf-categories').html(template( step_type_response_data ));
|
891 |
$('#wcf-scratch-steps-categories').html(template_dropdown( step_type_response_data ));
|
892 |
+
$('#wcf-scratch-steps-categories').find('option:first').addClass('current');
|
893 |
+
$('#wcf-categories').find('li a[data-slug=landing]').addClass('current');
|
894 |
|
895 |
$('.wcf-page-builder-notice').remove();
|
896 |
$('#wcf-remote-content').find( '.spinner' ).remove();
|
assets/js/optin-template.js
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Checkout Custom Field Validations
|
5 |
+
* This will collect all the present fields in the woocommerce form and adds an class if the field
|
6 |
+
* is blank
|
7 |
+
*/
|
8 |
+
var wcf_custom_field_validation = function(){
|
9 |
+
|
10 |
+
var custom_field_add_class = function (field_value, field_row, field_wrap, field_type){
|
11 |
+
|
12 |
+
if ( field_value == '' || 'select' == field_type && field_value == ' ') {
|
13 |
+
if( field_row.hasClass('validate-required') ){
|
14 |
+
|
15 |
+
field_wrap.addClass('field-required');
|
16 |
+
}
|
17 |
+
} else {
|
18 |
+
field_wrap.removeClass('field-required');
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
var fields_wrapper = $('form.woocommerce-checkout #customer_details'),
|
24 |
+
$all_fields = fields_wrapper.find('input, textarea'),
|
25 |
+
$selects = fields_wrapper.find('select');
|
26 |
+
|
27 |
+
$all_fields.blur(function(){
|
28 |
+
var $this = $(this),
|
29 |
+
field_type = $this.attr('type'),
|
30 |
+
field_row = $this.closest('p.form-row'),
|
31 |
+
field_value = $this.val();
|
32 |
+
|
33 |
+
custom_field_add_class(field_value, field_row, $this, field_type);
|
34 |
+
|
35 |
+
});
|
36 |
+
|
37 |
+
|
38 |
+
$selects.blur(function(){
|
39 |
+
var $this = $(this),
|
40 |
+
field_row = $this.closest('p.form-row'),
|
41 |
+
field_type = 'select',
|
42 |
+
field_wrap = field_row.find('.select2-container--default'),
|
43 |
+
field_value = field_row.find('select').val();
|
44 |
+
|
45 |
+
custom_field_add_class(field_value, field_row, field_wrap, field_type);
|
46 |
+
|
47 |
+
});
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
var wcf_check_is_local_storage = function(){
|
52 |
+
var test = 'test';
|
53 |
+
try {
|
54 |
+
localStorage.setItem(test, test);
|
55 |
+
localStorage.removeItem(test);
|
56 |
+
return true;
|
57 |
+
} catch(e) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
var wcf_persistent_data = function(){
|
63 |
+
|
64 |
+
if( 'yes' != cartflows.allow_persistance ){
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( false === wcf_check_is_local_storage() ) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
var checkout_cust_form = 'form.woocommerce-checkout #customer_details';
|
73 |
+
|
74 |
+
var wcf_form_data = {
|
75 |
+
set : function (){
|
76 |
+
|
77 |
+
var checkout_data = [];
|
78 |
+
var checkout_form = $('form.woocommerce-checkout #customer_details');
|
79 |
+
|
80 |
+
localStorage.removeItem('cartflows_checkout_form');
|
81 |
+
|
82 |
+
checkout_form.find('input[type=text], select, input[type=email], input[type=tel]').each(function(){
|
83 |
+
checkout_data.push({ name: this.name, value: this.value});
|
84 |
+
});
|
85 |
+
|
86 |
+
cartflows_checkout_form = JSON.stringify(checkout_data);
|
87 |
+
localStorage.setItem('cartflows_checkout_form', cartflows_checkout_form);
|
88 |
+
},
|
89 |
+
get : function (){
|
90 |
+
|
91 |
+
|
92 |
+
if( localStorage.getItem('cartflows_checkout_form') != null ){
|
93 |
+
|
94 |
+
checkout_data = JSON.parse( localStorage.getItem('cartflows_checkout_form') );
|
95 |
+
|
96 |
+
for (var i = 0; i < checkout_data.length; i++) {
|
97 |
+
if($('form.woocommerce-checkout [name='+checkout_data[i].name+']').hasClass('select2-hidden-accessible'))
|
98 |
+
{
|
99 |
+
$('form.woocommerce-checkout [name='+checkout_data[i].name+']').selectWoo("val", [checkout_data[i].value]);
|
100 |
+
}else{
|
101 |
+
$('form.woocommerce-checkout [name='+checkout_data[i].name+']').val(checkout_data[i].value);
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
wcf_form_data.get();
|
110 |
+
|
111 |
+
$( checkout_cust_form + " input, " + checkout_cust_form + " select").change( function() {
|
112 |
+
wcf_form_data.set();
|
113 |
+
});
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
$(document).ready(function($) {
|
119 |
+
|
120 |
+
wcf_persistent_data();
|
121 |
+
|
122 |
+
wcf_custom_field_validation();
|
123 |
+
});
|
124 |
+
|
125 |
+
})(jQuery);
|
assets/min-css/checkout-template-divi-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c!important}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:50px 0 0}.et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{margin-bottom:1.1em;padding:3px 3px 0 3px}.et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;text-transform:capitalize;margin-bottom:8px}.cartflows-canvas #page-container{padding-top:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-info,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{color:inherit!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6!important;border:dashed 1px #a00!important;padding:25px 25px 20px!important;color:#a00!important;margin:1rem 0 1rem!important;font-size:14px!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error li{font-weight:400!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio],.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_module #wcf-embed-checkout-form #order_review_heading,.et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address,.et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;text-transform:capitalize;margin:0 0 25px 0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block!important;font-family:inherit;font-weight:600;width:45%;margin:50px 0 0;padding:0 10px 20px;border:none;border-bottom:none}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0;margin:0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:right;margin:0;list-style:none;font-weight:inherit}.et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;color:#444;margin-top:0;margin-bottom:1.5em}.et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{list-style:none}.et_pb_module #wcf-embed-checkout-form .woocommerce a{color:#f16334;text-decoration:none}.et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:25px;margin-top:25px;border-top:1px solid #dcdcdc;padding-top:25px}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{color:inherit!important;border:none!important;background-color:transparent!important;padding:0 2em 1.2em 2em!important;font-size:14px!important;margin:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{display:block!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .wcf-col2-set{display:block;margin-top:10px;padding-left:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{display:block!important;margin:20px 0 0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding-left:0;padding:0;-webkit-border-radius:0;border-radius:0;margin-top:10px;margin-bottom:20px}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{float:none;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a{color:#fff}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;-webkit-border-radius:3px;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;-webkit-border-radius:3px;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}@media only screen and (max-width:768px){.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;float:none;padding-left:0;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:block!important;float:none;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{display:block;float:none;width:100%}}@media (max-width:767px){.et_pb_module #wcf-embed-checkout-form .woocommerce .form-row{width:100%!important}}
|
1 |
+
.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c!important}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:50px 0 0}.et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{margin-bottom:1.1em;padding:3px 3px 0 3px}.et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.cartflows-canvas #page-container{padding-top:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-info,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{color:inherit!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6!important;border:dashed 1px #a00!important;padding:25px 25px 20px!important;color:#a00!important;margin:1rem 0 1rem!important;font-size:14px!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error li{font-weight:400!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio],.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_module #wcf-embed-checkout-form #order_review_heading,.et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address,.et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block!important;font-family:inherit;font-weight:600;width:45%;margin:50px 0 0;padding:0 10px 20px;border:none;border-bottom:none}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0;margin:0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:right;margin:0;list-style:none;font-weight:inherit}.et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;color:#444;margin-top:0;margin-bottom:1.5em}.et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{list-style:none}.et_pb_module #wcf-embed-checkout-form .woocommerce a{color:#f16334;text-decoration:none}.et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:25px;margin-top:25px;border-top:1px solid #dcdcdc;padding-top:25px}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{color:inherit!important;border:none!important;background-color:transparent!important;padding:0 2em 1.2em 2em!important;font-size:14px!important;margin:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{display:block!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .wcf-col2-set{display:block;margin-top:10px;padding-left:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{display:block!important;margin:20px 0 0;width:100%}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;-webkit-border-radius:3px;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;-webkit-border-radius:3px;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}@media only screen and (max-width:768px){.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;float:none;padding-left:0;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:block!important;float:none;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{display:block;float:none;width:100%}}@media (max-width:767px){.et_pb_module #wcf-embed-checkout-form .woocommerce .form-row{width:100%!important}}
|
assets/min-css/checkout-template-divi.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c!important}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:50px 0 0}.et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{margin-bottom:1.1em;padding:3px 3px 0 3px}.et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;text-transform:capitalize;margin-bottom:8px}.cartflows-canvas #page-container{padding-top:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-info,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{color:inherit!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6!important;border:dashed 1px #a00!important;padding:25px 25px 20px!important;color:#a00!important;margin:1rem 0 1rem!important;font-size:14px!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error li{font-weight:400!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio],.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_module #wcf-embed-checkout-form #order_review_heading,.et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address,.et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;text-transform:capitalize;margin:0 0 25px 0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block!important;font-family:inherit;font-weight:600;width:45%;margin:50px 0 0;padding:0 10px 20px;border:none;border-bottom:none}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0;margin:0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;list-style:none;font-weight:inherit}.et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;color:#444;margin-top:0;margin-bottom:1.5em}.et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{list-style:none}.et_pb_module #wcf-embed-checkout-form .woocommerce a{color:#f16334;text-decoration:none}.et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:25px;margin-top:25px;border-top:1px solid #dcdcdc;padding-top:25px}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{color:inherit!important;border:none!important;background-color:transparent!important;padding:0 2em 1.2em 2em!important;font-size:14px!important;margin:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{display:block!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .wcf-col2-set{display:block;margin-top:10px;padding-right:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{display:block!important;margin:20px 0 0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding-right:0;padding:0;-webkit-border-radius:0;border-radius:0;margin-top:10px;margin-bottom:20px}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{float:none;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a{color:#fff}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;-webkit-border-radius:3px;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;-webkit-border-radius:3px;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}@media only screen and (max-width:768px){.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;float:none;padding-right:0;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:block!important;float:none;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{display:block;float:none;width:100%}}@media (max-width:767px){.et_pb_module #wcf-embed-checkout-form .woocommerce .form-row{width:100%!important}}
|
1 |
+
.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c!important}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:50px 0 0}.et_pb_module #wcf-embed-checkout-form .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row select,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row{margin-bottom:1.1em;padding:3px 3px 0 3px}.et_pb_module #wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.cartflows-canvas #page-container{padding-top:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-info,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{color:inherit!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6!important;border:dashed 1px #a00!important;padding:25px 25px 20px!important;color:#a00!important;margin:1rem 0 1rem!important;font-size:14px!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error li{font-weight:400!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio],.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.et_pb_module #wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_module #wcf-embed-checkout-form #order_review_heading,.et_pb_module #wcf-embed-checkout-form .woocommerce #ship-to-different-address,.et_pb_module #wcf-embed-checkout-form .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block!important;font-family:inherit;font-weight:600;width:45%;margin:50px 0 0;padding:0 10px 20px;border:none;border-bottom:none}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0;margin:0}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #add_payment_method #payment ul.payment_methods li,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;list-style:none;font-weight:inherit}.et_pb_module #wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;color:#444;margin-top:0;margin-bottom:1.5em}.et_pb_module #wcf-embed-checkout-form .woocommerce .shop_table #shipping_method li{list-style:none}.et_pb_module #wcf-embed-checkout-form .woocommerce a{color:#f16334;text-decoration:none}.et_pb_module #wcf-embed-checkout-form .wcf-custom-coupon-field{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:25px;margin-top:25px;border-top:1px solid #dcdcdc;padding-top:25px}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{color:inherit!important;border:none!important;background-color:transparent!important;padding:0 2em 1.2em 2em!important;font-size:14px!important;margin:0!important}.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.et_pb_module #wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{display:block!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce .wcf-col2-set{display:block;margin-top:10px;padding-right:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-one-column .woocommerce-checkout #order_review_heading{display:block!important;margin:20px 0 0;width:100%}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;-webkit-border-radius:3px;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;-webkit-border-radius:3px;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.et_pb_module #wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.et_pb_module #wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}@media only screen and (max-width:768px){.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;float:none;padding-right:0;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:block!important;float:none;width:100%}.et_pb_module #wcf-embed-checkout-form .woocommerce-checkout #order_review{display:block;float:none;width:100%}}@media (max-width:767px){.et_pb_module #wcf-embed-checkout-form .woocommerce .form-row{width:100%!important}}
|
assets/min-css/checkout-template-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-left:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:left;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.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{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.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{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-right-width:2px;border-right-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;text-transform:capitalize;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-right:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;right:0;margin:-1em 2em 0 0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-right:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.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{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;right:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 8px 0 0}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:right;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-left:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%;text-transform:uppercase}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff;text-transform:uppercase}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:right}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;text-transform:capitalize;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:initial}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:right;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{right:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:right;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-left:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px;text-transform:capitalize}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
1 |
+
.cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-left:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:left;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.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{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.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{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-right-width:2px;border-right-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-right:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;right:0;margin:-1em 2em 0 0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-right:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.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{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;right:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 8px 0 0}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:right;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-left:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:right}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:right;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{right:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:right;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-left:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
assets/min-css/checkout-template.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-right:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:right;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.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{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.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{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-left-width:2px;border-left-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;text-transform:capitalize;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-left:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;left:0;margin:-1em 0 0 2em}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-left:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.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{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;left:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 0 0 8px}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:left;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-right:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%;text-transform:uppercase}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff;text-transform:uppercase}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:left}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;text-transform:capitalize;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:initial}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:left;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{left:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:left;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-right:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px;text-transform:capitalize}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
1 |
+
.cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-right:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:right;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.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{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.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{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-left-width:2px;border-left-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-left:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;left:0;margin:-1em 0 0 2em}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-left:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.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{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;left:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 0 0 8px}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:left;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-right:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:left}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:left;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{left:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:left;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-right:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
assets/min-css/import-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.no-elementor-notice{border-right:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-right:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;right:0;left:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);left:0;right:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);left:22%;right:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:right}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;right:0;left:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 0 0 5px;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;right:0!important;left:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;left:0;bottom:50px;right:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:left}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:right;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1.5em 1em 1em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-left:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;right:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(50%,-40%);-ms-transform:translate(50%,-40%);transform:translate(50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-left:2em;padding-left:0;text-align:left;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px;line-height:29px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;left:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;right:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;right:50%;-webkit-transform:translate(50%,-35%);-ms-transform:translate(50%,-35%);transform:translate(50%,-35%);width:70%;min-height:450px;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:right;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;left:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;right:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;min-height:450px;max-height:450px;padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:right;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;left:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-right:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;right:50%;bottom:0;left:0;max-width:100%;max-height:100%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-right:0}#wcf-remote-filters .filter-links li:last-child a{margin-left:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 3px 0 0}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-left:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
1 |
+
.no-elementor-notice{border-right:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-right:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;right:0;left:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);left:0;right:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);left:22%;right:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:right}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;right:0;left:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 0 0 5px;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;right:0!important;left:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;left:0;bottom:50px;right:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:left}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:right;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1.5em 1em 1em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-left:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;right:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(50%,-40%);-ms-transform:translate(50%,-40%);transform:translate(50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-left:2em;padding-left:0;text-align:left;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 6px 2px 2px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;left:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;right:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;right:50%;-webkit-transform:translate(50%,-35%);-ms-transform:translate(50%,-35%);transform:translate(50%,-35%);width:70%;min-height:450px;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:right;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;left:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;right:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;min-height:450px;max-height:450px;padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:right;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;left:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-right:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;right:50%;bottom:0;left:0;max-width:100%;max-height:100%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-right:0}#wcf-remote-filters .filter-links li:last-child a{margin-left:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 3px 0 0}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-left:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
assets/min-css/import.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.no-elementor-notice{border-left:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-left:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;left:0;right:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);right:0;left:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);right:22%;left:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:left}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 5px 0 0;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;right:0;bottom:50px;left:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:right}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:left;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1em 1em 1.5em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-right:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;left:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(-50%,-40%);-ms-transform:translate(-50%,-40%);transform:translate(-50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-right:2em;padding-right:0;text-align:right;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px;line-height:29px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;right:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;left:50%;-webkit-transform:translate(-50%,-35%);-ms-transform:translate(-50%,-35%);transform:translate(-50%,-35%);width:70%;min-height:450px;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:left;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;right:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;left:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;min-height:450px;max-height:450px;padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:left;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-left:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;left:50%;bottom:0;right:0;max-width:100%;max-height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-left:0}#wcf-remote-filters .filter-links li:last-child a{margin-right:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 0 0 3px}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-right:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
1 |
+
.no-elementor-notice{border-left:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-left:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;left:0;right:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);right:0;left:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);right:22%;left:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:left}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 5px 0 0;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;right:0;bottom:50px;left:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:right}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:left;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1em 1em 1.5em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-right:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;left:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(-50%,-40%);-ms-transform:translate(-50%,-40%);transform:translate(-50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-right:2em;padding-right:0;text-align:right;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 6px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;right:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;left:50%;-webkit-transform:translate(-50%,-35%);-ms-transform:translate(-50%,-35%);transform:translate(-50%,-35%);width:70%;min-height:450px;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:left;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;right:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;left:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;min-height:450px;max-height:450px;padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:left;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-left:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;left:50%;bottom:0;right:0;max-width:100%;max-height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-left:0}#wcf-remote-filters .filter-links li:last-child a{margin-right:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 0 0 3px}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-right:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
assets/min-css/optin-template-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.elementor-editor-active .wcf-optin-form .woocommerce #order_review #payment #place_order{pointer-events:none!important}.cartflows-container .wcf-optin-form,.cartflows-container .wcf-optin-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-optin-form .wc-backward{display:none!important}.wcf-optin-form .woocommerce form .form-row-first,.wcf-optin-form .woocommerce form .form-row-last{width:50%;display:block}.wcf-optin-form .woocommerce form .form-row-full{width:100%;clear:both}.wcf-optin-form form .form-row-wide{width:100%}.wcf-optin-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:right;clear:right}.wcf-optin-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:left;clear:left}.wcf-optin-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-optin-form form .form-row-first.form-row-one{clear:both}.wcf-optin-form .woocommerce form.woocommerce-form-login{display:none}.wcf-optin-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-optin-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-optin-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-optin-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-optin-form .select2-container--default.field-required .select2-selection--single,.wcf-optin-form .woocommerce #order_review .input-text.field-required,.wcf-optin-form .woocommerce form .form-row input.input-text.field-required,.wcf-optin-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-optin-form .woocommerce form .form-row input.field-validated{border-right-width:2px;border-right-color:#69bf29}.wcf-optin-form .woocommerce #payment [type=radio]:checked+label,.wcf-optin-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-optin-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-optin-form .woocommerce #payment input[type=checkbox],.wcf-optin-form .woocommerce #payment input[type=radio],.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-optin-form .woocommerce #payment input[type=checkbox]:focus,.wcf-optin-form .woocommerce #payment input[type=radio]:focus,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-optin-form .woocommerce .col2-set .col-1,.wcf-optin-form .woocommerce .col2-set .col-2,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-optin-form #order_review_heading,.wcf-optin-form .woocommerce #ship-to-different-address,.wcf-optin-form .woocommerce-additional-fields>h3,.wcf-optin-form .woocommerce-billing-fields>h3{display:none}.wcf-optin-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-optin-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-optin-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-optin-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-right:10px}.wcf-optin-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-optin-form .woocommerce-checkout #payment fieldset .form-row .wcf-optin-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-optin-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-optin-form #add_payment_method #payment div.payment_box::before,.wcf-optin-form .woocommerce-cart #payment div.payment_box::before,.wcf-optin-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;right:0;margin:-1em 2em 0 0}.wcf-optin-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:26px;min-height:26px;overflow:visible;padding-right:0}.select2-results__option[data-selected],.wcf-optin-form .select2-results__option[aria-selected]{font-size:14px}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-optin-form .woocommerce #order_review .input-text,.wcf-optin-form .woocommerce form .form-row input.input-text,.wcf-optin-form .woocommerce form .form-row select,.wcf-optin-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-optin-form #order_review{padding:0;width:100%}.wcf-optin-form .select2-container--open,.wcf-optin-form input[type=email]:focus,.wcf-optin-form input[type=password]:focus,.wcf-optin-form input[type=tel]:focus,.wcf-optin-form input[type=text]:focus,.wcf-optin-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-optin-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-optin-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-optin-form .woocommerce #order_review #payment button{float:none;margin:0 auto;display:block}.wcf-optin-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-optin-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-optin-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-optin-form .woocommerce-additional-fields,.wcf-optin-form .woocommerce-form-coupon-toggle,.wcf-optin-form table.shop_table.woocommerce-checkout-review-order-table{display:none!important}.wcf-optin-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-optin-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;float:none;margin:10px 0 0 0;padding:0}.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-optin-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-optin-form .woocommerce form .woocommerce-account-fields{display:none}.wcf-optin-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-optin-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-optin-form .woocommerce .woocommerce-billing-fields label,.wcf-optin-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-optin-form .woocommerce .woocommerce-terms-and-conditions-wrapper{display:none}.wcf-optin-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-optin-form .woocommerce .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-info,.wcf-optin-form .woocommerce .woocommerce-message,.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:right;margin:0}.wcf-optin-form .woocommerce-info::before,.wcf-optin-form .woocommerce-message::before{right:.1em;color:#f16334}.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-optin-form .woocommerce .woocommerce-error::before{content:''}.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-optin-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-optin-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-optin-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:right;-webkit-border-radius:5px;border-radius:5px}.wcf-optin-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-optin-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}.wcf-optin-form-one-column{background:inherit;width:100%;margin:0 auto}.wcf-optin-form-one-column .woocommerce .col2-set .col-1,.wcf-optin-form-one-column .woocommerce .col2-set .col-2,.wcf-optin-form-one-column .woocommerce .wcf-order-wrap,.wcf-optin-form-one-column .woocommerce form.checkout_coupon,.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,.wcf-optin-form-one-column .woocommerce-checkout #payment,.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading,.wcf-optin-form-one-column .woocommerce-checkout .shop_table,.wcf-optin-form-one-column .woocommerce-checkout .wcf-qty-options{width:100%}.wcf-optin-form-one-column input[type=email],.wcf-optin-form-one-column input[type=password],.wcf-optin-form-one-column input[type=tel],.wcf-optin-form-one-column input[type=text],.wcf-optin-form-one-column select,.wcf-optin-form-one-column textarea{display:block;width:100%;min-height:40px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading{margin:20px 0 0}.wcf-optin-form-one-column .woocommerce-checkout #order_review{width:100%}@media only screen and (max-width:768px){.wcf-optin-form form.checkout_coupon .button{font-size:12px}.wcf-optin-form .woocommerce .col2-set .col-1,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-optin-form .woocommerce .wcf-order-wrap{padding:15px 0}.wcf-optin-form .woocommerce .col2-set .col-2,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2{padding:0}.wcf-optin-form .woocommerce form .form-row-first,.wcf-optin-form .woocommerce form .form-row-last{width:100%}.wcf-optin-form #order_review_heading,.wcf-optin-form .woocommerce #ship-to-different-address,.wcf-optin-form .woocommerce-additional-fields>h3,.wcf-optin-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after{opacity:0}.thrv_wrapper .wcf-optin-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
assets/min-css/optin-template.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.elementor-editor-active .wcf-optin-form .woocommerce #order_review #payment #place_order{pointer-events:none!important}.cartflows-container .wcf-optin-form,.cartflows-container .wcf-optin-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-optin-form .wc-backward{display:none!important}.wcf-optin-form .woocommerce form .form-row-first,.wcf-optin-form .woocommerce form .form-row-last{width:50%;display:block}.wcf-optin-form .woocommerce form .form-row-full{width:100%;clear:both}.wcf-optin-form form .form-row-wide{width:100%}.wcf-optin-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:left;clear:left}.wcf-optin-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right;clear:right}.wcf-optin-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-optin-form form .form-row-first.form-row-one{clear:both}.wcf-optin-form .woocommerce form.woocommerce-form-login{display:none}.wcf-optin-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-optin-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-optin-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-optin-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-optin-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-optin-form .select2-container--default.field-required .select2-selection--single,.wcf-optin-form .woocommerce #order_review .input-text.field-required,.wcf-optin-form .woocommerce form .form-row input.input-text.field-required,.wcf-optin-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-optin-form .woocommerce form .form-row input.field-validated{border-left-width:2px;border-left-color:#69bf29}.wcf-optin-form .woocommerce #payment [type=radio]:checked+label,.wcf-optin-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-optin-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-optin-form .woocommerce #payment input[type=checkbox],.wcf-optin-form .woocommerce #payment input[type=radio],.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-optin-form .woocommerce #payment input[type=checkbox]:focus,.wcf-optin-form .woocommerce #payment input[type=radio]:focus,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before,.wcf-optin-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-optin-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-optin-form .woocommerce .col2-set .col-1,.wcf-optin-form .woocommerce .col2-set .col-2,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-optin-form #order_review_heading,.wcf-optin-form .woocommerce #ship-to-different-address,.wcf-optin-form .woocommerce-additional-fields>h3,.wcf-optin-form .woocommerce-billing-fields>h3{display:none}.wcf-optin-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-optin-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-optin-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-optin-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-left:10px}.wcf-optin-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-optin-form .woocommerce-checkout #payment fieldset .form-row .wcf-optin-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-optin-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-optin-form #add_payment_method #payment div.payment_box::before,.wcf-optin-form .woocommerce-cart #payment div.payment_box::before,.wcf-optin-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;left:0;margin:-1em 0 0 2em}.wcf-optin-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:26px;min-height:26px;overflow:visible;padding-left:0}.select2-results__option[data-selected],.wcf-optin-form .select2-results__option[aria-selected]{font-size:14px}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-optin-form .woocommerce #order_review .input-text,.wcf-optin-form .woocommerce form .form-row input.input-text,.wcf-optin-form .woocommerce form .form-row select,.wcf-optin-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-optin-form #order_review{padding:0;width:100%}.wcf-optin-form .select2-container--open,.wcf-optin-form input[type=email]:focus,.wcf-optin-form input[type=password]:focus,.wcf-optin-form input[type=tel]:focus,.wcf-optin-form input[type=text]:focus,.wcf-optin-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-optin-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-optin-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-optin-form .woocommerce #order_review #payment button{float:none;margin:0 auto;display:block}.wcf-optin-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-optin-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-optin-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-optin-form .woocommerce-additional-fields,.wcf-optin-form .woocommerce-form-coupon-toggle,.wcf-optin-form table.shop_table.woocommerce-checkout-review-order-table{display:none!important}.wcf-optin-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-optin-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;float:none;margin:10px 0 0 0;padding:0}.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-optin-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-optin-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-optin-form .woocommerce form .woocommerce-account-fields{display:none}.wcf-optin-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-optin-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-optin-form .woocommerce .woocommerce-billing-fields label,.wcf-optin-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-optin-form .woocommerce .woocommerce-terms-and-conditions-wrapper{display:none}.wcf-optin-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-optin-form .woocommerce .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-info,.wcf-optin-form .woocommerce .woocommerce-message,.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:left;margin:0}.wcf-optin-form .woocommerce-info::before,.wcf-optin-form .woocommerce-message::before{left:.1em;color:#f16334}.wcf-optin-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-error,.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-optin-form .woocommerce .woocommerce-error::before{content:''}.wcf-optin-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-optin-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-optin-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-optin-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-optin-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:left;-webkit-border-radius:5px;border-radius:5px}.wcf-optin-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-optin-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}.wcf-optin-form-one-column{background:inherit;width:100%;margin:0 auto}.wcf-optin-form-one-column .woocommerce .col2-set .col-1,.wcf-optin-form-one-column .woocommerce .col2-set .col-2,.wcf-optin-form-one-column .woocommerce .wcf-order-wrap,.wcf-optin-form-one-column .woocommerce form.checkout_coupon,.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,.wcf-optin-form-one-column .woocommerce-checkout #payment,.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading,.wcf-optin-form-one-column .woocommerce-checkout .shop_table,.wcf-optin-form-one-column .woocommerce-checkout .wcf-qty-options{width:100%}.wcf-optin-form-one-column input[type=email],.wcf-optin-form-one-column input[type=password],.wcf-optin-form-one-column input[type=tel],.wcf-optin-form-one-column input[type=text],.wcf-optin-form-one-column select,.wcf-optin-form-one-column textarea{display:block;width:100%;min-height:40px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.wcf-optin-form-one-column .woocommerce-checkout #order_review_heading,.wcf-optin-form-one-column .woocommerce-checkout #your_products_heading{margin:20px 0 0}.wcf-optin-form-one-column .woocommerce-checkout #order_review{width:100%}@media only screen and (max-width:768px){.wcf-optin-form form.checkout_coupon .button{font-size:12px}.wcf-optin-form .woocommerce .col2-set .col-1,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-optin-form .woocommerce .wcf-order-wrap{padding:15px 0}.wcf-optin-form .woocommerce .col2-set .col-2,.wcf-optin-form .woocommerce .wcf-col2-set .wcf-col-2{padding:0}.wcf-optin-form .woocommerce form .form-row-first,.wcf-optin-form .woocommerce form .form-row-last{width:100%}.wcf-optin-form #order_review_heading,.wcf-optin-form .woocommerce #ship-to-different-address,.wcf-optin-form .woocommerce-additional-fields>h3,.wcf-optin-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after{opacity:0}.thrv_wrapper .wcf-optin-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
assets/min-js/import.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var CartFlowsAjaxQueue=function(){var s=[];return{add:function(t){s.push(t)},remove:function(t){-1<jQuery.inArray(t,s)&&s.splice($.inArray(t,s),1)},run:function(){var t,e=this;s.length?(t=s[0].complete,s[0].complete=function(){"function"==typeof t&&t(),s.shift(),e.run.apply(e,[])},jQuery.ajax(s[0])):e.tid=setTimeout(function(){e.run.apply(e,[])},1e3)},stop:function(){s=[],clearTimeout(this.tid)}}}();!function(c){CartFlowsImport={doc:c(document),wrap:c(".wcf-flow-steps-data-wrap"),inner:c(".wcf-flow-steps-data-wrap-importer"),post_id:c("#post_ID").val(),_ref:null,_api_step_type:{},_api_params:{},all_steps:0,remaining_steps:0,remaining_install_plugins:0,remaining_active_plugins:0,woo_required_steps:["checkout","upsell","downsell","thankyou"],step_order:["landing","checkout","upsell","downsell","thankyou"],new_step_names:{landing:"Landing",checkout:"Checkout (Woo)",upsell:"Upsell (Woo)",downsell:"Downsell (Woo)",thankyou:"Thank You (Woo)"},init:function(){if(this._bind(),"other"!==CartFlowsImportVars.default_page_builder&&(c(".post-type-cartflows_flow").hasClass("edit-php")&&this._process_cache_remote_flows(),c(".post-type-cartflows_flow").hasClass("post-php")&&this._process_cache_remote_steps()),c(".post-type-cartflows_flow").hasClass("edit-php")&&null!==this._getParamFromURL("add-new-flow")&&this._render_remote_flows(),c(".post-type-cartflows_flow").hasClass("post-php")&&null!==this._getParamFromURL("add-new-step")&&this._render_remote_steps(),this._getParamFromURL("highlight-step-id")){var t=c('.wcf-step-wrap[data-id="'+this._getParamFromURL("highlight-step-id")+'"]');t.length&&c("html, body").animate({scrollTop:t.offset().top},1500)}if(c(".post-type-cartflows_flow").hasClass("edit-php")){var e=c(".edit-php.post-type-cartflows_flow").find(".page-title-action:first");e.after('<a href="'+CartFlowsImportVars.export_url+'" class="page-title-action">Export</a>'),e.after('<a href="'+CartFlowsImportVars.import_url+'" class="page-title-action">Import</a>')}},_getParamFromURL:function(t,e){e=e||window.location.href,t=t.replace(/[\[\]]/g,"\\$&");var s=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},_bind:function(){var t=CartFlowsImport;t.doc.on("click",".wcf-install-plugin",t._install_plugin),t.doc.on("cartflows-api-request-fail",t._api_request_failed),t.doc.on("click","#wcf-get-started-steps a, .wcf-create-from-scratch-link",t._toggle_ready_templates),t.doc.on("click",".cartflows-flow-import-blank",t._create_default_flow),t.doc.on("click","#wcf-remote-flow-importer .wcf-page-builder-links a",t._filterFlowPageBuilderClick),t.doc.on("click","#wcf-remote-step-importer #wcf-categories .step-type-filter-links a",t._filterBlankStepCategoryClick),t.doc.on("change","#wcf-remote-step-importer #wcf-scratch-steps-categories .step-type-filter-links",t._filterBlankStepCategoryChange),t.doc.on("click","#wcf-get-started-steps",t._filterBlankStepCategoryChange),t.doc.on("click","#wcf-remote-step-importer .wcf-page-builder-links a",t._filterStepPageBuilderClick),t.doc.on("click",".cartflows-step-import-blank:not(.get-pro)",t._create_blank_step),t.doc.on("click","#wcf-remote-step-importer .cartflows-step-import",t._process_import_step),t.doc.on("click","#wcf-remote-flow-importer .cartflows-step-import",t._process_import_flow),t.doc.on("click",".cartflows-preview-flow-step",t._preview_individual),t.doc.on("add_template_to_page-fail",t._add_template_to_page_fail),c("body").on("thickbox:iframe:loaded",t._previewLoaded),c(document).on("keyup input","#wcf-remote-step-importer .wcf-flow-search-input",t._remote_step_search),c(document).on("click",".actions a",t._previewResponsive),c(document).on("click",".page-title-action:first",t._render_remote_flows),c(document).on("click",".wcf-trigger-popup",t._render_remote_steps),c(document).on("click",".wcf-templates-popup-overlay",t._close_template_popup),c(document).on("click",".wcf-popup-close-wrap .close-icon",t._close_template_popup),c(document).on("wp-plugin-install-success",t._installSuccess),c(document).on("click",".wcf-activate-wc",t._installWc)},_install_plugin:function(t){t.preventDefault();var e=c(this);if(!e.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process"),c("#wcf-remote-step-importer").addClass("request-process"),e.addClass("updating-message button");var s=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(s,function(t,e){"install"===e.status&&CartFlowsImport.remaining_install_plugins++,"activate"===e.status&&CartFlowsImport.remaining_active_plugins++}),CartFlowsImport.remaining_install_plugins?CartFlowsImport._install_all_plugins():CartFlowsImport.remaining_active_plugins?CartFlowsImport._activate_all_plugins():c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps()}},_install_all_plugins:function(){var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(t,function(t,e){"install"===e.status&&wp.updates.queue.push({action:"install-plugin",data:{slug:e.slug}})}),wp.updates.queueChecker()},_activate_all_plugins:function(){if(CartFlowsImport.remaining_active_plugins||CartFlowsImport.remaining_install_plugins){var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;CartFlowsAjaxQueue.stop(),CartFlowsAjaxQueue.run(),c.each(t,function(t,e){"activate"===e.status&&CartFlowsAjaxQueue.add({url:CartFlowsImportVars.ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:e.init,security:CartFlowsImportVars.cartflows_activate_plugin_nonce},success:function(t){CartFlowsImport.remaining_active_plugins--,CartFlowsImport.remaining_active_plugins||CartFlowsImport.remaining_install_plugins||(c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps())}})})}else c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps()},_installSuccess:function(t,s){t.preventDefault(),"no"===CartFlowsImportVars.is_wc_activated&&CartFlowsImport._activateWc();var e=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(e,function(t,e){"install"===e.status&&s.slug===e.slug&&c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:e.init,security:CartFlowsImportVars.cartflows_activate_plugin_nonce}}).done(function(t,e,s){CartFlowsImport.remaining_install_plugins--,CartFlowsImport.remaining_install_plugins||CartFlowsImport._activate_all_plugins()})})},_api_request_failed:function(t,e,s,a){"error"==a&&(c("#wcf-remote-content-failed").length||c("#wcf-ready-templates").html(wp.template("cartflows-website-unreachable")))},_toggle_ready_templates:function(t){t.preventDefault();var e=c(this).data("slug")||"";c("#wcf-get-started-steps").find("a").removeClass("current"),c("#wcf-get-started-steps").find('a[data-slug="'+e+'"]').addClass("current"),"canvas"==e?(c("#wcf-ready-templates").hide(),c("#wcf-start-from-scratch").show()):(c("#wcf-ready-templates").show(),c("#wcf-start-from-scratch").hide()),!c(".wcf-page-builder-notice").length&&c("#wcf-remote-step-importer").length&&CartFlowsImport._showSteps()},_switch_step_tab:function(t){t.preventDefault();var e=c(".wcf-tab > li.active > a").attr("href");c(".wcf-tab > li.active").removeClass("active"),c(this).parents("li").addClass("active"),c(e).removeClass("active"),c(e).addClass("hide");var s=c(this).attr("href");c(s).removeClass("hide"),c(s).addClass("active")},_remote_step_search:function(t){t.preventDefault(),c(".step-type-filter-links").find("option").removeClass("current"),c(".step-type-filter-links").find("option:first-child").addClass("current"),window.clearTimeout(CartFlowsImport._ref),CartFlowsImport._ref=window.setTimeout(function(){CartFlowsImport._ref=null,CartFlowsImport._showSteps()},500)},_previewResponsive:function(t){t.preventDefault();var e=c(this).find(".dashicons"),s=e.attr("data-view")||"";c("#TB_window").removeClass("desktop tablet mobile"),c("#TB_window").addClass(s),c(".actions .dashicons").removeClass("active"),e.addClass("active"),c("#TB_iframeContent").removeClass(),c("#TB_iframeContent").addClass(s)},_filterStepPageBuilderClick:function(t){t.preventDefault(),c(this).parents("ul").find("a").removeClass("current"),c(this).addClass("current");var e=c(".step-type-filter-links .current").data("slug")||"";"upsell"===e||"downsell"===e?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),c(".wcf-page-builder-notice").html(""),c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps()},_filterBlankStepCategoryClick:function(t){t.preventDefault(),c(".wcf-page-builder-notice").html("");var e=c(this).data("group")||"";e&&(c("#wcf-scratch-steps-categories .step-type-filter-links").val(e),c("#wcf-scratch-steps-categories .step-type-filter-links option").removeClass("current"),c('#wcf-scratch-steps-categories .step-type-filter-links option[data-group="'+e+'"]').addClass("current")),c(".step-type-filter-links").find("a").removeClass("current"),c(this).addClass("current"),$step_type=c(this).data("slug"),"upsell"===$step_type||"downsell"===$step_type?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),""!=CartFlowsImportVars._is_pro_active||"upsell"!=$step_type&&"downsell"!=$step_type?(c(".cartflows-step-import-blank").text("Create Step"),c(".cartflows-step-import-blank").removeClass("get-pro"),c(".cartflows-step-import-blank").removeAttr("target")):(c(".cartflows-step-import-blank").text("Get Pro"),c(".cartflows-step-import-blank").attr("href",CartFlowsImportVars.domain_url),c(".cartflows-step-import-blank").attr("target","_blank"),c(".cartflows-step-import-blank").addClass("get-pro")),c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps()},_filterBlankStepCategoryChange:function(t){t.preventDefault(),c(".wcf-notice-wrap").remove(),c(".cartflows-step-import-blank").css("pointer-events","auto").removeClass("disabled");var e=c(".step-type-filter-links").find("option:selected").val()||"";if(e&&(c(".step-type-filter-links").val(e),c(".step-type-filter-links").find("a").removeClass("current"),c(".step-type-filter-links").find('a[data-group="'+e+'"]').addClass("current")),c(".step-type-filter-links").find("option").removeClass("current"),c(".step-type-filter-links").find("option:selected").addClass("current"),$step_type=c(".step-type-filter-links").find("option:selected").data("slug"),!("no"!==CartFlowsImportVars.is_wc_installed&&"no"!==CartFlowsImportVars.is_wc_activated||"upsell"!==$step_type&&"downsell"!==$step_type&&"checkout"!==$step_type&&"thankyou"!==$step_type))return c(".cartflows-step-import-blank").after("<p class='wcf-notice-wrap' style='text-align: center'>You need WooCommerce plugin installed and actived to use this product flow. <br/><br/> <a href='#' class='wcf-activate-wc button-secondary'> Click here to install and activate WooCommerce </a> </p>"),void c(".cartflows-step-import-blank").addClass("disabled").css("pointer-events","none");"upsell"===$step_type||"downsell"===$step_type?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),""!=CartFlowsImportVars._is_pro_active||"upsell"!=$step_type&&"downsell"!=$step_type?(c(".cartflows-step-import-blank").text("Create Step"),c(".cartflows-step-import-blank").removeClass("get-pro"),c(".cartflows-step-import-blank").removeAttr("target")):(c(".cartflows-step-import-blank").text("Get Pro"),c(".cartflows-step-import-blank").attr("href",CartFlowsImportVars.domain_url),c(".cartflows-step-import-blank").attr("target","_blank"),c(".cartflows-step-import-blank").addClass("get-pro")),!c(".wcf-page-builder-notice").length&&c("#wcf-remote-step-importer").length&&(c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps())},_showSteps:function(){var t={licence_args:CartFlowsImportVars.licence_args,per_page:15,_fields:CartFlowsImportVars.step_fields.toString()},e=c("#wcf-categories .step-type-filter-links").find(".current").data("group")||"",a=c("#wcf-categories .step-type-filter-links").find(".current").data("slug");""!==e&&"all"!==e&&(t[CartFlowsImportVars.step_type]=e);e=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("group")||"",a=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("slug")||"";var r=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("title")||"Page Builder";""!==e&&"all"!==e&&(t[CartFlowsImportVars.step_page_builder]=e);var s={remote_slug:CartFlowsImportVars.step,slug:CartFlowsImportVars.step+"?"+decodeURIComponent(c.param(t))};CartFlowsAPI._api_request(s,function(s){s.current_step_type=a,"yes"!==CartFlowsImportVars.is_wc_activated&&c.each(s.items,function(t,e){s.items[t].woo_required=!1,0<=c.inArray(e.step_type.slug,CartFlowsImport.woo_required_steps)&&(s.items[t].woo_required=!0)});var t=wp.template("cartflows-steps-list");parseInt(s.items_count)?c("#wcf-remote-step-list").html(t(s)):(c("#wcf-remote-step-list").html(wp.template("cartflows-no-steps")),c(".cartflows-no-steps").find(".description").html("We are working on ready templates designed with "+r+'.<br/>Meanwhile you can <a href="#" data-slug="canvas" class="wcf-create-from-scratch-link">create your own designs</a> easily.')),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-step-importer").removeClass("request-process")})},_apiAddParam_per_page:function(){CartFlowsImport._api_params.per_page=15},_apiAddParam_licence_args:function(){CartFlowsImport._api_params.licence_args=CartFlowsImportVars.licence_args},_apiAddParam_search:function(){var t=c(".wcf-flow-search-input").val()||"";""!==t&&(CartFlowsImport._api_params.search=t)},_close_popup:function(){c("#cartflows-steps").fadeOut(),c("body").removeClass("cartflows-popup-is-open")},_post_auto_save:function(){var t=c("#title"),e=c("#title-prompt-text"),s=CartFlowsImport;t.val()||(t.val("CartFlows #"+s.post_id),e.length&&e.remove()),wp.autosave&&wp.autosave.server.triggerSave()},_process_cache_remote_flows:function(){if("gutenberg"==CartFlowsImportVars.default_page_builder)CartFlowsImport._cache_remote_flows();else{var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins,s=!0;c.each(t,function(t,e){s&&("install"!==e.status&&"activate"!==e.status||(s=!1))}),!1===s?(c(".wcf-page-builder-notice").html(wp.template("cartflows-page-builder-notice")),c("#wcf-remote-flow-list").find(".spinner").remove()):CartFlowsImport._cache_remote_flows()}},_cache_remote_flows:function(){CartFlowsImport;var t={search:CartFlowsImportVars.default_page_builder,licence_args:CartFlowsImportVars.licence_args,hide_empty:!1,_fields:CartFlowsImportVars.flow_page_builder_fields.toString()},e={remote_slug:CartFlowsImportVars.flow_page_builder,slug:CartFlowsImportVars.flow_page_builder+"?"+decodeURIComponent(c.param(t)),wrapper_class:"wcf-page-builder-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-page-builders").html(e(t)),c("#wcf-page-builders").find("li:first a").addClass("current");var s={licence_args:CartFlowsImportVars.licence_args,hide_empty:!0,_fields:CartFlowsImportVars.flow_type_fields.toString()},a={remote_slug:CartFlowsImportVars.flow_type,slug:CartFlowsImportVars.flow_type+"?"+decodeURIComponent(c.param(s)),wrapper_class:"flow-type-filter-links filter-links",show_all:!1};CartFlowsAPI._api_request(a,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-categories").html(e(t)),c("#wcf-categories").find("li:first a").addClass("current"),CartFlowsImport._showFlows()})})},_render_remote_flows:function(t){t&&t.preventDefault(),c("#wcf-remote-flow-importer").addClass("open"),c("html").addClass("wcf-popup-open")},_process_cache_remote_steps:function(){if("gutenberg"==CartFlowsImportVars.default_page_builder)CartFlowsImport._cache_remote_steps();else{var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins,s=!0;c.each(t,function(t,e){s&&("install"!==e.status&&"activate"!==e.status||(s=!1))}),!1===s?(c(".wcf-page-builder-notice").html(wp.template("cartflows-page-builder-notice")),c("#wcf-remote-step-list").find(".spinner").remove()):CartFlowsImport._cache_remote_steps()}},mapOrder:function(t,r,o){return t.sort(function(t,e){var s=t[o],a=e[o];return r.indexOf(s)>r.indexOf(a)?1:-1}),t},_cache_remote_steps:function(){CartFlowsImport;c("html").addClass("wcf-steps-loading");var t={search:CartFlowsImportVars.default_page_builder,licence_args:CartFlowsImportVars.licence_args,hide_empty:!1,_fields:CartFlowsImportVars.step_page_builder_fields.toString()},e={remote_slug:CartFlowsImportVars.step_page_builder,slug:CartFlowsImportVars.step_page_builder+"?"+decodeURIComponent(c.param(t)),wrapper_class:"wcf-page-builder-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-page-builders").html(e(t)),c("#wcf-page-builders").find("li:first a").addClass("current")});t={licence_args:CartFlowsImportVars.licence_args,_fields:CartFlowsImportVars.step_type_fields.toString()},e={remote_slug:CartFlowsImportVars.step_type,slug:CartFlowsImportVars.step_type+"?"+decodeURIComponent(c.param(t)),wrapper_class:"step-type-filter-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){t.items=CartFlowsImport.mapOrder(t.items,CartFlowsImport.step_order,"slug");var a=t,r=t.items_count;if(t.items)for(key in t.items){t.items[key].name=CartFlowsImport.new_step_names[t.items[key].slug];var e={licence_args:CartFlowsImportVars.licence_args,per_page:15,_fields:CartFlowsImportVars.step_fields.toString()};e[CartFlowsImportVars.step_type]=t.items[key].id;var s={remote_slug:CartFlowsImportVars.step,slug:CartFlowsImportVars.step+"?"+decodeURIComponent(c.param(e))};CartFlowsAPI._api_request(s,function(t){var e=wp.template("cartflows-steps-list");if(parseInt(t.items_count)?c("#wcf-remote-step-list").html(e(t)):c("#wcf-remote-step-list").html(wp.template("cartflows-no-steps")),0==--r){var s=wp.template("cartflows-term-filters-dropdown");e=wp.template("cartflows-term-filters");c("#wcf-categories").html(e(a)),c("#wcf-scratch-steps-categories").html(s(a)),c("#wcf-categories, #wcf-scratch-steps-categories").find("option:first").addClass("current"),c("#wcf-categories").find("li:first a").addClass("current"),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-content").find(".spinner").remove(),CartFlowsImport._showSteps(),c("html").removeClass("wcf-steps-loading")}})}})},_render_remote_steps:function(t){t&&t.preventDefault(),c("#wcf-remote-step-importer").addClass("open"),c("html").addClass("wcf-popup-open")},_categorize_data:function(t){var a=[];return c.each(t,function(t,e){var s=e.step_type.slug;void 0===a[s]&&(a[s]=[]),a[s].push(e)}),a},_close_template_popup:function(t){(c(t.target).hasClass("wcf-templates-popup-overlay")||c(t.target).hasClass("close-icon"))&&(c(".wcf-templates-popup-overlay").hasClass("request-process")||(c("html").removeClass("wcf-popup-open"),c(".wcf-templates-popup-overlay").removeClass("open")))},_ajax:function(t,a,r){var o=CartFlowsImport;c.ajax({url:ajaxurl,type:"POST",data:t}).done(function(t,e,s){a&&"function"==typeof a&&a({request:t,status:e,XHR:s}),o.doc.trigger(r+"-done",[t,e,s])}).fail(function(t,e){o.doc.trigger(r+"-fail",[t,e])}).always(function(){o.doc.trigger(r+"-always")})},_load_templates:function(t,a){var r=CartFlowsImport;c("body").hasClass("processing")||(c("body").addClass("processing"),c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_load_steps",security:cartflows_admin.cf_load_steps_nonce,args:t}}).done(function(t,e,s){r.doc.trigger(a,[t]),c("body").removeClass("processing")}).fail(function(t,e){}).always(function(){}))},_empty:function(t){if("number"==typeof t||"boolean"==typeof t)return!1;if(null==t)return!0;if(void 0!==t.length)return 0==t.length;var e=0;for(var s in t)t.hasOwnProperty(s)&&e++;return 0==e},_preview_individual:function(){var t=c(this).data("id")||"",e=c(this).data("href")||"";c(".cartflows-preview-flow-step").removeClass("active"),c('.cartflows-preview-flow-step[data-id="'+t+'"]').addClass("active"),c("#TB_window").addClass("cartflows-thickbox-loading"),c("#TB_iframeContent").removeAttr("onload"),c("#TB_iframeContent").removeAttr("src"),c("#TB_iframeContent").attr("src",e),c("#TB_iframeContent").attr("onload","CartFlowsImport.showIframe()")},showIframe:function(){c("#TB_load").remove(),c("#TB_window").css({visibility:"visible"}),c("#TB_window").removeClass("cartflows-thickbox-loading")},_previewLoaded:function(t){t.preventDefault(),c("#TB_window").removeClass("cartflows-thickbox-loading")},_filterFlowPageBuilderClick:function(t){t.preventDefault(),c(this).parents("ul").find("a").removeClass("current"),c(this).addClass("current"),c(".wcf-page-builder-notice").html(""),c("#wcf-remote-flow-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showFlows()},_showFlows:function(){var t={licence_args:CartFlowsImportVars.licence_args,_fields:CartFlowsImportVars.flow_fields.toString()},e=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("group")||"";c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("slug"),c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("title");""!==e&&"all"!==e&&(t[CartFlowsImportVars.flow_page_builder]=e);var s={remote_slug:CartFlowsImportVars.flow,slug:CartFlowsImportVars.flow+"?"+decodeURIComponent(c.param(t))};CartFlowsAPI._api_request(s,function(a){"yes"!==CartFlowsImportVars.is_wc_activated&&c.each(a.items,function(s,t){a.items[s].woo_required=!1,c.each(t.flow_steps,function(t,e){0<=c.inArray(e.type,CartFlowsImport.woo_required_steps)&&(a.items[s].woo_required=!0)})});var t=wp.template("cartflows-flows-list");parseInt(a.items_count)?c("#wcf-remote-flow-list").html(t(a)):c("#wcf-remote-flow-list").html(wp.template("cartflows-no-flows")),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-flow-importer").removeClass("request-process")})},_create_default_flow:function(t){t.preventDefault();var e=CartFlowsImport,s=c(this);if(!s.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process"),s.addClass("updating-message").text("Creating Flow.."),s.parents(".template").addClass("importing");var a={action:"cartflows_default_flow",security:cartflows_admin.cf_default_flow_nonce};e._ajax(a,function(t){if(t.request.success){var e=t.request.data;setTimeout(function(){s.removeClass("updating-message").text("Flow Created! Redirecting.."),window.location=CartFlowsImportVars.admin_url+"post.php?post="+e+"&action=edit"},3e3)}})}},_activate_plugin:function(t){var e=CartFlowsImport,s={action:"cartflows_activate_plugin",plugin_init:t,security:CartFlowsImportVars.cartflows_activate_plugin_nonce};e._ajax(s,function(t){})},_process_import_flow:function(t){t.preventDefault();var a=c(this);if(!a.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process");var e=CartFlowsImport;a.text("Creating Flow.."),a.addClass("updating-message"),a.parents(".template").addClass("importing");var s=a.data("flow-steps")||"",r=""!==s?JSON.parse("["+s+"]"):[],o={action:"cartflows_create_flow",security:cartflows_admin.cf_create_flow_nonce};e._ajax(o,function(t){if(t.request.success){var s=t.request.data;r&&(CartFlowsAjaxQueue.stop(),CartFlowsAjaxQueue.run(),CartFlowsImport.all_steps=r.length,a.addClass("updating-message").text("Importing Step 1 of "+CartFlowsImport.all_steps),c.each(r,function(t,e){CartFlowsAjaxQueue.add({url:CartFlowsImportVars.ajaxurl,type:"POST",data:{action:"cartflows_import_flow_step",flow_id:s,template_id:e,security:cartflows_admin.cf_import_flow_step_nonce},success:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(a.addClass("updating-message").text("Imported Step "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){a.removeClass("updating-message").text("All Imported! Redirecting.."),window.location=CartFlowsImportVars.admin_url+"post.php?post="+s+"&action=edit"},3e3)):a.addClass("updating-message").text("Importing Step "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)},error:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,template=a.parents(".template.importing"),template.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.statusText),CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(a.addClass("updating-message").text("Failed "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){a.removeClass("updating-message button-primary").addClass("disabled")},3e3)):a.addClass("updating-message").text("Failed "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)},fail:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(a.addClass("updating-message").text("Imported "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){a.removeClass("updating-message").text("All Step Imported! Reloading.."),location.reload()},3e3)):a.addClass("updating-message").text("Importing "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)}})}))}})}},_handle_error:function(t){c(".cartflows-step-import.updating-message").addClass("updating-message").text(t.errorMessage)},_create_blank_step:function(t){t.preventDefault();var s=c(this),e=CartFlowsImport,a=c("#post_ID").val(),r=c("#wcf-scratch-steps-categories .step-type-filter-links .current").data("slug")||"",o=c("#wcf-scratch-steps-categories .step-type-filter-links .current").data("title")||"",l=r,i=c('.wcf-step-wrap[data-term-slug="'+r+'"]').length||1,p=o+" "+(parseInt(i)+1);if(all_step_type=["landing","checkout","thankyou"],c("#wcf-start-from-scratch .wcf-notice-wrap ").remove(),""!==l){if(CartFlowsImportVars._is_pro_active||"upsell"!==l&&"downsell"!==l){if(s.parents(".template").addClass("importing"),!CartFlowsImportVars._is_pro_active)if("-1"!=jQuery.inArray(l,all_step_type))if(0<c('.wcf-step-wrap[data-term-slug="'+l+'"]').length){s.parents(".template.importing");return s.removeClass("importing updating-message").text("Import Failed!"),void c("#wcf-start-from-scratch .inner").append('<div class="wcf-notice-wrap"><div class="notice notice-warning"><p>Upgrade to Pro for adding more than one '+l.charAt(0).toUpperCase()+l.slice(1)+" step.</p></div></div>")}if(c("#wcf-remote-step-importer").addClass("request-process"),c(".cartflows-step-import").addClass("disabled"),s.addClass("importing updating-message").text("Creating.."),c("body").hasClass("post-type-cartflows_flow")){var n={action:"cartflows_step_create_blank",flow_id:a,step_type:l,step_title:p,security:cartflows_admin.cf_step_create_blank_nonce};e._ajax(n,function(t){CartFlowsImport;var e=s.parents(".template.importing");t.request.success?(s.text("Created. Reloading.."),setTimeout(function(){window.location.href=window.location.href+"&highlight-step-id="+t.request.data},3e3)):(s.removeClass("importing updating-message").text("Creating Failed!"),c("#wcf-remote-step-importer").removeClass("request-process"),e.find(".cartflows-step-preview").append("<div class='preview'></div>"),e.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.request.data))})}}}else c("#wcf-start-from-scratch .inner").append('<div class="wcf-notice-wrap"><div class="notice notice-info"><p>Please select the step type.</p></div></div>')},_process_import_step:function(t){t.preventDefault();var s=c(this),e=s.data("slug")||"",a=c('.wcf-step-wrap[data-term-slug="'+e+'"]').length||1;if((step_title=s.data("title")||"",step_custom_title=step_title+" "+(parseInt(a)+1),o=CartFlowsImport,all_step_slug=["landing","checkout","thankyou"],!CartFlowsImportVars._is_pro_active)&&("-1"!=jQuery.inArray(e,all_step_slug)&&0<c('.wcf-step-wrap[data-term-slug="'+e+'"]').length)){var r=s.parents(".template");return s.removeClass("importing updating-message").text("Import Failed!"),r.find(".preview").hide(),r.find("#wcf_create_notice").show().find("a").addClass("notice notice-warning ").text("Upgrade to Pro for adding more than one "+e.charAt(0).toUpperCase()+e.slice(1)+" step"),void c("#wcf-remote-step-importer").removeClass("request-process")}if(!s.hasClass("updating-message")){c("#wcf-remote-step-importer").addClass("request-process");var o=CartFlowsImport;s.addClass("updating-message"),s.parents(".template").addClass("importing");var l=s.data("template-id")||"",i=c("#post_ID").val(),p=e;o=CartFlowsImport;if(c(".cartflows-step-import-blank").addClass("disabled"),c(".cartflows-step-import").addClass("disabled"),s.addClass("importing updating-message").text("Importing.."),c("body").hasClass("post-type-cartflows_flow")){var n={action:"cartflows_step_import",flow_id:i,template_id:l,step_title:step_custom_title,step_type:p,security:cartflows_admin.cf_step_import_nonce};o._ajax(n,function(t){CartFlowsImport;var e=s.parents(".template.importing");t.request.success?(s.text("Imported. Reloading.."),setTimeout(function(){window.location.href=window.location.href+"&highlight-step-id="+t.request.data},3e3)):(c(".wcf-templates-popup-overlay").removeClass("request-process"),s.removeClass("importing updating-message").text("Import Failed!"),e.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.request.data))},"add_template_to_page")}}},_add_template_to_page_fail:function(t,e,s){t.preventDefault();CartFlowsImport;var a=c(".wcf-flow-steps-data-wrap-importer .template.importing");a.find(".cartflows-step-import").removeClass("importing updating-message").text("Import Failed!"),a.find(".preview").addClass("notice notice-warning").removeClass("preview").text(e.responseText)},_activateWc:function(t){c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:"woocommerce/woocommerce.php",security:CartFlowsImportVars.cartflows_activate_plugin_nonce}}).done(function(t,e,s){c(".wcf-notice-wrap").addClass("wcf-hidden"),c(".cartflows-template-selector").removeAttr("disabled"),CartFlowsImport.wc_installed=!0,CartFlowsImportVars.is_wc_installed="yes",CartFlowsImportVars.is_wc_activated="yes",location.reload(!0),window.location.search+="&add-new-flow"})},_installWc:function(t){c(this).addClass("updating-message button"),c(this).text(cartflows_admin.wc_activating_message),0==cartflows_admin.wc_status.installed?(wp.updates.shouldRequestFilesystemCredentials&&!wp.updates.ajaxLocked&&(wp.updates.requestFilesystemCredentials(t),$document.on("credential-modal-cancel",function(){c(".install-now.updating-message").removeClass("updating-message").text(wp.updates.l10n.installNow),wp.a11y.speak(wp.updates.l10n.updateCancel,"polite")})),wp.updates.installPlugin({slug:"woocommerce"})):CartFlowsImport._activateWc()}},c(function(){CartFlowsImport.init()})}(jQuery);
|
1 |
+
var CartFlowsAjaxQueue=function(){var a=[];return{add:function(t){a.push(t)},remove:function(t){-1<jQuery.inArray(t,a)&&a.splice($.inArray(t,a),1)},run:function(){var t,e=this;a.length?(t=a[0].complete,a[0].complete=function(){"function"==typeof t&&t(),a.shift(),e.run.apply(e,[])},jQuery.ajax(a[0])):e.tid=setTimeout(function(){e.run.apply(e,[])},1e3)},stop:function(){a=[],clearTimeout(this.tid)}}}();!function(c){CartFlowsImport={doc:c(document),wrap:c(".wcf-flow-steps-data-wrap"),inner:c(".wcf-flow-steps-data-wrap-importer"),post_id:c("#post_ID").val(),_ref:null,_api_step_type:{},_api_params:{},all_steps:0,remaining_steps:0,remaining_install_plugins:0,remaining_active_plugins:0,woo_required_steps:["checkout","upsell","downsell","thankyou","optin"],step_order:["landing","checkout","upsell","downsell","thankyou","optin"],new_step_names:{landing:"Landing",checkout:"Checkout (Woo)",upsell:"Upsell (Woo)",downsell:"Downsell (Woo)",thankyou:"Thank You (Woo)",optin:"Optin (Woo)"},init:function(){if(this._bind(),"other"!==CartFlowsImportVars.default_page_builder&&(c(".post-type-cartflows_flow").hasClass("edit-php")&&this._process_cache_remote_flows(),c(".post-type-cartflows_flow").hasClass("post-php")&&this._process_cache_remote_steps()),c(".post-type-cartflows_flow").hasClass("edit-php")&&null!==this._getParamFromURL("add-new-flow")&&this._render_remote_flows(),c(".post-type-cartflows_flow").hasClass("post-php")&&null!==this._getParamFromURL("add-new-step")&&this._render_remote_steps(),this._getParamFromURL("highlight-step-id")){var t=c('.wcf-step-wrap[data-id="'+this._getParamFromURL("highlight-step-id")+'"]');t.length&&c("html, body").animate({scrollTop:t.offset().top},1500)}if(c(".post-type-cartflows_flow").hasClass("edit-php")){var e=c(".edit-php.post-type-cartflows_flow").find(".page-title-action:first");e.after('<a href="'+CartFlowsImportVars.export_url+'" class="page-title-action">Export</a>'),e.after('<a href="'+CartFlowsImportVars.import_url+'" class="page-title-action">Import</a>')}},_getParamFromURL:function(t,e){e=e||window.location.href,t=t.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null},_bind:function(){var t=CartFlowsImport;t.doc.on("click",".wcf-install-plugin",t._install_plugin),t.doc.on("cartflows-api-request-fail",t._api_request_failed),t.doc.on("click","#wcf-get-started-steps a, .wcf-create-from-scratch-link",t._toggle_ready_templates),t.doc.on("click",".cartflows-flow-import-blank",t._create_default_flow),t.doc.on("click","#wcf-remote-flow-importer .wcf-page-builder-links a",t._filterFlowPageBuilderClick),t.doc.on("click","#wcf-remote-step-importer #wcf-categories .step-type-filter-links a",t._filterBlankStepCategoryClick),t.doc.on("change","#wcf-remote-step-importer #wcf-scratch-steps-categories .step-type-filter-links",t._filterBlankStepCategoryChange),t.doc.on("click","#wcf-get-started-steps",t._filterBlankStepCategoryChange),t.doc.on("click","#wcf-remote-step-importer .wcf-page-builder-links a",t._filterStepPageBuilderClick),t.doc.on("click",".cartflows-step-import-blank:not(.get-pro)",t._create_blank_step),t.doc.on("click","#wcf-remote-step-importer .cartflows-step-import",t._process_import_step),t.doc.on("click","#wcf-remote-flow-importer .cartflows-step-import",t._process_import_flow),t.doc.on("click",".cartflows-preview-flow-step",t._preview_individual),t.doc.on("add_template_to_page-fail",t._add_template_to_page_fail),c("body").on("thickbox:iframe:loaded",t._previewLoaded),c(document).on("keyup input","#wcf-remote-step-importer .wcf-flow-search-input",t._remote_step_search),c(document).on("click",".actions a",t._previewResponsive),c(document).on("click",".page-title-action:first",t._render_remote_flows),c(document).on("click",".wcf-trigger-popup",t._render_remote_steps),c(document).on("click",".wcf-templates-popup-overlay",t._close_template_popup),c(document).on("click",".wcf-popup-close-wrap .close-icon",t._close_template_popup),c(document).on("wp-plugin-install-success",t._installSuccess),c(document).on("click",".wcf-activate-wc",t._installWc)},_install_plugin:function(t){t.preventDefault();var e=c(this);if(!e.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process"),c("#wcf-remote-step-importer").addClass("request-process"),e.addClass("updating-message button");var a=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(a,function(t,e){"install"===e.status&&CartFlowsImport.remaining_install_plugins++,"activate"===e.status&&CartFlowsImport.remaining_active_plugins++}),CartFlowsImport.remaining_install_plugins?CartFlowsImport._install_all_plugins():CartFlowsImport.remaining_active_plugins?CartFlowsImport._activate_all_plugins():c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps()}},_install_all_plugins:function(){var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(t,function(t,e){"install"===e.status&&wp.updates.queue.push({action:"install-plugin",data:{slug:e.slug}})}),wp.updates.queueChecker()},_activate_all_plugins:function(){if(CartFlowsImport.remaining_active_plugins||CartFlowsImport.remaining_install_plugins){var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;CartFlowsAjaxQueue.stop(),CartFlowsAjaxQueue.run(),c.each(t,function(t,e){"activate"===e.status&&CartFlowsAjaxQueue.add({url:CartFlowsImportVars.ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:e.init,security:CartFlowsImportVars.cartflows_activate_plugin_nonce},success:function(t){CartFlowsImport.remaining_active_plugins--,CartFlowsImport.remaining_active_plugins||CartFlowsImport.remaining_install_plugins||(c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps())}})})}else c("#wcf-remote-flow-importer").length?CartFlowsImport._cache_remote_flows():c("#wcf-remote-step-importer").length&&CartFlowsImport._cache_remote_steps()},_installSuccess:function(t,a){t.preventDefault(),"no"===CartFlowsImportVars.is_wc_activated&&CartFlowsImport._activateWc();var e=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins;c.each(e,function(t,e){"install"===e.status&&a.slug===e.slug&&c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:e.init,security:CartFlowsImportVars.cartflows_activate_plugin_nonce}}).done(function(t,e,a){CartFlowsImport.remaining_install_plugins--,CartFlowsImport.remaining_install_plugins||CartFlowsImport._activate_all_plugins()})})},_api_request_failed:function(t,e,a,s){"error"==s&&(c("#wcf-remote-content-failed").length||c("#wcf-ready-templates").html(wp.template("cartflows-website-unreachable")))},_toggle_ready_templates:function(t){t.preventDefault();var e=c(this).data("slug")||"";c("#wcf-get-started-steps").find("a").removeClass("current"),c("#wcf-get-started-steps").find('a[data-slug="'+e+'"]').addClass("current"),"canvas"==e?(c("#wcf-ready-templates").hide(),c("#wcf-start-from-scratch").show()):(c("#wcf-ready-templates").show(),c("#wcf-start-from-scratch").hide()),!c(".wcf-page-builder-notice").length&&c("#wcf-remote-step-importer").length&&CartFlowsImport._showSteps()},_switch_step_tab:function(t){t.preventDefault();var e=c(".wcf-tab > li.active > a").attr("href");c(".wcf-tab > li.active").removeClass("active"),c(this).parents("li").addClass("active"),c(e).removeClass("active"),c(e).addClass("hide");var a=c(this).attr("href");c(a).removeClass("hide"),c(a).addClass("active")},_remote_step_search:function(t){t.preventDefault(),c(".step-type-filter-links").find("option").removeClass("current"),c(".step-type-filter-links").find("option:first-child").addClass("current"),window.clearTimeout(CartFlowsImport._ref),CartFlowsImport._ref=window.setTimeout(function(){CartFlowsImport._ref=null,CartFlowsImport._showSteps()},500)},_previewResponsive:function(t){t.preventDefault();var e=c(this).find(".dashicons"),a=e.attr("data-view")||"";c("#TB_window").removeClass("desktop tablet mobile"),c("#TB_window").addClass(a),c(".actions .dashicons").removeClass("active"),e.addClass("active"),c("#TB_iframeContent").removeClass(),c("#TB_iframeContent").addClass(a)},_filterStepPageBuilderClick:function(t){t.preventDefault(),c(this).parents("ul").find("a").removeClass("current"),c(this).addClass("current");var e=c(".step-type-filter-links .current").data("slug")||"";"upsell"===e||"downsell"===e?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),c(".wcf-page-builder-notice").html(""),c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps()},_filterBlankStepCategoryClick:function(t){t.preventDefault(),c(".wcf-page-builder-notice").html("");var e=c(this).data("group")||"";e&&(c("#wcf-scratch-steps-categories .step-type-filter-links").val(e),c("#wcf-scratch-steps-categories .step-type-filter-links option").removeClass("current"),c('#wcf-scratch-steps-categories .step-type-filter-links option[data-group="'+e+'"]').addClass("current")),c(".step-type-filter-links").find("a").removeClass("current"),c(this).addClass("current"),$step_type=c(this).data("slug"),"upsell"===$step_type||"downsell"===$step_type?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),""!=CartFlowsImportVars._is_pro_active||"upsell"!=$step_type&&"downsell"!=$step_type?(c(".cartflows-step-import-blank").text("Create Step"),c(".cartflows-step-import-blank").removeClass("get-pro"),c(".cartflows-step-import-blank").removeAttr("target")):(c(".cartflows-step-import-blank").text("Get Pro"),c(".cartflows-step-import-blank").attr("href",CartFlowsImportVars.domain_url),c(".cartflows-step-import-blank").attr("target","_blank"),c(".cartflows-step-import-blank").addClass("get-pro")),c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps()},_filterBlankStepCategoryChange:function(t){t.preventDefault(),c(".wcf-notice-wrap").remove(),c(".cartflows-step-import-blank").css("pointer-events","auto").removeClass("disabled");var e=c(".step-type-filter-links").find("option:selected").val()||"";if(e&&(c(".step-type-filter-links").val(e),c(".step-type-filter-links").find("a").removeClass("current"),c(".step-type-filter-links").find('a[data-group="'+e+'"]').addClass("current")),c(".step-type-filter-links").find("option").removeClass("current"),c(".step-type-filter-links").find("option:selected").addClass("current"),$step_type=c(".step-type-filter-links").find("option:selected").data("slug"),!("no"!==CartFlowsImportVars.is_wc_installed&&"no"!==CartFlowsImportVars.is_wc_activated||"upsell"!==$step_type&&"downsell"!==$step_type&&"checkout"!==$step_type&&"thankyou"!==$step_type))return c(".cartflows-step-import-blank").after("<p class='wcf-notice-wrap' style='text-align: center'>You need WooCommerce plugin installed and actived to use this product flow. <br/><br/> <a href='#' class='wcf-activate-wc button-secondary'> Click here to install and activate WooCommerce </a> </p>"),void c(".cartflows-step-import-blank").addClass("disabled").css("pointer-events","none");"upsell"===$step_type||"downsell"===$step_type?c(".wcf-template-notice").show():c(".wcf-template-notice").hide(),""!=CartFlowsImportVars._is_pro_active||"upsell"!=$step_type&&"downsell"!=$step_type?(c(".cartflows-step-import-blank").text("Create Step"),c(".cartflows-step-import-blank").removeClass("get-pro"),c(".cartflows-step-import-blank").removeAttr("target")):(c(".cartflows-step-import-blank").text("Get Pro"),c(".cartflows-step-import-blank").attr("href",CartFlowsImportVars.domain_url),c(".cartflows-step-import-blank").attr("target","_blank"),c(".cartflows-step-import-blank").addClass("get-pro")),!c(".wcf-page-builder-notice").length&&c("#wcf-remote-step-importer").length&&(c("#wcf-remote-step-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showSteps())},_showSteps:function(){var t={licence_args:CartFlowsImportVars.licence_args,per_page:15,_fields:CartFlowsImportVars.step_fields.toString()},e=c("#wcf-categories .step-type-filter-links").find(".current").data("group")||"",s=c("#wcf-categories .step-type-filter-links").find(".current").data("slug");""!==e&&"all"!==e&&(t[CartFlowsImportVars.step_type]=e);e=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("group")||"",s=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("slug")||"";var r=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("title")||"Page Builder";""!==e&&"all"!==e&&(t[CartFlowsImportVars.step_page_builder]=e);var a={remote_slug:CartFlowsImportVars.step,slug:CartFlowsImportVars.step+"?"+decodeURIComponent(c.param(t))};CartFlowsAPI._api_request(a,function(a){a.current_step_type=s,"yes"!==CartFlowsImportVars.is_wc_activated&&c.each(a.items,function(t,e){a.items[t].woo_required=!1,0<=c.inArray(e.step_type.slug,CartFlowsImport.woo_required_steps)&&(a.items[t].woo_required=!0)});var t=wp.template("cartflows-steps-list");parseInt(a.items_count)?c("#wcf-remote-step-list").html(t(a)):(c("#wcf-remote-step-list").html(wp.template("cartflows-no-steps")),c(".cartflows-no-steps").find(".description").html("We are working on ready templates designed with "+r+'.<br/>Meanwhile you can <a href="#" data-slug="canvas" class="wcf-create-from-scratch-link">create your own designs</a> easily.')),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-step-importer").removeClass("request-process")})},_apiAddParam_per_page:function(){CartFlowsImport._api_params.per_page=15},_apiAddParam_licence_args:function(){CartFlowsImport._api_params.licence_args=CartFlowsImportVars.licence_args},_apiAddParam_search:function(){var t=c(".wcf-flow-search-input").val()||"";""!==t&&(CartFlowsImport._api_params.search=t)},_close_popup:function(){c("#cartflows-steps").fadeOut(),c("body").removeClass("cartflows-popup-is-open")},_post_auto_save:function(){var t=c("#title"),e=c("#title-prompt-text"),a=CartFlowsImport;t.val()||(t.val("CartFlows #"+a.post_id),e.length&&e.remove()),wp.autosave&&wp.autosave.server.triggerSave()},_process_cache_remote_flows:function(){if("gutenberg"==CartFlowsImportVars.default_page_builder)CartFlowsImport._cache_remote_flows();else{var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins,a=!0;c.each(t,function(t,e){a&&("install"!==e.status&&"activate"!==e.status||(a=!1))}),!1===a?(c(".wcf-page-builder-notice").html(wp.template("cartflows-page-builder-notice")),c("#wcf-remote-flow-list").find(".spinner").remove()):CartFlowsImport._cache_remote_flows()}},_cache_remote_flows:function(){CartFlowsImport;var t={search:CartFlowsImportVars.default_page_builder,licence_args:CartFlowsImportVars.licence_args,hide_empty:!1,_fields:CartFlowsImportVars.flow_page_builder_fields.toString()},e={remote_slug:CartFlowsImportVars.flow_page_builder,slug:CartFlowsImportVars.flow_page_builder+"?"+decodeURIComponent(c.param(t)),wrapper_class:"wcf-page-builder-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-page-builders").html(e(t)),c("#wcf-page-builders").find("li:first a").addClass("current");var a={licence_args:CartFlowsImportVars.licence_args,hide_empty:!0,_fields:CartFlowsImportVars.flow_type_fields.toString()},s={remote_slug:CartFlowsImportVars.flow_type,slug:CartFlowsImportVars.flow_type+"?"+decodeURIComponent(c.param(a)),wrapper_class:"flow-type-filter-links filter-links",show_all:!1};CartFlowsAPI._api_request(s,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-categories").html(e(t)),c("#wcf-categories").find("li:first a").addClass("current"),CartFlowsImport._showFlows()})})},_render_remote_flows:function(t){t&&t.preventDefault(),c("#wcf-remote-flow-importer").addClass("open"),c("html").addClass("wcf-popup-open")},_process_cache_remote_steps:function(){if("gutenberg"==CartFlowsImportVars.default_page_builder)CartFlowsImport._cache_remote_steps();else{var t=CartFlowsImportVars.required_plugins[CartFlowsImportVars.default_page_builder].plugins,a=!0;c.each(t,function(t,e){a&&("install"!==e.status&&"activate"!==e.status||(a=!1))}),!1===a?(c(".wcf-page-builder-notice").html(wp.template("cartflows-page-builder-notice")),c("#wcf-remote-step-list").find(".spinner").remove()):CartFlowsImport._cache_remote_steps()}},mapOrder:function(t,r,o){return t.sort(function(t,e){var a=t[o],s=e[o];return-1===r.indexOf(a)?0:r.indexOf(a)>r.indexOf(s)?1:-1}),t},_cache_remote_steps:function(){CartFlowsImport;c("html").addClass("wcf-steps-loading");var t={search:CartFlowsImportVars.default_page_builder,licence_args:CartFlowsImportVars.licence_args,hide_empty:!1,_fields:CartFlowsImportVars.step_page_builder_fields.toString()},e={remote_slug:CartFlowsImportVars.step_page_builder,slug:CartFlowsImportVars.step_page_builder+"?"+decodeURIComponent(c.param(t)),wrapper_class:"wcf-page-builder-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){var e=wp.template("cartflows-term-filters");c("#wcf-page-builders").html(e(t)),c("#wcf-page-builders").find("li:first a").addClass("current")});t={licence_args:CartFlowsImportVars.licence_args,_fields:CartFlowsImportVars.step_type_fields.toString()},e={remote_slug:CartFlowsImportVars.step_type,slug:CartFlowsImportVars.step_type+"?"+decodeURIComponent(c.param(t)),wrapper_class:"step-type-filter-links filter-links",show_all:!1};CartFlowsAPI._api_request(e,function(t){t.items=CartFlowsImport.mapOrder(t.items,CartFlowsImport.step_order,"slug");var s=t,r=t.items_count;if(t.items)for(key in t.items){t.items[key].name=CartFlowsImport.new_step_names[t.items[key].slug];var e={licence_args:CartFlowsImportVars.licence_args,per_page:15,_fields:CartFlowsImportVars.step_fields.toString()};e[CartFlowsImportVars.step_type]=t.items[key].id;var a={remote_slug:CartFlowsImportVars.step,slug:CartFlowsImportVars.step+"?"+decodeURIComponent(c.param(e))};CartFlowsAPI._api_request(a,function(t){var e=wp.template("cartflows-steps-list");if(parseInt(t.items_count)?c("#wcf-remote-step-list").html(e(t)):c("#wcf-remote-step-list").html(wp.template("cartflows-no-steps")),0==--r){var a=wp.template("cartflows-term-filters-dropdown");e=wp.template("cartflows-term-filters");c("#wcf-categories").html(e(s)),c("#wcf-scratch-steps-categories").html(a(s)),c("#wcf-scratch-steps-categories").find("option:first").addClass("current"),c("#wcf-categories").find("li a[data-slug=landing]").addClass("current"),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-content").find(".spinner").remove(),CartFlowsImport._showSteps(),c("html").removeClass("wcf-steps-loading")}})}})},_render_remote_steps:function(t){t&&t.preventDefault(),c("#wcf-remote-step-importer").addClass("open"),c("html").addClass("wcf-popup-open")},_categorize_data:function(t){var s=[];return c.each(t,function(t,e){var a=e.step_type.slug;void 0===s[a]&&(s[a]=[]),s[a].push(e)}),s},_close_template_popup:function(t){(c(t.target).hasClass("wcf-templates-popup-overlay")||c(t.target).hasClass("close-icon"))&&(c(".wcf-templates-popup-overlay").hasClass("request-process")||(c("html").removeClass("wcf-popup-open"),c(".wcf-templates-popup-overlay").removeClass("open")))},_ajax:function(t,s,r){var o=CartFlowsImport;c.ajax({url:ajaxurl,type:"POST",data:t}).done(function(t,e,a){s&&"function"==typeof s&&s({request:t,status:e,XHR:a}),o.doc.trigger(r+"-done",[t,e,a])}).fail(function(t,e){o.doc.trigger(r+"-fail",[t,e])}).always(function(){o.doc.trigger(r+"-always")})},_load_templates:function(t,s){var r=CartFlowsImport;c("body").hasClass("processing")||(c("body").addClass("processing"),c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_load_steps",security:cartflows_admin.cf_load_steps_nonce,args:t}}).done(function(t,e,a){r.doc.trigger(s,[t]),c("body").removeClass("processing")}).fail(function(t,e){}).always(function(){}))},_empty:function(t){if("number"==typeof t||"boolean"==typeof t)return!1;if(null==t)return!0;if(void 0!==t.length)return 0==t.length;var e=0;for(var a in t)t.hasOwnProperty(a)&&e++;return 0==e},_preview_individual:function(){var t=c(this).data("id")||"",e=c(this).data("href")||"";c(".cartflows-preview-flow-step").removeClass("active"),c('.cartflows-preview-flow-step[data-id="'+t+'"]').addClass("active"),c("#TB_window").addClass("cartflows-thickbox-loading"),c("#TB_iframeContent").removeAttr("onload"),c("#TB_iframeContent").removeAttr("src"),c("#TB_iframeContent").attr("src",e),c("#TB_iframeContent").attr("onload","CartFlowsImport.showIframe()")},showIframe:function(){c("#TB_load").remove(),c("#TB_window").css({visibility:"visible"}),c("#TB_window").removeClass("cartflows-thickbox-loading")},_previewLoaded:function(t){t.preventDefault(),c("#TB_window").removeClass("cartflows-thickbox-loading")},_filterFlowPageBuilderClick:function(t){t.preventDefault(),c(this).parents("ul").find("a").removeClass("current"),c(this).addClass("current"),c(".wcf-page-builder-notice").html(""),c("#wcf-remote-flow-list").html('<span class="spinner is-active"></span>'),CartFlowsImport._showFlows()},_showFlows:function(){var t={licence_args:CartFlowsImportVars.licence_args,_fields:CartFlowsImportVars.flow_fields.toString()},e=c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("group")||"";c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("slug"),c("#wcf-page-builders .wcf-page-builder-links").find(".current").data("title");""!==e&&"all"!==e&&(t[CartFlowsImportVars.flow_page_builder]=e);var a={remote_slug:CartFlowsImportVars.flow,slug:CartFlowsImportVars.flow+"?"+decodeURIComponent(c.param(t))};CartFlowsAPI._api_request(a,function(s){"yes"!==CartFlowsImportVars.is_wc_activated&&c.each(s.items,function(a,t){s.items[a].woo_required=!1,c.each(t.flow_steps,function(t,e){0<=c.inArray(e.type,CartFlowsImport.woo_required_steps)&&(s.items[a].woo_required=!0)})});var t=wp.template("cartflows-flows-list");parseInt(s.items_count)?c("#wcf-remote-flow-list").html(t(s)):c("#wcf-remote-flow-list").html(wp.template("cartflows-no-flows")),c(".wcf-page-builder-notice").remove(),c("#wcf-remote-flow-importer").removeClass("request-process")})},_create_default_flow:function(t){t.preventDefault();var e=CartFlowsImport,a=c(this);if(!a.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process"),a.addClass("updating-message").text("Creating Flow.."),a.parents(".template").addClass("importing");var s={action:"cartflows_default_flow",security:cartflows_admin.cf_default_flow_nonce};e._ajax(s,function(t){if(t.request.success){var e=t.request.data;setTimeout(function(){a.removeClass("updating-message").text("Flow Created! Redirecting.."),window.location=CartFlowsImportVars.admin_url+"post.php?post="+e+"&action=edit"},3e3)}})}},_activate_plugin:function(t){var e=CartFlowsImport,a={action:"cartflows_activate_plugin",plugin_init:t,security:CartFlowsImportVars.cartflows_activate_plugin_nonce};e._ajax(a,function(t){})},_process_import_flow:function(t){t.preventDefault();var s=c(this);if(!s.hasClass("updating-message")){c("#wcf-remote-flow-importer").addClass("request-process");var e=CartFlowsImport;s.text("Creating Flow.."),s.addClass("updating-message"),s.parents(".template").addClass("importing");var a=s.data("flow-steps")||"",r=""!==a?JSON.parse("["+a+"]"):[],o={action:"cartflows_create_flow",security:cartflows_admin.cf_create_flow_nonce};e._ajax(o,function(t){if(t.request.success){var a=t.request.data;r&&(CartFlowsAjaxQueue.stop(),CartFlowsAjaxQueue.run(),CartFlowsImport.all_steps=r.length,s.addClass("updating-message").text("Importing Step 1 of "+CartFlowsImport.all_steps),c.each(r,function(t,e){CartFlowsAjaxQueue.add({url:CartFlowsImportVars.ajaxurl,type:"POST",data:{action:"cartflows_import_flow_step",flow_id:a,template_id:e,security:cartflows_admin.cf_import_flow_step_nonce},success:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(s.addClass("updating-message").text("Imported Step "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){s.removeClass("updating-message").text("All Imported! Redirecting.."),window.location=CartFlowsImportVars.admin_url+"post.php?post="+a+"&action=edit"},3e3)):s.addClass("updating-message").text("Importing Step "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)},error:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,template=s.parents(".template.importing"),template.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.statusText),CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(s.addClass("updating-message").text("Failed "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){s.removeClass("updating-message button-primary").addClass("disabled")},3e3)):s.addClass("updating-message").text("Failed "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)},fail:function(t){CartFlowsImport.remaining_steps=CartFlowsImport.remaining_steps+1,CartFlowsImport.remaining_steps===CartFlowsImport.all_steps?(s.addClass("updating-message").text("Imported "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps),setTimeout(function(){s.removeClass("updating-message").text("All Step Imported! Reloading.."),location.reload()},3e3)):s.addClass("updating-message").text("Importing "+CartFlowsImport.remaining_steps+" of "+CartFlowsImport.all_steps)}})}))}})}},_handle_error:function(t){c(".cartflows-step-import.updating-message").addClass("updating-message").text(t.errorMessage)},_create_blank_step:function(t){t.preventDefault();var a=c(this),e=CartFlowsImport,s=c("#post_ID").val(),r=c("#wcf-scratch-steps-categories .step-type-filter-links .current").data("slug")||"",o=c("#wcf-scratch-steps-categories .step-type-filter-links .current").data("title")||"",l=r,i=c('.wcf-step-wrap[data-term-slug="'+r+'"]').length||1,p=o+" "+(parseInt(i)+1);if(all_step_type=["landing","checkout","thankyou"],c("#wcf-start-from-scratch .wcf-notice-wrap ").remove(),""!==l){if(CartFlowsImportVars._is_pro_active||"upsell"!==l&&"downsell"!==l){if(a.parents(".template").addClass("importing"),!CartFlowsImportVars._is_pro_active)if("-1"!=jQuery.inArray(l,all_step_type))if(0<c('.wcf-step-wrap[data-term-slug="'+l+'"]').length){a.parents(".template.importing");return a.removeClass("importing updating-message").text("Import Failed!"),void c("#wcf-start-from-scratch .inner").append('<div class="wcf-notice-wrap"><div class="notice notice-warning"><p>Upgrade to Pro for adding more than one '+l.charAt(0).toUpperCase()+l.slice(1)+" step.</p></div></div>")}if(c("#wcf-remote-step-importer").addClass("request-process"),c(".cartflows-step-import").addClass("disabled"),a.addClass("importing updating-message").text("Creating.."),c("body").hasClass("post-type-cartflows_flow")){var n={action:"cartflows_step_create_blank",flow_id:s,step_type:l,step_title:p,security:cartflows_admin.cf_step_create_blank_nonce};e._ajax(n,function(t){CartFlowsImport;var e=a.parents(".template.importing");t.request.success?(a.text("Created. Reloading.."),setTimeout(function(){window.location.href=window.location.href+"&highlight-step-id="+t.request.data},3e3)):(a.removeClass("importing updating-message").text("Creating Failed!"),c("#wcf-remote-step-importer").removeClass("request-process"),e.find(".cartflows-step-preview").append("<div class='preview'></div>"),e.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.request.data))})}}}else c("#wcf-start-from-scratch .inner").append('<div class="wcf-notice-wrap"><div class="notice notice-info"><p>Please select the step type.</p></div></div>')},_process_import_step:function(t){t.preventDefault();var a=c(this),e=a.data("slug")||"",s=c('.wcf-step-wrap[data-term-slug="'+e+'"]').length||1;if((step_title=a.data("title")||"",step_custom_title=step_title+" "+(parseInt(s)+1),o=CartFlowsImport,all_step_slug=["landing","checkout","thankyou"],!CartFlowsImportVars._is_pro_active)&&("-1"!=jQuery.inArray(e,all_step_slug)&&0<c('.wcf-step-wrap[data-term-slug="'+e+'"]').length)){var r=a.parents(".template");return a.removeClass("importing updating-message").text("Import Failed!"),r.find(".preview").hide(),r.find("#wcf_create_notice").show().find("a").addClass("notice notice-warning ").text("Upgrade to Pro for adding more than one "+e.charAt(0).toUpperCase()+e.slice(1)+" step"),void c("#wcf-remote-step-importer").removeClass("request-process")}if(!a.hasClass("updating-message")){c("#wcf-remote-step-importer").addClass("request-process");var o=CartFlowsImport;a.addClass("updating-message"),a.parents(".template").addClass("importing");var l=a.data("template-id")||"",i=c("#post_ID").val(),p=e;o=CartFlowsImport;if(c(".cartflows-step-import-blank").addClass("disabled"),c(".cartflows-step-import").addClass("disabled"),a.addClass("importing updating-message").text("Importing.."),c("body").hasClass("post-type-cartflows_flow")){var n={action:"cartflows_step_import",flow_id:i,template_id:l,step_title:step_custom_title,step_type:p,security:cartflows_admin.cf_step_import_nonce};o._ajax(n,function(t){CartFlowsImport;var e=a.parents(".template.importing");t.request.success?(a.text("Imported. Reloading.."),setTimeout(function(){window.location.href=window.location.href+"&highlight-step-id="+t.request.data},3e3)):(c(".wcf-templates-popup-overlay").removeClass("request-process"),a.removeClass("importing updating-message").text("Import Failed!"),e.find(".preview").addClass("notice notice-warning").removeClass("preview").text(t.request.data))},"add_template_to_page")}}},_add_template_to_page_fail:function(t,e,a){t.preventDefault();CartFlowsImport;var s=c(".wcf-flow-steps-data-wrap-importer .template.importing");s.find(".cartflows-step-import").removeClass("importing updating-message").text("Import Failed!"),s.find(".preview").addClass("notice notice-warning").removeClass("preview").text(e.responseText)},_activateWc:function(t){c.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_activate_plugin",plugin_init:"woocommerce/woocommerce.php",security:CartFlowsImportVars.cartflows_activate_plugin_nonce}}).done(function(t,e,a){c(".wcf-notice-wrap").addClass("wcf-hidden"),c(".cartflows-template-selector").removeAttr("disabled"),CartFlowsImport.wc_installed=!0,CartFlowsImportVars.is_wc_installed="yes",CartFlowsImportVars.is_wc_activated="yes",location.reload(!0),window.location.search+="&add-new-flow"})},_installWc:function(t){c(this).addClass("updating-message button"),c(this).text(cartflows_admin.wc_activating_message),0==cartflows_admin.wc_status.installed?(wp.updates.shouldRequestFilesystemCredentials&&!wp.updates.ajaxLocked&&(wp.updates.requestFilesystemCredentials(t),$document.on("credential-modal-cancel",function(){c(".install-now.updating-message").removeClass("updating-message").text(wp.updates.l10n.installNow),wp.a11y.speak(wp.updates.l10n.updateCancel,"polite")})),wp.updates.installPlugin({slug:"woocommerce"})):CartFlowsImport._activateWc()}},c(function(){CartFlowsImport.init()})}(jQuery);
|
assets/min-js/optin-template.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(r){function t(){function a(e,t,c,o){""==e||"select"==o&&" "==e?t.hasClass("validate-required")&&c.addClass("field-required"):c.removeClass("field-required")}var e=r("form.woocommerce-checkout #customer_details"),t=e.find("input, textarea"),c=e.find("select");t.blur(function(){var e=r(this),t=e.attr("type"),c=e.closest("p.form-row"),o=e.val();a(o,c,e,t)}),c.blur(function(){var e=r(this).closest("p.form-row"),t=e.find(".select2-container--default"),c=e.find("select").val();a(c,e,t,"select")})}function c(){if("yes"==cartflows.allow_persistance&&!1!==function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}()){var e="form.woocommerce-checkout #customer_details",t=function(){var e=[],t=r("form.woocommerce-checkout #customer_details");localStorage.removeItem("cartflows_checkout_form"),t.find("input[type=text], select, input[type=email], input[type=tel]").each(function(){e.push({name:this.name,value:this.value})}),cartflows_checkout_form=JSON.stringify(e),localStorage.setItem("cartflows_checkout_form",cartflows_checkout_form)};(function(){if(null!=localStorage.getItem("cartflows_checkout_form")){checkout_data=JSON.parse(localStorage.getItem("cartflows_checkout_form"));for(var e=0;e<checkout_data.length;e++)r("form.woocommerce-checkout [name="+checkout_data[e].name+"]").hasClass("select2-hidden-accessible")?r("form.woocommerce-checkout [name="+checkout_data[e].name+"]").selectWoo("val",[checkout_data[e].value]):r("form.woocommerce-checkout [name="+checkout_data[e].name+"]").val(checkout_data[e].value)}})(),r(e+" input, "+e+" select").change(function(){t()})}}r(document).ready(function(e){c(),t()})}(jQuery);
|
cartflows.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
* Plugin Name: CartFlows
|
4 |
* Plugin URI: https://cartflows.com/
|
5 |
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
-
* Version: 1.
|
7 |
* Author: CartFlows Inc
|
8 |
* Author URI: https://cartflows.com/
|
9 |
* Text Domain: cartflows
|
10 |
* WC requires at least: 3.0
|
11 |
-
* WC tested up to: 3.
|
12 |
*
|
13 |
* @package CartFlows
|
14 |
*/
|
3 |
* Plugin Name: CartFlows
|
4 |
* Plugin URI: https://cartflows.com/
|
5 |
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: CartFlows Inc
|
8 |
* Author URI: https://cartflows.com/
|
9 |
* Text Domain: cartflows
|
10 |
* WC requires at least: 3.0
|
11 |
+
* WC tested up to: 3.9.1
|
12 |
*
|
13 |
* @package CartFlows
|
14 |
*/
|
changelog.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
Version 1.3.5 - Tuesday, 28th January 2020
|
2 |
- New: Option added for thank you page redirection.
|
3 |
- Fix: Pro version's two-step CSS conflict with the DIVI, the second tab was not displaying.
|
1 |
+
Version 1.4.0 - Tuesday, 11th February 2020
|
2 |
+
- New: Introduced a new optin step type for lead generation.
|
3 |
+
- Improvement: Added compatibility for a future release of CartFlows Pro.
|
4 |
+
- Fix: Fatal Error while editing the page in elementor preview mode if the WooCommerce is not installed.
|
5 |
+
|
6 |
Version 1.3.5 - Tuesday, 28th January 2020
|
7 |
- New: Option added for thank you page redirection.
|
8 |
- Fix: Pro version's two-step CSS conflict with the DIVI, the second tab was not displaying.
|
classes/class-cartflows-admin.php
CHANGED
@@ -1,620 +1,620 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows Admin.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Cartflows_Admin.
|
10 |
-
*/
|
11 |
-
class Cartflows_Admin {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Calls on initialization
|
15 |
-
*
|
16 |
-
* @since 1.0.0
|
17 |
-
*/
|
18 |
-
public static function init() {
|
19 |
-
|
20 |
-
self::initialise_plugin();
|
21 |
-
self::init_hooks();
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Init Hooks.
|
26 |
-
*
|
27 |
-
* @since 1.0.0
|
28 |
-
* @return void
|
29 |
-
*/
|
30 |
-
public static function init_hooks() {
|
31 |
-
|
32 |
-
if ( ! is_admin() ) {
|
33 |
-
return;
|
34 |
-
}
|
35 |
-
|
36 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin-fields.php';
|
37 |
-
|
38 |
-
/*
|
39 |
-
Add CARTFLOWS menu option to admin.
|
40 |
-
add_action( 'network_admin_menu', __CLASS__ . '::menu' );
|
41 |
-
*/
|
42 |
-
add_action( 'admin_menu', __CLASS__ . '::menu' );
|
43 |
-
add_action( 'admin_menu', __CLASS__ . '::submenu', 999 );
|
44 |
-
|
45 |
-
add_action( 'cartflows_render_admin_content', __CLASS__ . '::render_content' );
|
46 |
-
|
47 |
-
add_action( 'admin_init', __CLASS__ . '::settings_admin_scripts' );
|
48 |
-
|
49 |
-
/* Global Addmin Script */
|
50 |
-
add_action( 'admin_enqueue_scripts', __CLASS__ . '::global_admin_scripts', 20 );
|
51 |
-
|
52 |
-
add_action( 'admin_footer', __CLASS__ . '::global_admin_data', 9555 );
|
53 |
-
|
54 |
-
/* Add lite version class to body */
|
55 |
-
add_action( 'admin_body_class', __CLASS__ . '::add_admin_body_class' );
|
56 |
-
|
57 |
-
add_filter( 'plugin_action_links_' . CARTFLOWS_BASE, __CLASS__ . '::add_action_links' );
|
58 |
-
|
59 |
-
add_action( 'admin_init', __CLASS__ . '::cartflows_after_save_permalinks' );
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* After save of permalinks.
|
65 |
-
*/
|
66 |
-
public static function cartflows_after_save_permalinks() {
|
67 |
-
|
68 |
-
$has_saved_permalinks = get_option( 'cartflows_permalink_saved' );
|
69 |
-
if ( $has_saved_permalinks ) {
|
70 |
-
flush_rewrite_rules();
|
71 |
-
delete_option( 'cartflows_permalink_saved' );
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Initialize after Cartflows pro get loaded.
|
78 |
-
*/
|
79 |
-
public static function settings_admin_scripts() {
|
80 |
-
// Enqueue admin scripts.
|
81 |
-
if ( isset( $_REQUEST['page'] ) && CARTFLOWS_SETTINGS === $_REQUEST['page'] ) { //phpcs:ignore
|
82 |
-
add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
|
83 |
-
|
84 |
-
self::save_settings();
|
85 |
-
}
|
86 |
-
}
|
87 |
-
/**
|
88 |
-
* Show action on plugin page.
|
89 |
-
*
|
90 |
-
* @param array $links links.
|
91 |
-
* @return array
|
92 |
-
*/
|
93 |
-
public static function add_action_links( $links ) {
|
94 |
-
$mylinks = array(
|
95 |
-
'<a href="' . admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS ) . '">Settings</a>',
|
96 |
-
'<a target="_blank" href="' . esc_url( 'https://cartflows.com/docs' ) . '">Docs</a>',
|
97 |
-
);
|
98 |
-
|
99 |
-
if ( ! _is_cartflows_pro() ) {
|
100 |
-
array_push( $mylinks, '<a style="color: #39b54a; font-weight: bold;" target="_blank" href="' . esc_url( 'https://cartflows.com/pricing/' ) . '"> Go Pro </a>' );
|
101 |
-
}
|
102 |
-
|
103 |
-
return array_merge( $links, $mylinks );
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Initialises the Plugin Name.
|
108 |
-
*
|
109 |
-
* @since 1.0.0
|
110 |
-
* @return void
|
111 |
-
*/
|
112 |
-
public static function initialise_plugin() {
|
113 |
-
|
114 |
-
$name = 'Cartflows';
|
115 |
-
$short_name = 'Cflows';
|
116 |
-
|
117 |
-
define( 'CARTFLOWS_PLUGIN_NAME', $name );
|
118 |
-
define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Renders the admin settings menu.
|
123 |
-
*
|
124 |
-
* @since 1.0.0
|
125 |
-
* @return void
|
126 |
-
*/
|
127 |
-
public static function menu() {
|
128 |
-
|
129 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
130 |
-
return;
|
131 |
-
}
|
132 |
-
|
133 |
-
add_menu_page(
|
134 |
-
'CartFlows',
|
135 |
-
'CartFlows',
|
136 |
-
'manage_options',
|
137 |
-
CARTFLOWS_SLUG,
|
138 |
-
__CLASS__ . '::render',
|
139 |
-
'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore
|
140 |
-
39.7
|
141 |
-
);
|
142 |
-
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Add submenu to admin menu.
|
147 |
-
*
|
148 |
-
* @since 1.0.0
|
149 |
-
*/
|
150 |
-
public static function submenu() {
|
151 |
-
|
152 |
-
$parent_slug = CARTFLOWS_SLUG;
|
153 |
-
$page_title = __( 'Settings', 'cartflows' );
|
154 |
-
$menu_title = __( 'Settings', 'cartflows' );
|
155 |
-
$capability = 'manage_options';
|
156 |
-
$menu_slug = 'cartflows_settings';
|
157 |
-
$callback = __CLASS__ . '::render';
|
158 |
-
|
159 |
-
add_submenu_page(
|
160 |
-
$parent_slug,
|
161 |
-
$page_title,
|
162 |
-
$menu_title,
|
163 |
-
$capability,
|
164 |
-
$menu_slug,
|
165 |
-
$callback
|
166 |
-
);
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Renders the admin settings.
|
171 |
-
*
|
172 |
-
* @since 1.0.0
|
173 |
-
* @return void
|
174 |
-
*/
|
175 |
-
public static function render() {
|
176 |
-
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
177 |
-
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
178 |
-
$action = str_replace( '_', '-', $action );
|
179 |
-
|
180 |
-
// Enable header icon filter below.
|
181 |
-
$header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
|
182 |
-
|
183 |
-
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Renders the admin settings content.
|
188 |
-
*
|
189 |
-
* @since 1.0.0
|
190 |
-
* @return void
|
191 |
-
*/
|
192 |
-
public static function render_content() {
|
193 |
-
|
194 |
-
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
195 |
-
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
196 |
-
$action = str_replace( '_', '-', $action );
|
197 |
-
$action = 'general';
|
198 |
-
|
199 |
-
$header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
|
200 |
-
|
201 |
-
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Save Global Setting options.
|
206 |
-
*
|
207 |
-
* @since 1.0.0
|
208 |
-
*/
|
209 |
-
public static function save_common_settings() {
|
210 |
-
|
211 |
-
if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-common-settings-nonce'] ) ), 'cartflows-common-settings' ) ) {
|
212 |
-
|
213 |
-
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
214 |
-
$new_settings = array();
|
215 |
-
|
216 |
-
if ( isset( $_POST['_cartflows_common'] ) ) {
|
217 |
-
// Loop through the input and sanitize each of the values.
|
218 |
-
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_common'] ) ); //phpcs:ignore
|
219 |
-
}
|
220 |
-
|
221 |
-
Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, false );
|
222 |
-
|
223 |
-
$query = array(
|
224 |
-
'message' => 'saved',
|
225 |
-
);
|
226 |
-
|
227 |
-
$redirect_to = add_query_arg( $query, $url );
|
228 |
-
|
229 |
-
wp_safe_redirect( $redirect_to );
|
230 |
-
exit;
|
231 |
-
} // End if statement.
|
232 |
-
}
|
233 |
-
|
234 |
-
/**
|
235 |
-
* Save Debug Setting options.
|
236 |
-
*
|
237 |
-
* @since 1.1.14
|
238 |
-
*/
|
239 |
-
public static function save_debug_settings() {
|
240 |
-
|
241 |
-
if ( isset( $_POST['cartflows-debug-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-debug-settings-nonce'] ) ), 'cartflows-debug-settings' ) ) {
|
242 |
-
|
243 |
-
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
244 |
-
$new_settings = array();
|
245 |
-
|
246 |
-
if ( isset( $_POST['_cartflows_debug_data'] ) ) {
|
247 |
-
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_debug_data'] ) ); //phpcs:ignore
|
248 |
-
}
|
249 |
-
|
250 |
-
Cartflows_Helper::update_admin_settings_option( '_cartflows_debug_data', $new_settings, false );
|
251 |
-
|
252 |
-
$query = array(
|
253 |
-
'message' => 'saved',
|
254 |
-
);
|
255 |
-
|
256 |
-
$redirect_to = add_query_arg( $query, $url );
|
257 |
-
|
258 |
-
wp_safe_redirect( $redirect_to );
|
259 |
-
exit;
|
260 |
-
|
261 |
-
}
|
262 |
-
}
|
263 |
-
|
264 |
-
|
265 |
-
/**
|
266 |
-
* Save permalink Setting options.
|
267 |
-
*
|
268 |
-
* @since 1.1.14
|
269 |
-
*/
|
270 |
-
public static function save_permalink_settings() {
|
271 |
-
|
272 |
-
if ( isset( $_POST['cartflows-permalink-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-permalink-settings-nonce'] ) ), 'cartflows-permalink-settings' ) ) {
|
273 |
-
|
274 |
-
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
275 |
-
$new_settings = array();
|
276 |
-
|
277 |
-
if ( isset( $_POST['reset'] ) ) {
|
278 |
-
$_POST['_cartflows_permalink'] = array(
|
279 |
-
'permalink' => CARTFLOWS_STEP_POST_TYPE,
|
280 |
-
'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
|
281 |
-
'permalink_structure' => '',
|
282 |
-
);
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
if ( isset( $_POST['_cartflows_permalink'] ) ) {
|
287 |
-
$cartflows_permalink_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_permalink'] ) ); //phpcs:ignore
|
288 |
-
|
289 |
-
if ( empty( $cartflows_permalink_settings['permalink'] ) ) {
|
290 |
-
$new_settings['permalink'] = CARTFLOWS_STEP_POST_TYPE;
|
291 |
-
} else {
|
292 |
-
$new_settings['permalink'] = $cartflows_permalink_settings['permalink'];
|
293 |
-
}
|
294 |
-
|
295 |
-
if ( empty( $cartflows_permalink_settings['permalink_flow_base'] ) ) {
|
296 |
-
$new_settings['permalink_flow_base'] = CARTFLOWS_FLOW_POST_TYPE;
|
297 |
-
} else {
|
298 |
-
$new_settings['permalink_flow_base'] = $cartflows_permalink_settings['permalink_flow_base'];
|
299 |
-
}
|
300 |
-
|
301 |
-
$new_settings['permalink_structure'] = $cartflows_permalink_settings['permalink_structure'];
|
302 |
-
|
303 |
-
}
|
304 |
-
|
305 |
-
Cartflows_Helper::update_admin_settings_option( '_cartflows_permalink', $new_settings, false );
|
306 |
-
|
307 |
-
$query = array(
|
308 |
-
'message' => 'saved',
|
309 |
-
);
|
310 |
-
|
311 |
-
$redirect_to = add_query_arg( $query, $url );
|
312 |
-
|
313 |
-
update_option( 'cartflows_permalink_saved', true );
|
314 |
-
|
315 |
-
wp_safe_redirect( $redirect_to );
|
316 |
-
exit;
|
317 |
-
|
318 |
-
}
|
319 |
-
}
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Loop through the input and sanitize each of the values.
|
323 |
-
*
|
324 |
-
* @param array $input_settings input settings.
|
325 |
-
* @return array
|
326 |
-
*/
|
327 |
-
public static function sanitize_form_inputs( $input_settings = array() ) {
|
328 |
-
$new_settings = array();
|
329 |
-
foreach ( $input_settings as $key => $val ) {
|
330 |
-
|
331 |
-
if ( is_array( $val ) ) {
|
332 |
-
foreach ( $val as $k => $v ) {
|
333 |
-
$new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
|
334 |
-
}
|
335 |
-
} else {
|
336 |
-
$new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
|
337 |
-
}
|
338 |
-
}
|
339 |
-
return $new_settings;
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Check is cartflows admin.
|
344 |
-
*
|
345 |
-
* @since 1.0.0
|
346 |
-
* @return boolean
|
347 |
-
*/
|
348 |
-
public static function is_global_admin() {
|
349 |
-
|
350 |
-
$current_screen = get_current_screen();
|
351 |
-
|
352 |
-
if (
|
353 |
-
is_object( $current_screen ) &&
|
354 |
-
isset( $current_screen->post_type ) &&
|
355 |
-
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
|
356 |
-
CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
|
357 |
-
)
|
358 |
-
) {
|
359 |
-
return true;
|
360 |
-
}
|
361 |
-
return false;
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Check is flow admin.
|
366 |
-
*
|
367 |
-
* @since 1.0.0
|
368 |
-
* @return boolean
|
369 |
-
*/
|
370 |
-
public static function is_flow_edit_admin() {
|
371 |
-
|
372 |
-
$current_screen = get_current_screen();
|
373 |
-
|
374 |
-
if (
|
375 |
-
is_object( $current_screen ) &&
|
376 |
-
isset( $current_screen->post_type ) &&
|
377 |
-
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
|
378 |
-
isset( $current_screen->base ) &&
|
379 |
-
( 'post' === $current_screen->base )
|
380 |
-
) {
|
381 |
-
return true;
|
382 |
-
}
|
383 |
-
return false;
|
384 |
-
}
|
385 |
-
|
386 |
-
/**
|
387 |
-
* Global Admin Scripts.
|
388 |
-
*
|
389 |
-
* @since 1.0.0
|
390 |
-
*/
|
391 |
-
public static function global_admin_scripts() {
|
392 |
-
|
393 |
-
$installed_plugins = get_plugins();
|
394 |
-
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? true : false;
|
395 |
-
$edit_test_mode = filter_input( INPUT_GET, 'edit_test_mode', FILTER_SANITIZE_STRING );
|
396 |
-
$edit_test_mode = 'yes' === $edit_test_mode ? true : false;
|
397 |
-
|
398 |
-
$localize = array(
|
399 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
400 |
-
'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
|
401 |
-
'wc_status' => array(
|
402 |
-
'installed' => $is_wc_installed,
|
403 |
-
'active' => wcf()->is_woo_active,
|
404 |
-
),
|
405 |
-
'wc_activating_message' => __( 'Installing and activating..', 'cartflows' ),
|
406 |
-
'wc_install_error' => __( 'There was an error with the installation of plugin.', 'cartflows' ),
|
407 |
-
'wcf_edit_test_mode' => $edit_test_mode,
|
408 |
-
);
|
409 |
-
|
410 |
-
wp_localize_script( 'jquery', 'cartflows_admin', apply_filters( 'cartflows_admin_js_localize', $localize ) );
|
411 |
-
|
412 |
-
if ( self::is_global_admin() ) {
|
413 |
-
|
414 |
-
// Styles.
|
415 |
-
wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
|
416 |
-
wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
|
417 |
-
|
418 |
-
wp_enqueue_script(
|
419 |
-
'wcf-global-admin',
|
420 |
-
CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
|
421 |
-
array( 'jquery' ),
|
422 |
-
CARTFLOWS_VER,
|
423 |
-
true
|
424 |
-
);
|
425 |
-
|
426 |
-
do_action( 'cartflows_global_admin_scripts' );
|
427 |
-
}
|
428 |
-
}
|
429 |
-
|
430 |
-
/**
|
431 |
-
* Global Admin Data.
|
432 |
-
*
|
433 |
-
* @since 1.0.0
|
434 |
-
*/
|
435 |
-
public static function global_admin_data() {
|
436 |
-
|
437 |
-
$current_screen = get_current_screen();
|
438 |
-
|
439 |
-
if ( ! $current_screen ) {
|
440 |
-
return;
|
441 |
-
}
|
442 |
-
|
443 |
-
if ( 'edit-' . CARTFLOWS_FLOW_POST_TYPE != $current_screen->id ) {
|
444 |
-
return;
|
445 |
-
}
|
446 |
-
|
447 |
-
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
448 |
-
?>
|
449 |
-
|
450 |
-
<div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
|
451 |
-
<div class="wcf-templates-popup-content">
|
452 |
-
<div class="spinner"></div>
|
453 |
-
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
454 |
-
|
455 |
-
<div id="wcf-remote-flow-actions" class="wcf-template-header">
|
456 |
-
<div class="wcf-template-logo-wrap">
|
457 |
-
<span class="wcf-cartflows-logo-img">
|
458 |
-
<span class="cartflows-logo-icon"></span>
|
459 |
-
</span>
|
460 |
-
<span class="wcf-cartflows-title"><?php esc_html_e( 'Flows Library', 'cartflows' ); ?></span>
|
461 |
-
</div>
|
462 |
-
<div class="wcf-tab-wrapper">
|
463 |
-
<?php if ( 'other' !== $default_page_builder ) { ?>
|
464 |
-
<div id="wcf-get-started-steps">
|
465 |
-
<ul class="filter-links ">
|
466 |
-
<li>
|
467 |
-
<a href="#" class="current" data-slug="ready-templates" data-title="<?php esc_html_e( 'Ready Templates', 'cartflows' ); ?>"><?php esc_html_e( 'Ready Templates', 'cartflows' ); ?></a>
|
468 |
-
</li>
|
469 |
-
<li>
|
470 |
-
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
471 |
-
</li>
|
472 |
-
</ul>
|
473 |
-
</div>
|
474 |
-
<?php } ?>
|
475 |
-
</div>
|
476 |
-
<div class="wcf-popup-close-wrap">
|
477 |
-
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
478 |
-
</div>
|
479 |
-
</div>
|
480 |
-
<!-- <div class="wcf-search-form">
|
481 |
-
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
482 |
-
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
483 |
-
</div> -->
|
484 |
-
|
485 |
-
<div id="wcf-remote-content">
|
486 |
-
<?php if ( 'other' !== $default_page_builder ) { ?>
|
487 |
-
<div id="wcf-ready-templates">
|
488 |
-
<div id="wcf-remote-filters">
|
489 |
-
<div id="wcf-page-builders"></div>
|
490 |
-
<div id="wcf-categories"></div>
|
491 |
-
</div>
|
492 |
-
<div class="wcf-page-builder-notice"></div>
|
493 |
-
<div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
494 |
-
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
495 |
-
</div>
|
496 |
-
<?php } ?>
|
497 |
-
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
498 |
-
<div class="inner">
|
499 |
-
<a href="#" class="button button-hero button-primary cartflows-flow-import-blank"><?php esc_html_e( 'Design Your Flow', 'cartflows' ); ?></a>
|
500 |
-
<p class="wcf-learn-how"><a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank"><?php esc_html_e( 'Learn How', 'cartflows' ); ?> <i class="dashicons dashicons-external"></i></a></p>
|
501 |
-
</div>
|
502 |
-
</div>
|
503 |
-
</div>
|
504 |
-
</div>
|
505 |
-
</div>
|
506 |
-
</div>
|
507 |
-
|
508 |
-
<?php
|
509 |
-
}
|
510 |
-
|
511 |
-
/**
|
512 |
-
* Enqueues the needed CSS/JS for the builder's admin settings page.
|
513 |
-
*
|
514 |
-
* @since 1.0.0
|
515 |
-
*/
|
516 |
-
public static function styles_scripts() {
|
517 |
-
|
518 |
-
// Styles.
|
519 |
-
wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
|
520 |
-
wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
|
521 |
-
|
522 |
-
// Script.
|
523 |
-
wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
|
524 |
-
|
525 |
-
$localize = array(
|
526 |
-
'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
|
527 |
-
);
|
528 |
-
|
529 |
-
wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
|
530 |
-
|
531 |
-
do_action( 'cartflows_admin_settings_after_enqueue_scripts' );
|
532 |
-
}
|
533 |
-
|
534 |
-
/**
|
535 |
-
* Save All admin settings here
|
536 |
-
*/
|
537 |
-
public static function save_settings() {
|
538 |
-
|
539 |
-
// Only admins can save settings.
|
540 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
541 |
-
return;
|
542 |
-
}
|
543 |
-
|
544 |
-
self::save_common_settings();
|
545 |
-
self::save_debug_settings();
|
546 |
-
self::save_permalink_settings();
|
547 |
-
self::save_facebook_settings();
|
548 |
-
|
549 |
-
// Let extensions hook into saving.
|
550 |
-
do_action( 'cartflows_admin_settings_save' );
|
551 |
-
}
|
552 |
-
|
553 |
-
/**
|
554 |
-
* Get and return page URL
|
555 |
-
*
|
556 |
-
* @param string $menu_slug Menu name.
|
557 |
-
* @since 1.0.0
|
558 |
-
* @return string page url
|
559 |
-
*/
|
560 |
-
public static function get_page_url( $menu_slug ) {
|
561 |
-
|
562 |
-
$parent_page = self::$default_menu_position;
|
563 |
-
|
564 |
-
if ( strpos( $parent_page, '?' ) !== false ) {
|
565 |
-
$query_var = '&page=' . self::$plugin_slug;
|
566 |
-
} else {
|
567 |
-
$query_var = '?page=' . self::$plugin_slug;
|
568 |
-
}
|
569 |
-
|
570 |
-
$parent_page_url = admin_url( $parent_page . $query_var );
|
571 |
-
|
572 |
-
$url = $parent_page_url . '&action=' . $menu_slug;
|
573 |
-
|
574 |
-
return esc_url( $url );
|
575 |
-
}
|
576 |
-
|
577 |
-
/**
|
578 |
-
* Admin body classes.
|
579 |
-
*
|
580 |
-
* Body classes to be added to <body> tag in admin page
|
581 |
-
*
|
582 |
-
* @param String $classes body classes returned from the filter.
|
583 |
-
* @return String body classes to be added to <body> tag in admin page
|
584 |
-
*/
|
585 |
-
public static function add_admin_body_class( $classes ) {
|
586 |
-
|
587 |
-
$classes .= ' cartflows-' . CARTFLOWS_VER;
|
588 |
-
|
589 |
-
return $classes;
|
590 |
-
}
|
591 |
-
|
592 |
-
/**
|
593 |
-
* Save Global Setting options.
|
594 |
-
*
|
595 |
-
* @since 1.0.0
|
596 |
-
*/
|
597 |
-
public static function save_facebook_settings() {
|
598 |
-
|
599 |
-
if ( isset( $_POST['cartflows-facebook-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-facebook-settings-nonce'] ) ), 'cartflows-facebook-settings' ) ) {
|
600 |
-
|
601 |
-
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
602 |
-
$new_settings = array();
|
603 |
-
|
604 |
-
if ( isset( $_POST['_cartflows_facebook'] ) ) {
|
605 |
-
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_facebook'] ) ); //phpcs:ignore
|
606 |
-
}
|
607 |
-
|
608 |
-
Cartflows_Helper::update_admin_settings_option( '_cartflows_facebook', $new_settings, false );
|
609 |
-
$query = array(
|
610 |
-
'message' => 'saved',
|
611 |
-
);
|
612 |
-
$redirect_to = add_query_arg( $query, $url );
|
613 |
-
wp_safe_redirect( $redirect_to );
|
614 |
-
exit;
|
615 |
-
}
|
616 |
-
}
|
617 |
-
|
618 |
-
}
|
619 |
-
|
620 |
-
Cartflows_Admin::init();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Admin.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Cartflows_Admin.
|
10 |
+
*/
|
11 |
+
class Cartflows_Admin {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Calls on initialization
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
*/
|
18 |
+
public static function init() {
|
19 |
+
|
20 |
+
self::initialise_plugin();
|
21 |
+
self::init_hooks();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Init Hooks.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public static function init_hooks() {
|
31 |
+
|
32 |
+
if ( ! is_admin() ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin-fields.php';
|
37 |
+
|
38 |
+
/*
|
39 |
+
Add CARTFLOWS menu option to admin.
|
40 |
+
add_action( 'network_admin_menu', __CLASS__ . '::menu' );
|
41 |
+
*/
|
42 |
+
add_action( 'admin_menu', __CLASS__ . '::menu' );
|
43 |
+
add_action( 'admin_menu', __CLASS__ . '::submenu', 999 );
|
44 |
+
|
45 |
+
add_action( 'cartflows_render_admin_content', __CLASS__ . '::render_content' );
|
46 |
+
|
47 |
+
add_action( 'admin_init', __CLASS__ . '::settings_admin_scripts' );
|
48 |
+
|
49 |
+
/* Global Addmin Script */
|
50 |
+
add_action( 'admin_enqueue_scripts', __CLASS__ . '::global_admin_scripts', 20 );
|
51 |
+
|
52 |
+
add_action( 'admin_footer', __CLASS__ . '::global_admin_data', 9555 );
|
53 |
+
|
54 |
+
/* Add lite version class to body */
|
55 |
+
add_action( 'admin_body_class', __CLASS__ . '::add_admin_body_class' );
|
56 |
+
|
57 |
+
add_filter( 'plugin_action_links_' . CARTFLOWS_BASE, __CLASS__ . '::add_action_links' );
|
58 |
+
|
59 |
+
add_action( 'admin_init', __CLASS__ . '::cartflows_after_save_permalinks' );
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* After save of permalinks.
|
65 |
+
*/
|
66 |
+
public static function cartflows_after_save_permalinks() {
|
67 |
+
|
68 |
+
$has_saved_permalinks = get_option( 'cartflows_permalink_saved' );
|
69 |
+
if ( $has_saved_permalinks ) {
|
70 |
+
flush_rewrite_rules();
|
71 |
+
delete_option( 'cartflows_permalink_saved' );
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Initialize after Cartflows pro get loaded.
|
78 |
+
*/
|
79 |
+
public static function settings_admin_scripts() {
|
80 |
+
// Enqueue admin scripts.
|
81 |
+
if ( isset( $_REQUEST['page'] ) && CARTFLOWS_SETTINGS === $_REQUEST['page'] ) { //phpcs:ignore
|
82 |
+
add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
|
83 |
+
|
84 |
+
self::save_settings();
|
85 |
+
}
|
86 |
+
}
|
87 |
+
/**
|
88 |
+
* Show action on plugin page.
|
89 |
+
*
|
90 |
+
* @param array $links links.
|
91 |
+
* @return array
|
92 |
+
*/
|
93 |
+
public static function add_action_links( $links ) {
|
94 |
+
$mylinks = array(
|
95 |
+
'<a href="' . admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS ) . '">Settings</a>',
|
96 |
+
'<a target="_blank" href="' . esc_url( 'https://cartflows.com/docs' ) . '">Docs</a>',
|
97 |
+
);
|
98 |
+
|
99 |
+
if ( ! _is_cartflows_pro() ) {
|
100 |
+
array_push( $mylinks, '<a style="color: #39b54a; font-weight: bold;" target="_blank" href="' . esc_url( 'https://cartflows.com/pricing/' ) . '"> Go Pro </a>' );
|
101 |
+
}
|
102 |
+
|
103 |
+
return array_merge( $links, $mylinks );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Initialises the Plugin Name.
|
108 |
+
*
|
109 |
+
* @since 1.0.0
|
110 |
+
* @return void
|
111 |
+
*/
|
112 |
+
public static function initialise_plugin() {
|
113 |
+
|
114 |
+
$name = 'Cartflows';
|
115 |
+
$short_name = 'Cflows';
|
116 |
+
|
117 |
+
define( 'CARTFLOWS_PLUGIN_NAME', $name );
|
118 |
+
define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Renders the admin settings menu.
|
123 |
+
*
|
124 |
+
* @since 1.0.0
|
125 |
+
* @return void
|
126 |
+
*/
|
127 |
+
public static function menu() {
|
128 |
+
|
129 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
|
133 |
+
add_menu_page(
|
134 |
+
'CartFlows',
|
135 |
+
'CartFlows',
|
136 |
+
'manage_options',
|
137 |
+
CARTFLOWS_SLUG,
|
138 |
+
__CLASS__ . '::render',
|
139 |
+
'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore
|
140 |
+
39.7
|
141 |
+
);
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Add submenu to admin menu.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
*/
|
150 |
+
public static function submenu() {
|
151 |
+
|
152 |
+
$parent_slug = CARTFLOWS_SLUG;
|
153 |
+
$page_title = __( 'Settings', 'cartflows' );
|
154 |
+
$menu_title = __( 'Settings', 'cartflows' );
|
155 |
+
$capability = 'manage_options';
|
156 |
+
$menu_slug = 'cartflows_settings';
|
157 |
+
$callback = __CLASS__ . '::render';
|
158 |
+
|
159 |
+
add_submenu_page(
|
160 |
+
$parent_slug,
|
161 |
+
$page_title,
|
162 |
+
$menu_title,
|
163 |
+
$capability,
|
164 |
+
$menu_slug,
|
165 |
+
$callback
|
166 |
+
);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Renders the admin settings.
|
171 |
+
*
|
172 |
+
* @since 1.0.0
|
173 |
+
* @return void
|
174 |
+
*/
|
175 |
+
public static function render() {
|
176 |
+
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
177 |
+
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
178 |
+
$action = str_replace( '_', '-', $action );
|
179 |
+
|
180 |
+
// Enable header icon filter below.
|
181 |
+
$header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
|
182 |
+
|
183 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Renders the admin settings content.
|
188 |
+
*
|
189 |
+
* @since 1.0.0
|
190 |
+
* @return void
|
191 |
+
*/
|
192 |
+
public static function render_content() {
|
193 |
+
|
194 |
+
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
195 |
+
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
196 |
+
$action = str_replace( '_', '-', $action );
|
197 |
+
$action = 'general';
|
198 |
+
|
199 |
+
$header_wrapper_class = apply_filters( 'cartflows_header_wrapper_class', array( $action ) );
|
200 |
+
|
201 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Save Global Setting options.
|
206 |
+
*
|
207 |
+
* @since 1.0.0
|
208 |
+
*/
|
209 |
+
public static function save_common_settings() {
|
210 |
+
|
211 |
+
if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-common-settings-nonce'] ) ), 'cartflows-common-settings' ) ) {
|
212 |
+
|
213 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
214 |
+
$new_settings = array();
|
215 |
+
|
216 |
+
if ( isset( $_POST['_cartflows_common'] ) ) {
|
217 |
+
// Loop through the input and sanitize each of the values.
|
218 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_common'] ) ); //phpcs:ignore
|
219 |
+
}
|
220 |
+
|
221 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, false );
|
222 |
+
|
223 |
+
$query = array(
|
224 |
+
'message' => 'saved',
|
225 |
+
);
|
226 |
+
|
227 |
+
$redirect_to = add_query_arg( $query, $url );
|
228 |
+
|
229 |
+
wp_safe_redirect( $redirect_to );
|
230 |
+
exit;
|
231 |
+
} // End if statement.
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Save Debug Setting options.
|
236 |
+
*
|
237 |
+
* @since 1.1.14
|
238 |
+
*/
|
239 |
+
public static function save_debug_settings() {
|
240 |
+
|
241 |
+
if ( isset( $_POST['cartflows-debug-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-debug-settings-nonce'] ) ), 'cartflows-debug-settings' ) ) {
|
242 |
+
|
243 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
244 |
+
$new_settings = array();
|
245 |
+
|
246 |
+
if ( isset( $_POST['_cartflows_debug_data'] ) ) {
|
247 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_debug_data'] ) ); //phpcs:ignore
|
248 |
+
}
|
249 |
+
|
250 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_debug_data', $new_settings, false );
|
251 |
+
|
252 |
+
$query = array(
|
253 |
+
'message' => 'saved',
|
254 |
+
);
|
255 |
+
|
256 |
+
$redirect_to = add_query_arg( $query, $url );
|
257 |
+
|
258 |
+
wp_safe_redirect( $redirect_to );
|
259 |
+
exit;
|
260 |
+
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Save permalink Setting options.
|
267 |
+
*
|
268 |
+
* @since 1.1.14
|
269 |
+
*/
|
270 |
+
public static function save_permalink_settings() {
|
271 |
+
|
272 |
+
if ( isset( $_POST['cartflows-permalink-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-permalink-settings-nonce'] ) ), 'cartflows-permalink-settings' ) ) {
|
273 |
+
|
274 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
275 |
+
$new_settings = array();
|
276 |
+
|
277 |
+
if ( isset( $_POST['reset'] ) ) {
|
278 |
+
$_POST['_cartflows_permalink'] = array(
|
279 |
+
'permalink' => CARTFLOWS_STEP_POST_TYPE,
|
280 |
+
'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
|
281 |
+
'permalink_structure' => '',
|
282 |
+
);
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
if ( isset( $_POST['_cartflows_permalink'] ) ) {
|
287 |
+
$cartflows_permalink_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_permalink'] ) ); //phpcs:ignore
|
288 |
+
|
289 |
+
if ( empty( $cartflows_permalink_settings['permalink'] ) ) {
|
290 |
+
$new_settings['permalink'] = CARTFLOWS_STEP_POST_TYPE;
|
291 |
+
} else {
|
292 |
+
$new_settings['permalink'] = $cartflows_permalink_settings['permalink'];
|
293 |
+
}
|
294 |
+
|
295 |
+
if ( empty( $cartflows_permalink_settings['permalink_flow_base'] ) ) {
|
296 |
+
$new_settings['permalink_flow_base'] = CARTFLOWS_FLOW_POST_TYPE;
|
297 |
+
} else {
|
298 |
+
$new_settings['permalink_flow_base'] = $cartflows_permalink_settings['permalink_flow_base'];
|
299 |
+
}
|
300 |
+
|
301 |
+
$new_settings['permalink_structure'] = $cartflows_permalink_settings['permalink_structure'];
|
302 |
+
|
303 |
+
}
|
304 |
+
|
305 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_permalink', $new_settings, false );
|
306 |
+
|
307 |
+
$query = array(
|
308 |
+
'message' => 'saved',
|
309 |
+
);
|
310 |
+
|
311 |
+
$redirect_to = add_query_arg( $query, $url );
|
312 |
+
|
313 |
+
update_option( 'cartflows_permalink_saved', true );
|
314 |
+
|
315 |
+
wp_safe_redirect( $redirect_to );
|
316 |
+
exit;
|
317 |
+
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Loop through the input and sanitize each of the values.
|
323 |
+
*
|
324 |
+
* @param array $input_settings input settings.
|
325 |
+
* @return array
|
326 |
+
*/
|
327 |
+
public static function sanitize_form_inputs( $input_settings = array() ) {
|
328 |
+
$new_settings = array();
|
329 |
+
foreach ( $input_settings as $key => $val ) {
|
330 |
+
|
331 |
+
if ( is_array( $val ) ) {
|
332 |
+
foreach ( $val as $k => $v ) {
|
333 |
+
$new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
|
334 |
+
}
|
335 |
+
} else {
|
336 |
+
$new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
|
337 |
+
}
|
338 |
+
}
|
339 |
+
return $new_settings;
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Check is cartflows admin.
|
344 |
+
*
|
345 |
+
* @since 1.0.0
|
346 |
+
* @return boolean
|
347 |
+
*/
|
348 |
+
public static function is_global_admin() {
|
349 |
+
|
350 |
+
$current_screen = get_current_screen();
|
351 |
+
|
352 |
+
if (
|
353 |
+
is_object( $current_screen ) &&
|
354 |
+
isset( $current_screen->post_type ) &&
|
355 |
+
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
|
356 |
+
CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
|
357 |
+
)
|
358 |
+
) {
|
359 |
+
return true;
|
360 |
+
}
|
361 |
+
return false;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Check is flow admin.
|
366 |
+
*
|
367 |
+
* @since 1.0.0
|
368 |
+
* @return boolean
|
369 |
+
*/
|
370 |
+
public static function is_flow_edit_admin() {
|
371 |
+
|
372 |
+
$current_screen = get_current_screen();
|
373 |
+
|
374 |
+
if (
|
375 |
+
is_object( $current_screen ) &&
|
376 |
+
isset( $current_screen->post_type ) &&
|
377 |
+
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
|
378 |
+
isset( $current_screen->base ) &&
|
379 |
+
( 'post' === $current_screen->base )
|
380 |
+
) {
|
381 |
+
return true;
|
382 |
+
}
|
383 |
+
return false;
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Global Admin Scripts.
|
388 |
+
*
|
389 |
+
* @since 1.0.0
|
390 |
+
*/
|
391 |
+
public static function global_admin_scripts() {
|
392 |
+
|
393 |
+
$installed_plugins = get_plugins();
|
394 |
+
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? true : false;
|
395 |
+
$edit_test_mode = filter_input( INPUT_GET, 'edit_test_mode', FILTER_SANITIZE_STRING );
|
396 |
+
$edit_test_mode = 'yes' === $edit_test_mode ? true : false;
|
397 |
+
|
398 |
+
$localize = array(
|
399 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
400 |
+
'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
|
401 |
+
'wc_status' => array(
|
402 |
+
'installed' => $is_wc_installed,
|
403 |
+
'active' => wcf()->is_woo_active,
|
404 |
+
),
|
405 |
+
'wc_activating_message' => __( 'Installing and activating..', 'cartflows' ),
|
406 |
+
'wc_install_error' => __( 'There was an error with the installation of plugin.', 'cartflows' ),
|
407 |
+
'wcf_edit_test_mode' => $edit_test_mode,
|
408 |
+
);
|
409 |
+
|
410 |
+
wp_localize_script( 'jquery', 'cartflows_admin', apply_filters( 'cartflows_admin_js_localize', $localize ) );
|
411 |
+
|
412 |
+
if ( self::is_global_admin() ) {
|
413 |
+
|
414 |
+
// Styles.
|
415 |
+
wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
|
416 |
+
wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
|
417 |
+
|
418 |
+
wp_enqueue_script(
|
419 |
+
'wcf-global-admin',
|
420 |
+
CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
|
421 |
+
array( 'jquery' ),
|
422 |
+
CARTFLOWS_VER,
|
423 |
+
true
|
424 |
+
);
|
425 |
+
|
426 |
+
do_action( 'cartflows_global_admin_scripts' );
|
427 |
+
}
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Global Admin Data.
|
432 |
+
*
|
433 |
+
* @since 1.0.0
|
434 |
+
*/
|
435 |
+
public static function global_admin_data() {
|
436 |
+
|
437 |
+
$current_screen = get_current_screen();
|
438 |
+
|
439 |
+
if ( ! $current_screen ) {
|
440 |
+
return;
|
441 |
+
}
|
442 |
+
|
443 |
+
if ( 'edit-' . CARTFLOWS_FLOW_POST_TYPE != $current_screen->id ) {
|
444 |
+
return;
|
445 |
+
}
|
446 |
+
|
447 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
448 |
+
?>
|
449 |
+
|
450 |
+
<div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
|
451 |
+
<div class="wcf-templates-popup-content">
|
452 |
+
<div class="spinner"></div>
|
453 |
+
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
454 |
+
|
455 |
+
<div id="wcf-remote-flow-actions" class="wcf-template-header">
|
456 |
+
<div class="wcf-template-logo-wrap">
|
457 |
+
<span class="wcf-cartflows-logo-img">
|
458 |
+
<span class="cartflows-logo-icon"></span>
|
459 |
+
</span>
|
460 |
+
<span class="wcf-cartflows-title"><?php esc_html_e( 'Flows Library', 'cartflows' ); ?></span>
|
461 |
+
</div>
|
462 |
+
<div class="wcf-tab-wrapper">
|
463 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
464 |
+
<div id="wcf-get-started-steps">
|
465 |
+
<ul class="filter-links ">
|
466 |
+
<li>
|
467 |
+
<a href="#" class="current" data-slug="ready-templates" data-title="<?php esc_html_e( 'Ready Templates', 'cartflows' ); ?>"><?php esc_html_e( 'Ready Templates', 'cartflows' ); ?></a>
|
468 |
+
</li>
|
469 |
+
<li>
|
470 |
+
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
471 |
+
</li>
|
472 |
+
</ul>
|
473 |
+
</div>
|
474 |
+
<?php } ?>
|
475 |
+
</div>
|
476 |
+
<div class="wcf-popup-close-wrap">
|
477 |
+
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
478 |
+
</div>
|
479 |
+
</div>
|
480 |
+
<!-- <div class="wcf-search-form">
|
481 |
+
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
482 |
+
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
483 |
+
</div> -->
|
484 |
+
|
485 |
+
<div id="wcf-remote-content">
|
486 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
487 |
+
<div id="wcf-ready-templates">
|
488 |
+
<div id="wcf-remote-filters">
|
489 |
+
<div id="wcf-page-builders"></div>
|
490 |
+
<div id="wcf-categories"></div>
|
491 |
+
</div>
|
492 |
+
<div class="wcf-page-builder-notice"></div>
|
493 |
+
<div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
494 |
+
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
495 |
+
</div>
|
496 |
+
<?php } ?>
|
497 |
+
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
498 |
+
<div class="inner">
|
499 |
+
<a href="#" class="button button-hero button-primary cartflows-flow-import-blank"><?php esc_html_e( 'Design Your Flow', 'cartflows' ); ?></a>
|
500 |
+
<p class="wcf-learn-how"><a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank"><?php esc_html_e( 'Learn How', 'cartflows' ); ?> <i class="dashicons dashicons-external"></i></a></p>
|
501 |
+
</div>
|
502 |
+
</div>
|
503 |
+
</div>
|
504 |
+
</div>
|
505 |
+
</div>
|
506 |
+
</div>
|
507 |
+
|
508 |
+
<?php
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Enqueues the needed CSS/JS for the builder's admin settings page.
|
513 |
+
*
|
514 |
+
* @since 1.0.0
|
515 |
+
*/
|
516 |
+
public static function styles_scripts() {
|
517 |
+
|
518 |
+
// Styles.
|
519 |
+
wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
|
520 |
+
wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
|
521 |
+
|
522 |
+
// Script.
|
523 |
+
wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
|
524 |
+
|
525 |
+
$localize = array(
|
526 |
+
'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
|
527 |
+
);
|
528 |
+
|
529 |
+
wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
|
530 |
+
|
531 |
+
do_action( 'cartflows_admin_settings_after_enqueue_scripts' );
|
532 |
+
}
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Save All admin settings here
|
536 |
+
*/
|
537 |
+
public static function save_settings() {
|
538 |
+
|
539 |
+
// Only admins can save settings.
|
540 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
541 |
+
return;
|
542 |
+
}
|
543 |
+
|
544 |
+
self::save_common_settings();
|
545 |
+
self::save_debug_settings();
|
546 |
+
self::save_permalink_settings();
|
547 |
+
self::save_facebook_settings();
|
548 |
+
|
549 |
+
// Let extensions hook into saving.
|
550 |
+
do_action( 'cartflows_admin_settings_save' );
|
551 |
+
}
|
552 |
+
|
553 |
+
/**
|
554 |
+
* Get and return page URL
|
555 |
+
*
|
556 |
+
* @param string $menu_slug Menu name.
|
557 |
+
* @since 1.0.0
|
558 |
+
* @return string page url
|
559 |
+
*/
|
560 |
+
public static function get_page_url( $menu_slug ) {
|
561 |
+
|
562 |
+
$parent_page = self::$default_menu_position;
|
563 |
+
|
564 |
+
if ( strpos( $parent_page, '?' ) !== false ) {
|
565 |
+
$query_var = '&page=' . self::$plugin_slug;
|
566 |
+
} else {
|
567 |
+
$query_var = '?page=' . self::$plugin_slug;
|
568 |
+
}
|
569 |
+
|
570 |
+
$parent_page_url = admin_url( $parent_page . $query_var );
|
571 |
+
|
572 |
+
$url = $parent_page_url . '&action=' . $menu_slug;
|
573 |
+
|
574 |
+
return esc_url( $url );
|
575 |
+
}
|
576 |
+
|
577 |
+
/**
|
578 |
+
* Admin body classes.
|
579 |
+
*
|
580 |
+
* Body classes to be added to <body> tag in admin page
|
581 |
+
*
|
582 |
+
* @param String $classes body classes returned from the filter.
|
583 |
+
* @return String body classes to be added to <body> tag in admin page
|
584 |
+
*/
|
585 |
+
public static function add_admin_body_class( $classes ) {
|
586 |
+
|
587 |
+
$classes .= ' cartflows-' . CARTFLOWS_VER;
|
588 |
+
|
589 |
+
return $classes;
|
590 |
+
}
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Save Global Setting options.
|
594 |
+
*
|
595 |
+
* @since 1.0.0
|
596 |
+
*/
|
597 |
+
public static function save_facebook_settings() {
|
598 |
+
|
599 |
+
if ( isset( $_POST['cartflows-facebook-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-facebook-settings-nonce'] ) ), 'cartflows-facebook-settings' ) ) {
|
600 |
+
|
601 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
602 |
+
$new_settings = array();
|
603 |
+
|
604 |
+
if ( isset( $_POST['_cartflows_facebook'] ) ) {
|
605 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_facebook'] ) ); //phpcs:ignore
|
606 |
+
}
|
607 |
+
|
608 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_facebook', $new_settings, false );
|
609 |
+
$query = array(
|
610 |
+
'message' => 'saved',
|
611 |
+
);
|
612 |
+
$redirect_to = add_query_arg( $query, $url );
|
613 |
+
wp_safe_redirect( $redirect_to );
|
614 |
+
exit;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
}
|
619 |
+
|
620 |
+
Cartflows_Admin::init();
|
classes/class-cartflows-compatibility.php
CHANGED
@@ -1,410 +1,410 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Page builder compatibility
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'Cartflows_Compatibility' ) ) {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class for page builder compatibility
|
12 |
-
*/
|
13 |
-
class Cartflows_Compatibility {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Member Variable
|
17 |
-
*
|
18 |
-
* @var object instance
|
19 |
-
*/
|
20 |
-
private static $instance;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Initiator
|
24 |
-
*/
|
25 |
-
public static function get_instance() {
|
26 |
-
if ( ! isset( self::$instance ) ) {
|
27 |
-
self::$instance = new self();
|
28 |
-
}
|
29 |
-
return self::$instance;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructor
|
34 |
-
*/
|
35 |
-
public function __construct() {
|
36 |
-
|
37 |
-
$this->load_files();
|
38 |
-
|
39 |
-
// Override post meta.
|
40 |
-
add_action( 'wp', array( $this, 'override_meta' ), 0 );
|
41 |
-
|
42 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'load_fontawesome' ), 10000 );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Load page builder compatibility files
|
47 |
-
*/
|
48 |
-
public function load_files() {
|
49 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
50 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-elementor-compatibility.php';
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( $this->is_divi_enabled() ) {
|
54 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-divi-compatibility.php';
|
55 |
-
}
|
56 |
-
|
57 |
-
if ( $this->is_bb_enabled() ) {
|
58 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-bb-compatibility.php';
|
59 |
-
}
|
60 |
-
|
61 |
-
if ( class_exists( 'TCB_Post' ) ) {
|
62 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-thrive-compatibility.php';
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( defined( 'LEARNDASH_VERSION' ) ) {
|
66 |
-
require_once CARTFLOWS_DIR . 'classes/class-cartflows-learndash-compatibility.php';
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Check if it is beaver builder enabled.
|
72 |
-
*
|
73 |
-
* @since 1.1.4
|
74 |
-
*/
|
75 |
-
public function is_bb_enabled() {
|
76 |
-
|
77 |
-
if ( class_exists( 'FLBuilderModel' ) ) {
|
78 |
-
return true;
|
79 |
-
}
|
80 |
-
|
81 |
-
return false;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Check if elementor preview mode is on.
|
86 |
-
*/
|
87 |
-
public function is_elementor_preview_mode() {
|
88 |
-
|
89 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
90 |
-
|
91 |
-
if ( \Elementor\Plugin::$instance->preview->is_preview_mode() ) {
|
92 |
-
return true;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
return false;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Get Current Theme.
|
101 |
-
*/
|
102 |
-
public function get_current_theme() {
|
103 |
-
|
104 |
-
$theme_name = '';
|
105 |
-
$theme = wp_get_theme();
|
106 |
-
|
107 |
-
if ( isset( $theme->parent_theme ) && '' != $theme->parent_theme || null != $theme->parent_theme ) {
|
108 |
-
$theme_name = $theme->parent_theme;
|
109 |
-
} else {
|
110 |
-
$theme_name = $theme->name;
|
111 |
-
}
|
112 |
-
|
113 |
-
return $theme_name;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Check if it is beaver builder preview mode
|
118 |
-
*/
|
119 |
-
public function is_bb_preview_mode() {
|
120 |
-
|
121 |
-
if ( class_exists( 'FLBuilderModel' ) ) {
|
122 |
-
if ( FLBuilderModel::is_builder_active() ) {
|
123 |
-
return true;
|
124 |
-
} else {
|
125 |
-
return false;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
return false;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Check for page builder preview mode.
|
134 |
-
*/
|
135 |
-
public function is_page_builder_preview() {
|
136 |
-
|
137 |
-
if ( $this->is_elementor_preview_mode() || $this->is_bb_preview_mode() || $this->is_divi_builder_preview() ) {
|
138 |
-
return true;
|
139 |
-
}
|
140 |
-
|
141 |
-
return false;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Check if divi builder enabled for post id.
|
146 |
-
*/
|
147 |
-
public function is_divi_builder_preview() {
|
148 |
-
|
149 |
-
if ( isset( $_GET['et_fb'] ) && '1' === $_GET['et_fb'] ) { //phpcs:ignore
|
150 |
-
return true;
|
151 |
-
}
|
152 |
-
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Check if divi builder enabled for post id.
|
158 |
-
*
|
159 |
-
* @param int $post_id post id.
|
160 |
-
*/
|
161 |
-
public function is_divi_builder_enabled( $post_id ) {
|
162 |
-
|
163 |
-
if ( function_exists( 'et_pb_is_pagebuilder_used' ) && et_pb_is_pagebuilder_used( $post_id ) ) {
|
164 |
-
return true;
|
165 |
-
}
|
166 |
-
|
167 |
-
return false;
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Check if compatibility theme enabled.
|
172 |
-
*/
|
173 |
-
public function is_compatibility_theme_enabled() {
|
174 |
-
|
175 |
-
$theme = wp_get_theme();
|
176 |
-
|
177 |
-
$is_compatibility = false;
|
178 |
-
|
179 |
-
if ( $this->is_divi_enabled( $theme ) || $this->is_flatsome_enabled( $theme ) ) {
|
180 |
-
|
181 |
-
$is_compatibility = true;
|
182 |
-
}
|
183 |
-
|
184 |
-
return apply_filters( 'cartflows_is_compatibility_theme', $is_compatibility );
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Check if divi builder enabled for post id.
|
189 |
-
*
|
190 |
-
* @param object $theme theme data.
|
191 |
-
* @return boolean
|
192 |
-
*/
|
193 |
-
public function is_divi_enabled( $theme = false ) {
|
194 |
-
|
195 |
-
if ( ! $theme ) {
|
196 |
-
$theme = wp_get_theme();
|
197 |
-
}
|
198 |
-
|
199 |
-
if ( 'Divi' == $theme->name || 'Divi' == $theme->parent_theme || 'Extra' == $theme->name || 'Extra' == $theme->parent_theme ) {
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
|
203 |
-
return false;
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Check if Divi theme is install status.
|
208 |
-
*
|
209 |
-
* @return boolean
|
210 |
-
*/
|
211 |
-
public function is_divi_theme_installed() {
|
212 |
-
foreach ( (array) wp_get_themes() as $theme_dir => $theme ) {
|
213 |
-
if ( 'Divi' == $theme->name || 'Divi' == $theme->parent_theme || 'Extra' == $theme->name || 'Extra' == $theme->parent_theme ) {
|
214 |
-
return true;
|
215 |
-
}
|
216 |
-
}
|
217 |
-
return false;
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Check if Flatsome enabled for post id.
|
222 |
-
*
|
223 |
-
* @param object $theme theme data.
|
224 |
-
* @return boolean
|
225 |
-
*/
|
226 |
-
public function is_flatsome_enabled( $theme = false ) {
|
227 |
-
|
228 |
-
if ( ! $theme ) {
|
229 |
-
$theme = wp_get_theme();
|
230 |
-
}
|
231 |
-
|
232 |
-
if ( 'Flatsome' == $theme->name || 'Flatsome' == $theme->parent_theme ) {
|
233 |
-
return true;
|
234 |
-
}
|
235 |
-
|
236 |
-
return false;
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* Check if The7 enabled for post id.
|
241 |
-
*
|
242 |
-
* @param object $theme theme data.
|
243 |
-
* @return boolean
|
244 |
-
*/
|
245 |
-
public function is_the_seven_enabled( $theme = false ) {
|
246 |
-
|
247 |
-
if ( ! $theme ) {
|
248 |
-
$theme = wp_get_theme();
|
249 |
-
}
|
250 |
-
|
251 |
-
if ( 'The7' == $theme->name || 'The7' == $theme->parent_theme ) {
|
252 |
-
return true;
|
253 |
-
}
|
254 |
-
|
255 |
-
return false;
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Check if OceanWp enabled for post id.
|
260 |
-
*
|
261 |
-
* @param object $theme theme data.
|
262 |
-
* @return boolean
|
263 |
-
*/
|
264 |
-
public function is_oceanwp_enabled( $theme = false ) {
|
265 |
-
|
266 |
-
if ( ! $theme ) {
|
267 |
-
$theme = wp_get_theme();
|
268 |
-
}
|
269 |
-
|
270 |
-
if ( 'OceanWP' == $theme->name || 'OceanWP' == $theme->parent_theme ) {
|
271 |
-
return true;
|
272 |
-
}
|
273 |
-
|
274 |
-
return false;
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Check for thrive architect edit page.
|
279 |
-
*
|
280 |
-
* @param int $post_id post id.
|
281 |
-
*/
|
282 |
-
public function is_thrive_edit_page( $post_id ) {
|
283 |
-
|
284 |
-
if ( true === $this->is_thrive_builder_page( $post_id ) ) {
|
285 |
-
return true;
|
286 |
-
} else {
|
287 |
-
return false;
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Check if the page being rendered is the main ID on the editor page.
|
293 |
-
*
|
294 |
-
* @since 1.0.0
|
295 |
-
* @param String $post_id Post ID which is to be rendered.
|
296 |
-
* @return boolean True if current if is being rendered is not being edited.
|
297 |
-
*/
|
298 |
-
private function is_thrive_builder_page( $post_id ) {
|
299 |
-
$tve = ( isset( $_GET['tve'] ) && 'true' == $_GET['tve'] ) ? true : false; //phpcs:ignore
|
300 |
-
$post = isset( $_GET['post'] ) ? intval( wp_unslash( $_GET['post'] ) ) : false; //phpcs:ignore
|
301 |
-
|
302 |
-
return ( true == $tve && $post_id !== $post );
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Overwrite meta for page
|
307 |
-
*/
|
308 |
-
public function override_meta() {
|
309 |
-
|
310 |
-
// don't override meta for `elementor_library` post type.
|
311 |
-
if ( 'elementor_library' == get_post_type() ) {
|
312 |
-
return;
|
313 |
-
}
|
314 |
-
|
315 |
-
if ( ! is_singular() ) {
|
316 |
-
return;
|
317 |
-
}
|
318 |
-
|
319 |
-
global $post;
|
320 |
-
$post_id = $post->ID;
|
321 |
-
$post_type = get_post_type();
|
322 |
-
|
323 |
-
if ( 'cartflows_step' == $post_type && ( $this->is_elementor_preview_mode()
|
324 |
-
|| $this->is_bb_preview_mode() || $this->is_thrive_edit_page( $post_id )
|
325 |
-
|| $this->is_divi_builder_enabled( $post_id ) ) ) {
|
326 |
-
|
327 |
-
if ( '' == $post->post_content ) {
|
328 |
-
|
329 |
-
$this->overwrite_template( $post_id );
|
330 |
-
}
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
/**
|
335 |
-
* Assign cartflow canvas template to page.
|
336 |
-
*
|
337 |
-
* @param int $post_id post ID.
|
338 |
-
*/
|
339 |
-
public function overwrite_template( $post_id ) {
|
340 |
-
|
341 |
-
$template = 'cartflows-canvas';
|
342 |
-
$key = '_wp_page_template';
|
343 |
-
|
344 |
-
$record_exists = get_post_meta( $post_id, $key, true );
|
345 |
-
|
346 |
-
if ( 'cartflows-canvas' == $record_exists ) {
|
347 |
-
return;
|
348 |
-
}
|
349 |
-
|
350 |
-
// As elementor doesn't allow update post meta using update_post_meta, run wpdb query to update post meta.
|
351 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
352 |
-
|
353 |
-
global $wpdb;
|
354 |
-
|
355 |
-
if ( '' == $record_exists || ! $record_exists ) {
|
356 |
-
|
357 |
-
$wpdb->insert(
|
358 |
-
$wpdb->prefix . 'postmeta',
|
359 |
-
array(
|
360 |
-
'post_id' => $post_id,
|
361 |
-
'meta_key' => $key,//phpcs:ignore
|
362 |
-
'meta_value' => $template, //phpcs:ignore
|
363 |
-
)
|
364 |
-
);// db call ok;.
|
365 |
-
|
366 |
-
// alternative query to above query.
|
367 |
-
// $table = $wpdb->prefix . 'postmeta';
|
368 |
-
// $wpdb->query($wpdb->prepare( "INSERT INTO { $table } ( `post_id`, `meta_key`, 'meta_value' )
|
369 |
-
// VALUES ( '$post_id', '$key', '$template' )" ) );// db call ok; no-cache ok.
|
370 |
-
|
371 |
-
} else {
|
372 |
-
|
373 |
-
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = %s WHERE meta_key = %s AND post_id = %s;", $template, $key, $post_id ) ); // db call ok; no-cache ok.
|
374 |
-
}
|
375 |
-
} else {
|
376 |
-
|
377 |
-
update_post_meta( $post_id, $key, $template );
|
378 |
-
}
|
379 |
-
}
|
380 |
-
|
381 |
-
/**
|
382 |
-
* Load font awesome style from oceanwp on checkout page.
|
383 |
-
*/
|
384 |
-
public function load_fontawesome() {
|
385 |
-
|
386 |
-
$theme = get_template();
|
387 |
-
|
388 |
-
if ( 'oceanwp' == strtolower( $theme ) && wcf()->utils->is_step_post_type() ) {
|
389 |
-
|
390 |
-
$load_fa = apply_filters( 'cartflows_maybe_load_font_awesome', true );
|
391 |
-
|
392 |
-
if ( $load_fa ) {
|
393 |
-
|
394 |
-
wp_enqueue_style( 'font-awesome', OCEANWP_CSS_DIR_URI . 'third/font-awesome.min.css', false );//phpcs:ignore
|
395 |
-
}
|
396 |
-
|
397 |
-
$custom_css = '
|
398 |
-
#oceanwp-cart-sidebar-wrap,
|
399 |
-
#owp-qv-wrap{
|
400 |
-
display: none;
|
401 |
-
}';
|
402 |
-
|
403 |
-
wp_add_inline_style( 'wcf-frontend-global', $custom_css );
|
404 |
-
}
|
405 |
-
}
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
Cartflows_Compatibility::get_instance();
|
410 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Page builder compatibility
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! class_exists( 'Cartflows_Compatibility' ) ) {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class for page builder compatibility
|
12 |
+
*/
|
13 |
+
class Cartflows_Compatibility {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Member Variable
|
17 |
+
*
|
18 |
+
* @var object instance
|
19 |
+
*/
|
20 |
+
private static $instance;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Initiator
|
24 |
+
*/
|
25 |
+
public static function get_instance() {
|
26 |
+
if ( ! isset( self::$instance ) ) {
|
27 |
+
self::$instance = new self();
|
28 |
+
}
|
29 |
+
return self::$instance;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructor
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
|
37 |
+
$this->load_files();
|
38 |
+
|
39 |
+
// Override post meta.
|
40 |
+
add_action( 'wp', array( $this, 'override_meta' ), 0 );
|
41 |
+
|
42 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'load_fontawesome' ), 10000 );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Load page builder compatibility files
|
47 |
+
*/
|
48 |
+
public function load_files() {
|
49 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
50 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-elementor-compatibility.php';
|
51 |
+
}
|
52 |
+
|
53 |
+
if ( $this->is_divi_enabled() ) {
|
54 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-divi-compatibility.php';
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( $this->is_bb_enabled() ) {
|
58 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-bb-compatibility.php';
|
59 |
+
}
|
60 |
+
|
61 |
+
if ( class_exists( 'TCB_Post' ) ) {
|
62 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-thrive-compatibility.php';
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( defined( 'LEARNDASH_VERSION' ) ) {
|
66 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-learndash-compatibility.php';
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Check if it is beaver builder enabled.
|
72 |
+
*
|
73 |
+
* @since 1.1.4
|
74 |
+
*/
|
75 |
+
public function is_bb_enabled() {
|
76 |
+
|
77 |
+
if ( class_exists( 'FLBuilderModel' ) ) {
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
|
81 |
+
return false;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Check if elementor preview mode is on.
|
86 |
+
*/
|
87 |
+
public function is_elementor_preview_mode() {
|
88 |
+
|
89 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
90 |
+
|
91 |
+
if ( \Elementor\Plugin::$instance->preview->is_preview_mode() ) {
|
92 |
+
return true;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Get Current Theme.
|
101 |
+
*/
|
102 |
+
public function get_current_theme() {
|
103 |
+
|
104 |
+
$theme_name = '';
|
105 |
+
$theme = wp_get_theme();
|
106 |
+
|
107 |
+
if ( isset( $theme->parent_theme ) && '' != $theme->parent_theme || null != $theme->parent_theme ) {
|
108 |
+
$theme_name = $theme->parent_theme;
|
109 |
+
} else {
|
110 |
+
$theme_name = $theme->name;
|
111 |
+
}
|
112 |
+
|
113 |
+
return $theme_name;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Check if it is beaver builder preview mode
|
118 |
+
*/
|
119 |
+
public function is_bb_preview_mode() {
|
120 |
+
|
121 |
+
if ( class_exists( 'FLBuilderModel' ) ) {
|
122 |
+
if ( FLBuilderModel::is_builder_active() ) {
|
123 |
+
return true;
|
124 |
+
} else {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
return false;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Check for page builder preview mode.
|
134 |
+
*/
|
135 |
+
public function is_page_builder_preview() {
|
136 |
+
|
137 |
+
if ( $this->is_elementor_preview_mode() || $this->is_bb_preview_mode() || $this->is_divi_builder_preview() ) {
|
138 |
+
return true;
|
139 |
+
}
|
140 |
+
|
141 |
+
return false;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Check if divi builder enabled for post id.
|
146 |
+
*/
|
147 |
+
public function is_divi_builder_preview() {
|
148 |
+
|
149 |
+
if ( isset( $_GET['et_fb'] ) && '1' === $_GET['et_fb'] ) { //phpcs:ignore
|
150 |
+
return true;
|
151 |
+
}
|
152 |
+
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Check if divi builder enabled for post id.
|
158 |
+
*
|
159 |
+
* @param int $post_id post id.
|
160 |
+
*/
|
161 |
+
public function is_divi_builder_enabled( $post_id ) {
|
162 |
+
|
163 |
+
if ( function_exists( 'et_pb_is_pagebuilder_used' ) && et_pb_is_pagebuilder_used( $post_id ) ) {
|
164 |
+
return true;
|
165 |
+
}
|
166 |
+
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Check if compatibility theme enabled.
|
172 |
+
*/
|
173 |
+
public function is_compatibility_theme_enabled() {
|
174 |
+
|
175 |
+
$theme = wp_get_theme();
|
176 |
+
|
177 |
+
$is_compatibility = false;
|
178 |
+
|
179 |
+
if ( $this->is_divi_enabled( $theme ) || $this->is_flatsome_enabled( $theme ) ) {
|
180 |
+
|
181 |
+
$is_compatibility = true;
|
182 |
+
}
|
183 |
+
|
184 |
+
return apply_filters( 'cartflows_is_compatibility_theme', $is_compatibility );
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Check if divi builder enabled for post id.
|
189 |
+
*
|
190 |
+
* @param object $theme theme data.
|
191 |
+
* @return boolean
|
192 |
+
*/
|
193 |
+
public function is_divi_enabled( $theme = false ) {
|
194 |
+
|
195 |
+
if ( ! $theme ) {
|
196 |
+
$theme = wp_get_theme();
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( 'Divi' == $theme->name || 'Divi' == $theme->parent_theme || 'Extra' == $theme->name || 'Extra' == $theme->parent_theme ) {
|
200 |
+
return true;
|
201 |
+
}
|
202 |
+
|
203 |
+
return false;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Check if Divi theme is install status.
|
208 |
+
*
|
209 |
+
* @return boolean
|
210 |
+
*/
|
211 |
+
public function is_divi_theme_installed() {
|
212 |
+
foreach ( (array) wp_get_themes() as $theme_dir => $theme ) {
|
213 |
+
if ( 'Divi' == $theme->name || 'Divi' == $theme->parent_theme || 'Extra' == $theme->name || 'Extra' == $theme->parent_theme ) {
|
214 |
+
return true;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
return false;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Check if Flatsome enabled for post id.
|
222 |
+
*
|
223 |
+
* @param object $theme theme data.
|
224 |
+
* @return boolean
|
225 |
+
*/
|
226 |
+
public function is_flatsome_enabled( $theme = false ) {
|
227 |
+
|
228 |
+
if ( ! $theme ) {
|
229 |
+
$theme = wp_get_theme();
|
230 |
+
}
|
231 |
+
|
232 |
+
if ( 'Flatsome' == $theme->name || 'Flatsome' == $theme->parent_theme ) {
|
233 |
+
return true;
|
234 |
+
}
|
235 |
+
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Check if The7 enabled for post id.
|
241 |
+
*
|
242 |
+
* @param object $theme theme data.
|
243 |
+
* @return boolean
|
244 |
+
*/
|
245 |
+
public function is_the_seven_enabled( $theme = false ) {
|
246 |
+
|
247 |
+
if ( ! $theme ) {
|
248 |
+
$theme = wp_get_theme();
|
249 |
+
}
|
250 |
+
|
251 |
+
if ( 'The7' == $theme->name || 'The7' == $theme->parent_theme ) {
|
252 |
+
return true;
|
253 |
+
}
|
254 |
+
|
255 |
+
return false;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Check if OceanWp enabled for post id.
|
260 |
+
*
|
261 |
+
* @param object $theme theme data.
|
262 |
+
* @return boolean
|
263 |
+
*/
|
264 |
+
public function is_oceanwp_enabled( $theme = false ) {
|
265 |
+
|
266 |
+
if ( ! $theme ) {
|
267 |
+
$theme = wp_get_theme();
|
268 |
+
}
|
269 |
+
|
270 |
+
if ( 'OceanWP' == $theme->name || 'OceanWP' == $theme->parent_theme ) {
|
271 |
+
return true;
|
272 |
+
}
|
273 |
+
|
274 |
+
return false;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Check for thrive architect edit page.
|
279 |
+
*
|
280 |
+
* @param int $post_id post id.
|
281 |
+
*/
|
282 |
+
public function is_thrive_edit_page( $post_id ) {
|
283 |
+
|
284 |
+
if ( true === $this->is_thrive_builder_page( $post_id ) ) {
|
285 |
+
return true;
|
286 |
+
} else {
|
287 |
+
return false;
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Check if the page being rendered is the main ID on the editor page.
|
293 |
+
*
|
294 |
+
* @since 1.0.0
|
295 |
+
* @param String $post_id Post ID which is to be rendered.
|
296 |
+
* @return boolean True if current if is being rendered is not being edited.
|
297 |
+
*/
|
298 |
+
private function is_thrive_builder_page( $post_id ) {
|
299 |
+
$tve = ( isset( $_GET['tve'] ) && 'true' == $_GET['tve'] ) ? true : false; //phpcs:ignore
|
300 |
+
$post = isset( $_GET['post'] ) ? intval( wp_unslash( $_GET['post'] ) ) : false; //phpcs:ignore
|
301 |
+
|
302 |
+
return ( true == $tve && $post_id !== $post );
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Overwrite meta for page
|
307 |
+
*/
|
308 |
+
public function override_meta() {
|
309 |
+
|
310 |
+
// don't override meta for `elementor_library` post type.
|
311 |
+
if ( 'elementor_library' == get_post_type() ) {
|
312 |
+
return;
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( ! is_singular() ) {
|
316 |
+
return;
|
317 |
+
}
|
318 |
+
|
319 |
+
global $post;
|
320 |
+
$post_id = $post->ID;
|
321 |
+
$post_type = get_post_type();
|
322 |
+
|
323 |
+
if ( 'cartflows_step' == $post_type && ( $this->is_elementor_preview_mode()
|
324 |
+
|| $this->is_bb_preview_mode() || $this->is_thrive_edit_page( $post_id )
|
325 |
+
|| $this->is_divi_builder_enabled( $post_id ) ) ) {
|
326 |
+
|
327 |
+
if ( '' == $post->post_content ) {
|
328 |
+
|
329 |
+
$this->overwrite_template( $post_id );
|
330 |
+
}
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Assign cartflow canvas template to page.
|
336 |
+
*
|
337 |
+
* @param int $post_id post ID.
|
338 |
+
*/
|
339 |
+
public function overwrite_template( $post_id ) {
|
340 |
+
|
341 |
+
$template = 'cartflows-canvas';
|
342 |
+
$key = '_wp_page_template';
|
343 |
+
|
344 |
+
$record_exists = get_post_meta( $post_id, $key, true );
|
345 |
+
|
346 |
+
if ( 'cartflows-canvas' == $record_exists ) {
|
347 |
+
return;
|
348 |
+
}
|
349 |
+
|
350 |
+
// As elementor doesn't allow update post meta using update_post_meta, run wpdb query to update post meta.
|
351 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
352 |
+
|
353 |
+
global $wpdb;
|
354 |
+
|
355 |
+
if ( '' == $record_exists || ! $record_exists ) {
|
356 |
+
|
357 |
+
$wpdb->insert(
|
358 |
+
$wpdb->prefix . 'postmeta',
|
359 |
+
array(
|
360 |
+
'post_id' => $post_id,
|
361 |
+
'meta_key' => $key,//phpcs:ignore
|
362 |
+
'meta_value' => $template, //phpcs:ignore
|
363 |
+
)
|
364 |
+
);// db call ok;.
|
365 |
+
|
366 |
+
// alternative query to above query.
|
367 |
+
// $table = $wpdb->prefix . 'postmeta';
|
368 |
+
// $wpdb->query($wpdb->prepare( "INSERT INTO { $table } ( `post_id`, `meta_key`, 'meta_value' )
|
369 |
+
// VALUES ( '$post_id', '$key', '$template' )" ) );// db call ok; no-cache ok.
|
370 |
+
|
371 |
+
} else {
|
372 |
+
|
373 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = %s WHERE meta_key = %s AND post_id = %s;", $template, $key, $post_id ) ); // db call ok; no-cache ok.
|
374 |
+
}
|
375 |
+
} else {
|
376 |
+
|
377 |
+
update_post_meta( $post_id, $key, $template );
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Load font awesome style from oceanwp on checkout page.
|
383 |
+
*/
|
384 |
+
public function load_fontawesome() {
|
385 |
+
|
386 |
+
$theme = get_template();
|
387 |
+
|
388 |
+
if ( 'oceanwp' == strtolower( $theme ) && wcf()->utils->is_step_post_type() ) {
|
389 |
+
|
390 |
+
$load_fa = apply_filters( 'cartflows_maybe_load_font_awesome', true );
|
391 |
+
|
392 |
+
if ( $load_fa ) {
|
393 |
+
|
394 |
+
wp_enqueue_style( 'font-awesome', OCEANWP_CSS_DIR_URI . 'third/font-awesome.min.css', false );//phpcs:ignore
|
395 |
+
}
|
396 |
+
|
397 |
+
$custom_css = '
|
398 |
+
#oceanwp-cart-sidebar-wrap,
|
399 |
+
#owp-qv-wrap{
|
400 |
+
display: none;
|
401 |
+
}';
|
402 |
+
|
403 |
+
wp_add_inline_style( 'wcf-frontend-global', $custom_css );
|
404 |
+
}
|
405 |
+
}
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
Cartflows_Compatibility::get_instance();
|
410 |
+
|
classes/class-cartflows-default-meta.php
CHANGED
@@ -42,13 +42,20 @@ class Cartflows_Default_Meta {
|
|
42 |
*/
|
43 |
private static $flow_fields = null;
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
private static $landing_fields = null;
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/**
|
53 |
* Initiator
|
54 |
*/
|
@@ -384,264 +391,6 @@ class Cartflows_Default_Meta {
|
|
384 |
}
|
385 |
}
|
386 |
break;
|
387 |
-
case 'FILTER_CARTFLOWS_CHECKOUT_FIELDS':
|
388 |
-
$count = 10;
|
389 |
-
$ordered_fields = array();
|
390 |
-
$billing_fields = array();
|
391 |
-
|
392 |
-
if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { //phpcs:ignore
|
393 |
-
$post_data = wp_unslash( $_POST[ $key ] ); //phpcs:ignore
|
394 |
-
|
395 |
-
if ( 'wcf_field_order_billing' == $key ) {
|
396 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
397 |
-
|
398 |
-
foreach ( $post_data as $index => $value ) {
|
399 |
-
if ( isset( $billing_fields[ $value ] ) ) {
|
400 |
-
$ordered_fields[ $value ] = $billing_fields[ $value ];
|
401 |
-
$ordered_fields[ $value ]['priority'] = $count;
|
402 |
-
$count += 10;
|
403 |
-
}
|
404 |
-
}
|
405 |
-
|
406 |
-
$meta_value = $ordered_fields;
|
407 |
-
}
|
408 |
-
|
409 |
-
if ( 'wcf_field_order_shipping' == $key ) {
|
410 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
411 |
-
foreach ( $post_data as $index => $value ) {
|
412 |
-
if ( isset( $shipping_fields[ $value ] ) ) {
|
413 |
-
$ordered_fields[ $value ] = $shipping_fields[ $value ];
|
414 |
-
$ordered_fields[ $value ]['priority'] = $count;
|
415 |
-
$count += 10;
|
416 |
-
}
|
417 |
-
}
|
418 |
-
$meta_value = $ordered_fields;
|
419 |
-
}
|
420 |
-
|
421 |
-
if ( 'wcf_label_text_field_billing' == $key ) {
|
422 |
-
$get_ordered_billing_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_billing' );
|
423 |
-
|
424 |
-
if ( isset( $get_ordered_billing_fields ) && ! empty( $get_ordered_billing_fields ) ) {
|
425 |
-
echo 'con 1';
|
426 |
-
$billing_fields = $get_ordered_billing_fields;
|
427 |
-
} else {
|
428 |
-
echo 'con 2';
|
429 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
430 |
-
}
|
431 |
-
|
432 |
-
foreach ( $post_data as $index => $value ) {
|
433 |
-
if ( isset( $billing_fields[ $index ] ) ) {
|
434 |
-
$ordered_fields[ $index ] = $billing_fields[ $index ];
|
435 |
-
$ordered_fields[ $index ]['label'] = wp_kses_post( trim( stripslashes( $value ) ) );
|
436 |
-
}
|
437 |
-
}
|
438 |
-
$key = 'wcf_field_order_billing';
|
439 |
-
$meta_value = $ordered_fields;
|
440 |
-
}
|
441 |
-
|
442 |
-
if ( 'wcf_label_text_field_shipping' == $key ) {
|
443 |
-
$get_ordered_shipping_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_shipping' );
|
444 |
-
|
445 |
-
if ( isset( $get_ordered_shipping_fields ) && ! empty( $get_ordered_shipping_fields ) ) {
|
446 |
-
$shipping_fields = $get_ordered_shipping_fields;
|
447 |
-
} else {
|
448 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
449 |
-
}
|
450 |
-
|
451 |
-
foreach ( $post_data as $index => $value ) {
|
452 |
-
if ( isset( $shipping_fields[ $index ] ) ) {
|
453 |
-
$ordered_fields[ $index ] = $shipping_fields[ $index ];
|
454 |
-
$ordered_fields[ $index ]['label'] = wp_kses_post( trim( stripslashes( $value ) ) );
|
455 |
-
}
|
456 |
-
}
|
457 |
-
$key = 'wcf_field_order_shipping';
|
458 |
-
$meta_value = $ordered_fields;
|
459 |
-
}
|
460 |
-
|
461 |
-
if ( 'wcf_label_placeholder_field_billing' == $key ) {
|
462 |
-
$get_ordered_billing_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_billing' );
|
463 |
-
|
464 |
-
if ( isset( $get_ordered_billing_fields ) && ! empty( $get_ordered_billing_fields ) ) {
|
465 |
-
$billing_fields = $get_ordered_billing_fields;
|
466 |
-
} else {
|
467 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
468 |
-
}
|
469 |
-
foreach ( $post_data as $index => $value ) {
|
470 |
-
if ( isset( $billing_fields[ $index ] ) ) {
|
471 |
-
$ordered_fields[ $index ] = $billing_fields[ $index ];
|
472 |
-
$ordered_fields[ $index ]['placeholder'] = wc_clean( stripslashes( $value ) );
|
473 |
-
}
|
474 |
-
}
|
475 |
-
|
476 |
-
$key = 'wcf_field_order_billing';
|
477 |
-
$meta_value = $ordered_fields;
|
478 |
-
}
|
479 |
-
|
480 |
-
if ( 'wcf_label_placeholder_field_shipping' == $key ) {
|
481 |
-
$get_ordered_shipping_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_shipping' );
|
482 |
-
|
483 |
-
if ( isset( $get_ordered_shipping_fields ) && ! empty( $get_ordered_shipping_fields ) ) {
|
484 |
-
$shipping_fields = $get_ordered_shipping_fields;
|
485 |
-
} else {
|
486 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
487 |
-
}
|
488 |
-
|
489 |
-
foreach ( $post_data as $index => $value ) {
|
490 |
-
if ( isset( $shipping_fields[ $index ] ) ) {
|
491 |
-
$ordered_fields[ $index ] = $shipping_fields[ $index ];
|
492 |
-
$ordered_fields[ $index ]['placeholder'] = wc_clean( stripslashes( $value ) );
|
493 |
-
}
|
494 |
-
}
|
495 |
-
|
496 |
-
$key = 'wcf_field_order_shipping';
|
497 |
-
$meta_value = $ordered_fields;
|
498 |
-
}
|
499 |
-
|
500 |
-
if ( 'wcf_label_default_field_billing' == $key ) {
|
501 |
-
$get_ordered_billing_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_billing' );
|
502 |
-
|
503 |
-
if ( isset( $get_ordered_billing_fields ) && ! empty( $get_ordered_billing_fields ) ) {
|
504 |
-
$billing_fields = $get_ordered_billing_fields;
|
505 |
-
} else {
|
506 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
507 |
-
}
|
508 |
-
|
509 |
-
foreach ( $post_data as $index => $value ) {
|
510 |
-
if ( isset( $billing_fields[ $index ] ) ) {
|
511 |
-
$ordered_fields[ $index ] = $billing_fields[ $index ];
|
512 |
-
$ordered_fields[ $index ]['default'] = wp_kses_post( trim( stripslashes( $value ) ) );
|
513 |
-
}
|
514 |
-
}
|
515 |
-
|
516 |
-
$key = 'wcf_field_order_billing';
|
517 |
-
$meta_value = $ordered_fields;
|
518 |
-
}
|
519 |
-
|
520 |
-
if ( 'wcf_label_default_field_shipping' == $key ) {
|
521 |
-
$get_ordered_shipping_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_shipping' );
|
522 |
-
|
523 |
-
if ( isset( $get_ordered_shipping_fields ) && ! empty( $get_ordered_shipping_fields ) ) {
|
524 |
-
$shipping_fields = $get_ordered_shipping_fields;
|
525 |
-
} else {
|
526 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
527 |
-
}
|
528 |
-
|
529 |
-
foreach ( $post_data as $index => $value ) {
|
530 |
-
if ( isset( $shipping_fields[ $index ] ) ) {
|
531 |
-
$ordered_fields[ $index ] = $shipping_fields[ $index ];
|
532 |
-
$ordered_fields[ $index ]['default'] = wp_kses_post( trim( stripslashes( $value ) ) );
|
533 |
-
}
|
534 |
-
}
|
535 |
-
|
536 |
-
$key = 'wcf_field_order_shipping';
|
537 |
-
$meta_value = $ordered_fields;
|
538 |
-
}
|
539 |
-
|
540 |
-
if ( 'wcf_is_required_field_billing' == $key ) {
|
541 |
-
$get_ordered_billing_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_billing' );
|
542 |
-
|
543 |
-
if ( isset( $get_ordered_billing_fields ) && ! empty( $get_ordered_billing_fields ) ) {
|
544 |
-
$billing_fields = $get_ordered_billing_fields;
|
545 |
-
} else {
|
546 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
547 |
-
}
|
548 |
-
|
549 |
-
foreach ( $post_data as $index => $value ) {
|
550 |
-
if ( isset( $billing_fields[ $index ] ) ) {
|
551 |
-
$ordered_fields[ $index ] = $billing_fields[ $index ];
|
552 |
-
if ( 'yes' == $value ) {
|
553 |
-
$ordered_fields[ $index ]['required'] = true;
|
554 |
-
} else {
|
555 |
-
$ordered_fields[ $index ]['required'] = false;
|
556 |
-
}
|
557 |
-
}
|
558 |
-
}
|
559 |
-
|
560 |
-
$key = 'wcf_field_order_billing';
|
561 |
-
$meta_value = $ordered_fields;
|
562 |
-
}
|
563 |
-
|
564 |
-
if ( 'wcf_is_required_field_shipping' == $key ) {
|
565 |
-
$get_ordered_shipping_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_shipping' );
|
566 |
-
|
567 |
-
if ( isset( $get_ordered_shipping_fields ) && ! empty( $get_ordered_shipping_fields ) ) {
|
568 |
-
$shipping_fields = $get_ordered_shipping_fields;
|
569 |
-
} else {
|
570 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
571 |
-
}
|
572 |
-
|
573 |
-
foreach ( $post_data as $index => $value ) {
|
574 |
-
if ( isset( $shipping_fields[ $index ] ) ) {
|
575 |
-
$ordered_fields[ $index ] = $shipping_fields[ $index ];
|
576 |
-
|
577 |
-
if ( 'yes' == $value ) {
|
578 |
-
$ordered_fields[ $index ]['required'] = true;
|
579 |
-
} else {
|
580 |
-
$ordered_fields[ $index ]['required'] = false;
|
581 |
-
}
|
582 |
-
}
|
583 |
-
}
|
584 |
-
|
585 |
-
$key = 'wcf_field_order_shipping';
|
586 |
-
$meta_value = $ordered_fields;
|
587 |
-
}
|
588 |
-
|
589 |
-
if ( 'wcf_select_option_field_billing' == $key ) {
|
590 |
-
$get_ordered_billing_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_billing' );
|
591 |
-
|
592 |
-
if ( isset( $get_ordered_billing_fields ) && ! empty( $get_ordered_billing_fields ) ) {
|
593 |
-
$billing_fields = $get_ordered_billing_fields;
|
594 |
-
} else {
|
595 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post_id );
|
596 |
-
}
|
597 |
-
|
598 |
-
foreach ( $post_data as $index => $value ) {
|
599 |
-
$options = explode( ',', $value );
|
600 |
-
|
601 |
-
if ( isset( $billing_fields[ $index ] ) ) {
|
602 |
-
$ordered_fields[ $index ] = $billing_fields[ $index ];
|
603 |
-
|
604 |
-
$ordered_fields[ $index ]['options'] = array();
|
605 |
-
|
606 |
-
foreach ( $options as $key => $option ) {
|
607 |
-
$ordered_fields[ $index ]['options'][ $option ] = trim( stripslashes( $option ) );
|
608 |
-
}
|
609 |
-
}
|
610 |
-
}
|
611 |
-
|
612 |
-
$key = 'wcf_field_order_billing';
|
613 |
-
$meta_value = $ordered_fields;
|
614 |
-
}
|
615 |
-
|
616 |
-
if ( 'wcf_select_option_field_shipping' == $key ) {
|
617 |
-
$get_ordered_shipping_fields = wcf()->options->get_checkout_meta_value( $post_id, 'wcf_field_order_shipping' );
|
618 |
-
|
619 |
-
if ( isset( $get_ordered_shipping_fields ) && ! empty( $get_ordered_shipping_fields ) ) {
|
620 |
-
$shipping_fields = $get_ordered_shipping_fields;
|
621 |
-
} else {
|
622 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post_id );
|
623 |
-
}
|
624 |
-
|
625 |
-
foreach ( $post_data as $index => $value ) {
|
626 |
-
$options = explode( ',', $value );
|
627 |
-
|
628 |
-
if ( isset( $shipping_fields[ $index ] ) ) {
|
629 |
-
$ordered_fields[ $index ] = $shipping_fields[ $index ];
|
630 |
-
|
631 |
-
$ordered_fields[ $index ]['options'] = array();
|
632 |
-
|
633 |
-
foreach ( $options as $key => $option ) {
|
634 |
-
$ordered_fields[ $index ]['options'][ $option ] = trim( stripslashes( $option ) );
|
635 |
-
}
|
636 |
-
}
|
637 |
-
}
|
638 |
-
|
639 |
-
$key = 'wcf_field_order_shipping';
|
640 |
-
$meta_value = $ordered_fields;
|
641 |
-
}
|
642 |
-
}
|
643 |
-
break;
|
644 |
-
|
645 |
default:
|
646 |
if ( 'FILTER_DEFAULT' === $sanitize_filter ) {
|
647 |
$meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
|
@@ -754,6 +503,10 @@ class Cartflows_Default_Meta {
|
|
754 |
'default' => '',
|
755 |
'sanitize' => 'FILTER_DEFAULT',
|
756 |
),
|
|
|
|
|
|
|
|
|
757 |
'wcf-tq-heading-color' => array(
|
758 |
'default' => '',
|
759 |
'sanitize' => 'FILTER_DEFAULT',
|
@@ -866,7 +619,7 @@ class Cartflows_Default_Meta {
|
|
866 |
}
|
867 |
|
868 |
/**
|
869 |
-
*
|
870 |
*
|
871 |
* @param int $post_id post id.
|
872 |
* @return array
|
@@ -883,6 +636,198 @@ class Cartflows_Default_Meta {
|
|
883 |
}
|
884 |
return apply_filters( 'cartflows_landing_meta_options', self::$landing_fields, $post_id );
|
885 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
|
888 |
/**
|
42 |
*/
|
43 |
private static $flow_fields = null;
|
44 |
|
45 |
+
/**
|
46 |
+
* Member Variable
|
47 |
+
*
|
48 |
+
* @var landing_fields
|
49 |
+
*/
|
50 |
private static $landing_fields = null;
|
51 |
|
52 |
+
/**
|
53 |
+
* Member Variable
|
54 |
+
*
|
55 |
+
* @var optin_fields
|
56 |
+
*/
|
57 |
+
private static $optin_fields = null;
|
58 |
+
|
59 |
/**
|
60 |
* Initiator
|
61 |
*/
|
391 |
}
|
392 |
}
|
393 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
default:
|
395 |
if ( 'FILTER_DEFAULT' === $sanitize_filter ) {
|
396 |
$meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
|
503 |
'default' => '',
|
504 |
'sanitize' => 'FILTER_DEFAULT',
|
505 |
),
|
506 |
+
'wcf-tq-font-size' => array(
|
507 |
+
'default' => '',
|
508 |
+
'sanitize' => 'FILTER_DEFAULT',
|
509 |
+
),
|
510 |
'wcf-tq-heading-color' => array(
|
511 |
'default' => '',
|
512 |
'sanitize' => 'FILTER_DEFAULT',
|
619 |
}
|
620 |
|
621 |
/**
|
622 |
+
* Landing Default fields.
|
623 |
*
|
624 |
* @param int $post_id post id.
|
625 |
* @return array
|
636 |
}
|
637 |
return apply_filters( 'cartflows_landing_meta_options', self::$landing_fields, $post_id );
|
638 |
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* Optin Default fields.
|
642 |
+
*
|
643 |
+
* @param int $post_id post id.
|
644 |
+
* @return array
|
645 |
+
*/
|
646 |
+
public function get_optin_fields( $post_id ) {
|
647 |
+
|
648 |
+
if ( null === self::$optin_fields ) {
|
649 |
+
self::$optin_fields = array(
|
650 |
+
|
651 |
+
'wcf-optin-product' => array(
|
652 |
+
'default' => array(),
|
653 |
+
'sanitize' => 'FILTER_CARTFLOWS_ARRAY',
|
654 |
+
),
|
655 |
+
|
656 |
+
/* Style */
|
657 |
+
'wcf-field-google-font-url' => array(
|
658 |
+
'default' => '',
|
659 |
+
'sanitize' => 'FILTER_DEFAULT',
|
660 |
+
),
|
661 |
+
'wcf-primary-color' => array(
|
662 |
+
'default' => '',
|
663 |
+
'sanitize' => 'FILTER_DEFAULT',
|
664 |
+
),
|
665 |
+
'wcf-base-font-family' => array(
|
666 |
+
'default' => '',
|
667 |
+
'sanitize' => 'FILTER_DEFAULT',
|
668 |
+
),
|
669 |
+
'wcf-input-fields-skins' => array(
|
670 |
+
'default' => '',
|
671 |
+
'sanitize' => 'FILTER_DEFAULT',
|
672 |
+
),
|
673 |
+
'wcf-input-font-family' => array(
|
674 |
+
'default' => '',
|
675 |
+
'sanitize' => 'FILTER_DEFAULT',
|
676 |
+
),
|
677 |
+
'wcf-input-font-weight' => array(
|
678 |
+
'default' => '',
|
679 |
+
'sanitize' => 'FILTER_DEFAULT',
|
680 |
+
),
|
681 |
+
'wcf-input-field-size' => array(
|
682 |
+
'default' => '33px',
|
683 |
+
'sanitize' => 'FILTER_DEFAULT',
|
684 |
+
),
|
685 |
+
'wcf-field-tb-padding' => array(
|
686 |
+
'default' => '',
|
687 |
+
'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
|
688 |
+
),
|
689 |
+
'wcf-field-lr-padding' => array(
|
690 |
+
'default' => '',
|
691 |
+
'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
|
692 |
+
),
|
693 |
+
'wcf-field-color' => array(
|
694 |
+
'default' => '',
|
695 |
+
'sanitize' => 'FILTER_DEFAULT',
|
696 |
+
),
|
697 |
+
'wcf-field-bg-color' => array(
|
698 |
+
'default' => '',
|
699 |
+
'sanitize' => 'FILTER_DEFAULT',
|
700 |
+
),
|
701 |
+
'wcf-field-border-color' => array(
|
702 |
+
'default' => '',
|
703 |
+
'sanitize' => 'FILTER_DEFAULT',
|
704 |
+
),
|
705 |
+
'wcf-field-label-color' => array(
|
706 |
+
'default' => '',
|
707 |
+
'sanitize' => 'FILTER_DEFAULT',
|
708 |
+
),
|
709 |
+
'wcf-submit-button-text' => array(
|
710 |
+
'default' => __( 'Submit', 'cartflows' ),
|
711 |
+
'sanitize' => 'FILTER_DEFAULT',
|
712 |
+
),
|
713 |
+
'wcf-submit-font-size' => array(
|
714 |
+
'default' => '',
|
715 |
+
'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
|
716 |
+
),
|
717 |
+
'wcf-button-font-family' => array(
|
718 |
+
'default' => '',
|
719 |
+
'sanitize' => 'FILTER_DEFAULT',
|
720 |
+
),
|
721 |
+
'wcf-button-font-weight' => array(
|
722 |
+
'default' => '',
|
723 |
+
'sanitize' => 'FILTER_DEFAULT',
|
724 |
+
),
|
725 |
+
'wcf-submit-button-size' => array(
|
726 |
+
'default' => '33px',
|
727 |
+
'sanitize' => 'FILTER_DEFAULT',
|
728 |
+
),
|
729 |
+
'wcf-submit-tb-padding' => array(
|
730 |
+
'default' => '',
|
731 |
+
'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
|
732 |
+
),
|
733 |
+
'wcf-submit-lr-padding' => array(
|
734 |
+
'default' => '',
|
735 |
+
'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
|
736 |
+
),
|
737 |
+
'wcf-submit-button-position' => array(
|
738 |
+
'default' => 'center',
|
739 |
+
'sanitize' => 'FILTER_DEFAULT',
|
740 |
+
),
|
741 |
+
'wcf-submit-color' => array(
|
742 |
+
'default' => '',
|
743 |
+
'sanitize' => 'FILTER_DEFAULT',
|
744 |
+
),
|
745 |
+
'wcf-submit-hover-color' => array(
|
746 |
+
'default' => '',
|
747 |
+
'sanitize' => 'FILTER_DEFAULT',
|
748 |
+
),
|
749 |
+
'wcf-submit-bg-color' => array(
|
750 |
+
'default' => '',
|
751 |
+
'sanitize' => 'FILTER_DEFAULT',
|
752 |
+
),
|
753 |
+
'wcf-submit-bg-hover-color' => array(
|
754 |
+
'default' => '',
|
755 |
+
'sanitize' => 'FILTER_DEFAULT',
|
756 |
+
),
|
757 |
+
'wcf-submit-border-color' => array(
|
758 |
+
'default' => '',
|
759 |
+
'sanitize' => 'FILTER_DEFAULT',
|
760 |
+
),
|
761 |
+
'wcf-submit-border-hover-color' => array(
|
762 |
+
'default' => '',
|
763 |
+
'sanitize' => 'FILTER_DEFAULT',
|
764 |
+
),
|
765 |
+
|
766 |
+
/* Settings */
|
767 |
+
'wcf-optin-pass-fields' => array(
|
768 |
+
'default' => '',
|
769 |
+
'sanitize' => 'FILTER_DEFAULT',
|
770 |
+
),
|
771 |
+
'wcf-optin-pass-specific-fields' => array(
|
772 |
+
'default' => 'first_name',
|
773 |
+
'sanitize' => 'FILTER_DEFAULT',
|
774 |
+
),
|
775 |
+
|
776 |
+
/* Script */
|
777 |
+
'wcf-custom-script' => array(
|
778 |
+
'default' => '',
|
779 |
+
'sanitize' => 'FILTER_DEFAULT',
|
780 |
+
),
|
781 |
+
|
782 |
+
/* Hidden */
|
783 |
+
'wcf-active-tab' => array(
|
784 |
+
'default' => '',
|
785 |
+
'sanitize' => 'FILTER_DEFAULT',
|
786 |
+
),
|
787 |
+
);
|
788 |
+
}
|
789 |
+
return apply_filters( 'cartflows_optin_meta_options', self::$optin_fields, $post_id );
|
790 |
+
}
|
791 |
+
|
792 |
+
/**
|
793 |
+
* Save Optin Meta fields.
|
794 |
+
*
|
795 |
+
* @param int $post_id post id.
|
796 |
+
* @return void
|
797 |
+
*/
|
798 |
+
public function save_optin_fields( $post_id ) {
|
799 |
+
|
800 |
+
$post_meta = $this->get_optin_fields( $post_id );
|
801 |
+
|
802 |
+
$this->save_meta_fields( $post_id, $post_meta );
|
803 |
+
}
|
804 |
+
|
805 |
+
/**
|
806 |
+
* Get optin meta.
|
807 |
+
*
|
808 |
+
* @param int $post_id post id.
|
809 |
+
* @param string $key options key.
|
810 |
+
* @param mix $default options default value.
|
811 |
+
* @return string
|
812 |
+
*/
|
813 |
+
public function get_optin_meta_value( $post_id = 0, $key = '', $default = false ) {
|
814 |
+
|
815 |
+
$value = $this->get_save_meta( $post_id, $key );
|
816 |
+
|
817 |
+
if ( ! $value ) {
|
818 |
+
if ( false !== $default ) {
|
819 |
+
$value = $default;
|
820 |
+
} else {
|
821 |
+
$fields = $this->get_optin_fields( $post_id );
|
822 |
+
|
823 |
+
if ( isset( $fields[ $key ]['default'] ) ) {
|
824 |
+
$value = $fields[ $key ]['default'];
|
825 |
+
}
|
826 |
+
}
|
827 |
+
}
|
828 |
+
|
829 |
+
return $value;
|
830 |
+
}
|
831 |
}
|
832 |
|
833 |
/**
|
classes/class-cartflows-elementor-compatibility.php
CHANGED
@@ -1,66 +1,100 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Elementor page builder compatibility
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
namespace Elementor\Modules\PageTemplates;
|
9 |
-
|
10 |
-
use Elementor\Core\Base\Document;
|
11 |
-
use Elementor\Plugin;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class for elementor page builder compatibility
|
15 |
-
*/
|
16 |
-
class Cartflows_Elementor_Compatibility {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Member Variable
|
20 |
-
*
|
21 |
-
* @var instance
|
22 |
-
*/
|
23 |
-
private static $instance;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Initiator
|
27 |
-
*/
|
28 |
-
public static function get_instance() {
|
29 |
-
if ( ! isset( self::$instance ) ) {
|
30 |
-
self::$instance = new self();
|
31 |
-
}
|
32 |
-
return self::$instance;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor
|
37 |
-
*/
|
38 |
-
public function __construct() {
|
39 |
-
|
40 |
-
add_filter( 'cartflows_page_template', array( $this, 'get_page_template' ) );
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Elementor page builder compatibility
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Elementor\Modules\PageTemplates;
|
9 |
+
|
10 |
+
use Elementor\Core\Base\Document;
|
11 |
+
use Elementor\Plugin;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class for elementor page builder compatibility
|
15 |
+
*/
|
16 |
+
class Cartflows_Elementor_Compatibility {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Member Variable
|
20 |
+
*
|
21 |
+
* @var instance
|
22 |
+
*/
|
23 |
+
private static $instance;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Initiator
|
27 |
+
*/
|
28 |
+
public static function get_instance() {
|
29 |
+
if ( ! isset( self::$instance ) ) {
|
30 |
+
self::$instance = new self();
|
31 |
+
}
|
32 |
+
return self::$instance;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
|
40 |
+
add_filter( 'cartflows_page_template', array( $this, 'get_page_template' ) );
|
41 |
+
|
42 |
+
if ( wcf()->is_woo_active ) {
|
43 |
+
|
44 |
+
// On Editor - Register WooCommerce frontend hooks before the Editor init.
|
45 |
+
// Priority = 5, in order to allow plugins remove/add their wc hooks on init.
|
46 |
+
if ( ! empty( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] && is_admin() ) { //phpcs:ignore
|
47 |
+
add_action( 'init', array( $this, 'register_wc_hooks' ), 5 );
|
48 |
+
}
|
49 |
+
|
50 |
+
add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'maybe_init_cart' ) );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get page template fiter callback for elementor preview mode
|
56 |
+
*
|
57 |
+
* @param string $template page template.
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function get_page_template( $template ) {
|
61 |
+
|
62 |
+
if ( is_singular() ) {
|
63 |
+
$document = Plugin::$instance->documents->get_doc_for_frontend( get_the_ID() );
|
64 |
+
|
65 |
+
if ( $document ) {
|
66 |
+
$template = $document->get_meta( '_wp_page_template' );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
return $template;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Rgister wc hookes for elementor preview mode
|
75 |
+
*/
|
76 |
+
public function register_wc_hooks() {
|
77 |
+
wc()->frontend_includes();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Init cart in elementor preview mode
|
82 |
+
*/
|
83 |
+
public function maybe_init_cart() {
|
84 |
+
|
85 |
+
$has_cart = is_a( WC()->cart, 'WC_Cart' );
|
86 |
+
|
87 |
+
if ( ! $has_cart ) {
|
88 |
+
$session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' );
|
89 |
+
WC()->session = new $session_class();
|
90 |
+
WC()->session->init();
|
91 |
+
WC()->cart = new \WC_Cart();
|
92 |
+
WC()->customer = new \WC_Customer( get_current_user_id(), true );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Kicking this off by calling 'get_instance()' method
|
99 |
+
*/
|
100 |
+
Cartflows_Elementor_Compatibility::get_instance();
|
classes/class-cartflows-flow-frontend.php
CHANGED
@@ -1,206 +1,247 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Frontend & Markup
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Flow Markup
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*/
|
13 |
-
class Cartflows_Flow_Frontend {
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Member Variable
|
18 |
-
*
|
19 |
-
* @var object instance
|
20 |
-
*/
|
21 |
-
private static $instance;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Initiator
|
25 |
-
*/
|
26 |
-
public static function get_instance() {
|
27 |
-
if ( ! isset( self::$instance ) ) {
|
28 |
-
self::$instance = new self();
|
29 |
-
}
|
30 |
-
return self::$instance;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Constructor
|
35 |
-
*/
|
36 |
-
public function __construct() {
|
37 |
-
|
38 |
-
/* Analytics */
|
39 |
-
add_action( 'cartflows_wp_footer', array( $this, 'footer_markup' ) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Footer markup
|
44 |
-
*/
|
45 |
-
public function footer_markup() {
|
46 |
-
|
47 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
48 |
-
// @codingStandardsIgnoreStart
|
49 |
-
$flow_id = wcf()->utils->get_flow_id();
|
50 |
-
?>
|
51 |
-
<?php if( $this->is_flow_testmode( $flow_id ) ) { ?>
|
52 |
-
<div class="wcf-preview-mode">
|
53 |
-
<span><?php _e( 'Test mode is active — which displays random products for previewing. It can be deactivated from the flow settings in the admin dashboard.', 'cartflows' ); ?></span>
|
54 |
-
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
55 |
-
<?php
|
56 |
-
$flow_edit_link = add_query_arg( 'edit_test_mode', 'yes', get_edit_post_link( $flow_id ) );
|
57 |
-
?>
|
58 |
-
<a href="<?php echo $flow_edit_link; ?>"><?php _e( 'Click here to disable it', 'cartflows'); ?></a>
|
59 |
-
<?php } ?>
|
60 |
-
</div>
|
61 |
-
<?php } ?>
|
62 |
-
<?php
|
63 |
-
// @codingStandardsIgnoreEnd
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Check if flow test mode is enable.
|
69 |
-
*
|
70 |
-
* @since 1.0.0
|
71 |
-
* @param int $flow_id flow ID.
|
72 |
-
*
|
73 |
-
* @return boolean
|
74 |
-
*/
|
75 |
-
public function is_flow_testmode( $flow_id = '' ) {
|
76 |
-
|
77 |
-
if ( ! $flow_id ) {
|
78 |
-
$flow_id = wcf()->utils->get_flow_id();
|
79 |
-
}
|
80 |
-
|
81 |
-
$test_mode = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-testing' );
|
82 |
-
|
83 |
-
if ( 'no' === $test_mode ) {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
return true;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get steps data.
|
92 |
-
*
|
93 |
-
* @since 1.0.0
|
94 |
-
* @param int $flow_id flow ID.
|
95 |
-
*
|
96 |
-
* @return array
|
97 |
-
*/
|
98 |
-
public function get_steps( $flow_id ) {
|
99 |
-
|
100 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
101 |
-
|
102 |
-
if ( ! is_array( $steps ) ) {
|
103 |
-
|
104 |
-
$steps = array();
|
105 |
-
}
|
106 |
-
|
107 |
-
return $steps;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Check thank you page exists.
|
112 |
-
*
|
113 |
-
* @since 1.0.0
|
114 |
-
* @param array $order order data.
|
115 |
-
*
|
116 |
-
* @return bool
|
117 |
-
*/
|
118 |
-
public function is_thankyou_page_exists( $order ) {
|
119 |
-
|
120 |
-
$thankyou_step_exist = false;
|
121 |
-
|
122 |
-
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
123 |
-
|
124 |
-
if ( $flow_id ) {
|
125 |
-
|
126 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
127 |
-
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
128 |
-
|
129 |
-
if ( is_array( $flow_steps ) ) {
|
130 |
-
|
131 |
-
$current_step_found = false;
|
132 |
-
|
133 |
-
foreach ( $flow_steps as $index => $data ) {
|
134 |
-
|
135 |
-
if ( $current_step_found ) {
|
136 |
-
|
137 |
-
if ( 'thankyou' === $data['type'] ) {
|
138 |
-
|
139 |
-
$thankyou_step_exist = true;
|
140 |
-
break;
|
141 |
-
}
|
142 |
-
} else {
|
143 |
-
|
144 |
-
if ( intval( $data['id'] ) === $step_id ) {
|
145 |
-
|
146 |
-
$current_step_found = true;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
return $thankyou_step_exist;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Check thank you page exists.
|
158 |
-
*
|
159 |
-
* @since 1.0.0
|
160 |
-
* @param array $order order data.
|
161 |
-
*
|
162 |
-
* @return bool
|
163 |
-
*/
|
164 |
-
public function get_thankyou_page_id( $order ) {
|
165 |
-
|
166 |
-
$thankyou_step_id = false;
|
167 |
-
|
168 |
-
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
169 |
-
|
170 |
-
if ( $flow_id ) {
|
171 |
-
|
172 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
173 |
-
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
174 |
-
|
175 |
-
if ( is_array( $flow_steps ) ) {
|
176 |
-
|
177 |
-
$current_step_found = false;
|
178 |
-
|
179 |
-
foreach ( $flow_steps as $index => $data ) {
|
180 |
-
|
181 |
-
if ( $current_step_found ) {
|
182 |
-
|
183 |
-
if ( 'thankyou' === $data['type'] ) {
|
184 |
-
|
185 |
-
$thankyou_step_id = intval( $data['id'] );
|
186 |
-
break;
|
187 |
-
}
|
188 |
-
} else {
|
189 |
-
|
190 |
-
if ( intval( $data['id'] ) === $step_id ) {
|
191 |
-
|
192 |
-
$current_step_found = true;
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
return $thankyou_step_id;
|
200 |
-
}
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend & Markup
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Flow Markup
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Flow_Frontend {
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Member Variable
|
18 |
+
*
|
19 |
+
* @var object instance
|
20 |
+
*/
|
21 |
+
private static $instance;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initiator
|
25 |
+
*/
|
26 |
+
public static function get_instance() {
|
27 |
+
if ( ! isset( self::$instance ) ) {
|
28 |
+
self::$instance = new self();
|
29 |
+
}
|
30 |
+
return self::$instance;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
|
38 |
+
/* Analytics */
|
39 |
+
add_action( 'cartflows_wp_footer', array( $this, 'footer_markup' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Footer markup
|
44 |
+
*/
|
45 |
+
public function footer_markup() {
|
46 |
+
|
47 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
48 |
+
// @codingStandardsIgnoreStart
|
49 |
+
$flow_id = wcf()->utils->get_flow_id();
|
50 |
+
?>
|
51 |
+
<?php if( $this->is_flow_testmode( $flow_id ) ) { ?>
|
52 |
+
<div class="wcf-preview-mode">
|
53 |
+
<span><?php _e( 'Test mode is active — which displays random products for previewing. It can be deactivated from the flow settings in the admin dashboard.', 'cartflows' ); ?></span>
|
54 |
+
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
55 |
+
<?php
|
56 |
+
$flow_edit_link = add_query_arg( 'edit_test_mode', 'yes', get_edit_post_link( $flow_id ) );
|
57 |
+
?>
|
58 |
+
<a href="<?php echo $flow_edit_link; ?>"><?php _e( 'Click here to disable it', 'cartflows'); ?></a>
|
59 |
+
<?php } ?>
|
60 |
+
</div>
|
61 |
+
<?php } ?>
|
62 |
+
<?php
|
63 |
+
// @codingStandardsIgnoreEnd
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Check if flow test mode is enable.
|
69 |
+
*
|
70 |
+
* @since 1.0.0
|
71 |
+
* @param int $flow_id flow ID.
|
72 |
+
*
|
73 |
+
* @return boolean
|
74 |
+
*/
|
75 |
+
public function is_flow_testmode( $flow_id = '' ) {
|
76 |
+
|
77 |
+
if ( ! $flow_id ) {
|
78 |
+
$flow_id = wcf()->utils->get_flow_id();
|
79 |
+
}
|
80 |
+
|
81 |
+
$test_mode = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-testing' );
|
82 |
+
|
83 |
+
if ( 'no' === $test_mode ) {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get steps data.
|
92 |
+
*
|
93 |
+
* @since 1.0.0
|
94 |
+
* @param int $flow_id flow ID.
|
95 |
+
*
|
96 |
+
* @return array
|
97 |
+
*/
|
98 |
+
public function get_steps( $flow_id ) {
|
99 |
+
|
100 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
101 |
+
|
102 |
+
if ( ! is_array( $steps ) ) {
|
103 |
+
|
104 |
+
$steps = array();
|
105 |
+
}
|
106 |
+
|
107 |
+
return $steps;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check thank you page exists.
|
112 |
+
*
|
113 |
+
* @since 1.0.0
|
114 |
+
* @param array $order order data.
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
public function is_thankyou_page_exists( $order ) {
|
119 |
+
|
120 |
+
$thankyou_step_exist = false;
|
121 |
+
|
122 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
123 |
+
|
124 |
+
if ( $flow_id ) {
|
125 |
+
|
126 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
127 |
+
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
128 |
+
|
129 |
+
if ( is_array( $flow_steps ) ) {
|
130 |
+
|
131 |
+
$current_step_found = false;
|
132 |
+
|
133 |
+
foreach ( $flow_steps as $index => $data ) {
|
134 |
+
|
135 |
+
if ( $current_step_found ) {
|
136 |
+
|
137 |
+
if ( 'thankyou' === $data['type'] ) {
|
138 |
+
|
139 |
+
$thankyou_step_exist = true;
|
140 |
+
break;
|
141 |
+
}
|
142 |
+
} else {
|
143 |
+
|
144 |
+
if ( intval( $data['id'] ) === $step_id ) {
|
145 |
+
|
146 |
+
$current_step_found = true;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
return $thankyou_step_exist;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Check thank you page exists.
|
158 |
+
*
|
159 |
+
* @since 1.0.0
|
160 |
+
* @param array $order order data.
|
161 |
+
*
|
162 |
+
* @return bool
|
163 |
+
*/
|
164 |
+
public function get_thankyou_page_id( $order ) {
|
165 |
+
|
166 |
+
$thankyou_step_id = false;
|
167 |
+
|
168 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
169 |
+
|
170 |
+
if ( $flow_id ) {
|
171 |
+
|
172 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
173 |
+
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
174 |
+
|
175 |
+
if ( is_array( $flow_steps ) ) {
|
176 |
+
|
177 |
+
$current_step_found = false;
|
178 |
+
|
179 |
+
foreach ( $flow_steps as $index => $data ) {
|
180 |
+
|
181 |
+
if ( $current_step_found ) {
|
182 |
+
|
183 |
+
if ( 'thankyou' === $data['type'] ) {
|
184 |
+
|
185 |
+
$thankyou_step_id = intval( $data['id'] );
|
186 |
+
break;
|
187 |
+
}
|
188 |
+
} else {
|
189 |
+
|
190 |
+
if ( intval( $data['id'] ) === $step_id ) {
|
191 |
+
|
192 |
+
$current_step_found = true;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
return $thankyou_step_id;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Check thank you page exists.
|
204 |
+
*
|
205 |
+
* @since 1.0.0
|
206 |
+
* @param array $order order data.
|
207 |
+
*
|
208 |
+
* @return bool
|
209 |
+
*/
|
210 |
+
public function get_next_step_id( $order ) {
|
211 |
+
|
212 |
+
$next_step_id = false;
|
213 |
+
|
214 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
215 |
+
|
216 |
+
if ( $flow_id ) {
|
217 |
+
|
218 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
219 |
+
$step_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
220 |
+
|
221 |
+
if ( is_array( $flow_steps ) ) {
|
222 |
+
|
223 |
+
foreach ( $flow_steps as $index => $data ) {
|
224 |
+
|
225 |
+
if ( intval( $data['id'] ) === $step_id ) {
|
226 |
+
|
227 |
+
$next_step_index = $index + 1;
|
228 |
+
|
229 |
+
if ( isset( $flow_steps[ $next_step_index ] ) ) {
|
230 |
+
|
231 |
+
$next_step_id = intval( $flow_steps[ $next_step_index ]['id'] );
|
232 |
+
}
|
233 |
+
|
234 |
+
break;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
return $next_step_id;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Kicking this off by calling 'get_instance()' method
|
246 |
+
*/
|
247 |
+
Cartflows_Flow_Frontend::get_instance();
|
classes/class-cartflows-frontend.php
CHANGED
@@ -36,6 +36,7 @@ class Cartflows_Frontend {
|
|
36 |
add_action( 'wp', array( $this, 'init_actions' ), 1 );
|
37 |
|
38 |
add_action( 'init', array( $this, 'debug_data_setting_actions' ) );
|
|
|
39 |
/* Enqueue global required scripts */
|
40 |
add_action( 'wp', array( $this, 'wp_actions' ), 55 );
|
41 |
|
@@ -251,25 +252,25 @@ class Cartflows_Frontend {
|
|
251 |
|
252 |
wcf()->utils->do_not_cache();
|
253 |
|
254 |
-
|
255 |
-
|
|
|
256 |
|
257 |
-
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
|
263 |
-
|
264 |
|
265 |
-
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
|
272 |
-
if ( _is_wcf_thankyou_type() ) {
|
273 |
$wp->set_query_var( 'order-received', $wcf_order );
|
274 |
}
|
275 |
}
|
@@ -531,6 +532,99 @@ class Cartflows_Frontend {
|
|
531 |
return $script;
|
532 |
}
|
533 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
}
|
535 |
|
536 |
/**
|
36 |
add_action( 'wp', array( $this, 'init_actions' ), 1 );
|
37 |
|
38 |
add_action( 'init', array( $this, 'debug_data_setting_actions' ) );
|
39 |
+
add_action( 'init', array( $this, 'setup_optin_checkout_filter' ) );
|
40 |
/* Enqueue global required scripts */
|
41 |
add_action( 'wp', array( $this, 'wp_actions' ), 55 );
|
42 |
|
252 |
|
253 |
wcf()->utils->do_not_cache();
|
254 |
|
255 |
+
if ( _is_wcf_thankyou_type() ) {
|
256 |
+
/* Set key to support pixel */
|
257 |
+
if ( isset( $_GET['wcf-key'] ) ) { //phpcs:ignore
|
258 |
|
259 |
+
$wcf_key = sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ); //phpcs:ignore
|
260 |
|
261 |
+
$_GET['key'] = $wcf_key;
|
262 |
+
$_REQUEST['key'] = $wcf_key;
|
263 |
+
}
|
264 |
|
265 |
+
if ( isset( $_GET['wcf-order'] ) ) { //phpcs:ignore
|
266 |
|
267 |
+
$wcf_order = intval( wp_unslash( $_GET['wcf-order'] ) ); //phpcs:ignore
|
268 |
|
269 |
+
$_GET['order'] = $wcf_order;
|
270 |
+
$_REQUEST['order'] = $wcf_order;
|
271 |
+
$_GET['order-received'] = $wcf_order;
|
272 |
+
$_REQUEST['order-received'] = $wcf_order;
|
273 |
|
|
|
274 |
$wp->set_query_var( 'order-received', $wcf_order );
|
275 |
}
|
276 |
}
|
532 |
return $script;
|
533 |
}
|
534 |
|
535 |
+
|
536 |
+
/**
|
537 |
+
* Set appropriate filter sctions.
|
538 |
+
*
|
539 |
+
* @since 1.1.14
|
540 |
+
*/
|
541 |
+
public function setup_optin_checkout_filter() {
|
542 |
+
|
543 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
544 |
+
/* Modify the optin order received url to go next step */
|
545 |
+
remove_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_to_thankyou_page' ), 10, 2 );
|
546 |
+
add_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_optin_to_next_step' ), 10, 2 );
|
547 |
+
}
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Redirect to thank page if upsell not exists
|
552 |
+
*
|
553 |
+
* @param string $order_recieve_url url.
|
554 |
+
* @param object $order order object.
|
555 |
+
* @since 1.0.0
|
556 |
+
*/
|
557 |
+
public function redirect_optin_to_next_step( $order_recieve_url, $order ) {
|
558 |
+
|
559 |
+
/* Only for optin page */
|
560 |
+
wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ );
|
561 |
+
wcf()->logger->log( 'Only for optin page' );
|
562 |
+
|
563 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
564 |
+
|
565 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
566 |
+
|
567 |
+
if ( ! $optin_id ) {
|
568 |
+
$optin_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
569 |
+
}
|
570 |
+
} else {
|
571 |
+
$optin_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
572 |
+
}
|
573 |
+
|
574 |
+
wcf()->logger->log( 'Optin ID : ' . $optin_id );
|
575 |
+
|
576 |
+
if ( $optin_id ) {
|
577 |
+
|
578 |
+
$next_step_id = wcf()->flow->get_next_step_id( $order );
|
579 |
+
|
580 |
+
if ( $next_step_id ) {
|
581 |
+
|
582 |
+
$order_recieve_url = get_permalink( $next_step_id );
|
583 |
+
$query_param = array(
|
584 |
+
'wcf-key' => $order->get_order_key(),
|
585 |
+
'wcf-order' => $order->get_id(),
|
586 |
+
);
|
587 |
+
|
588 |
+
if ( 'yes' === wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-pass-fields' ) ) {
|
589 |
+
|
590 |
+
$fields_string = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-pass-specific-fields' );
|
591 |
+
|
592 |
+
$fields = array_map( 'trim', explode( ',', $fields_string ) );
|
593 |
+
|
594 |
+
if ( is_array( $fields ) ) {
|
595 |
+
|
596 |
+
$order_id = $order->get_id();
|
597 |
+
|
598 |
+
foreach ( $fields as $in => $key ) {
|
599 |
+
switch ( $key ) {
|
600 |
+
case 'first_name':
|
601 |
+
$query_param[ $key ] = $order->get_billing_first_name();
|
602 |
+
break;
|
603 |
+
case 'last_name':
|
604 |
+
$query_param[ $key ] = $order->get_billing_last_name();
|
605 |
+
break;
|
606 |
+
case 'email':
|
607 |
+
$query_param[ $key ] = $order->get_billing_email();
|
608 |
+
break;
|
609 |
+
default:
|
610 |
+
$query_param[ $key ] = get_post_meta( $order_id, '_billing_' . $key, true );
|
611 |
+
break;
|
612 |
+
}
|
613 |
+
}
|
614 |
+
}
|
615 |
+
}
|
616 |
+
|
617 |
+
$order_recieve_url = add_query_arg(
|
618 |
+
$query_param,
|
619 |
+
$order_recieve_url
|
620 |
+
);
|
621 |
+
}
|
622 |
+
}
|
623 |
+
|
624 |
+
wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ );
|
625 |
+
|
626 |
+
return $order_recieve_url;
|
627 |
+
}
|
628 |
}
|
629 |
|
630 |
/**
|
classes/class-cartflows-functions.php
CHANGED
@@ -185,6 +185,26 @@ function _is_wcf_doing_checkout_ajax() {
|
|
185 |
return false;
|
186 |
}
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
/**
|
190 |
* Returns checkout ID.
|
@@ -417,6 +437,44 @@ function _get_wcf_base_offer_id() {
|
|
417 |
return false;
|
418 |
}
|
419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
|
421 |
/**
|
422 |
* Define a constant if it is not already defined.
|
@@ -445,3 +503,21 @@ if ( ! function_exists( 'wp_body_open' ) ) {
|
|
445 |
do_action( 'wp_body_open' );
|
446 |
}
|
447 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
return false;
|
186 |
}
|
187 |
|
188 |
+
/**
|
189 |
+
* Check if optin AJAX call is in progress.
|
190 |
+
*
|
191 |
+
* @since 1.0.0
|
192 |
+
* @return bool
|
193 |
+
*/
|
194 |
+
function _is_wcf_doing_optin_ajax() {
|
195 |
+
|
196 |
+
if ( wp_doing_ajax() ) {
|
197 |
+
|
198 |
+
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
199 |
+
'checkout' === $_GET['wc-ajax'] && //phpcs:ignore
|
200 |
+
isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
|
201 |
+
) {
|
202 |
+
return true;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
return false;
|
207 |
+
}
|
208 |
|
209 |
/**
|
210 |
* Returns checkout ID.
|
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.
|
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 |
+
}
|
classes/class-cartflows-importer.php
CHANGED
@@ -845,8 +845,15 @@ if ( ! class_exists( 'CartFlows_Importer' ) ) :
|
|
845 |
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
846 |
<option value=""> <?php esc_html_e( 'Select Step Type', 'cartflows' ); ?> </option>
|
847 |
<# } #>
|
|
|
848 |
<# for ( key in data.items ) { #>
|
849 |
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
<# } #>
|
851 |
</select>
|
852 |
<# } #>
|
845 |
<# if ( CartFlowsImportVars.step_type === data.args.remote_slug ) { #>
|
846 |
<option value=""> <?php esc_html_e( 'Select Step Type', 'cartflows' ); ?> </option>
|
847 |
<# } #>
|
848 |
+
<# var step_slug_data = []; #>
|
849 |
<# for ( key in data.items ) { #>
|
850 |
<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>
|
851 |
+
|
852 |
+
<# step_slug_data.push( data.items[ key ].slug ); #>
|
853 |
+
|
854 |
+
<# } #>
|
855 |
+
<# if( step_slug_data.indexOf("optin") === -1){ #>
|
856 |
+
<option value='0' data-group='0' class="Optin (Woo)" data-slug="optin" data-title="Optin (Woo)">Optin (Woo)</option>
|
857 |
<# } #>
|
858 |
</select>
|
859 |
<# } #>
|
classes/class-cartflows-loader.php
CHANGED
@@ -118,7 +118,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
118 |
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
119 |
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
120 |
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
121 |
-
define( 'CARTFLOWS_VER', '1.
|
122 |
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
123 |
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
124 |
|
@@ -194,11 +194,9 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
194 |
return;
|
195 |
}
|
196 |
|
197 |
-
if ( version_compare( CARTFLOWS_PRO_VER, '1.
|
198 |
add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
|
199 |
}
|
200 |
-
|
201 |
-
$this->licence_setup();
|
202 |
}
|
203 |
|
204 |
/**
|
@@ -210,7 +208,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
210 |
*/
|
211 |
public function required_cartflows_pro_notice() {
|
212 |
|
213 |
-
$required_pro_version = '1.
|
214 |
|
215 |
$class = 'notice notice-warning';
|
216 |
/* translators: %s: html tags */
|
@@ -219,23 +217,6 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
219 |
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
220 |
}
|
221 |
|
222 |
-
/**
|
223 |
-
* Licence Setup Fallback.
|
224 |
-
*
|
225 |
-
* @since 1.1.16
|
226 |
-
*
|
227 |
-
* @return void
|
228 |
-
*/
|
229 |
-
public function licence_setup() {
|
230 |
-
|
231 |
-
if ( version_compare( CARTFLOWS_PRO_VER, '1.1.13', '<' ) ) {
|
232 |
-
|
233 |
-
if ( method_exists( 'Cartflows_Pro_Loader', 'licence_setup' ) ) {
|
234 |
-
wcf_pro()->licence_setup();
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
/**
|
240 |
* Load Helper Files and Components.
|
241 |
*
|
@@ -325,6 +306,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
325 |
if ( $this->is_woo_active ) {
|
326 |
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
327 |
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
|
|
328 |
}
|
329 |
|
330 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
118 |
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
119 |
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
120 |
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
121 |
+
define( 'CARTFLOWS_VER', '1.4.0' );
|
122 |
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
123 |
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
124 |
|
194 |
return;
|
195 |
}
|
196 |
|
197 |
+
if ( version_compare( CARTFLOWS_PRO_VER, '1.4.0', '<' ) ) {
|
198 |
add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
|
199 |
}
|
|
|
|
|
200 |
}
|
201 |
|
202 |
/**
|
208 |
*/
|
209 |
public function required_cartflows_pro_notice() {
|
210 |
|
211 |
+
$required_pro_version = '1.4.0';
|
212 |
|
213 |
$class = 'notice notice-warning';
|
214 |
/* translators: %s: html tags */
|
217 |
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
218 |
}
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
/**
|
221 |
* Load Helper Files and Components.
|
222 |
*
|
306 |
if ( $this->is_woo_active ) {
|
307 |
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
308 |
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
309 |
+
include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
|
310 |
}
|
311 |
|
312 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
classes/class-cartflows-meta-fields.php
CHANGED
@@ -1,1491 +1,816 @@
|
|
1 |
-
<?php
|
2 |
-
// @codingStandardsIgnoreStart
|
3 |
-
/**
|
4 |
-
* Meta Fields.
|
5 |
-
*
|
6 |
-
* @package CartFlows
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class Cartflows_Meta_Fields.
|
11 |
-
*/
|
12 |
-
class Cartflows_Meta_Fields {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Instance
|
16 |
-
*
|
17 |
-
* @var $instance
|
18 |
-
*/
|
19 |
-
private static $instance;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Initiator
|
23 |
-
*/
|
24 |
-
public static function get_instance() {
|
25 |
-
if ( ! isset( self::$instance ) ) {
|
26 |
-
self::$instance = new self;
|
27 |
-
}
|
28 |
-
|
29 |
-
return self::$instance;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructor
|
34 |
-
*/
|
35 |
-
public function __construct() {
|
36 |
-
|
37 |
-
/* Add Scripts */
|
38 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_meta_scripts' ), 20 );
|
39 |
-
|
40 |
-
add_action( 'wp_ajax_wcf_json_search_coupons', array( $this, 'json_search_coupons' ) );
|
41 |
-
|
42 |
-
add_action( '
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
( '
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
'
|
87 |
-
'
|
88 |
-
'
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
$
|
114 |
-
|
115 |
-
if (
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
$
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
$
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
$
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
$
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
)
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
$
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
$
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
$
|
258 |
-
$
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
$
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
)
|
349 |
-
|
350 |
-
|
351 |
-
}
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
$
|
372 |
-
|
373 |
-
$field_content
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
$
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
$
|
391 |
-
$
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
<
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
$
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
$
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
}
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
$field_html .= '<
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
$
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
$
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
$
|
760 |
-
|
761 |
-
return $
|
762 |
-
}
|
763 |
-
|
764 |
-
function
|
765 |
-
|
766 |
-
$
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
$
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
819 |
-
|
820 |
-
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
821 |
-
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
822 |
-
}
|
823 |
-
}
|
824 |
-
|
825 |
-
$field_content = '<textarea name="' . $field_data['name'] . '" rows="10" cols="50" ' . $attr . '>';
|
826 |
-
$field_content .= $value;
|
827 |
-
$field_content .= '</textarea>';
|
828 |
-
|
829 |
-
return $this->get_field( $field_data, $field_content );
|
830 |
-
}
|
831 |
-
|
832 |
-
function get_only_checkbox_field( $field_data ) {
|
833 |
-
// echo "<pre>";
|
834 |
-
// var_dump($field_data);
|
835 |
-
// echo "</pre>";
|
836 |
-
|
837 |
-
$value = $field_data['value'];
|
838 |
-
|
839 |
-
|
840 |
-
$field_content = '';
|
841 |
-
if ( isset( $field_data['before'] ) ) {
|
842 |
-
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
843 |
-
}
|
844 |
-
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
845 |
-
$field_content .= '<input type="checkbox" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . '>';
|
846 |
-
|
847 |
-
if ( isset( $field_data['after'] ) ) {
|
848 |
-
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
849 |
-
}
|
850 |
-
|
851 |
-
if ( isset( $field_data['after_html'] ) ) {
|
852 |
-
$field_content .= '<span>' . $field_data['after_html'] . '</span>';
|
853 |
-
}
|
854 |
-
|
855 |
-
return $field_content;
|
856 |
-
}
|
857 |
-
|
858 |
-
function get_checkbox_field( $field_data ) {
|
859 |
-
|
860 |
-
$value = $field_data['value'];
|
861 |
-
|
862 |
-
$field_content = '';
|
863 |
-
if ( isset( $field_data['before'] ) ) {
|
864 |
-
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
865 |
-
}
|
866 |
-
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
867 |
-
$field_content .= '<input type="checkbox" id="'.$field_data['name'].'" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . '>';
|
868 |
-
|
869 |
-
if ( isset( $field_data['after'] ) ) {
|
870 |
-
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
871 |
-
}
|
872 |
-
|
873 |
-
return $this->get_field( $field_data, $field_content );
|
874 |
-
}
|
875 |
-
|
876 |
-
function get_radio_field( $field_data ) {
|
877 |
-
|
878 |
-
$value = $field_data['value'];
|
879 |
-
$field_content = '';
|
880 |
-
|
881 |
-
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
882 |
-
|
883 |
-
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
884 |
-
|
885 |
-
$field_content .= '<div class="wcf-radio-option">';
|
886 |
-
$field_content .= '<input type="radio" name="' . $field_data['name'] . '" value="' . $data_key . '" ' . checked( $data_key, $value, false ) . '>';
|
887 |
-
$field_content .= $data_value;
|
888 |
-
$field_content .= '</div>';
|
889 |
-
}
|
890 |
-
}
|
891 |
-
|
892 |
-
return $this->get_field( $field_data, $field_content );
|
893 |
-
}
|
894 |
-
|
895 |
-
function get_font_family_field( $field_data ) {
|
896 |
-
|
897 |
-
$value = $field_data['value'];
|
898 |
-
|
899 |
-
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
900 |
-
|
901 |
-
$field_content = '<select class="wcf-field-font-family" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
902 |
-
|
903 |
-
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
904 |
-
|
905 |
-
$field_content .= '<optgroup label="Other System Fonts">';
|
906 |
-
foreach ( CartFlows_Font_Families::get_system_fonts() as $name => $variants ) {
|
907 |
-
$field_content .= '<option value="' . esc_attr( $name ) . '" ' . selected( $name, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
908 |
-
}
|
909 |
-
$field_content .= '</optgroup>';
|
910 |
-
$field_content .= '<optgroup label="Google">';
|
911 |
-
foreach ( CartFlows_Font_Families::get_google_fonts() as $name => $single_font ) {
|
912 |
-
$variants = wcf_get_prop( $single_font, '0' );
|
913 |
-
$category = wcf_get_prop( $single_font, '1' );
|
914 |
-
$font_value = '\'' . esc_attr( $name ) . '\', ' . esc_attr( $category );
|
915 |
-
$field_content .= '<option value="' . esc_attr( $font_value ) . '" ' . selected( $font_value, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
916 |
-
}
|
917 |
-
$field_content .= '</optgroup>';
|
918 |
-
|
919 |
-
$field_content .= '</select>';
|
920 |
-
|
921 |
-
return $this->get_field( $field_data, $field_content );
|
922 |
-
}
|
923 |
-
|
924 |
-
function get_font_weight_field( $field_data ) {
|
925 |
-
|
926 |
-
$value = $field_data['value'];
|
927 |
-
|
928 |
-
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
929 |
-
|
930 |
-
$field_content = '<select data-selected="'.esc_attr( $value ).'" class="wcf-field-font-weight" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
931 |
-
|
932 |
-
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
933 |
-
|
934 |
-
$field_content .= '</select>';
|
935 |
-
|
936 |
-
return $this->get_field( $field_data, $field_content );
|
937 |
-
}
|
938 |
-
|
939 |
-
function get_select_field( $field_data ) {
|
940 |
-
|
941 |
-
$value = $field_data['value'];
|
942 |
-
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
943 |
-
|
944 |
-
$field_content = '<select name="' . $field_data['name'] . '">';
|
945 |
-
|
946 |
-
|
947 |
-
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
948 |
-
|
949 |
-
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
950 |
-
|
951 |
-
$disabled = '';
|
952 |
-
|
953 |
-
if ( array_key_exists( $data_key, $pro_options ) ) {
|
954 |
-
$disabled = 'disabled ';
|
955 |
-
$data_value = $pro_options[ $data_key ];
|
956 |
-
}
|
957 |
-
|
958 |
-
$field_content .= '<option value="' . $data_key . '" ' . selected( $value, $data_key, false ) . ' ' . $disabled .'>' . $data_value . '</option>';
|
959 |
-
}
|
960 |
-
}
|
961 |
-
|
962 |
-
$field_content .= '</select>';
|
963 |
-
|
964 |
-
if ( isset( $field_data['after'] ) ) {
|
965 |
-
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
966 |
-
}
|
967 |
-
|
968 |
-
return $this->get_field( $field_data, $field_content );
|
969 |
-
}
|
970 |
-
|
971 |
-
function get_color_picker_field( $field_data ) {
|
972 |
-
|
973 |
-
$value = $field_data['value'];
|
974 |
-
|
975 |
-
$field_content = '<input class="wcf-color-picker" type="text" name="' . $field_data['name'] . '" value="' . $value . '">';
|
976 |
-
|
977 |
-
return $this->get_field( $field_data, $field_content );
|
978 |
-
}
|
979 |
-
|
980 |
-
function get_product_selection_field( $field_data ) {
|
981 |
-
|
982 |
-
$value = $field_data['value'];
|
983 |
-
|
984 |
-
$multiple = '';
|
985 |
-
|
986 |
-
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
987 |
-
$multiple = ' multiple="multiple"';
|
988 |
-
}
|
989 |
-
|
990 |
-
$allow_clear = '';
|
991 |
-
|
992 |
-
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
993 |
-
$allow_clear = ' data-allow_clear="allow_clear"';
|
994 |
-
}
|
995 |
-
|
996 |
-
$field_content = '<select
|
997 |
-
name="' . $field_data['name'] . '[]"
|
998 |
-
class="wcf-product-search" ' . $multiple . $allow_clear . '
|
999 |
-
data-placeholder="' . __( 'Search for a product…', 'cartflows' ) . '"
|
1000 |
-
data-action="woocommerce_json_search_products_and_variations">';
|
1001 |
-
|
1002 |
-
if ( is_array( $value ) && ! empty( $value ) ) {
|
1003 |
-
|
1004 |
-
foreach ( $value as $data_key => $product_id ) {
|
1005 |
-
|
1006 |
-
$product = wc_get_product( $product_id );
|
1007 |
-
|
1008 |
-
// posts.
|
1009 |
-
if ( ! empty( $product ) ) {
|
1010 |
-
$post_title = $product->get_name() . ' (#' . $product_id . ')';
|
1011 |
-
|
1012 |
-
$field_content .= '<option value="' . $product_id . '" selected="selected" >' . $post_title . '</option>';
|
1013 |
-
}
|
1014 |
-
}
|
1015 |
-
}
|
1016 |
-
$field_content .= '</select>';
|
1017 |
-
|
1018 |
-
return $this->get_field( $field_data, $field_content );
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
function get_coupon_selection_field( $field_data ) {
|
1022 |
-
|
1023 |
-
$value = $field_data['value'];
|
1024 |
-
|
1025 |
-
$multiple = '';
|
1026 |
-
|
1027 |
-
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
1028 |
-
$multiple = ' multiple="multiple"';
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
$allow_clear = '';
|
1032 |
-
|
1033 |
-
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
1034 |
-
$allow_clear = ' data-allow_clear="allow_clear"';
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
$field_content = '<select
|
1038 |
-
name="' . $field_data['name'] . '[]"
|
1039 |
-
class="wc-coupon-search wcf-coupon-search" ' . $multiple . $allow_clear . '
|
1040 |
-
data-placeholder="' . __( 'Search for a coupon…', 'cartflows' ) . '"
|
1041 |
-
data-action="wcf_json_search_coupons">';
|
1042 |
-
|
1043 |
-
if ( is_array( $value ) && ! empty( $value ) ) {
|
1044 |
-
|
1045 |
-
$all_discount_types = wc_get_coupon_types();
|
1046 |
-
|
1047 |
-
foreach ( $value as $coupon_title ) {
|
1048 |
-
|
1049 |
-
$coupon = new WC_Coupon( $coupon_title );
|
1050 |
-
|
1051 |
-
$discount_type = $coupon->get_discount_type();
|
1052 |
-
|
1053 |
-
if ( isset( $discount_type ) && $discount_type ) {
|
1054 |
-
$discount_type = ' ( Type: ' . $all_discount_types[ $discount_type ] . ' )';
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
$field_content .= '<option value="' . $coupon_title . '" selected="selected">' . $coupon_title . $discount_type . '</option>';
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
|
1061 |
-
$field_content .= '</select>';
|
1062 |
-
|
1063 |
-
return $this->get_field( $field_data, $field_content );
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
function get_page_selection_field( $field_data ) {
|
1067 |
-
|
1068 |
-
$value = $field_data['value'];
|
1069 |
-
|
1070 |
-
$multiple = '';
|
1071 |
-
|
1072 |
-
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
1073 |
-
$multiple = 'multiple="multiple"';
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
$field_content = '<select
|
1077 |
-
name="' . $field_data['name'] . '[]"
|
1078 |
-
class="wcf-search-pages" ' . $multiple . '"
|
1079 |
-
data-action="wcf_json_search_pages">';
|
1080 |
-
|
1081 |
-
if ( is_array( $value ) && ! empty( $value ) ) {
|
1082 |
-
|
1083 |
-
foreach ( $value as $data_key => $data_value ) {
|
1084 |
-
|
1085 |
-
$field_content .= '<option value="' . $data_value . '">' . get_the_title( $data_value ) . '</option>';
|
1086 |
-
}
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
$field_content .= '</select>';
|
1090 |
-
|
1091 |
-
return $this->get_field( $field_data, $field_content );
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
function get_section( $field_data ) {
|
1095 |
-
$field_html = '<div class="wcf-field-row wcf-field-section">';
|
1096 |
-
$field_html .= '<div class="wcf-field-section-heading" colspan="2">';
|
1097 |
-
$field_html .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
|
1098 |
-
|
1099 |
-
if ( isset( $field_data['help'] ) ) {
|
1100 |
-
$field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help" title="' . esc_attr( $field_data['help'] ) . '"></i>';
|
1101 |
-
}
|
1102 |
-
$field_html .= '</div>';
|
1103 |
-
$field_html .= '</div>';
|
1104 |
-
return $field_html;
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
function get_description_field( $field_data ) {
|
1108 |
-
|
1109 |
-
$field_html = '<div class="wcf-field-row wcf-field-desc ' . $field_data['name'] . '">';
|
1110 |
-
$field_html .= '<div class="wcf-field-desc-content">';
|
1111 |
-
$field_html .= $field_data['content'];
|
1112 |
-
$field_html .= '</div>';
|
1113 |
-
$field_html .= '</div>';
|
1114 |
-
|
1115 |
-
return $field_html;
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
function get_checkout_field_repeater( $field_data ) {
|
1119 |
-
|
1120 |
-
$value = array();
|
1121 |
-
|
1122 |
-
$value[0] = array(
|
1123 |
-
'add_to' => '',
|
1124 |
-
'type' => '',
|
1125 |
-
'label' => '',
|
1126 |
-
'name' => '',
|
1127 |
-
);
|
1128 |
-
|
1129 |
-
$field_content = '';
|
1130 |
-
|
1131 |
-
$field_content .= '<div class="wcf-field-row">';
|
1132 |
-
// $field_content .= '<div class="wcf-field-row-heading">';
|
1133 |
-
// $field_content .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
|
1134 |
-
// $field_content .= '</div>';
|
1135 |
-
$field_content .= '<div class="wcf-field-row-content">';
|
1136 |
-
$field_content .= '<div class="wcf-cpf-wrap">';
|
1137 |
-
|
1138 |
-
foreach ( $value as $p_key => $p_data ) {
|
1139 |
-
$field_content .= '<div class="wcf-cpf-row" data-key="' . $p_key . '">';
|
1140 |
-
$field_content .= '<div class="wcf-cpf-row-header">';
|
1141 |
-
$field_content .= '<span class="wcf-cpf-row-title">Add New Custom Field</span>';
|
1142 |
-
$field_content .= '</div>';
|
1143 |
-
|
1144 |
-
$field_content .= '<div class="wcf-cpf-row-standard-fields">';
|
1145 |
-
|
1146 |
-
/* Add To */
|
1147 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-add_to">';
|
1148 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Add to</span>';
|
1149 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1150 |
-
$field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][add_to]" class="wcf-cpf-add_to">';
|
1151 |
-
$field_content .= '<option value="billing">Billing</option>';
|
1152 |
-
$field_content .= '<option value="shipping">Shipping</option>';
|
1153 |
-
$field_content .= '</select>';
|
1154 |
-
$field_content .= '</span>';
|
1155 |
-
$field_content .= '</div>';
|
1156 |
-
|
1157 |
-
/* Type */
|
1158 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-type">';
|
1159 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Type</span>';
|
1160 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1161 |
-
$field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][type]" class="wcf-cpf-type">';
|
1162 |
-
$field_content .= '<option value="text">Text</option>';
|
1163 |
-
$field_content .= '<option value="textarea">Textarea</option>';
|
1164 |
-
$field_content .= '<option value="select">Select</option>';
|
1165 |
-
$field_content .= '<option value="checkbox">Checkbox</option>';
|
1166 |
-
$field_content .= '</select>';
|
1167 |
-
$field_content .= '</span>';
|
1168 |
-
$field_content .= '</div>';
|
1169 |
-
|
1170 |
-
/* Textarea */
|
1171 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-options">';
|
1172 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Options *</span>';
|
1173 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1174 |
-
$field_content .= '<textarea value="" name="wcf-checkout-custom-fields[' . $p_key . '][label]" class="wcf-cpf-options" placeholder="Enter your options separated by comma."></textarea>';
|
1175 |
-
$field_content .= '</span>';
|
1176 |
-
$field_content .= '</div>';
|
1177 |
-
|
1178 |
-
/* Label */
|
1179 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-label">';
|
1180 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Label *</span>';
|
1181 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1182 |
-
$field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][label]" class="wcf-cpf-label">';
|
1183 |
-
$field_content .= '</span>';
|
1184 |
-
$field_content .= '</div>';
|
1185 |
-
|
1186 |
-
/* Name */
|
1187 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-name">';
|
1188 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Name *</span>';
|
1189 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1190 |
-
$field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][name]" class="wcf-cpf-name">';
|
1191 |
-
$field_content .= '</span>';
|
1192 |
-
$field_content .= '</div>';
|
1193 |
-
|
1194 |
-
$field_content .= '</div>';
|
1195 |
-
$field_content .= '</div>';
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
/* Add New Custom Field */
|
1199 |
-
$field_content .= '<div class="wcf-cpf-add-row">';
|
1200 |
-
$field_content .= '<div class="wcf-cpf-add-wrap">';
|
1201 |
-
$field_content .= '<button class="button button-secondary wcf-cpf-add" data-name="wcf-checkout-custom-fields">Add New Field</button>';
|
1202 |
-
$field_content .= '</div>';
|
1203 |
-
$field_content .= '</div>';
|
1204 |
-
/* End Add new custom field */
|
1205 |
-
|
1206 |
-
$field_content .= '</div>';
|
1207 |
-
$field_content .= '</div>';
|
1208 |
-
$field_content .= '</div>';
|
1209 |
-
|
1210 |
-
return $field_content;
|
1211 |
-
}
|
1212 |
-
|
1213 |
-
function get_pro_checkout_field_repeater( $field_data ) {
|
1214 |
-
|
1215 |
-
$value = array();
|
1216 |
-
|
1217 |
-
$value[0] = array(
|
1218 |
-
'add_to' => '',
|
1219 |
-
'type' => '',
|
1220 |
-
'label' => '',
|
1221 |
-
'name' => '',
|
1222 |
-
);
|
1223 |
-
|
1224 |
-
$field_content = '';
|
1225 |
-
|
1226 |
-
$field_content .= '<div class="wcf-field-row">';
|
1227 |
-
// $field_content .= '<div class="wcf-field-row-heading">';
|
1228 |
-
// $field_content .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
|
1229 |
-
// $field_content .= '</div>';
|
1230 |
-
$field_content .= '<div class="wcf-field-row-content">';
|
1231 |
-
$field_content .= '<div class="wcf-cpf-wrap">';
|
1232 |
-
|
1233 |
-
foreach ( $value as $p_key => $p_data ) {
|
1234 |
-
$field_content .= '<div class="wcf-cpf-row" data-key="' . $p_key . '">';
|
1235 |
-
$field_content .= '<div class="wcf-cpf-row-header">';
|
1236 |
-
$field_content .= '<span class="wcf-cpf-row-title">Add New Custom Field</span>';
|
1237 |
-
$field_content .= '</div>';
|
1238 |
-
|
1239 |
-
$field_content .= '<div class="wcf-cpf-row-standard-fields">';
|
1240 |
-
|
1241 |
-
/* Add To */
|
1242 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-add_to">';
|
1243 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Add to</span>';
|
1244 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1245 |
-
$field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][add_to]" class="wcf-cpf-add_to">';
|
1246 |
-
$field_content .= '<option value="billing">Billing</option>';
|
1247 |
-
$field_content .= '<option value="shipping">Shipping</option>';
|
1248 |
-
$field_content .= '</select>';
|
1249 |
-
$field_content .= '</span>';
|
1250 |
-
$field_content .= '</div>';
|
1251 |
-
|
1252 |
-
/* Type */
|
1253 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-type">';
|
1254 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Type</span>';
|
1255 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1256 |
-
$field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][type]" class="wcf-cpf-type">';
|
1257 |
-
$field_content .= '<option value="text">Text</option>';
|
1258 |
-
$field_content .= '<option value="textarea">Textarea</option>';
|
1259 |
-
$field_content .= '<option value="select">Select</option>';
|
1260 |
-
$field_content .= '<option value="checkbox">Checkbox</option>';
|
1261 |
-
$field_content .= '<option value="hidden">Hidden</option>';
|
1262 |
-
$field_content .= '</select>';
|
1263 |
-
$field_content .= '</span>';
|
1264 |
-
$field_content .= '</div>';
|
1265 |
-
|
1266 |
-
/* Label */
|
1267 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-label">';
|
1268 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Label <i>*</i></span>';
|
1269 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1270 |
-
$field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][label]" class="wcf-cpf-label">';
|
1271 |
-
$field_content .= '<span id="wcf-cpf-label-error-msg"></span>';
|
1272 |
-
$field_content .= '</span>';
|
1273 |
-
$field_content .= '</div>';
|
1274 |
-
|
1275 |
-
/* Default */
|
1276 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-default">';
|
1277 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Default</span>';
|
1278 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1279 |
-
$field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][default]" class="wcf-cpf-default">';
|
1280 |
-
$field_content .= '<span id="wcf-cpf-default-error-msg"></span>';
|
1281 |
-
$field_content .= '</span>';
|
1282 |
-
$field_content .= '</div>';
|
1283 |
-
|
1284 |
-
/* Placeholder */
|
1285 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-placeholder">';
|
1286 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Placeholder</span>';
|
1287 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1288 |
-
$field_content .= '<input type="text" value="" name="wcf-checkout-custom-fields[' . $p_key . '][placeholder]" class="wcf-cpf-placeholder">';
|
1289 |
-
$field_content .= '<span id="wcf-cpf-placeholder-error-msg"></span>';
|
1290 |
-
$field_content .= '</span>';
|
1291 |
-
$field_content .= '</div>';
|
1292 |
-
|
1293 |
-
/* Options */
|
1294 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-options">';
|
1295 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Options <i>*</i></span>';
|
1296 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1297 |
-
$field_content .= '<textarea value="" name="wcf-checkout-custom-fields[' . $p_key . '][label]" class="wcf-cpf-options" placeholder="Enter your options separated by comma."></textarea>';
|
1298 |
-
$field_content .= '</span>';
|
1299 |
-
$field_content .= '</div>';
|
1300 |
-
|
1301 |
-
/* Width */
|
1302 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-width">';
|
1303 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Width</span>';
|
1304 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1305 |
-
$field_content .= '<select name="wcf-checkout-custom-fields[' . $p_key . '][width]" class="wcf-cpf-width">';
|
1306 |
-
$field_content .= '<option value="33">33%</option>';
|
1307 |
-
$field_content .= '<option value="50">50%</option>';
|
1308 |
-
$field_content .= '<option value="100" selected>100%</option>';
|
1309 |
-
$field_content .= '</select>';
|
1310 |
-
$field_content .= '</span>';
|
1311 |
-
$field_content .= '</div>';
|
1312 |
-
|
1313 |
-
/* Required */
|
1314 |
-
$field_content .= '<div class="wcf-cpf-fields wcf-cpf-required">';
|
1315 |
-
$field_content .= '<span class="wcf-cpf-row-setting-label">Required</span>';
|
1316 |
-
$field_content .= '<span class="wcf-cpf-row-setting-field">';
|
1317 |
-
$field_content .= '<input type="hidden" value="no" name="wcf-checkout-custom-fields[' . $p_key . '][required]" class="wcf-cpf-required">';
|
1318 |
-
$field_content .= '<input type="checkbox" value="yes" name="wcf-checkout-custom-fields[' . $p_key . '][required]" class="wcf-cpf-required">';
|
1319 |
-
$field_content .= '<span id="wcf-cpf-required-error-msg"></span>';
|
1320 |
-
$field_content .= '</span>';
|
1321 |
-
$field_content .= '</div>';
|
1322 |
-
|
1323 |
-
$field_content .= '</div>';
|
1324 |
-
$field_content .= '</div>';
|
1325 |
-
}
|
1326 |
-
|
1327 |
-
/* Add New Custom Field */
|
1328 |
-
$field_content .= '<div class="wcf-cpf-add-row">';
|
1329 |
-
$field_content .= '<div class="wcf-cpf-add-wrap">';
|
1330 |
-
$field_content .= '<button class="button button-secondary wcf-pro-cpf-add" data-name="wcf-checkout-custom-fields">Add New Field</button>';
|
1331 |
-
$field_content .= '</div>';
|
1332 |
-
$field_content .= '</div>';
|
1333 |
-
/* End Add new custom field */
|
1334 |
-
|
1335 |
-
$field_content .= '</div>';
|
1336 |
-
$field_content .= '</div>';
|
1337 |
-
$field_content .= '</div>';
|
1338 |
-
|
1339 |
-
return $field_content;
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
function get_product_selection_repeater( $field_data ) {
|
1343 |
-
|
1344 |
-
$value = $field_data['value'];
|
1345 |
-
|
1346 |
-
if ( ! is_array( $value ) ) {
|
1347 |
-
|
1348 |
-
$value[0] = array(
|
1349 |
-
'product' => '',
|
1350 |
-
);
|
1351 |
-
} else {
|
1352 |
-
|
1353 |
-
if ( ! isset( $value[0] ) ) {
|
1354 |
-
|
1355 |
-
$value[0] = array(
|
1356 |
-
'product' => '',
|
1357 |
-
);
|
1358 |
-
}
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
$field_html = '';
|
1362 |
-
|
1363 |
-
$field_html .= '<script type="text/html" id="tmpl-wcf-product-repeater">';
|
1364 |
-
$field_html .= $this->generate_product_repeater_html( '{{id}}' );
|
1365 |
-
$field_html .= '</script>';
|
1366 |
-
|
1367 |
-
$field_html .= '<div class="wcf-field-row">';
|
1368 |
-
$field_html .= '<div class="wcf-field-row-content">';
|
1369 |
-
$field_html .= '<div class="wcf-repeatables-wrap">';
|
1370 |
-
|
1371 |
-
if ( is_array( $value ) ) {
|
1372 |
-
|
1373 |
-
foreach ( $value as $p_key => $p_data ) {
|
1374 |
-
|
1375 |
-
$selected_options = '';
|
1376 |
-
|
1377 |
-
if ( isset( $p_data['product'] ) ) {
|
1378 |
-
|
1379 |
-
$product = wc_get_product( $p_data['product'] );
|
1380 |
-
|
1381 |
-
// posts.
|
1382 |
-
if ( ! empty( $product ) ) {
|
1383 |
-
$post_title = $product->get_name() . ' (#' . $p_data['product'] . ')';
|
1384 |
-
|
1385 |
-
$selected_options = '<option value="' . $p_data['product'] . '" selected="selected" >' . $post_title . '</option>';
|
1386 |
-
}
|
1387 |
-
}
|
1388 |
-
|
1389 |
-
$field_html .= $this->generate_product_repeater_html( $p_key, $selected_options );
|
1390 |
-
}
|
1391 |
-
}
|
1392 |
-
|
1393 |
-
$field_html .= '<div class="wcf-add-repeatable-row">';
|
1394 |
-
$field_html .= '<div class="submit wcf-add-repeatable-wrap">';
|
1395 |
-
$field_html .= '<button class="button-primary wcf-add-repeatable" data-name="wcf-checkout-products">Add New Product</button>';
|
1396 |
-
$field_html .= '</div>';
|
1397 |
-
$field_html .= '</div>';
|
1398 |
-
$field_html .= '</div>';
|
1399 |
-
$field_html .= '</div>';
|
1400 |
-
$field_html .= '</div>';
|
1401 |
-
|
1402 |
-
return $field_html;
|
1403 |
-
}
|
1404 |
-
|
1405 |
-
function generate_product_repeater_html( $id, $options = '' ) {
|
1406 |
-
|
1407 |
-
$field_html = '<div class="wcf-repeatable-row" data-key="' . $id . '">';
|
1408 |
-
|
1409 |
-
$field_html .= '<div class="wcf-repeatable-row-standard-fields">';
|
1410 |
-
|
1411 |
-
/* Product Name */
|
1412 |
-
$field_html .= '<div class="wcf-repeatable-fields wcf-sel-product">';
|
1413 |
-
$field_html .= '<span class="wcf-repeatable-row-setting-field">';
|
1414 |
-
$field_html .= '<select
|
1415 |
-
name="wcf-checkout-products[' . $id . '][product]"
|
1416 |
-
class="wcf-product-search"
|
1417 |
-
data-allow_clear="allow_clear"
|
1418 |
-
data-placeholder="' . __( 'Search for a product…', 'cartflows' ) . '"
|
1419 |
-
data-action="woocommerce_json_search_products_and_variations">';
|
1420 |
-
$field_html .= $options;
|
1421 |
-
$field_html .= '</select>';
|
1422 |
-
$field_html .= '</span>';
|
1423 |
-
$field_html .= '<span class="wcf-repeatable-row-actions">';
|
1424 |
-
$field_html .= '<a class="wcf-remove-row wcf-repeatable-remove button" data-type="product">';
|
1425 |
-
$field_html .= '<span class="dashicons dashicons-trash"></span>';
|
1426 |
-
$field_html .= '<span class="wcf-repeatable-remove-button">'. __( 'Remove', 'cartflows' ).'</span>';
|
1427 |
-
$field_html .= '</a>';
|
1428 |
-
$field_html .= '</span>';
|
1429 |
-
$field_html .= '</div>';
|
1430 |
-
$field_html .= '</div>';
|
1431 |
-
$field_html .= '</div>';
|
1432 |
-
|
1433 |
-
return $field_html;
|
1434 |
-
}
|
1435 |
-
|
1436 |
-
function get_image_field( $field_data ) {
|
1437 |
-
|
1438 |
-
$value = $field_data['value'];
|
1439 |
-
|
1440 |
-
$attr = '';
|
1441 |
-
|
1442 |
-
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
1443 |
-
|
1444 |
-
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
1445 |
-
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
1446 |
-
}
|
1447 |
-
}
|
1448 |
-
|
1449 |
-
$display_preview_box = ( isset( $value ) && '' != $value ) ? 'display:block;' : 'display:none';
|
1450 |
-
|
1451 |
-
$field_content = '<div id="wcf-image-preview" style="'.$display_preview_box.'">';
|
1452 |
-
if( isset( $value ) ){
|
1453 |
-
$field_content .= '<img src="'. $value .'" class="saved-image" name="'. $field_data['name'] .'" width="150">';
|
1454 |
-
}
|
1455 |
-
$field_content .= '</div>';
|
1456 |
-
// $field_content .= '<input type="hidden" id="wcf-image-id" class="wcf-image-id" name="wcf-image-id[image-id]" value="">';
|
1457 |
-
$field_content .= '<input type="hidden" id="wcf-image-value" class="wcf-image" name="' . $field_data['name'] . '" value="'.$value.'">';
|
1458 |
-
|
1459 |
-
$field_content .= '<button type="button" ' . $attr . ' class="wcf-select-image button-secondary">Select Image</button>';
|
1460 |
-
|
1461 |
-
$display_remove_button = ( isset( $value ) && '' != $value ) ? 'display:inline-block; margin-left: 5px;' : 'display:none';
|
1462 |
-
|
1463 |
-
$field_content .= '<button type="button" class="wcf-remove-image button-secondary" style="'.$display_remove_button.'">Remove Image</button>';
|
1464 |
-
|
1465 |
-
return $this->get_field( $field_data, $field_content );
|
1466 |
-
}
|
1467 |
-
|
1468 |
-
/**
|
1469 |
-
* Localize variables in admin
|
1470 |
-
*
|
1471 |
-
* @param array $vars variables.
|
1472 |
-
*/
|
1473 |
-
function localize_vars( $vars ) {
|
1474 |
-
|
1475 |
-
$ajax_actions = array(
|
1476 |
-
'wcf_add_checkout_custom_field',
|
1477 |
-
'wcf_pro_add_checkout_custom_field',
|
1478 |
-
'wcf_delete_checkout_custom_field',
|
1479 |
-
'wcf_json_search_pages',
|
1480 |
-
'wcf_json_search_coupons'
|
1481 |
-
);
|
1482 |
-
|
1483 |
-
foreach ( $ajax_actions as $action ) {
|
1484 |
-
|
1485 |
-
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
1486 |
-
}
|
1487 |
-
|
1488 |
-
return $vars;
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
// @codingStandardsIgnoreEnd
|
1 |
+
<?php
|
2 |
+
// @codingStandardsIgnoreStart
|
3 |
+
/**
|
4 |
+
* Meta Fields.
|
5 |
+
*
|
6 |
+
* @package CartFlows
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Cartflows_Meta_Fields.
|
11 |
+
*/
|
12 |
+
class Cartflows_Meta_Fields {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance
|
16 |
+
*
|
17 |
+
* @var $instance
|
18 |
+
*/
|
19 |
+
private static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Initiator
|
23 |
+
*/
|
24 |
+
public static function get_instance() {
|
25 |
+
if ( ! isset( self::$instance ) ) {
|
26 |
+
self::$instance = new self;
|
27 |
+
}
|
28 |
+
|
29 |
+
return self::$instance;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructor
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
|
37 |
+
/* Add Scripts */
|
38 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_meta_scripts' ), 20 );
|
39 |
+
|
40 |
+
add_action( 'wp_ajax_wcf_json_search_coupons', array( $this, 'json_search_coupons' ) );
|
41 |
+
|
42 |
+
add_action( 'wp_ajax_wcf_json_search_pages', array( $this, 'json_search_pages' ) );
|
43 |
+
|
44 |
+
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
public function admin_meta_scripts() {
|
48 |
+
|
49 |
+
global $pagenow;
|
50 |
+
global $post;
|
51 |
+
|
52 |
+
$screen = get_current_screen();
|
53 |
+
|
54 |
+
if (
|
55 |
+
( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) &&
|
56 |
+
wcf()->utils->is_step_post_type( $screen->post_type )
|
57 |
+
) {
|
58 |
+
|
59 |
+
wp_enqueue_style( 'woocommerce_admin_styles' );
|
60 |
+
|
61 |
+
wp_enqueue_script( 'select2' );
|
62 |
+
wp_enqueue_script( 'wc-enhanced-select' );
|
63 |
+
|
64 |
+
wp_enqueue_script(
|
65 |
+
'wcf-admin-meta',
|
66 |
+
CARTFLOWS_URL . 'admin/meta-assets/js/admin-edit.js',
|
67 |
+
array( 'jquery', 'wp-color-picker' ),
|
68 |
+
CARTFLOWS_VER,
|
69 |
+
true
|
70 |
+
);
|
71 |
+
|
72 |
+
wp_enqueue_style( 'wcf-admin-meta', CARTFLOWS_URL . 'admin/meta-assets/css/admin-edit.css', array( 'wp-color-picker' ), CARTFLOWS_VER );
|
73 |
+
wp_style_add_data( 'wcf-admin-meta', 'rtl', 'replace' );
|
74 |
+
|
75 |
+
$localize = array(
|
76 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
77 |
+
'google_fonts' => CartFlows_Font_Families::get_google_fonts(),
|
78 |
+
'system_fonts' => CartFlows_Font_Families::get_system_fonts(),
|
79 |
+
'font_weights' => array(
|
80 |
+
'100' => __( 'Thin 100', 'cartflows' ),
|
81 |
+
'200' => __( 'Extra-Light 200', 'cartflows' ),
|
82 |
+
'300' => __( 'Light 300', 'cartflows' ),
|
83 |
+
'400' => __( 'Normal 400', 'cartflows' ),
|
84 |
+
'500' => __( 'Medium 500', 'cartflows' ),
|
85 |
+
'600' => __( 'Semi-Bold 600', 'cartflows' ),
|
86 |
+
'700' => __( 'Bold 700', 'cartflows' ),
|
87 |
+
'800' => __( 'Extra-Bold 800', 'cartflows' ),
|
88 |
+
'900' => __( 'Ultra-Bold 900', 'cartflows' ),
|
89 |
+
)
|
90 |
+
);
|
91 |
+
|
92 |
+
wp_localize_script( 'jquery', 'wcf', apply_filters( 'wcf_js_localize', $localize ) );
|
93 |
+
|
94 |
+
do_action( 'cartflows_admin_meta_scripts' );
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Function to search coupons
|
100 |
+
*/
|
101 |
+
public function json_search_coupons() {
|
102 |
+
|
103 |
+
check_admin_referer( 'wcf-json-search-coupons', 'security' );
|
104 |
+
|
105 |
+
global $wpdb;
|
106 |
+
|
107 |
+
$term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
|
108 |
+
|
109 |
+
if ( empty( $term ) ) {
|
110 |
+
die();
|
111 |
+
}
|
112 |
+
|
113 |
+
$posts = wp_cache_get( 'wcf_search_coupons', 'wcf_funnel_Cart' );
|
114 |
+
|
115 |
+
if ( false === $posts ) {
|
116 |
+
$posts = $wpdb->get_results( // phpcs:ignore
|
117 |
+
$wpdb->prepare(
|
118 |
+
"SELECT *
|
119 |
+
FROM {$wpdb->prefix}posts
|
120 |
+
WHERE post_type = %s
|
121 |
+
AND post_title LIKE %s
|
122 |
+
AND post_status = %s",
|
123 |
+
'shop_coupon',
|
124 |
+
$wpdb->esc_like( $term ) . '%',
|
125 |
+
'publish'
|
126 |
+
)
|
127 |
+
);
|
128 |
+
wp_cache_set( 'wcf_search_coupons', $posts, 'wcf_funnel_Cart' );
|
129 |
+
}
|
130 |
+
|
131 |
+
$coupons_found = array();
|
132 |
+
$all_discount_types = wc_get_coupon_types();
|
133 |
+
|
134 |
+
if ( $posts ) {
|
135 |
+
foreach ( $posts as $post ) {
|
136 |
+
|
137 |
+
$discount_type = get_post_meta( $post->ID, 'discount_type', true );
|
138 |
+
|
139 |
+
if ( ! empty( $all_discount_types[ $discount_type ] ) ) {
|
140 |
+
$coupons_found[ get_the_title( $post->ID ) ] = get_the_title( $post->ID ) . ' (Type: ' . $all_discount_types[ $discount_type ] . ')';
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
wp_send_json( $coupons_found );
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Function to search coupons
|
150 |
+
*/
|
151 |
+
public function json_search_pages() {
|
152 |
+
|
153 |
+
check_ajax_referer( 'wcf-json-search-pages', 'security' );
|
154 |
+
|
155 |
+
$term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
|
156 |
+
|
157 |
+
if ( empty( $term ) ) {
|
158 |
+
die( 'not found' );
|
159 |
+
}
|
160 |
+
|
161 |
+
$search_string = $term;
|
162 |
+
$data = array();
|
163 |
+
$result = array();
|
164 |
+
|
165 |
+
add_filter( 'posts_search', array( $this, 'search_only_titles' ), 10, 2 );
|
166 |
+
|
167 |
+
$query = new WP_Query(
|
168 |
+
array(
|
169 |
+
's' => $search_string,
|
170 |
+
'post_type' => 'page',
|
171 |
+
'posts_per_page' => - 1,
|
172 |
+
)
|
173 |
+
);
|
174 |
+
|
175 |
+
if ( $query->have_posts() ) {
|
176 |
+
while ( $query->have_posts() ) {
|
177 |
+
$query->the_post();
|
178 |
+
$title = get_the_title();
|
179 |
+
$title .= ( 0 != $query->post->post_parent ) ? ' (' . get_the_title( $query->post->post_parent ) . ')' : '';
|
180 |
+
$id = get_the_id();
|
181 |
+
$data[] = array(
|
182 |
+
'id' => $id,
|
183 |
+
'text' => $title,
|
184 |
+
);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
if ( is_array( $data ) && ! empty( $data ) ) {
|
189 |
+
$result[] = array(
|
190 |
+
'text' => '',
|
191 |
+
'children' => $data,
|
192 |
+
);
|
193 |
+
}
|
194 |
+
|
195 |
+
wp_reset_postdata();
|
196 |
+
|
197 |
+
// return the result in json.
|
198 |
+
wp_send_json( $result );
|
199 |
+
}
|
200 |
+
|
201 |
+
public function search_only_titles( $search, $wp_query ) {
|
202 |
+
if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
|
203 |
+
global $wpdb;
|
204 |
+
|
205 |
+
$q = $wp_query->query_vars;
|
206 |
+
$n = ! empty( $q['exact'] ) ? '' : '%';
|
207 |
+
|
208 |
+
$search = array();
|
209 |
+
|
210 |
+
foreach ( (array) $q['search_terms'] as $term ) {
|
211 |
+
$search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
|
212 |
+
}
|
213 |
+
|
214 |
+
if ( ! is_user_logged_in() ) {
|
215 |
+
$search[] = "$wpdb->posts.post_password = ''";
|
216 |
+
}
|
217 |
+
|
218 |
+
$search = ' AND ' . implode( ' AND ', $search );
|
219 |
+
}
|
220 |
+
|
221 |
+
return $search;
|
222 |
+
}
|
223 |
+
|
224 |
+
function get_field( $field_data, $field_content ) {
|
225 |
+
|
226 |
+
$label = isset( $field_data['label'] ) ? $field_data['label'] : '';
|
227 |
+
$help = isset( $field_data['help'] ) ? $field_data['help'] : '';
|
228 |
+
$after_html = isset( $field_data['after_html'] ) ? $field_data['after_html'] : '';
|
229 |
+
|
230 |
+
$name_class = 'field-' . $field_data['name'];
|
231 |
+
|
232 |
+
$field_html = '<div class="wcf-field-row ' . $name_class . '">';
|
233 |
+
|
234 |
+
if( ! empty( $label ) || ! empty( $help ) ) {
|
235 |
+
$field_html .= '<div class="wcf-field-row-heading">';
|
236 |
+
if( ! empty( $label ) ) {
|
237 |
+
$field_html .= '<label>' . esc_html( $label ) . '</label>';
|
238 |
+
}
|
239 |
+
if ( ! empty( $help ) ) {
|
240 |
+
$field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help">';
|
241 |
+
// $field_html .= '<span class="wcf-tooltip" data-tooltip= "'. esc_attr( $help ) .'"></span>';
|
242 |
+
$field_html .= '</i>';
|
243 |
+
$field_html .= '<span class="wcf-tooltip-text">';
|
244 |
+
$field_html .= $help;
|
245 |
+
$field_html .= '</span>';
|
246 |
+
}
|
247 |
+
$field_html .= '</div>';
|
248 |
+
}
|
249 |
+
|
250 |
+
$field_html .= '<div class="wcf-field-row-content">';
|
251 |
+
$field_html .= $field_content;
|
252 |
+
|
253 |
+
if ( ! empty( $after_html ) ) {
|
254 |
+
$field_html .= $after_html;
|
255 |
+
}
|
256 |
+
|
257 |
+
$field_html .= '</div>';
|
258 |
+
$field_html .= '</div>';
|
259 |
+
|
260 |
+
return $field_html;
|
261 |
+
}
|
262 |
+
|
263 |
+
function get_text_field( $field_data ) {
|
264 |
+
|
265 |
+
$value = $field_data['value'];
|
266 |
+
|
267 |
+
$attr = '';
|
268 |
+
|
269 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
270 |
+
|
271 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
272 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
$field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
|
277 |
+
|
278 |
+
return $this->get_field( $field_data, $field_content );
|
279 |
+
}
|
280 |
+
|
281 |
+
function get_shortcode_field( $field_data ) {
|
282 |
+
|
283 |
+
$attr = '';
|
284 |
+
|
285 |
+
$attr_fields = array(
|
286 |
+
'readonly' => 'readonly',
|
287 |
+
'onfocus' => 'this.select()',
|
288 |
+
'onmouseup' => 'return false',
|
289 |
+
);
|
290 |
+
|
291 |
+
if ( $attr_fields && is_array( $attr_fields ) ) {
|
292 |
+
|
293 |
+
foreach ( $attr_fields as $attr_key => $attr_value ) {
|
294 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
$field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . $field_data['content'] . '" ' . $attr . '>';
|
299 |
+
|
300 |
+
return $this->get_field( $field_data, $field_content );
|
301 |
+
}
|
302 |
+
|
303 |
+
function get_display_field( $field_data ) {
|
304 |
+
|
305 |
+
$field_content = $field_data['content'];
|
306 |
+
|
307 |
+
return $this->get_field( $field_data, $field_content );
|
308 |
+
}
|
309 |
+
|
310 |
+
function get_hr_line_field( $field_data ) {
|
311 |
+
|
312 |
+
$field_data = array(
|
313 |
+
'name' => 'wcf-hr-line',
|
314 |
+
'content' => '<hr>'
|
315 |
+
);
|
316 |
+
|
317 |
+
$field_content = $field_data['content'];
|
318 |
+
|
319 |
+
return $this->get_field( $field_data, $field_content );
|
320 |
+
}
|
321 |
+
|
322 |
+
function get_number_field( $field_data ) {
|
323 |
+
|
324 |
+
$value = $field_data['value'];
|
325 |
+
|
326 |
+
$attr = '';
|
327 |
+
|
328 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
329 |
+
|
330 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
331 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
$field_content = '<input type="number" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
|
336 |
+
|
337 |
+
return $this->get_field( $field_data, $field_content );
|
338 |
+
}
|
339 |
+
|
340 |
+
function get_hidden_field( $field_data ) {
|
341 |
+
|
342 |
+
$value = $field_data['value'];
|
343 |
+
|
344 |
+
$attr = '';
|
345 |
+
|
346 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
347 |
+
|
348 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
349 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
$field_content = '<input type="hidden" id="' . $field_data['name'] . '" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
|
354 |
+
|
355 |
+
return $this->get_field( $field_data, $field_content );
|
356 |
+
}
|
357 |
+
|
358 |
+
function get_area_field( $field_data ) {
|
359 |
+
|
360 |
+
$value = $field_data['value'];
|
361 |
+
|
362 |
+
$attr = '';
|
363 |
+
|
364 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
365 |
+
|
366 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
367 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
$field_content = '<textarea name="' . $field_data['name'] . '" rows="10" cols="50" ' . $attr . '>';
|
372 |
+
$field_content .= $value;
|
373 |
+
$field_content .= '</textarea>';
|
374 |
+
|
375 |
+
return $this->get_field( $field_data, $field_content );
|
376 |
+
}
|
377 |
+
|
378 |
+
function get_only_checkbox_field( $field_data ) {
|
379 |
+
// echo "<pre>";
|
380 |
+
// var_dump($field_data);
|
381 |
+
// echo "</pre>";
|
382 |
+
|
383 |
+
$value = $field_data['value'];
|
384 |
+
|
385 |
+
|
386 |
+
$field_content = '';
|
387 |
+
if ( isset( $field_data['before'] ) ) {
|
388 |
+
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
389 |
+
}
|
390 |
+
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
391 |
+
$field_content .= '<input type="checkbox" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . '>';
|
392 |
+
|
393 |
+
if ( isset( $field_data['after'] ) ) {
|
394 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
395 |
+
}
|
396 |
+
|
397 |
+
if ( isset( $field_data['after_html'] ) ) {
|
398 |
+
$field_content .= '<span>' . $field_data['after_html'] . '</span>';
|
399 |
+
}
|
400 |
+
|
401 |
+
return $field_content;
|
402 |
+
}
|
403 |
+
|
404 |
+
function get_checkbox_field( $field_data ) {
|
405 |
+
|
406 |
+
$value = $field_data['value'];
|
407 |
+
|
408 |
+
$field_content = '';
|
409 |
+
if ( isset( $field_data['before'] ) ) {
|
410 |
+
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
411 |
+
}
|
412 |
+
|
413 |
+
$toggle_data = '';
|
414 |
+
if ( isset( $field_data['toggle'] ) ) {
|
415 |
+
$toggle_data .= 'toggle="' . htmlspecialchars( wp_json_encode( $field_data['toggle'] ) ) . '"';
|
416 |
+
}
|
417 |
+
|
418 |
+
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
419 |
+
$field_content .= '<input type="checkbox" id="'.$field_data['name'].'" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . ' ' . $toggle_data . '>';
|
420 |
+
|
421 |
+
if ( isset( $field_data['after'] ) ) {
|
422 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
423 |
+
}
|
424 |
+
|
425 |
+
return $this->get_field( $field_data, $field_content );
|
426 |
+
}
|
427 |
+
|
428 |
+
function get_radio_field( $field_data ) {
|
429 |
+
|
430 |
+
$value = $field_data['value'];
|
431 |
+
$field_content = '';
|
432 |
+
|
433 |
+
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
434 |
+
|
435 |
+
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
436 |
+
|
437 |
+
$field_content .= '<div class="wcf-radio-option">';
|
438 |
+
$field_content .= '<input type="radio" name="' . $field_data['name'] . '" value="' . $data_key . '" ' . checked( $data_key, $value, false ) . '>';
|
439 |
+
$field_content .= $data_value;
|
440 |
+
$field_content .= '</div>';
|
441 |
+
}
|
442 |
+
}
|
443 |
+
|
444 |
+
return $this->get_field( $field_data, $field_content );
|
445 |
+
}
|
446 |
+
|
447 |
+
function get_font_family_field( $field_data ) {
|
448 |
+
|
449 |
+
$value = $field_data['value'];
|
450 |
+
|
451 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
452 |
+
|
453 |
+
$field_content = '<select class="wcf-field-font-family" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
454 |
+
|
455 |
+
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
456 |
+
|
457 |
+
$field_content .= '<optgroup label="Other System Fonts">';
|
458 |
+
foreach ( CartFlows_Font_Families::get_system_fonts() as $name => $variants ) {
|
459 |
+
$field_content .= '<option value="' . esc_attr( $name ) . '" ' . selected( $name, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
460 |
+
}
|
461 |
+
$field_content .= '</optgroup>';
|
462 |
+
$field_content .= '<optgroup label="Google">';
|
463 |
+
foreach ( CartFlows_Font_Families::get_google_fonts() as $name => $single_font ) {
|
464 |
+
$variants = wcf_get_prop( $single_font, '0' );
|
465 |
+
$category = wcf_get_prop( $single_font, '1' );
|
466 |
+
$font_value = '\'' . esc_attr( $name ) . '\', ' . esc_attr( $category );
|
467 |
+
$field_content .= '<option value="' . esc_attr( $font_value ) . '" ' . selected( $font_value, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
468 |
+
}
|
469 |
+
$field_content .= '</optgroup>';
|
470 |
+
|
471 |
+
$field_content .= '</select>';
|
472 |
+
|
473 |
+
return $this->get_field( $field_data, $field_content );
|
474 |
+
}
|
475 |
+
|
476 |
+
function get_font_weight_field( $field_data ) {
|
477 |
+
|
478 |
+
$value = $field_data['value'];
|
479 |
+
|
480 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
481 |
+
|
482 |
+
$field_content = '<select data-selected="'.esc_attr( $value ).'" class="wcf-field-font-weight" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
483 |
+
|
484 |
+
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
485 |
+
|
486 |
+
$field_content .= '</select>';
|
487 |
+
|
488 |
+
return $this->get_field( $field_data, $field_content );
|
489 |
+
}
|
490 |
+
|
491 |
+
function get_select_field( $field_data ) {
|
492 |
+
|
493 |
+
$value = $field_data['value'];
|
494 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
495 |
+
|
496 |
+
$field_content = '<select name="' . $field_data['name'] . '">';
|
497 |
+
|
498 |
+
|
499 |
+
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
500 |
+
|
501 |
+
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
502 |
+
|
503 |
+
$disabled = '';
|
504 |
+
|
505 |
+
if ( array_key_exists( $data_key, $pro_options ) ) {
|
506 |
+
$disabled = 'disabled ';
|
507 |
+
$data_value = $pro_options[ $data_key ];
|
508 |
+
}
|
509 |
+
|
510 |
+
$field_content .= '<option value="' . $data_key . '" ' . selected( $value, $data_key, false ) . ' ' . $disabled .'>' . $data_value . '</option>';
|
511 |
+
}
|
512 |
+
}
|
513 |
+
|
514 |
+
$field_content .= '</select>';
|
515 |
+
|
516 |
+
if ( isset( $field_data['after'] ) ) {
|
517 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
518 |
+
}
|
519 |
+
|
520 |
+
return $this->get_field( $field_data, $field_content );
|
521 |
+
}
|
522 |
+
|
523 |
+
function get_color_picker_field( $field_data ) {
|
524 |
+
|
525 |
+
$value = $field_data['value'];
|
526 |
+
|
527 |
+
$field_content = '<input class="wcf-color-picker" type="text" name="' . $field_data['name'] . '" value="' . $value . '">';
|
528 |
+
|
529 |
+
return $this->get_field( $field_data, $field_content );
|
530 |
+
}
|
531 |
+
|
532 |
+
function get_product_selection_field( $field_data ) {
|
533 |
+
|
534 |
+
$value = $field_data['value'];
|
535 |
+
|
536 |
+
$multiple = '';
|
537 |
+
|
538 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
539 |
+
$multiple = ' multiple="multiple"';
|
540 |
+
}
|
541 |
+
|
542 |
+
$allow_clear = '';
|
543 |
+
|
544 |
+
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
545 |
+
$allow_clear = ' data-allow_clear="allow_clear"';
|
546 |
+
}
|
547 |
+
|
548 |
+
$field_content = '<select
|
549 |
+
name="' . $field_data['name'] . '[]"
|
550 |
+
class="wcf-product-search" ' . $multiple . $allow_clear . '
|
551 |
+
data-placeholder="' . __( 'Search for a product…', 'cartflows' ) . '"
|
552 |
+
data-action="woocommerce_json_search_products_and_variations">';
|
553 |
+
|
554 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
555 |
+
|
556 |
+
foreach ( $value as $data_key => $product_id ) {
|
557 |
+
|
558 |
+
$product = wc_get_product( $product_id );
|
559 |
+
|
560 |
+
// posts.
|
561 |
+
if ( ! empty( $product ) ) {
|
562 |
+
$post_title = $product->get_name() . ' (#' . $product_id . ')';
|
563 |
+
|
564 |
+
$field_content .= '<option value="' . $product_id . '" selected="selected" >' . $post_title . '</option>';
|
565 |
+
}
|
566 |
+
}
|
567 |
+
}
|
568 |
+
$field_content .= '</select>';
|
569 |
+
|
570 |
+
return $this->get_field( $field_data, $field_content );
|
571 |
+
}
|
572 |
+
|
573 |
+
function get_coupon_selection_field( $field_data ) {
|
574 |
+
|
575 |
+
$value = $field_data['value'];
|
576 |
+
|
577 |
+
$multiple = '';
|
578 |
+
|
579 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
580 |
+
$multiple = ' multiple="multiple"';
|
581 |
+
}
|
582 |
+
|
583 |
+
$allow_clear = '';
|
584 |
+
|
585 |
+
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
586 |
+
$allow_clear = ' data-allow_clear="allow_clear"';
|
587 |
+
}
|
588 |
+
|
589 |
+
$field_content = '<select
|
590 |
+
name="' . $field_data['name'] . '[]"
|
591 |
+
class="wc-coupon-search wcf-coupon-search" ' . $multiple . $allow_clear . '
|
592 |
+
data-placeholder="' . __( 'Search for a coupon…', 'cartflows' ) . '"
|
593 |
+
data-action="wcf_json_search_coupons">';
|
594 |
+
|
595 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
596 |
+
|
597 |
+
$all_discount_types = wc_get_coupon_types();
|
598 |
+
|
599 |
+
foreach ( $value as $coupon_title ) {
|
600 |
+
|
601 |
+
$coupon = new WC_Coupon( $coupon_title );
|
602 |
+
|
603 |
+
$discount_type = $coupon->get_discount_type();
|
604 |
+
|
605 |
+
if ( isset( $discount_type ) && $discount_type ) {
|
606 |
+
$discount_type = ' ( Type: ' . $all_discount_types[ $discount_type ] . ' )';
|
607 |
+
}
|
608 |
+
|
609 |
+
$field_content .= '<option value="' . $coupon_title . '" selected="selected">' . $coupon_title . $discount_type . '</option>';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
$field_content .= '</select>';
|
614 |
+
|
615 |
+
return $this->get_field( $field_data, $field_content );
|
616 |
+
}
|
617 |
+
|
618 |
+
function get_page_selection_field( $field_data ) {
|
619 |
+
|
620 |
+
$value = $field_data['value'];
|
621 |
+
|
622 |
+
$multiple = '';
|
623 |
+
|
624 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
625 |
+
$multiple = 'multiple="multiple"';
|
626 |
+
}
|
627 |
+
|
628 |
+
$field_content = '<select
|
629 |
+
name="' . $field_data['name'] . '[]"
|
630 |
+
class="wcf-search-pages" ' . $multiple . '"
|
631 |
+
data-action="wcf_json_search_pages">';
|
632 |
+
|
633 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
634 |
+
|
635 |
+
foreach ( $value as $data_key => $data_value ) {
|
636 |
+
|
637 |
+
$field_content .= '<option value="' . $data_value . '">' . get_the_title( $data_value ) . '</option>';
|
638 |
+
}
|
639 |
+
}
|
640 |
+
|
641 |
+
$field_content .= '</select>';
|
642 |
+
|
643 |
+
return $this->get_field( $field_data, $field_content );
|
644 |
+
}
|
645 |
+
|
646 |
+
function get_section( $field_data ) {
|
647 |
+
$field_html = '<div class="wcf-field-row wcf-field-section">';
|
648 |
+
$field_html .= '<div class="wcf-field-section-heading" colspan="2">';
|
649 |
+
$field_html .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
|
650 |
+
|
651 |
+
if ( isset( $field_data['help'] ) ) {
|
652 |
+
$field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help" title="' . esc_attr( $field_data['help'] ) . '"></i>';
|
653 |
+
}
|
654 |
+
$field_html .= '</div>';
|
655 |
+
$field_html .= '</div>';
|
656 |
+
return $field_html;
|
657 |
+
}
|
658 |
+
|
659 |
+
function get_description_field( $field_data ) {
|
660 |
+
|
661 |
+
$field_html = '<div class="wcf-field-row wcf-field-desc ' . $field_data['name'] . '">';
|
662 |
+
$field_html .= '<div class="wcf-field-desc-content">';
|
663 |
+
$field_html .= $field_data['content'];
|
664 |
+
$field_html .= '</div>';
|
665 |
+
$field_html .= '</div>';
|
666 |
+
|
667 |
+
return $field_html;
|
668 |
+
}
|
669 |
+
|
670 |
+
function get_product_selection_repeater( $field_data ) {
|
671 |
+
|
672 |
+
$value = $field_data['value'];
|
673 |
+
|
674 |
+
if ( ! is_array( $value ) ) {
|
675 |
+
|
676 |
+
$value[0] = array(
|
677 |
+
'product' => '',
|
678 |
+
);
|
679 |
+
} else {
|
680 |
+
|
681 |
+
if ( ! isset( $value[0] ) ) {
|
682 |
+
|
683 |
+
$value[0] = array(
|
684 |
+
'product' => '',
|
685 |
+
);
|
686 |
+
}
|
687 |
+
}
|
688 |
+
|
689 |
+
$field_html = '';
|
690 |
+
|
691 |
+
$field_html .= '<script type="text/html" id="tmpl-wcf-product-repeater">';
|
692 |
+
$field_html .= $this->generate_product_repeater_html( '{{id}}' );
|
693 |
+
$field_html .= '</script>';
|
694 |
+
|
695 |
+
$field_html .= '<div class="wcf-field-row">';
|
696 |
+
$field_html .= '<div class="wcf-field-row-content">';
|
697 |
+
$field_html .= '<div class="wcf-repeatables-wrap">';
|
698 |
+
|
699 |
+
if ( is_array( $value ) ) {
|
700 |
+
|
701 |
+
foreach ( $value as $p_key => $p_data ) {
|
702 |
+
|
703 |
+
$selected_options = '';
|
704 |
+
|
705 |
+
if ( isset( $p_data['product'] ) ) {
|
706 |
+
|
707 |
+
$product = wc_get_product( $p_data['product'] );
|
708 |
+
|
709 |
+
// posts.
|
710 |
+
if ( ! empty( $product ) ) {
|
711 |
+
$post_title = $product->get_name() . ' (#' . $p_data['product'] . ')';
|
712 |
+
|
713 |
+
$selected_options = '<option value="' . $p_data['product'] . '" selected="selected" >' . $post_title . '</option>';
|
714 |
+
}
|
715 |
+
}
|
716 |
+
|
717 |
+
$field_html .= $this->generate_product_repeater_html( $p_key, $selected_options );
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
$field_html .= '<div class="wcf-add-repeatable-row">';
|
722 |
+
$field_html .= '<div class="submit wcf-add-repeatable-wrap">';
|
723 |
+
$field_html .= '<button class="button-primary wcf-add-repeatable" data-name="wcf-checkout-products">Add New Product</button>';
|
724 |
+
$field_html .= '</div>';
|
725 |
+
$field_html .= '</div>';
|
726 |
+
$field_html .= '</div>';
|
727 |
+
$field_html .= '</div>';
|
728 |
+
$field_html .= '</div>';
|
729 |
+
|
730 |
+
return $field_html;
|
731 |
+
}
|
732 |
+
|
733 |
+
function generate_product_repeater_html( $id, $options = '' ) {
|
734 |
+
|
735 |
+
$field_html = '<div class="wcf-repeatable-row" data-key="' . $id . '">';
|
736 |
+
|
737 |
+
$field_html .= '<div class="wcf-repeatable-row-standard-fields">';
|
738 |
+
|
739 |
+
/* Product Name */
|
740 |
+
$field_html .= '<div class="wcf-repeatable-fields wcf-sel-product">';
|
741 |
+
$field_html .= '<span class="wcf-repeatable-row-setting-field">';
|
742 |
+
$field_html .= '<select
|
743 |
+
name="wcf-checkout-products[' . $id . '][product]"
|
744 |
+
class="wcf-product-search"
|
745 |
+
data-allow_clear="allow_clear"
|
746 |
+
data-placeholder="' . __( 'Search for a product…', 'cartflows' ) . '"
|
747 |
+
data-action="woocommerce_json_search_products_and_variations">';
|
748 |
+
$field_html .= $options;
|
749 |
+
$field_html .= '</select>';
|
750 |
+
$field_html .= '</span>';
|
751 |
+
$field_html .= '<span class="wcf-repeatable-row-actions">';
|
752 |
+
$field_html .= '<a class="wcf-remove-row wcf-repeatable-remove button" data-type="product">';
|
753 |
+
$field_html .= '<span class="dashicons dashicons-trash"></span>';
|
754 |
+
$field_html .= '<span class="wcf-repeatable-remove-button">'. __( 'Remove', 'cartflows' ).'</span>';
|
755 |
+
$field_html .= '</a>';
|
756 |
+
$field_html .= '</span>';
|
757 |
+
$field_html .= '</div>';
|
758 |
+
$field_html .= '</div>';
|
759 |
+
$field_html .= '</div>';
|
760 |
+
|
761 |
+
return $field_html;
|
762 |
+
}
|
763 |
+
|
764 |
+
function get_image_field( $field_data ) {
|
765 |
+
|
766 |
+
$value = $field_data['value'];
|
767 |
+
|
768 |
+
$attr = '';
|
769 |
+
|
770 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
771 |
+
|
772 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
773 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
$display_preview_box = ( isset( $value ) && '' != $value ) ? 'display:block;' : 'display:none';
|
778 |
+
|
779 |
+
$field_content = '<div id="wcf-image-preview" style="'.$display_preview_box.'">';
|
780 |
+
if( isset( $value ) ){
|
781 |
+
$field_content .= '<img src="'. $value .'" class="saved-image" name="'. $field_data['name'] .'" width="150">';
|
782 |
+
}
|
783 |
+
$field_content .= '</div>';
|
784 |
+
// $field_content .= '<input type="hidden" id="wcf-image-id" class="wcf-image-id" name="wcf-image-id[image-id]" value="">';
|
785 |
+
$field_content .= '<input type="hidden" id="wcf-image-value" class="wcf-image" name="' . $field_data['name'] . '" value="'.$value.'">';
|
786 |
+
|
787 |
+
$field_content .= '<button type="button" ' . $attr . ' class="wcf-select-image button-secondary">Select Image</button>';
|
788 |
+
|
789 |
+
$display_remove_button = ( isset( $value ) && '' != $value ) ? 'display:inline-block; margin-left: 5px;' : 'display:none';
|
790 |
+
|
791 |
+
$field_content .= '<button type="button" class="wcf-remove-image button-secondary" style="'.$display_remove_button.'">Remove Image</button>';
|
792 |
+
|
793 |
+
return $this->get_field( $field_data, $field_content );
|
794 |
+
}
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Localize variables in admin
|
798 |
+
*
|
799 |
+
* @param array $vars variables.
|
800 |
+
*/
|
801 |
+
function localize_vars( $vars ) {
|
802 |
+
|
803 |
+
$ajax_actions = array(
|
804 |
+
'wcf_json_search_pages',
|
805 |
+
'wcf_json_search_coupons'
|
806 |
+
);
|
807 |
+
|
808 |
+
foreach ( $ajax_actions as $action ) {
|
809 |
+
|
810 |
+
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
811 |
+
}
|
812 |
+
|
813 |
+
return $vars;
|
814 |
+
}
|
815 |
+
}
|
816 |
+
// @codingStandardsIgnoreEnd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class-cartflows-metabox.php
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Update Compatibility
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'Cartflows_Metabox' ) ) :
|
9 |
-
|
10 |
-
/**
|
11 |
-
* CartFlows Update initial setup
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
*/
|
15 |
-
class Cartflows_Metabox {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Class instance.
|
19 |
-
*
|
20 |
-
* @access private
|
21 |
-
* @var $instance Class instance.
|
22 |
-
*/
|
23 |
-
private static $instance;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Initiator
|
27 |
-
*/
|
28 |
-
public static function get_instance() {
|
29 |
-
if ( ! isset( self::$instance ) ) {
|
30 |
-
self::$instance = new self();
|
31 |
-
}
|
32 |
-
return self::$instance;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor
|
37 |
-
*/
|
38 |
-
public function __construct() {
|
39 |
-
add_action( 'admin_init', array( $this, 'add_wcf_order_metabox' ) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
*
|
44 |
-
* Add Analytics Metabox
|
45 |
-
*
|
46 |
-
* @return void
|
47 |
-
*/
|
48 |
-
public function add_wcf_order_metabox() {
|
49 |
-
|
50 |
-
if ( ! isset( $_GET['cartflows_debug'] ) ) { //phpcs:ignore
|
51 |
-
return;
|
52 |
-
}
|
53 |
-
|
54 |
-
$debug = filter_input( INPUT_GET, 'cartflows_debug', FILTER_SANITIZE_STRING );
|
55 |
-
|
56 |
-
if ( $debug ) {
|
57 |
-
add_meta_box(
|
58 |
-
'wcf-order-details',
|
59 |
-
__( 'Flow Details', 'cartflows' ),
|
60 |
-
array( $this, 'flow_metabox_markup' ),
|
61 |
-
'shop_order',
|
62 |
-
'side',
|
63 |
-
'low'
|
64 |
-
);
|
65 |
-
}
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Flow metabox markup.
|
72 |
-
*/
|
73 |
-
public function flow_metabox_markup() {
|
74 |
-
global $post;
|
75 |
-
$flow_id = wcf()->utils->get_flow_id_from_order( $post->ID );
|
76 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_order( $post->ID );
|
77 |
-
|
78 |
-
$html_data = "
|
79 |
-
<div>
|
80 |
-
<p> This is for debugging only. </p>
|
81 |
-
<p> <strong>Flow ID:</strong>: <a href='" . admin_url( 'post.php?post=' . $flow_id . '&action=edit' ) . "'> " . $flow_id . " </a> </p>
|
82 |
-
<p> <strong>Checkout ID:</strong> <a href='" . admin_url( 'post.php?post=' . $checkout_id . '&action=edit' ) . "'> " . $checkout_id . ' </a></p>
|
83 |
-
</div>
|
84 |
-
';
|
85 |
-
|
86 |
-
echo $html_data;
|
87 |
-
}
|
88 |
-
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Kicking this off by calling 'get_instance()' method
|
94 |
-
*/
|
95 |
-
Cartflows_Metabox::get_instance();
|
96 |
-
|
97 |
-
endif;
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Update Compatibility
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! class_exists( 'Cartflows_Metabox' ) ) :
|
9 |
+
|
10 |
+
/**
|
11 |
+
* CartFlows Update initial setup
|
12 |
+
*
|
13 |
+
* @since 1.0.0
|
14 |
+
*/
|
15 |
+
class Cartflows_Metabox {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class instance.
|
19 |
+
*
|
20 |
+
* @access private
|
21 |
+
* @var $instance Class instance.
|
22 |
+
*/
|
23 |
+
private static $instance;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Initiator
|
27 |
+
*/
|
28 |
+
public static function get_instance() {
|
29 |
+
if ( ! isset( self::$instance ) ) {
|
30 |
+
self::$instance = new self();
|
31 |
+
}
|
32 |
+
return self::$instance;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
add_action( 'admin_init', array( $this, 'add_wcf_order_metabox' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
*
|
44 |
+
* Add Analytics Metabox
|
45 |
+
*
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function add_wcf_order_metabox() {
|
49 |
+
|
50 |
+
if ( ! isset( $_GET['cartflows_debug'] ) ) { //phpcs:ignore
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
|
54 |
+
$debug = filter_input( INPUT_GET, 'cartflows_debug', FILTER_SANITIZE_STRING );
|
55 |
+
|
56 |
+
if ( $debug ) {
|
57 |
+
add_meta_box(
|
58 |
+
'wcf-order-details',
|
59 |
+
__( 'Flow Details', 'cartflows' ),
|
60 |
+
array( $this, 'flow_metabox_markup' ),
|
61 |
+
'shop_order',
|
62 |
+
'side',
|
63 |
+
'low'
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Flow metabox markup.
|
72 |
+
*/
|
73 |
+
public function flow_metabox_markup() {
|
74 |
+
global $post;
|
75 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $post->ID );
|
76 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_order( $post->ID );
|
77 |
+
|
78 |
+
$html_data = "
|
79 |
+
<div>
|
80 |
+
<p> This is for debugging only. </p>
|
81 |
+
<p> <strong>Flow ID:</strong>: <a href='" . admin_url( 'post.php?post=' . $flow_id . '&action=edit' ) . "'> " . $flow_id . " </a> </p>
|
82 |
+
<p> <strong>Checkout ID:</strong> <a href='" . admin_url( 'post.php?post=' . $checkout_id . '&action=edit' ) . "'> " . $checkout_id . ' </a></p>
|
83 |
+
</div>
|
84 |
+
';
|
85 |
+
|
86 |
+
echo $html_data;
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Kicking this off by calling 'get_instance()' method
|
94 |
+
*/
|
95 |
+
Cartflows_Metabox::get_instance();
|
96 |
+
|
97 |
+
endif;
|
classes/class-cartflows-utils.php
CHANGED
@@ -251,6 +251,36 @@ class Cartflows_Utils {
|
|
251 |
return false;
|
252 |
}
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
/**
|
255 |
* Check for thank you page
|
256 |
*
|
251 |
return false;
|
252 |
}
|
253 |
|
254 |
+
/**
|
255 |
+
* Get optin id for order
|
256 |
+
*
|
257 |
+
* @param int $order_id order ID.
|
258 |
+
* @return int
|
259 |
+
*/
|
260 |
+
public function get_optin_id_from_order( $order_id ) {
|
261 |
+
|
262 |
+
$optin_id = get_post_meta( $order_id, '_wcf_optin_id', true );
|
263 |
+
|
264 |
+
return intval( $optin_id );
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* We are using this function mostly in ajax on checkout page
|
269 |
+
*
|
270 |
+
* @return bool
|
271 |
+
*/
|
272 |
+
public function get_optin_id_from_post_data() {
|
273 |
+
|
274 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
275 |
+
|
276 |
+
$optin_id = filter_var( wp_unslash( $_POST['_wcf_optin_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
277 |
+
|
278 |
+
return intval( $optin_id );
|
279 |
+
}
|
280 |
+
|
281 |
+
return false;
|
282 |
+
}
|
283 |
+
|
284 |
/**
|
285 |
* Check for thank you page
|
286 |
*
|
classes/class-cartflows-wizard.php
CHANGED
@@ -1,679 +1,679 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows- Onboarding Wizard
|
4 |
-
*
|
5 |
-
* @package cartflows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( ! class_exists( 'CartFlows_Wizard' ) ) :
|
13 |
-
|
14 |
-
/**
|
15 |
-
* CartFlows_Wizard class.
|
16 |
-
*/
|
17 |
-
class CartFlows_Wizard {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Hook in tabs.
|
21 |
-
*/
|
22 |
-
public function __construct() {
|
23 |
-
|
24 |
-
if ( apply_filters( 'cartflows_enable_setup_wizard', true ) && current_user_can( 'manage_options' ) ) {
|
25 |
-
add_action( 'admin_menu', array( $this, 'admin_menus' ) );
|
26 |
-
add_action( 'admin_init', array( $this, 'setup_wizard' ) );
|
27 |
-
add_action( 'admin_notices', array( $this, 'show_setup_wizard' ) );
|
28 |
-
add_action( 'wp_ajax_page_builder_step_save', array( $this, 'page_builder_step_save' ) );
|
29 |
-
add_action( 'wp_ajax_page_builder_save_option', array( $this, 'save_page_builder_option' ) );
|
30 |
-
add_action( 'admin_head', array( $this, 'add_mautic_form_script' ) );
|
31 |
-
add_action( 'woocommerce_installed', array( $this, 'disable_woo_setup_redirect' ) );
|
32 |
-
|
33 |
-
add_action( 'wp_ajax_wcf_activate_wc_plugins', array( $this, 'activate_wc_plugins' ) );
|
34 |
-
|
35 |
-
add_action( 'admin_init', array( $this, 'hide_notices' ) );
|
36 |
-
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Hide a notice if the GET variable is set.
|
43 |
-
*/
|
44 |
-
public function hide_notices() {
|
45 |
-
|
46 |
-
if ( ! isset( $_GET['wcf-hide-notice'] ) ) {
|
47 |
-
return;
|
48 |
-
}
|
49 |
-
|
50 |
-
$wcf_hide_notice = filter_input( INPUT_GET, 'wcf-hide-notice', FILTER_SANITIZE_STRING );
|
51 |
-
$_wcf_notice_nonce = filter_input( INPUT_GET, '_wcf_notice_nonce', FILTER_SANITIZE_STRING );
|
52 |
-
|
53 |
-
if ( $wcf_hide_notice && $_wcf_notice_nonce && wp_verify_nonce( sanitize_text_field( wp_unslash( $_wcf_notice_nonce ) ), 'wcf_hide_notices_nonce' ) ) {
|
54 |
-
update_option( 'wcf_setup_skipped', true );
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Disable the woo redirect for new setup.
|
60 |
-
*/
|
61 |
-
public function disable_woo_setup_redirect() {
|
62 |
-
|
63 |
-
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
-
delete_transient( '_wc_activation_redirect' );
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Show action links on the plugin screen.
|
72 |
-
*
|
73 |
-
* @since 1.0.0
|
74 |
-
* @return void
|
75 |
-
*/
|
76 |
-
public function show_setup_wizard() {
|
77 |
-
|
78 |
-
$status = get_option( 'wcf_setup_complete', false );
|
79 |
-
$skip_setup = get_option( 'wcf_setup_skipped', false );
|
80 |
-
|
81 |
-
if ( false === $status && ! $skip_setup ) { ?>
|
82 |
-
<div class="notice notice-info">
|
83 |
-
<p><b><?php esc_html_e( 'Thanks for installing and using CartFlows!', 'cartflows' ); ?></b></p>
|
84 |
-
<p><?php esc_html_e( 'It is easy to use the CartFlows. Please use the setup wizard to quick start setup.', 'cartflows' ); ?></p>
|
85 |
-
<p>
|
86 |
-
<a href="<?php echo esc_url( admin_url( 'index.php?page=cartflow-setup' ) ); ?>" class="button button-primary"> <?php esc_html_e( 'Start Wizard', 'cartflows' ); ?></a>
|
87 |
-
<a class="button-secondary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcf-hide-notice', 'install' ), 'wcf_hide_notices_nonce', '_wcf_notice_nonce' ) ); ?>"><?php esc_html_e( 'Skip Setup', 'cartflows' ); ?></a>
|
88 |
-
</p>
|
89 |
-
</div>
|
90 |
-
<?php
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Add admin menus/screens.
|
96 |
-
*/
|
97 |
-
public function admin_menus() {
|
98 |
-
|
99 |
-
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
100 |
-
return;
|
101 |
-
}
|
102 |
-
|
103 |
-
add_dashboard_page( '', '', 'manage_options', 'cartflow-setup', '' );
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Show the setup wizard.
|
108 |
-
*/
|
109 |
-
public function setup_wizard() {
|
110 |
-
|
111 |
-
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
112 |
-
return;
|
113 |
-
}
|
114 |
-
|
115 |
-
$this->steps = array(
|
116 |
-
'basic-config' => array(
|
117 |
-
'name' => __( 'Welcome', 'cartflows' ),
|
118 |
-
'view' => array( $this, 'welcome_step' ),
|
119 |
-
'handler' => array( $this, 'welcome_step_save' ),
|
120 |
-
),
|
121 |
-
'page-builder' => array(
|
122 |
-
'name' => __( 'Page Builder', 'cartflows' ),
|
123 |
-
'view' => array( $this, 'page_builder_step' ),
|
124 |
-
),
|
125 |
-
'checkout' => array(
|
126 |
-
'name' => __( 'Checkout', 'cartflows' ),
|
127 |
-
'view' => array( $this, 'checkout_step' ),
|
128 |
-
),
|
129 |
-
'training' => array(
|
130 |
-
'name' => __( 'Training', 'cartflows' ),
|
131 |
-
'view' => array( $this, 'training_step' ),
|
132 |
-
),
|
133 |
-
'setup-ready' => array(
|
134 |
-
'name' => __( 'Ready!', 'cartflows' ),
|
135 |
-
'view' => array( $this, 'ready_step' ),
|
136 |
-
'handler' => '',
|
137 |
-
),
|
138 |
-
);
|
139 |
-
|
140 |
-
$this->step = isset( $_GET['step'] ) ? sanitize_text_field( $_GET['step'] ) : current( array_keys( $this->steps ) ); //phpcs:ignore
|
141 |
-
|
142 |
-
wp_enqueue_style( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/css/setup-wizard.css', array( 'dashicons' ), CARTFLOWS_VER );
|
143 |
-
wp_style_add_data( 'cartflows-setup', 'rtl', 'replace' );
|
144 |
-
|
145 |
-
wp_enqueue_script( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/js/setup-wizard.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
|
146 |
-
|
147 |
-
wp_localize_script( 'cartflows-setup', 'cartflows_setup_vars', self::localize_vars() );
|
148 |
-
|
149 |
-
wp_enqueue_media();
|
150 |
-
|
151 |
-
if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) { //phpcs:ignore
|
152 |
-
call_user_func( $this->steps[ $this->step ]['handler'] );
|
153 |
-
}
|
154 |
-
|
155 |
-
ob_start();
|
156 |
-
$this->setup_wizard_header();
|
157 |
-
$this->setup_wizard_steps();
|
158 |
-
$this->setup_wizard_content();
|
159 |
-
$this->setup_wizard_footer();
|
160 |
-
exit;
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Get current step slug
|
165 |
-
*/
|
166 |
-
public function get_current_step_slug() {
|
167 |
-
$keys = array_keys( $this->steps );
|
168 |
-
return $keys[ array_search( $this->step, array_keys( $this->steps ), true ) ];
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Get previous step link
|
173 |
-
*/
|
174 |
-
public function get_prev_step_link() {
|
175 |
-
$keys = array_keys( $this->steps );
|
176 |
-
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ), true ) - 1 ] );
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Get next step link
|
181 |
-
*/
|
182 |
-
public function get_next_step_link() {
|
183 |
-
$keys = array_keys( $this->steps );
|
184 |
-
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ), true ) + 1 ] );
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Get next step link
|
189 |
-
*/
|
190 |
-
public function get_next_step_plain_link() {
|
191 |
-
$keys = array_keys( $this->steps );
|
192 |
-
$step_index = array_search( $this->step, $keys, true );
|
193 |
-
$step_index = ( count( $keys ) == $step_index + 1 ) ? $step_index : $step_index + 1;
|
194 |
-
$step = $keys[ $step_index ];
|
195 |
-
return admin_url( 'index.php?page=cartflow-setup&step=' . $step );
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Setup Wizard Header.
|
200 |
-
*/
|
201 |
-
public function setup_wizard_header() {
|
202 |
-
?>
|
203 |
-
<!DOCTYPE html>
|
204 |
-
<html>
|
205 |
-
<head>
|
206 |
-
<meta name="viewport" content="width=device-width" />
|
207 |
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
208 |
-
<title><?php esc_html_e( 'CartFlows Setup', 'cartflows' ); ?></title>
|
209 |
-
|
210 |
-
<script type="text/javascript">
|
211 |
-
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
212 |
-
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>';
|
213 |
-
var pagenow = '';
|
214 |
-
</script>
|
215 |
-
<?php wp_print_scripts( array( 'cartflows-setup' ) ); ?>
|
216 |
-
<?php do_action( 'admin_print_styles' ); ?>
|
217 |
-
<?php do_action( 'admin_head' ); ?>
|
218 |
-
</head>
|
219 |
-
<body class="cartflows-setup wp-core-ui cartflows-step-<?php echo esc_attr( $this->get_current_step_slug() ); ?>">
|
220 |
-
<div id="cartflows-logo">
|
221 |
-
<img height="40" class="wcf-logo" src="<?php echo CARTFLOWS_URL . 'assets/images/cartflows-logo.svg'; ?>" />
|
222 |
-
</div>
|
223 |
-
<?php
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Setup Wizard Footer.
|
228 |
-
*/
|
229 |
-
public function setup_wizard_footer() {
|
230 |
-
|
231 |
-
$admin_url = admin_url( 'admin.php?page=cartflows_settings' );
|
232 |
-
?>
|
233 |
-
<div class="close-button-wrapper">
|
234 |
-
<a href="<?php echo esc_url( $admin_url ); ?>" class="wizard-close-link" ><?php esc_html_e( 'Exit Setup Wizard', 'cartflows' ); ?></a>
|
235 |
-
</div>
|
236 |
-
</body>
|
237 |
-
</html>
|
238 |
-
<?php
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Output the steps.
|
243 |
-
*/
|
244 |
-
public function setup_wizard_steps() {
|
245 |
-
|
246 |
-
$ouput_steps = $this->steps;
|
247 |
-
?>
|
248 |
-
<ol class="cartflows-setup-steps">
|
249 |
-
<?php
|
250 |
-
foreach ( $ouput_steps as $step_key => $step ) :
|
251 |
-
$classes = '';
|
252 |
-
$activated = false;
|
253 |
-
if ( $step_key === $this->step ) {
|
254 |
-
$classes = 'active';
|
255 |
-
$activated = true;
|
256 |
-
} elseif ( array_search( $this->step, array_keys( $this->steps ), true ) > array_search( $step_key, array_keys( $this->steps ), true ) ) {
|
257 |
-
$classes = 'done';
|
258 |
-
$activated = true;
|
259 |
-
}
|
260 |
-
?>
|
261 |
-
<li class="<?php echo esc_attr( $classes ); ?>">
|
262 |
-
<span><?php echo esc_html( $step['name'] ); ?></span>
|
263 |
-
</li>
|
264 |
-
<?php endforeach; ?>
|
265 |
-
</ol>
|
266 |
-
<?php
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* Output the content for the current step.
|
271 |
-
*/
|
272 |
-
public function setup_wizard_content() {
|
273 |
-
?>
|
274 |
-
<input type="hidden" class="wcf-redirect-link" data-redirect-link="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" >
|
275 |
-
<?php
|
276 |
-
|
277 |
-
echo '<div class="cartflows-setup-content">';
|
278 |
-
call_user_func( $this->steps[ $this->step ]['view'] );
|
279 |
-
echo '</div>';
|
280 |
-
}
|
281 |
-
|
282 |
-
/**
|
283 |
-
* Introduction step.
|
284 |
-
*/
|
285 |
-
public function welcome_step() {
|
286 |
-
?>
|
287 |
-
<h1><?php esc_html_e( 'Welcome to CartFlows!', 'cartflows' ); ?></h1>
|
288 |
-
<p><?php esc_html_e( 'Thank you for choosing CartFlows to get more leads, increase conversions, & maximize profits. This short setup wizard will guide you though configuring CartFlows and creating your first funnel.', 'cartflows' ); ?></p>
|
289 |
-
<form method="post">
|
290 |
-
<div class="cartflows-setup-actions step">
|
291 |
-
<div class="button-prev-wrap">
|
292 |
-
</div>
|
293 |
-
<div class="button-next-wrap">
|
294 |
-
<input type="submit" class="uct-activate button-primary button button-large " value="<?php esc_html_e( 'Lets Go »', 'cartflows' ); ?>" name="save_step" />
|
295 |
-
</div>
|
296 |
-
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
297 |
-
</div>
|
298 |
-
</form>
|
299 |
-
<?php
|
300 |
-
}
|
301 |
-
|
302 |
-
/**
|
303 |
-
* Save Locale Settings.
|
304 |
-
*/
|
305 |
-
public function welcome_step_save() {
|
306 |
-
check_admin_referer( 'cartflow-setup' );
|
307 |
-
|
308 |
-
// Update site title & tagline.
|
309 |
-
$redirect_url = $this->get_next_step_link();
|
310 |
-
|
311 |
-
wp_safe_redirect( esc_url_raw( $redirect_url ) );
|
312 |
-
exit;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Locale settings
|
317 |
-
*/
|
318 |
-
public function page_builder_step() {
|
319 |
-
?>
|
320 |
-
|
321 |
-
<h1><?php esc_html_e( 'Page Builder Setup', 'cartflows' ); ?></h1>
|
322 |
-
<p class="description"><?php esc_html_e( 'Please select a page builder you would like to use with CartFlows.', 'cartflows' ); ?></p>
|
323 |
-
<form method="post">
|
324 |
-
<table class="cartflows-table widefat">
|
325 |
-
<tr class="cartflows-row">
|
326 |
-
<td class="cartflows-row-heading">
|
327 |
-
<label><?php esc_html_e( 'Select Page Builder', 'cartflows' ); ?></label>
|
328 |
-
</td>
|
329 |
-
<td class="cartflows-row-content">
|
330 |
-
<?php
|
331 |
-
$installed_plugins = get_plugins();
|
332 |
-
$plugins = array(
|
333 |
-
array(
|
334 |
-
'title' => __( 'Elementor', 'cartflows' ),
|
335 |
-
'value' => 'elementor',
|
336 |
-
'data' => array(
|
337 |
-
'slug' => 'elementor',
|
338 |
-
'init' => 'elementor/elementor.php',
|
339 |
-
'active' => is_plugin_active( 'elementor/elementor.php' ) ? 'yes' : 'no',
|
340 |
-
'install' => isset( $installed_plugins['elementor/elementor.php'] ) ? 'yes' : 'no',
|
341 |
-
),
|
342 |
-
),
|
343 |
-
array(
|
344 |
-
'title' => __( 'Beaver Builder Plugin (Lite Version)', 'cartflows' ),
|
345 |
-
'value' => 'beaver-builder',
|
346 |
-
'data' => array(
|
347 |
-
'slug' => 'beaver-builder-lite-version',
|
348 |
-
'init' => 'beaver-builder-lite-version/fl-builder.php',
|
349 |
-
'active' => is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) ? 'yes' : 'no',
|
350 |
-
'install' => isset( $installed_plugins['beaver-builder-lite-version/fl-builder.php'] ) ? 'yes' : 'no',
|
351 |
-
),
|
352 |
-
),
|
353 |
-
array(
|
354 |
-
'title' => __( 'Divi', 'cartflows' ),
|
355 |
-
'value' => 'divi',
|
356 |
-
'data' => array(
|
357 |
-
'slug' => 'divi',
|
358 |
-
'init' => 'divi',
|
359 |
-
'active' => 'yes',
|
360 |
-
'install' => 'NA',
|
361 |
-
),
|
362 |
-
),
|
363 |
-
array(
|
364 |
-
'title' => __( 'Other', 'cartflows' ),
|
365 |
-
'value' => 'other',
|
366 |
-
'data' => array(
|
367 |
-
'slug' => 'other',
|
368 |
-
'init' => false,
|
369 |
-
'active' => 'yes',
|
370 |
-
'install' => 'NA',
|
371 |
-
),
|
372 |
-
),
|
373 |
-
);
|
374 |
-
?>
|
375 |
-
<input type="hidden" name="save-pb-input" id="save-pb-option" value="1" />
|
376 |
-
<select name="page-builder" class="page-builder-list" data-redirect-link="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>">
|
377 |
-
<?php
|
378 |
-
foreach ( $plugins as $key => $plugin ) {
|
379 |
-
echo '<option value="' . esc_attr( $plugin['value'] ) . '" data-install="' . esc_attr( $plugin['data']['install'] ) . '" data-active="' . esc_attr( $plugin['data']['active'] ) . '" data-slug="' . esc_attr( $plugin['data']['slug'] ) . '" data-init="' . esc_attr( $plugin['data']['init'] ) . '">' . esc_html( $plugin['title'] ) . '</option>';
|
380 |
-
}
|
381 |
-
?>
|
382 |
-
</select>
|
383 |
-
</td>
|
384 |
-
</tr>
|
385 |
-
</table>
|
386 |
-
<p><?php esc_html_e( 'While CartFlows Should work with most page builders, we offer templates for the above page builders.', 'cartflows' ); ?></p>
|
387 |
-
<div class="cartflows-setup-actions step">
|
388 |
-
<div class="button-prev-wrap">
|
389 |
-
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
390 |
-
</div>
|
391 |
-
<div class="button-next-wrap">
|
392 |
-
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next" ><?php esc_html_e( 'Skip this step', 'cartflows' ); ?></a>
|
393 |
-
<a href="#" class="button button-primary wcf-install-plugins"><?php esc_html_e( 'Next »', 'cartflows' ); ?></a>
|
394 |
-
</div>
|
395 |
-
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
396 |
-
</div>
|
397 |
-
</form>
|
398 |
-
<?php
|
399 |
-
}
|
400 |
-
|
401 |
-
/**
|
402 |
-
* Render checkout step.
|
403 |
-
*/
|
404 |
-
public function checkout_step() {
|
405 |
-
|
406 |
-
$installed_plugins = get_plugins();
|
407 |
-
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? 'yes' : 'no';
|
408 |
-
$is_wcf_ca_installed = isset( $installed_plugins['woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php'] ) ? 'yes' : 'no';
|
409 |
-
$is_active = class_exists( 'WooCommerce' ) ? 'yes' : 'no';
|
410 |
-
$is_wcf_ca_active = class_exists( 'CARTFLOWS_CA_Loader' ) ? 'yes' : 'no';
|
411 |
-
?>
|
412 |
-
<h1><?php esc_html_e( 'Choose a checkout', 'cartflows' ); ?></h1>
|
413 |
-
<div class="cartflows-setup-message">
|
414 |
-
<p>
|
415 |
-
<?php esc_html_e( 'While CartFlows is designed to use WooCommerce sell digital and physical products, not all funnels need a checkout system.', 'cartflows' ); ?>
|
416 |
-
</p>
|
417 |
-
<h4 class="cartflows-setup-message-title"><?php esc_html_e( 'Would you like to install WooCommerce to sell digital and physical products in your funnels?', 'cartflows' ); ?></h4>
|
418 |
-
<span><input data-wcf-ca-active="<?php echo esc_attr( $is_wcf_ca_active ); ?>" data-wcf-ca-install="<?php echo esc_attr( $is_wcf_ca_installed ); ?>" data-woo-active="<?php echo esc_attr( $is_active ); ?>" data-woo-install="<?php echo esc_attr( $is_wc_installed ); ?>" type="hidden" class="wcf-install-wc-input" name="installl-woocommerce" value="" checked></span>
|
419 |
-
</div>
|
420 |
-
|
421 |
-
<div class="cartflows-setup-extra-notice">
|
422 |
-
|
423 |
-
<span>
|
424 |
-
<?php esc_html_e( 'The following plugin will be installed and activated for you:', 'cartflows' ); ?>
|
425 |
-
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce', 'cartflows' ); ?></a>,
|
426 |
-
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce Cart Abandonment Recovery', 'cartflows' ); ?></a>
|
427 |
-
|
428 |
-
</span>
|
429 |
-
|
430 |
-
</div>
|
431 |
-
|
432 |
-
<div class="cartflows-setup-actions step">
|
433 |
-
<div class="button-prev-wrap">
|
434 |
-
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
435 |
-
</div>
|
436 |
-
<div class="button-next-wrap">
|
437 |
-
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next"><?php esc_html_e( 'No thanks', 'cartflows' ); ?></a>
|
438 |
-
<a class="wcf-install-wc button-primary button button-large" name="save_step" > <?php esc_html_e( 'Yes', 'cartflows' ); ?> </a>
|
439 |
-
</div>
|
440 |
-
</div>
|
441 |
-
|
442 |
-
<?php
|
443 |
-
}
|
444 |
-
|
445 |
-
/**
|
446 |
-
* Save Locale Settings.
|
447 |
-
*/
|
448 |
-
public function activate_wc_plugins() {
|
449 |
-
|
450 |
-
check_ajax_referer( 'wcf-wc-plugins-activate', 'security' );
|
451 |
-
|
452 |
-
$plugin_slug_arr = array(
|
453 |
-
'woocommerce/woocommerce.php' => true,
|
454 |
-
'woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php' => false,
|
455 |
-
);
|
456 |
-
|
457 |
-
$activate = array(
|
458 |
-
'woocommerce/woocommerce.php' => false,
|
459 |
-
'woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php' => false,
|
460 |
-
);
|
461 |
-
|
462 |
-
foreach ( $plugin_slug_arr as $slug => $do_silently ) {
|
463 |
-
|
464 |
-
$activate[ $slug ] = activate_plugin( $slug, '', false, $do_silently );
|
465 |
-
}
|
466 |
-
|
467 |
-
foreach ( $activate as $slug => $data ) {
|
468 |
-
|
469 |
-
if ( is_wp_error( $data ) ) {
|
470 |
-
wp_send_json_error(
|
471 |
-
array(
|
472 |
-
'success' => false,
|
473 |
-
'message' => $data->get_error_message(),
|
474 |
-
)
|
475 |
-
);
|
476 |
-
}
|
477 |
-
}
|
478 |
-
|
479 |
-
wp_send_json_success();
|
480 |
-
}
|
481 |
-
|
482 |
-
/**
|
483 |
-
* Save Locale Settings.
|
484 |
-
*/
|
485 |
-
public function page_builder_step_save() {
|
486 |
-
|
487 |
-
check_ajax_referer( 'wcf-page-builder-step-save', 'security' );
|
488 |
-
|
489 |
-
$plugin_init = isset( $_POST['plugin_init'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_init'] ) ) : '';
|
490 |
-
$save_option = ( isset( $_POST['save_builder_option'] ) && 'true' == $_POST['save_builder_option'] ) ? true : false;
|
491 |
-
$plugin_slug = filter_input( INPUT_POST, 'page_builder', FILTER_SANITIZE_STRING );
|
492 |
-
|
493 |
-
$do_sliently = true;
|
494 |
-
if ( 'woo-cart-abandonment-recovery' === $plugin_slug ) {
|
495 |
-
$do_sliently = false;
|
496 |
-
}
|
497 |
-
|
498 |
-
$activate = activate_plugin( $plugin_init, '', false, $do_sliently );
|
499 |
-
|
500 |
-
if ( $save_option ) {
|
501 |
-
$this->save_page_builder_option();
|
502 |
-
}
|
503 |
-
|
504 |
-
if ( is_wp_error( $activate ) ) {
|
505 |
-
wp_send_json_error(
|
506 |
-
array(
|
507 |
-
'success' => false,
|
508 |
-
'message' => $activate->get_error_message(),
|
509 |
-
)
|
510 |
-
);
|
511 |
-
}
|
512 |
-
|
513 |
-
wp_send_json_success(
|
514 |
-
array( 'plugin' => $plugin_slug )
|
515 |
-
);
|
516 |
-
}
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Save selected page builder in options database.
|
520 |
-
*/
|
521 |
-
public function save_page_builder_option() {
|
522 |
-
|
523 |
-
$page_builder = isset( $_POST['page_builder'] ) ? sanitize_text_field( wp_unslash( $_POST['page_builder'] ) ) : ''; //phpcs:ignore
|
524 |
-
|
525 |
-
$wcf_settings = get_option( '_cartflows_common', array() );
|
526 |
-
|
527 |
-
if ( false !== strpos( $page_builder, 'beaver-builder' ) ) {
|
528 |
-
$page_builder = 'beaver-builder';
|
529 |
-
}
|
530 |
-
|
531 |
-
$wcf_settings['default_page_builder'] = $page_builder;
|
532 |
-
|
533 |
-
update_option( '_cartflows_common', $wcf_settings );
|
534 |
-
|
535 |
-
wp_send_json_success(
|
536 |
-
array( 'plugin' => $page_builder )
|
537 |
-
);
|
538 |
-
|
539 |
-
}
|
540 |
-
|
541 |
-
/**
|
542 |
-
* Final step.
|
543 |
-
*/
|
544 |
-
public function ready_step() {
|
545 |
-
|
546 |
-
// Set setup wizard status to complete.
|
547 |
-
update_option( 'wcf_setup_complete', true );
|
548 |
-
?>
|
549 |
-
<h1><?php esc_html_e( 'Congratulations, You Did It!', 'cartflows' ); ?></h1>
|
550 |
-
|
551 |
-
<div class="cartflows-setup-next-steps">
|
552 |
-
<div class="cartflows-setup-next-steps-last">
|
553 |
-
|
554 |
-
<p class="success">
|
555 |
-
<?php
|
556 |
-
esc_html_e( 'CartFlows is ready to use on your website. You\'ve successfully completed the setup process and all that is left for you to do is create your first flow.', 'cartflows' )
|
557 |
-
?>
|
558 |
-
</p>
|
559 |
-
|
560 |
-
|
561 |
-
<ul class="wcf-wizard-next-steps">
|
562 |
-
<li class="wcf-wizard-next-step-item">
|
563 |
-
<div class="wcf-wizard-next-step-description">
|
564 |
-
<p class="next-step-heading">Next step</p>
|
565 |
-
<h3 class="next-step-description">Create First Flow</h3>
|
566 |
-
<p class="next-step-extra-info">You're ready to add flows to your website.</p>
|
567 |
-
</div>
|
568 |
-
<div class="wcf-wizard-next-step-action">
|
569 |
-
<p class="wc-setup-actions step">
|
570 |
-
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=cartflows_flow&add-new-flow' ) ); ?>" type="button" class="button button-primary button-hero" ><?php esc_html_e( 'Create a flow', 'cartflows' ); ?></a>
|
571 |
-
</p>
|
572 |
-
</div>
|
573 |
-
</li>
|
574 |
-
</ul>
|
575 |
-
|
576 |
-
</div>
|
577 |
-
</div>
|
578 |
-
<?php
|
579 |
-
}
|
580 |
-
|
581 |
-
/**
|
582 |
-
* Training course step.
|
583 |
-
*/
|
584 |
-
public function training_step() {
|
585 |
-
$current_user = wp_get_current_user();
|
586 |
-
?>
|
587 |
-
<h1><?php esc_html_e( 'Exclusive CartFlows Training Course Offer', 'cartflows' ); ?></h1>
|
588 |
-
|
589 |
-
<div id="mauticform_wrapper_cartflowsonboarding" class="mauticform_wrapper">
|
590 |
-
<form autocomplete="false" role="form" method="post" action="https://go.cartflows.com/form/submit?formId=2" id="mauticform_cartflowsonboarding" data-mautic-form="cartflowsonboarding" enctype="multipart/form-data">
|
591 |
-
<div class="mauticform-error" id="mauticform_cartflowsonboarding_error"></div>
|
592 |
-
<div class="mauticform-message" id="mauticform_cartflowsonboarding_message"></div>
|
593 |
-
<div class="mauticform-innerform">
|
594 |
-
<div class="mauticform-page-wrapper mauticform-page-1" data-mautic-form-page="1">
|
595 |
-
<div id="mauticform_cartflowsonboarding_enter_your_email" class="mauticform-row mauticform-email mauticform-field-1">
|
596 |
-
<div class="cartflows-setup-message">
|
597 |
-
<p>
|
598 |
-
<?php esc_html_e( 'We want you to get off to a great start using CartFlows, so we would like to give access to our exclusive training course.', 'cartflows' ); ?>
|
599 |
-
<?php esc_html_e( 'Get access to this couse, for free, by entering your email below.', 'cartflows' ); ?>
|
600 |
-
</p>
|
601 |
-
<input id="mauticform_input_cartflowsonboarding_enter_your_email" name="mauticform[enter_your_email]" placeholder="<?php esc_html_e( 'Enter Email address', 'cartflows' ); ?>" value="<?php echo $current_user->user_email; ?>" class="mauticform-input" type="email">
|
602 |
-
</div>
|
603 |
-
<span class="mauticform-errormsg" style="display: none;"></span>
|
604 |
-
</div>
|
605 |
-
</div>
|
606 |
-
</div>
|
607 |
-
|
608 |
-
<input type="hidden" name="mauticform[formId]" id="mauticform_cartflowsonboarding_id" value="2">
|
609 |
-
<input type="hidden" name="mauticform[return]" id="mauticform_cartflowsonboarding_return" value="">
|
610 |
-
<input type="hidden" name="mauticform[formName]" id="mauticform_cartflowsonboarding_name" value="cartflowsonboarding">
|
611 |
-
<div class="cartflows-setup-actions step">
|
612 |
-
<div class="button-prev-wrap">
|
613 |
-
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
614 |
-
</div>
|
615 |
-
<div class="button-next-wrap">
|
616 |
-
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next"><?php esc_html_e( 'No thanks', 'cartflows' ); ?></a>
|
617 |
-
<button type="submit" name="mauticform[submit]" id="mauticform_input_cartflowsonboarding_submit" value="<?php esc_html_e( 'Allow', 'cartflows' ); ?>" class="mautic-form-submit btn btn-default button-primary button button-large button-next" name="save_step"><?php esc_html_e( 'Allow', 'cartflows' ); ?></button>
|
618 |
-
</div>
|
619 |
-
</div>
|
620 |
-
</form>
|
621 |
-
</div>
|
622 |
-
<?php
|
623 |
-
}
|
624 |
-
|
625 |
-
/**
|
626 |
-
* Localize variables in admin
|
627 |
-
*/
|
628 |
-
public function localize_vars() {
|
629 |
-
|
630 |
-
$vars = array();
|
631 |
-
|
632 |
-
$ajax_actions = array(
|
633 |
-
'wcf_page_builder_step_save',
|
634 |
-
'wcf_wc_plugins_activate',
|
635 |
-
);
|
636 |
-
|
637 |
-
foreach ( $ajax_actions as $action ) {
|
638 |
-
|
639 |
-
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
640 |
-
}
|
641 |
-
|
642 |
-
return $vars;
|
643 |
-
}
|
644 |
-
|
645 |
-
/**
|
646 |
-
* Add JS script for mautic form
|
647 |
-
*/
|
648 |
-
public function add_mautic_form_script() {
|
649 |
-
|
650 |
-
if ( ! isset( $_REQUEST['page'] ) || ( isset( $_REQUEST['page'] ) && 'cartflow-setup' !== $_REQUEST['page'] ) ) { //phpcs:ignore
|
651 |
-
return;
|
652 |
-
}
|
653 |
-
?>
|
654 |
-
|
655 |
-
<script type="text/javascript">
|
656 |
-
/** This section is only needed once per page if manually copying **/
|
657 |
-
if (typeof MauticSDKLoaded == 'undefined') {
|
658 |
-
var MauticSDKLoaded = true;
|
659 |
-
var head = document.getElementsByTagName('head')[0];
|
660 |
-
var script = document.createElement('script');
|
661 |
-
script.type = 'text/javascript';
|
662 |
-
script.src = 'https://go.cartflows.com/media/js/mautic-form.js';
|
663 |
-
script.onload = function() {
|
664 |
-
MauticSDK.onLoad();
|
665 |
-
};
|
666 |
-
head.appendChild(script);
|
667 |
-
var MauticDomain = 'https://go.cartflows.com';
|
668 |
-
var MauticLang = {
|
669 |
-
'submittingMessage': "Please wait..."
|
670 |
-
};
|
671 |
-
}
|
672 |
-
</script>
|
673 |
-
<?php
|
674 |
-
}
|
675 |
-
}
|
676 |
-
|
677 |
-
new CartFlows_Wizard();
|
678 |
-
|
679 |
-
endif;
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows- Onboarding Wizard
|
4 |
+
*
|
5 |
+
* @package cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'CartFlows_Wizard' ) ) :
|
13 |
+
|
14 |
+
/**
|
15 |
+
* CartFlows_Wizard class.
|
16 |
+
*/
|
17 |
+
class CartFlows_Wizard {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Hook in tabs.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
if ( apply_filters( 'cartflows_enable_setup_wizard', true ) && current_user_can( 'manage_options' ) ) {
|
25 |
+
add_action( 'admin_menu', array( $this, 'admin_menus' ) );
|
26 |
+
add_action( 'admin_init', array( $this, 'setup_wizard' ) );
|
27 |
+
add_action( 'admin_notices', array( $this, 'show_setup_wizard' ) );
|
28 |
+
add_action( 'wp_ajax_page_builder_step_save', array( $this, 'page_builder_step_save' ) );
|
29 |
+
add_action( 'wp_ajax_page_builder_save_option', array( $this, 'save_page_builder_option' ) );
|
30 |
+
add_action( 'admin_head', array( $this, 'add_mautic_form_script' ) );
|
31 |
+
add_action( 'woocommerce_installed', array( $this, 'disable_woo_setup_redirect' ) );
|
32 |
+
|
33 |
+
add_action( 'wp_ajax_wcf_activate_wc_plugins', array( $this, 'activate_wc_plugins' ) );
|
34 |
+
|
35 |
+
add_action( 'admin_init', array( $this, 'hide_notices' ) );
|
36 |
+
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Hide a notice if the GET variable is set.
|
43 |
+
*/
|
44 |
+
public function hide_notices() {
|
45 |
+
|
46 |
+
if ( ! isset( $_GET['wcf-hide-notice'] ) ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$wcf_hide_notice = filter_input( INPUT_GET, 'wcf-hide-notice', FILTER_SANITIZE_STRING );
|
51 |
+
$_wcf_notice_nonce = filter_input( INPUT_GET, '_wcf_notice_nonce', FILTER_SANITIZE_STRING );
|
52 |
+
|
53 |
+
if ( $wcf_hide_notice && $_wcf_notice_nonce && wp_verify_nonce( sanitize_text_field( wp_unslash( $_wcf_notice_nonce ) ), 'wcf_hide_notices_nonce' ) ) {
|
54 |
+
update_option( 'wcf_setup_skipped', true );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Disable the woo redirect for new setup.
|
60 |
+
*/
|
61 |
+
public function disable_woo_setup_redirect() {
|
62 |
+
|
63 |
+
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
delete_transient( '_wc_activation_redirect' );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Show action links on the plugin screen.
|
72 |
+
*
|
73 |
+
* @since 1.0.0
|
74 |
+
* @return void
|
75 |
+
*/
|
76 |
+
public function show_setup_wizard() {
|
77 |
+
|
78 |
+
$status = get_option( 'wcf_setup_complete', false );
|
79 |
+
$skip_setup = get_option( 'wcf_setup_skipped', false );
|
80 |
+
|
81 |
+
if ( false === $status && ! $skip_setup ) { ?>
|
82 |
+
<div class="notice notice-info">
|
83 |
+
<p><b><?php esc_html_e( 'Thanks for installing and using CartFlows!', 'cartflows' ); ?></b></p>
|
84 |
+
<p><?php esc_html_e( 'It is easy to use the CartFlows. Please use the setup wizard to quick start setup.', 'cartflows' ); ?></p>
|
85 |
+
<p>
|
86 |
+
<a href="<?php echo esc_url( admin_url( 'index.php?page=cartflow-setup' ) ); ?>" class="button button-primary"> <?php esc_html_e( 'Start Wizard', 'cartflows' ); ?></a>
|
87 |
+
<a class="button-secondary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcf-hide-notice', 'install' ), 'wcf_hide_notices_nonce', '_wcf_notice_nonce' ) ); ?>"><?php esc_html_e( 'Skip Setup', 'cartflows' ); ?></a>
|
88 |
+
</p>
|
89 |
+
</div>
|
90 |
+
<?php
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Add admin menus/screens.
|
96 |
+
*/
|
97 |
+
public function admin_menus() {
|
98 |
+
|
99 |
+
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
|
103 |
+
add_dashboard_page( '', '', 'manage_options', 'cartflow-setup', '' );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Show the setup wizard.
|
108 |
+
*/
|
109 |
+
public function setup_wizard() {
|
110 |
+
|
111 |
+
if ( empty( $_GET['page'] ) || 'cartflow-setup' !== $_GET['page'] ) { //phpcs:ignore
|
112 |
+
return;
|
113 |
+
}
|
114 |
+
|
115 |
+
$this->steps = array(
|
116 |
+
'basic-config' => array(
|
117 |
+
'name' => __( 'Welcome', 'cartflows' ),
|
118 |
+
'view' => array( $this, 'welcome_step' ),
|
119 |
+
'handler' => array( $this, 'welcome_step_save' ),
|
120 |
+
),
|
121 |
+
'page-builder' => array(
|
122 |
+
'name' => __( 'Page Builder', 'cartflows' ),
|
123 |
+
'view' => array( $this, 'page_builder_step' ),
|
124 |
+
),
|
125 |
+
'checkout' => array(
|
126 |
+
'name' => __( 'Checkout', 'cartflows' ),
|
127 |
+
'view' => array( $this, 'checkout_step' ),
|
128 |
+
),
|
129 |
+
'training' => array(
|
130 |
+
'name' => __( 'Training', 'cartflows' ),
|
131 |
+
'view' => array( $this, 'training_step' ),
|
132 |
+
),
|
133 |
+
'setup-ready' => array(
|
134 |
+
'name' => __( 'Ready!', 'cartflows' ),
|
135 |
+
'view' => array( $this, 'ready_step' ),
|
136 |
+
'handler' => '',
|
137 |
+
),
|
138 |
+
);
|
139 |
+
|
140 |
+
$this->step = isset( $_GET['step'] ) ? sanitize_text_field( $_GET['step'] ) : current( array_keys( $this->steps ) ); //phpcs:ignore
|
141 |
+
|
142 |
+
wp_enqueue_style( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/css/setup-wizard.css', array( 'dashicons' ), CARTFLOWS_VER );
|
143 |
+
wp_style_add_data( 'cartflows-setup', 'rtl', 'replace' );
|
144 |
+
|
145 |
+
wp_enqueue_script( 'cartflows-setup', CARTFLOWS_URL . 'admin/assets/js/setup-wizard.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
|
146 |
+
|
147 |
+
wp_localize_script( 'cartflows-setup', 'cartflows_setup_vars', self::localize_vars() );
|
148 |
+
|
149 |
+
wp_enqueue_media();
|
150 |
+
|
151 |
+
if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) { //phpcs:ignore
|
152 |
+
call_user_func( $this->steps[ $this->step ]['handler'] );
|
153 |
+
}
|
154 |
+
|
155 |
+
ob_start();
|
156 |
+
$this->setup_wizard_header();
|
157 |
+
$this->setup_wizard_steps();
|
158 |
+
$this->setup_wizard_content();
|
159 |
+
$this->setup_wizard_footer();
|
160 |
+
exit;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get current step slug
|
165 |
+
*/
|
166 |
+
public function get_current_step_slug() {
|
167 |
+
$keys = array_keys( $this->steps );
|
168 |
+
return $keys[ array_search( $this->step, array_keys( $this->steps ), true ) ];
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Get previous step link
|
173 |
+
*/
|
174 |
+
public function get_prev_step_link() {
|
175 |
+
$keys = array_keys( $this->steps );
|
176 |
+
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ), true ) - 1 ] );
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Get next step link
|
181 |
+
*/
|
182 |
+
public function get_next_step_link() {
|
183 |
+
$keys = array_keys( $this->steps );
|
184 |
+
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ), true ) + 1 ] );
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Get next step link
|
189 |
+
*/
|
190 |
+
public function get_next_step_plain_link() {
|
191 |
+
$keys = array_keys( $this->steps );
|
192 |
+
$step_index = array_search( $this->step, $keys, true );
|
193 |
+
$step_index = ( count( $keys ) == $step_index + 1 ) ? $step_index : $step_index + 1;
|
194 |
+
$step = $keys[ $step_index ];
|
195 |
+
return admin_url( 'index.php?page=cartflow-setup&step=' . $step );
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Setup Wizard Header.
|
200 |
+
*/
|
201 |
+
public function setup_wizard_header() {
|
202 |
+
?>
|
203 |
+
<!DOCTYPE html>
|
204 |
+
<html>
|
205 |
+
<head>
|
206 |
+
<meta name="viewport" content="width=device-width" />
|
207 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
208 |
+
<title><?php esc_html_e( 'CartFlows Setup', 'cartflows' ); ?></title>
|
209 |
+
|
210 |
+
<script type="text/javascript">
|
211 |
+
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
212 |
+
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>';
|
213 |
+
var pagenow = '';
|
214 |
+
</script>
|
215 |
+
<?php wp_print_scripts( array( 'cartflows-setup' ) ); ?>
|
216 |
+
<?php do_action( 'admin_print_styles' ); ?>
|
217 |
+
<?php do_action( 'admin_head' ); ?>
|
218 |
+
</head>
|
219 |
+
<body class="cartflows-setup wp-core-ui cartflows-step-<?php echo esc_attr( $this->get_current_step_slug() ); ?>">
|
220 |
+
<div id="cartflows-logo">
|
221 |
+
<img height="40" class="wcf-logo" src="<?php echo CARTFLOWS_URL . 'assets/images/cartflows-logo.svg'; ?>" />
|
222 |
+
</div>
|
223 |
+
<?php
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Setup Wizard Footer.
|
228 |
+
*/
|
229 |
+
public function setup_wizard_footer() {
|
230 |
+
|
231 |
+
$admin_url = admin_url( 'admin.php?page=cartflows_settings' );
|
232 |
+
?>
|
233 |
+
<div class="close-button-wrapper">
|
234 |
+
<a href="<?php echo esc_url( $admin_url ); ?>" class="wizard-close-link" ><?php esc_html_e( 'Exit Setup Wizard', 'cartflows' ); ?></a>
|
235 |
+
</div>
|
236 |
+
</body>
|
237 |
+
</html>
|
238 |
+
<?php
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Output the steps.
|
243 |
+
*/
|
244 |
+
public function setup_wizard_steps() {
|
245 |
+
|
246 |
+
$ouput_steps = $this->steps;
|
247 |
+
?>
|
248 |
+
<ol class="cartflows-setup-steps">
|
249 |
+
<?php
|
250 |
+
foreach ( $ouput_steps as $step_key => $step ) :
|
251 |
+
$classes = '';
|
252 |
+
$activated = false;
|
253 |
+
if ( $step_key === $this->step ) {
|
254 |
+
$classes = 'active';
|
255 |
+
$activated = true;
|
256 |
+
} elseif ( array_search( $this->step, array_keys( $this->steps ), true ) > array_search( $step_key, array_keys( $this->steps ), true ) ) {
|
257 |
+
$classes = 'done';
|
258 |
+
$activated = true;
|
259 |
+
}
|
260 |
+
?>
|
261 |
+
<li class="<?php echo esc_attr( $classes ); ?>">
|
262 |
+
<span><?php echo esc_html( $step['name'] ); ?></span>
|
263 |
+
</li>
|
264 |
+
<?php endforeach; ?>
|
265 |
+
</ol>
|
266 |
+
<?php
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Output the content for the current step.
|
271 |
+
*/
|
272 |
+
public function setup_wizard_content() {
|
273 |
+
?>
|
274 |
+
<input type="hidden" class="wcf-redirect-link" data-redirect-link="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" >
|
275 |
+
<?php
|
276 |
+
|
277 |
+
echo '<div class="cartflows-setup-content">';
|
278 |
+
call_user_func( $this->steps[ $this->step ]['view'] );
|
279 |
+
echo '</div>';
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Introduction step.
|
284 |
+
*/
|
285 |
+
public function welcome_step() {
|
286 |
+
?>
|
287 |
+
<h1><?php esc_html_e( 'Welcome to CartFlows!', 'cartflows' ); ?></h1>
|
288 |
+
<p><?php esc_html_e( 'Thank you for choosing CartFlows to get more leads, increase conversions, & maximize profits. This short setup wizard will guide you though configuring CartFlows and creating your first funnel.', 'cartflows' ); ?></p>
|
289 |
+
<form method="post">
|
290 |
+
<div class="cartflows-setup-actions step">
|
291 |
+
<div class="button-prev-wrap">
|
292 |
+
</div>
|
293 |
+
<div class="button-next-wrap">
|
294 |
+
<input type="submit" class="uct-activate button-primary button button-large " value="<?php esc_html_e( 'Lets Go »', 'cartflows' ); ?>" name="save_step" />
|
295 |
+
</div>
|
296 |
+
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
297 |
+
</div>
|
298 |
+
</form>
|
299 |
+
<?php
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Save Locale Settings.
|
304 |
+
*/
|
305 |
+
public function welcome_step_save() {
|
306 |
+
check_admin_referer( 'cartflow-setup' );
|
307 |
+
|
308 |
+
// Update site title & tagline.
|
309 |
+
$redirect_url = $this->get_next_step_link();
|
310 |
+
|
311 |
+
wp_safe_redirect( esc_url_raw( $redirect_url ) );
|
312 |
+
exit;
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Locale settings
|
317 |
+
*/
|
318 |
+
public function page_builder_step() {
|
319 |
+
?>
|
320 |
+
|
321 |
+
<h1><?php esc_html_e( 'Page Builder Setup', 'cartflows' ); ?></h1>
|
322 |
+
<p class="description"><?php esc_html_e( 'Please select a page builder you would like to use with CartFlows.', 'cartflows' ); ?></p>
|
323 |
+
<form method="post">
|
324 |
+
<table class="cartflows-table widefat">
|
325 |
+
<tr class="cartflows-row">
|
326 |
+
<td class="cartflows-row-heading">
|
327 |
+
<label><?php esc_html_e( 'Select Page Builder', 'cartflows' ); ?></label>
|
328 |
+
</td>
|
329 |
+
<td class="cartflows-row-content">
|
330 |
+
<?php
|
331 |
+
$installed_plugins = get_plugins();
|
332 |
+
$plugins = array(
|
333 |
+
array(
|
334 |
+
'title' => __( 'Elementor', 'cartflows' ),
|
335 |
+
'value' => 'elementor',
|
336 |
+
'data' => array(
|
337 |
+
'slug' => 'elementor',
|
338 |
+
'init' => 'elementor/elementor.php',
|
339 |
+
'active' => is_plugin_active( 'elementor/elementor.php' ) ? 'yes' : 'no',
|
340 |
+
'install' => isset( $installed_plugins['elementor/elementor.php'] ) ? 'yes' : 'no',
|
341 |
+
),
|
342 |
+
),
|
343 |
+
array(
|
344 |
+
'title' => __( 'Beaver Builder Plugin (Lite Version)', 'cartflows' ),
|
345 |
+
'value' => 'beaver-builder',
|
346 |
+
'data' => array(
|
347 |
+
'slug' => 'beaver-builder-lite-version',
|
348 |
+
'init' => 'beaver-builder-lite-version/fl-builder.php',
|
349 |
+
'active' => is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) ? 'yes' : 'no',
|
350 |
+
'install' => isset( $installed_plugins['beaver-builder-lite-version/fl-builder.php'] ) ? 'yes' : 'no',
|
351 |
+
),
|
352 |
+
),
|
353 |
+
array(
|
354 |
+
'title' => __( 'Divi', 'cartflows' ),
|
355 |
+
'value' => 'divi',
|
356 |
+
'data' => array(
|
357 |
+
'slug' => 'divi',
|
358 |
+
'init' => 'divi',
|
359 |
+
'active' => 'yes',
|
360 |
+
'install' => 'NA',
|
361 |
+
),
|
362 |
+
),
|
363 |
+
array(
|
364 |
+
'title' => __( 'Other', 'cartflows' ),
|
365 |
+
'value' => 'other',
|
366 |
+
'data' => array(
|
367 |
+
'slug' => 'other',
|
368 |
+
'init' => false,
|
369 |
+
'active' => 'yes',
|
370 |
+
'install' => 'NA',
|
371 |
+
),
|
372 |
+
),
|
373 |
+
);
|
374 |
+
?>
|
375 |
+
<input type="hidden" name="save-pb-input" id="save-pb-option" value="1" />
|
376 |
+
<select name="page-builder" class="page-builder-list" data-redirect-link="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>">
|
377 |
+
<?php
|
378 |
+
foreach ( $plugins as $key => $plugin ) {
|
379 |
+
echo '<option value="' . esc_attr( $plugin['value'] ) . '" data-install="' . esc_attr( $plugin['data']['install'] ) . '" data-active="' . esc_attr( $plugin['data']['active'] ) . '" data-slug="' . esc_attr( $plugin['data']['slug'] ) . '" data-init="' . esc_attr( $plugin['data']['init'] ) . '">' . esc_html( $plugin['title'] ) . '</option>';
|
380 |
+
}
|
381 |
+
?>
|
382 |
+
</select>
|
383 |
+
</td>
|
384 |
+
</tr>
|
385 |
+
</table>
|
386 |
+
<p><?php esc_html_e( 'While CartFlows Should work with most page builders, we offer templates for the above page builders.', 'cartflows' ); ?></p>
|
387 |
+
<div class="cartflows-setup-actions step">
|
388 |
+
<div class="button-prev-wrap">
|
389 |
+
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
390 |
+
</div>
|
391 |
+
<div class="button-next-wrap">
|
392 |
+
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next" ><?php esc_html_e( 'Skip this step', 'cartflows' ); ?></a>
|
393 |
+
<a href="#" class="button button-primary wcf-install-plugins"><?php esc_html_e( 'Next »', 'cartflows' ); ?></a>
|
394 |
+
</div>
|
395 |
+
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
396 |
+
</div>
|
397 |
+
</form>
|
398 |
+
<?php
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Render checkout step.
|
403 |
+
*/
|
404 |
+
public function checkout_step() {
|
405 |
+
|
406 |
+
$installed_plugins = get_plugins();
|
407 |
+
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? 'yes' : 'no';
|
408 |
+
$is_wcf_ca_installed = isset( $installed_plugins['woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php'] ) ? 'yes' : 'no';
|
409 |
+
$is_active = class_exists( 'WooCommerce' ) ? 'yes' : 'no';
|
410 |
+
$is_wcf_ca_active = class_exists( 'CARTFLOWS_CA_Loader' ) ? 'yes' : 'no';
|
411 |
+
?>
|
412 |
+
<h1><?php esc_html_e( 'Choose a checkout', 'cartflows' ); ?></h1>
|
413 |
+
<div class="cartflows-setup-message">
|
414 |
+
<p>
|
415 |
+
<?php esc_html_e( 'While CartFlows is designed to use WooCommerce sell digital and physical products, not all funnels need a checkout system.', 'cartflows' ); ?>
|
416 |
+
</p>
|
417 |
+
<h4 class="cartflows-setup-message-title"><?php esc_html_e( 'Would you like to install WooCommerce to sell digital and physical products in your funnels?', 'cartflows' ); ?></h4>
|
418 |
+
<span><input data-wcf-ca-active="<?php echo esc_attr( $is_wcf_ca_active ); ?>" data-wcf-ca-install="<?php echo esc_attr( $is_wcf_ca_installed ); ?>" data-woo-active="<?php echo esc_attr( $is_active ); ?>" data-woo-install="<?php echo esc_attr( $is_wc_installed ); ?>" type="hidden" class="wcf-install-wc-input" name="installl-woocommerce" value="" checked></span>
|
419 |
+
</div>
|
420 |
+
|
421 |
+
<div class="cartflows-setup-extra-notice">
|
422 |
+
|
423 |
+
<span>
|
424 |
+
<?php esc_html_e( 'The following plugin will be installed and activated for you:', 'cartflows' ); ?>
|
425 |
+
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce', 'cartflows' ); ?></a>,
|
426 |
+
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce Cart Abandonment Recovery', 'cartflows' ); ?></a>
|
427 |
+
|
428 |
+
</span>
|
429 |
+
|
430 |
+
</div>
|
431 |
+
|
432 |
+
<div class="cartflows-setup-actions step">
|
433 |
+
<div class="button-prev-wrap">
|
434 |
+
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
435 |
+
</div>
|
436 |
+
<div class="button-next-wrap">
|
437 |
+
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next"><?php esc_html_e( 'No thanks', 'cartflows' ); ?></a>
|
438 |
+
<a class="wcf-install-wc button-primary button button-large" name="save_step" > <?php esc_html_e( 'Yes', 'cartflows' ); ?> </a>
|
439 |
+
</div>
|
440 |
+
</div>
|
441 |
+
|
442 |
+
<?php
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Save Locale Settings.
|
447 |
+
*/
|
448 |
+
public function activate_wc_plugins() {
|
449 |
+
|
450 |
+
check_ajax_referer( 'wcf-wc-plugins-activate', 'security' );
|
451 |
+
|
452 |
+
$plugin_slug_arr = array(
|
453 |
+
'woocommerce/woocommerce.php' => true,
|
454 |
+
'woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php' => false,
|
455 |
+
);
|
456 |
+
|
457 |
+
$activate = array(
|
458 |
+
'woocommerce/woocommerce.php' => false,
|
459 |
+
'woo-cart-abandonment-recovery/woo-cart-abandonment-recovery.php' => false,
|
460 |
+
);
|
461 |
+
|
462 |
+
foreach ( $plugin_slug_arr as $slug => $do_silently ) {
|
463 |
+
|
464 |
+
$activate[ $slug ] = activate_plugin( $slug, '', false, $do_silently );
|
465 |
+
}
|
466 |
+
|
467 |
+
foreach ( $activate as $slug => $data ) {
|
468 |
+
|
469 |
+
if ( is_wp_error( $data ) ) {
|
470 |
+
wp_send_json_error(
|
471 |
+
array(
|
472 |
+
'success' => false,
|
473 |
+
'message' => $data->get_error_message(),
|
474 |
+
)
|
475 |
+
);
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
wp_send_json_success();
|
480 |
+
}
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Save Locale Settings.
|
484 |
+
*/
|
485 |
+
public function page_builder_step_save() {
|
486 |
+
|
487 |
+
check_ajax_referer( 'wcf-page-builder-step-save', 'security' );
|
488 |
+
|
489 |
+
$plugin_init = isset( $_POST['plugin_init'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_init'] ) ) : '';
|
490 |
+
$save_option = ( isset( $_POST['save_builder_option'] ) && 'true' == $_POST['save_builder_option'] ) ? true : false;
|
491 |
+
$plugin_slug = filter_input( INPUT_POST, 'page_builder', FILTER_SANITIZE_STRING );
|
492 |
+
|
493 |
+
$do_sliently = true;
|
494 |
+
if ( 'woo-cart-abandonment-recovery' === $plugin_slug ) {
|
495 |
+
$do_sliently = false;
|
496 |
+
}
|
497 |
+
|
498 |
+
$activate = activate_plugin( $plugin_init, '', false, $do_sliently );
|
499 |
+
|
500 |
+
if ( $save_option ) {
|
501 |
+
$this->save_page_builder_option();
|
502 |
+
}
|
503 |
+
|
504 |
+
if ( is_wp_error( $activate ) ) {
|
505 |
+
wp_send_json_error(
|
506 |
+
array(
|
507 |
+
'success' => false,
|
508 |
+
'message' => $activate->get_error_message(),
|
509 |
+
)
|
510 |
+
);
|
511 |
+
}
|
512 |
+
|
513 |
+
wp_send_json_success(
|
514 |
+
array( 'plugin' => $plugin_slug )
|
515 |
+
);
|
516 |
+
}
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Save selected page builder in options database.
|
520 |
+
*/
|
521 |
+
public function save_page_builder_option() {
|
522 |
+
|
523 |
+
$page_builder = isset( $_POST['page_builder'] ) ? sanitize_text_field( wp_unslash( $_POST['page_builder'] ) ) : ''; //phpcs:ignore
|
524 |
+
|
525 |
+
$wcf_settings = get_option( '_cartflows_common', array() );
|
526 |
+
|
527 |
+
if ( false !== strpos( $page_builder, 'beaver-builder' ) ) {
|
528 |
+
$page_builder = 'beaver-builder';
|
529 |
+
}
|
530 |
+
|
531 |
+
$wcf_settings['default_page_builder'] = $page_builder;
|
532 |
+
|
533 |
+
update_option( '_cartflows_common', $wcf_settings );
|
534 |
+
|
535 |
+
wp_send_json_success(
|
536 |
+
array( 'plugin' => $page_builder )
|
537 |
+
);
|
538 |
+
|
539 |
+
}
|
540 |
+
|
541 |
+
/**
|
542 |
+
* Final step.
|
543 |
+
*/
|
544 |
+
public function ready_step() {
|
545 |
+
|
546 |
+
// Set setup wizard status to complete.
|
547 |
+
update_option( 'wcf_setup_complete', true );
|
548 |
+
?>
|
549 |
+
<h1><?php esc_html_e( 'Congratulations, You Did It!', 'cartflows' ); ?></h1>
|
550 |
+
|
551 |
+
<div class="cartflows-setup-next-steps">
|
552 |
+
<div class="cartflows-setup-next-steps-last">
|
553 |
+
|
554 |
+
<p class="success">
|
555 |
+
<?php
|
556 |
+
esc_html_e( 'CartFlows is ready to use on your website. You\'ve successfully completed the setup process and all that is left for you to do is create your first flow.', 'cartflows' )
|
557 |
+
?>
|
558 |
+
</p>
|
559 |
+
|
560 |
+
|
561 |
+
<ul class="wcf-wizard-next-steps">
|
562 |
+
<li class="wcf-wizard-next-step-item">
|
563 |
+
<div class="wcf-wizard-next-step-description">
|
564 |
+
<p class="next-step-heading">Next step</p>
|
565 |
+
<h3 class="next-step-description">Create First Flow</h3>
|
566 |
+
<p class="next-step-extra-info">You're ready to add flows to your website.</p>
|
567 |
+
</div>
|
568 |
+
<div class="wcf-wizard-next-step-action">
|
569 |
+
<p class="wc-setup-actions step">
|
570 |
+
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=cartflows_flow&add-new-flow' ) ); ?>" type="button" class="button button-primary button-hero" ><?php esc_html_e( 'Create a flow', 'cartflows' ); ?></a>
|
571 |
+
</p>
|
572 |
+
</div>
|
573 |
+
</li>
|
574 |
+
</ul>
|
575 |
+
|
576 |
+
</div>
|
577 |
+
</div>
|
578 |
+
<?php
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Training course step.
|
583 |
+
*/
|
584 |
+
public function training_step() {
|
585 |
+
$current_user = wp_get_current_user();
|
586 |
+
?>
|
587 |
+
<h1><?php esc_html_e( 'Exclusive CartFlows Training Course Offer', 'cartflows' ); ?></h1>
|
588 |
+
|
589 |
+
<div id="mauticform_wrapper_cartflowsonboarding" class="mauticform_wrapper">
|
590 |
+
<form autocomplete="false" role="form" method="post" action="https://go.cartflows.com/form/submit?formId=2" id="mauticform_cartflowsonboarding" data-mautic-form="cartflowsonboarding" enctype="multipart/form-data">
|
591 |
+
<div class="mauticform-error" id="mauticform_cartflowsonboarding_error"></div>
|
592 |
+
<div class="mauticform-message" id="mauticform_cartflowsonboarding_message"></div>
|
593 |
+
<div class="mauticform-innerform">
|
594 |
+
<div class="mauticform-page-wrapper mauticform-page-1" data-mautic-form-page="1">
|
595 |
+
<div id="mauticform_cartflowsonboarding_enter_your_email" class="mauticform-row mauticform-email mauticform-field-1">
|
596 |
+
<div class="cartflows-setup-message">
|
597 |
+
<p>
|
598 |
+
<?php esc_html_e( 'We want you to get off to a great start using CartFlows, so we would like to give access to our exclusive training course.', 'cartflows' ); ?>
|
599 |
+
<?php esc_html_e( 'Get access to this couse, for free, by entering your email below.', 'cartflows' ); ?>
|
600 |
+
</p>
|
601 |
+
<input id="mauticform_input_cartflowsonboarding_enter_your_email" name="mauticform[enter_your_email]" placeholder="<?php esc_html_e( 'Enter Email address', 'cartflows' ); ?>" value="<?php echo $current_user->user_email; ?>" class="mauticform-input" type="email">
|
602 |
+
</div>
|
603 |
+
<span class="mauticform-errormsg" style="display: none;"></span>
|
604 |
+
</div>
|
605 |
+
</div>
|
606 |
+
</div>
|
607 |
+
|
608 |
+
<input type="hidden" name="mauticform[formId]" id="mauticform_cartflowsonboarding_id" value="2">
|
609 |
+
<input type="hidden" name="mauticform[return]" id="mauticform_cartflowsonboarding_return" value="">
|
610 |
+
<input type="hidden" name="mauticform[formName]" id="mauticform_cartflowsonboarding_name" value="cartflowsonboarding">
|
611 |
+
<div class="cartflows-setup-actions step">
|
612 |
+
<div class="button-prev-wrap">
|
613 |
+
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
614 |
+
</div>
|
615 |
+
<div class="button-next-wrap">
|
616 |
+
<a href="<?php echo esc_url_raw( $this->get_next_step_plain_link() ); ?>" class="button button-large button-next"><?php esc_html_e( 'No thanks', 'cartflows' ); ?></a>
|
617 |
+
<button type="submit" name="mauticform[submit]" id="mauticform_input_cartflowsonboarding_submit" value="<?php esc_html_e( 'Allow', 'cartflows' ); ?>" class="mautic-form-submit btn btn-default button-primary button button-large button-next" name="save_step"><?php esc_html_e( 'Allow', 'cartflows' ); ?></button>
|
618 |
+
</div>
|
619 |
+
</div>
|
620 |
+
</form>
|
621 |
+
</div>
|
622 |
+
<?php
|
623 |
+
}
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Localize variables in admin
|
627 |
+
*/
|
628 |
+
public function localize_vars() {
|
629 |
+
|
630 |
+
$vars = array();
|
631 |
+
|
632 |
+
$ajax_actions = array(
|
633 |
+
'wcf_page_builder_step_save',
|
634 |
+
'wcf_wc_plugins_activate',
|
635 |
+
);
|
636 |
+
|
637 |
+
foreach ( $ajax_actions as $action ) {
|
638 |
+
|
639 |
+
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
640 |
+
}
|
641 |
+
|
642 |
+
return $vars;
|
643 |
+
}
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Add JS script for mautic form
|
647 |
+
*/
|
648 |
+
public function add_mautic_form_script() {
|
649 |
+
|
650 |
+
if ( ! isset( $_REQUEST['page'] ) || ( isset( $_REQUEST['page'] ) && 'cartflow-setup' !== $_REQUEST['page'] ) ) { //phpcs:ignore
|
651 |
+
return;
|
652 |
+
}
|
653 |
+
?>
|
654 |
+
|
655 |
+
<script type="text/javascript">
|
656 |
+
/** This section is only needed once per page if manually copying **/
|
657 |
+
if (typeof MauticSDKLoaded == 'undefined') {
|
658 |
+
var MauticSDKLoaded = true;
|
659 |
+
var head = document.getElementsByTagName('head')[0];
|
660 |
+
var script = document.createElement('script');
|
661 |
+
script.type = 'text/javascript';
|
662 |
+
script.src = 'https://go.cartflows.com/media/js/mautic-form.js';
|
663 |
+
script.onload = function() {
|
664 |
+
MauticSDK.onLoad();
|
665 |
+
};
|
666 |
+
head.appendChild(script);
|
667 |
+
var MauticDomain = 'https://go.cartflows.com';
|
668 |
+
var MauticLang = {
|
669 |
+
'submittingMessage': "Please wait..."
|
670 |
+
};
|
671 |
+
}
|
672 |
+
</script>
|
673 |
+
<?php
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
new CartFlows_Wizard();
|
678 |
+
|
679 |
+
endif;
|
includes/admin/cartflows-admin.php
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CARTFLOWS Admin HTML.
|
4 |
-
*
|
5 |
-
* @package CARTFLOWS
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<div class="wcf-menu-page-wrapper">
|
10 |
-
<div id="wcf-menu-page">
|
11 |
-
<div class="wcf-menu-page-header <?php echo esc_attr( implode( ' ', $header_wrapper_class ) ); ?>">
|
12 |
-
<div class="wcf-container wcf-flex">
|
13 |
-
<div class="wcf-title">
|
14 |
-
<span class="screen-reader-text"><?php echo esc_attr( CARTFLOWS_PLUGIN_NAME ); ?></span>
|
15 |
-
<img class="wcf-logo" src="<?php echo esc_attr( CARTFLOWS_URL ) . 'assets/images/cartflows-logo.svg'; ?>" />
|
16 |
-
</div>
|
17 |
-
<div class="wcf-top-links">
|
18 |
-
<?php
|
19 |
-
esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
|
20 |
-
?>
|
21 |
-
</div>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
<?php
|
26 |
-
// Settings update message.
|
27 |
-
if ( isset( $_REQUEST['message'] ) && ( 'saved' === $_REQUEST['message'] ) ) { //phpcs:ignore
|
28 |
-
?>
|
29 |
-
<div id="message" class="notice notice-success is-dismissive wcf-notice"><p> <?php esc_html_e( 'Settings saved successfully.', 'cartflows' ); ?> </p></div>
|
30 |
-
<?php
|
31 |
-
}
|
32 |
-
?>
|
33 |
-
<?php do_action( 'cartflows_render_admin_content' ); ?>
|
34 |
-
</div>
|
35 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CARTFLOWS Admin HTML.
|
4 |
+
*
|
5 |
+
* @package CARTFLOWS
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div class="wcf-menu-page-wrapper">
|
10 |
+
<div id="wcf-menu-page">
|
11 |
+
<div class="wcf-menu-page-header <?php echo esc_attr( implode( ' ', $header_wrapper_class ) ); ?>">
|
12 |
+
<div class="wcf-container wcf-flex">
|
13 |
+
<div class="wcf-title">
|
14 |
+
<span class="screen-reader-text"><?php echo esc_attr( CARTFLOWS_PLUGIN_NAME ); ?></span>
|
15 |
+
<img class="wcf-logo" src="<?php echo esc_attr( CARTFLOWS_URL ) . 'assets/images/cartflows-logo.svg'; ?>" />
|
16 |
+
</div>
|
17 |
+
<div class="wcf-top-links">
|
18 |
+
<?php
|
19 |
+
esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
|
20 |
+
?>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<?php
|
26 |
+
// Settings update message.
|
27 |
+
if ( isset( $_REQUEST['message'] ) && ( 'saved' === $_REQUEST['message'] ) ) { //phpcs:ignore
|
28 |
+
?>
|
29 |
+
<div id="message" class="notice notice-success is-dismissive wcf-notice"><p> <?php esc_html_e( 'Settings saved successfully.', 'cartflows' ); ?> </p></div>
|
30 |
+
<?php
|
31 |
+
}
|
32 |
+
?>
|
33 |
+
<?php do_action( 'cartflows_render_admin_content' ); ?>
|
34 |
+
</div>
|
35 |
+
</div>
|
includes/admin/cartflows-general.php
CHANGED
@@ -1,370 +1,370 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* General settings
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
$settings = Cartflows_Helper::get_common_settings();
|
9 |
-
|
10 |
-
$debug_data = Cartflows_Helper::get_debug_settings();
|
11 |
-
|
12 |
-
$permalink_settings = Cartflows_Helper::get_permalink_settings();
|
13 |
-
|
14 |
-
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
15 |
-
|
16 |
-
$debug_on = ( isset( $_GET['debug'] ) ) ? sanitize_text_field( wp_unslash( $_GET['debug'] ) ) : 'false'; //phpcs:ignore
|
17 |
-
|
18 |
-
$error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOOLEAN );
|
19 |
-
?>
|
20 |
-
|
21 |
-
|
22 |
-
<?php if ( $error_log ) : ?>
|
23 |
-
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
24 |
-
<?php Cartflows_Logger::status_logs_file(); ?>
|
25 |
-
</div>
|
26 |
-
<?php else : ?>
|
27 |
-
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
28 |
-
<input type="hidden" name="action" value="wcf_save_common_settings">
|
29 |
-
<h1 class="screen-reader-text"><?php esc_html_e( 'General Settings', 'cartflows' ); ?></h1>
|
30 |
-
|
31 |
-
<div id="poststuff">
|
32 |
-
<div id="post-body" class="columns-2">
|
33 |
-
<div id="post-body-content">
|
34 |
-
<div class="postbox introduction">
|
35 |
-
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
36 |
-
<span><?php esc_html_e( 'Getting Started', 'cartflows' ); ?></span>
|
37 |
-
</h2>
|
38 |
-
<div class="inside">
|
39 |
-
<div class="iframe-wrap">
|
40 |
-
<iframe width="560" height="315" src="https://www.youtube.com/embed/SlE0moPKjMY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
41 |
-
</div>
|
42 |
-
<p>
|
43 |
-
<?php
|
44 |
-
esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
|
45 |
-
?>
|
46 |
-
</p>
|
47 |
-
</div>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<div class="general-settings-form postbox">
|
51 |
-
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
52 |
-
<span><?php esc_html_e( 'General Settings', 'cartflows' ); ?></span>
|
53 |
-
</h2>
|
54 |
-
<div class="inside">
|
55 |
-
<form method="post" class="wrap wcf-clear" action="" >
|
56 |
-
<div class="form-wrap">
|
57 |
-
<?php
|
58 |
-
|
59 |
-
do_action( 'cartflows_before_settings_fields', $settings );
|
60 |
-
|
61 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
62 |
-
array(
|
63 |
-
'id' => 'wcf_disallow_indexing',
|
64 |
-
'name' => '_cartflows_common[disallow_indexing]',
|
65 |
-
'title' => __( 'Disallow search engines from indexing flows', 'cartflows' ),
|
66 |
-
'value' => $settings['disallow_indexing'],
|
67 |
-
)
|
68 |
-
);
|
69 |
-
|
70 |
-
if ( wcf()->is_woo_active ) {
|
71 |
-
echo Cartflows_Admin_Fields::flow_checkout_selection_field(
|
72 |
-
array(
|
73 |
-
'id' => 'wcf_global_checkout',
|
74 |
-
'name' => '_cartflows_common[global_checkout]',
|
75 |
-
'title' => __( 'Global Checkout', 'cartflows' ),
|
76 |
-
'value' => $settings['global_checkout'],
|
77 |
-
)
|
78 |
-
);
|
79 |
-
}
|
80 |
-
echo Cartflows_Admin_Fields::select_field(
|
81 |
-
array(
|
82 |
-
'id' => 'wcf_default_page_builder',
|
83 |
-
'name' => '_cartflows_common[default_page_builder]',
|
84 |
-
'title' => __( 'Show Templates designed with', 'cartflows' ),
|
85 |
-
'description' => __( 'CartFlows offers flow templates that can be imported in one click. These templates are available in few different page builders. Please choose your preferred page builder from the list so you will only see templates that are made using that page builder..', 'cartflows' ),
|
86 |
-
'value' => $settings['default_page_builder'],
|
87 |
-
'options' => array(
|
88 |
-
'elementor' => __( 'Elementor', 'cartflows' ),
|
89 |
-
'beaver-builder' => __( 'Beaver Builder', 'cartflows' ),
|
90 |
-
'divi' => __( 'Divi', 'cartflows' ),
|
91 |
-
'other' => __( 'Other', 'cartflows' ),
|
92 |
-
),
|
93 |
-
)
|
94 |
-
);
|
95 |
-
|
96 |
-
do_action( 'cartflows_after_settings_fields', $settings );
|
97 |
-
|
98 |
-
?>
|
99 |
-
</div>
|
100 |
-
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
101 |
-
<?php wp_nonce_field( 'cartflows-common-settings', 'cartflows-common-settings-nonce' ); ?>
|
102 |
-
</form>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
|
106 |
-
<div class="general-settingss-form postbox">
|
107 |
-
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
108 |
-
<span><?php esc_html_e( 'Permalink Settings', 'cartflows' ); ?></span>
|
109 |
-
</h2>
|
110 |
-
<div class="inside">
|
111 |
-
<form method="post" class="wrap wcf-clear" action="" >
|
112 |
-
<div class="form-wrap wcf_permalink_settings">
|
113 |
-
<?php
|
114 |
-
|
115 |
-
echo Cartflows_Admin_Fields::radio_field(
|
116 |
-
array(
|
117 |
-
'id' => 'permalink_structure',
|
118 |
-
'name' => '_cartflows_permalink[permalink_structure]',
|
119 |
-
'value' => $permalink_settings['permalink_structure'],
|
120 |
-
'options' => array(
|
121 |
-
'' =>
|
122 |
-
array(
|
123 |
-
'label' => __( 'Default', 'cartflows' ),
|
124 |
-
'description' => 'Default WordPress Permalink',
|
125 |
-
),
|
126 |
-
|
127 |
-
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
128 |
-
array(
|
129 |
-
'label' => __( 'Flow and Step Slug', 'cartflows' ),
|
130 |
-
'description' => '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
131 |
-
),
|
132 |
-
|
133 |
-
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%' =>
|
134 |
-
array(
|
135 |
-
'label' => __( 'Flow Slug', 'cartflows' ),
|
136 |
-
'description' => '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/%stepname%/',
|
137 |
-
),
|
138 |
-
|
139 |
-
'/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
140 |
-
array(
|
141 |
-
'label' => __( 'Step Slug', 'cartflows' ),
|
142 |
-
'description' => '/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
143 |
-
),
|
144 |
-
),
|
145 |
-
)
|
146 |
-
);
|
147 |
-
?>
|
148 |
-
<hr/>
|
149 |
-
<?php
|
150 |
-
|
151 |
-
echo Cartflows_Admin_Fields::title_field(
|
152 |
-
array(
|
153 |
-
'title' => __( 'Post Type Permalink Base', 'cartflows' ),
|
154 |
-
)
|
155 |
-
);
|
156 |
-
|
157 |
-
echo Cartflows_Admin_Fields::text_field(
|
158 |
-
array(
|
159 |
-
'id' => 'wcf_permalink_step_base',
|
160 |
-
'name' => '_cartflows_permalink[permalink]',
|
161 |
-
'title' => __( 'Step Base', 'cartflows' ),
|
162 |
-
'value' => $permalink_settings['permalink'],
|
163 |
-
'placeholder' => CARTFLOWS_STEP_POST_TYPE,
|
164 |
-
)
|
165 |
-
);
|
166 |
-
|
167 |
-
echo Cartflows_Admin_Fields::text_field(
|
168 |
-
array(
|
169 |
-
'id' => 'wcf_permalink_flow_base',
|
170 |
-
'name' => '_cartflows_permalink[permalink_flow_base]',
|
171 |
-
'title' => __( 'Flow Base', 'cartflows' ),
|
172 |
-
'value' => $permalink_settings['permalink_flow_base'],
|
173 |
-
'placeholder' => CARTFLOWS_FLOW_POST_TYPE,
|
174 |
-
)
|
175 |
-
);
|
176 |
-
|
177 |
-
?>
|
178 |
-
|
179 |
-
|
180 |
-
</div>
|
181 |
-
<p>
|
182 |
-
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
183 |
-
<?php submit_button( __( 'Set Default', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'reset', false ); ?>
|
184 |
-
<?php wp_nonce_field( 'cartflows-permalink-settings', 'cartflows-permalink-settings-nonce' ); ?>
|
185 |
-
</p>
|
186 |
-
|
187 |
-
|
188 |
-
</form>
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
|
192 |
-
|
193 |
-
<div class="general-settingss-form postbox">
|
194 |
-
<h2 class="wcf-facebook-hndle wcf-normal-cusror ui-sortable-handle hndle">
|
195 |
-
|
196 |
-
<span><?php esc_html_e( 'Facebook Pixel Settings', 'cartflows' ); ?></span>
|
197 |
-
</h2>
|
198 |
-
|
199 |
-
<form method="post" class="wrap wcf-clear" action="">
|
200 |
-
<div class="form-wrap">
|
201 |
-
<input type="hidden" name="action" value="wcf_save_facebook_pixel_settings">
|
202 |
-
<div id="post-body">
|
203 |
-
|
204 |
-
<div class="inside">
|
205 |
-
<div class="form-wrap">
|
206 |
-
<?php
|
207 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
208 |
-
array(
|
209 |
-
'id' => 'wcf_facebook_pixel_tracking',
|
210 |
-
'name' => '_cartflows_facebook[facebook_pixel_tracking]',
|
211 |
-
'title' => __( 'Enable Facebook Pixel Tracking', 'cartflows' ),
|
212 |
-
'value' => $facebook_settings['facebook_pixel_tracking'],
|
213 |
-
)
|
214 |
-
);
|
215 |
-
|
216 |
-
echo "<div class='wcf-fb-pixel-wrapper'>";
|
217 |
-
|
218 |
-
echo Cartflows_Admin_Fields::text_field(
|
219 |
-
array(
|
220 |
-
'id' => 'wcf_facebook_pixel_id',
|
221 |
-
'name' => '_cartflows_facebook[facebook_pixel_id]',
|
222 |
-
'title' => __( 'Enter Facebook pixel ID', 'cartflows' ),
|
223 |
-
'value' => $facebook_settings['facebook_pixel_id'],
|
224 |
-
)
|
225 |
-
);
|
226 |
-
|
227 |
-
|
228 |
-
echo Cartflows_Admin_Fields::title_field(
|
229 |
-
array(
|
230 |
-
'title' => __( 'Enable Events:', 'cartflows' ),
|
231 |
-
)
|
232 |
-
);
|
233 |
-
|
234 |
-
|
235 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
236 |
-
array(
|
237 |
-
'id' => 'wcf_facebook_pixel_initiate_checkout',
|
238 |
-
'name' => '_cartflows_facebook[facebook_pixel_initiate_checkout]',
|
239 |
-
'title' => __( 'Initiate Checkout', 'cartflows' ),
|
240 |
-
'value' => $facebook_settings['facebook_pixel_initiate_checkout'],
|
241 |
-
)
|
242 |
-
);
|
243 |
-
|
244 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
245 |
-
array(
|
246 |
-
'id' => 'wcf_facebook_pixel_add_payment_info',
|
247 |
-
'name' => '_cartflows_facebook[facebook_pixel_add_payment_info]',
|
248 |
-
'title' => __( 'Add Payment Info', 'cartflows' ),
|
249 |
-
'value' => $facebook_settings['facebook_pixel_add_payment_info'],
|
250 |
-
)
|
251 |
-
);
|
252 |
-
|
253 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
254 |
-
array(
|
255 |
-
'id' => 'wcf_facebook_pixel_purchase_complete',
|
256 |
-
'name' => '_cartflows_facebook[facebook_pixel_purchase_complete]',
|
257 |
-
'title' => __( 'Purchase Complete', 'cartflows' ),
|
258 |
-
'value' => $facebook_settings['facebook_pixel_purchase_complete'],
|
259 |
-
)
|
260 |
-
);
|
261 |
-
|
262 |
-
echo '</div>';
|
263 |
-
|
264 |
-
?>
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-facebook-setting-save-btn button-primary button', 'submit', false ); ?>
|
268 |
-
<?php wp_nonce_field( 'cartflows-facebook-settings', 'cartflows-facebook-settings-nonce' ); ?>
|
269 |
-
</div>
|
270 |
-
|
271 |
-
</div>
|
272 |
-
</div>
|
273 |
-
</form>
|
274 |
-
|
275 |
-
|
276 |
-
</div>
|
277 |
-
</div>
|
278 |
-
<div class="postbox-container" id="postbox-container-1">
|
279 |
-
<div id="side-sortables">
|
280 |
-
|
281 |
-
<div class="postbox">
|
282 |
-
<h2 class="hndle">
|
283 |
-
<span class="dashicons dashicons-book"></span>
|
284 |
-
<span><?php esc_html_e( 'Knowledge Base', 'cartflows' ); ?></span>
|
285 |
-
</h2>
|
286 |
-
<div class="inside">
|
287 |
-
<p>
|
288 |
-
<?php esc_html_e( 'Not sure how something works? Take a peek at the knowledge base and learn.', 'cartflows' ); ?>
|
289 |
-
</p>
|
290 |
-
<p>
|
291 |
-
<a href="<?php echo esc_url( 'https://cartflows.com/docs' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Visit Knowledge Base »', 'cartflows' ); ?></a>
|
292 |
-
</p>
|
293 |
-
</div>
|
294 |
-
</div>
|
295 |
-
|
296 |
-
<div class="postbox">
|
297 |
-
<h2 class="hndle">
|
298 |
-
<span class="dashicons dashicons-groups"></span>
|
299 |
-
<span><?php esc_html_e( 'Community', 'cartflows' ); ?></span>
|
300 |
-
</h2>
|
301 |
-
<div class="inside">
|
302 |
-
<p>
|
303 |
-
<?php esc_html_e( 'Join the community of super helpful CartFlows users. Say hello, ask questions, give feedback and help each other!', 'cartflows' ); ?>
|
304 |
-
</p>
|
305 |
-
<p>
|
306 |
-
<a href="<?php echo esc_url( 'https://www.facebook.com/groups/cartflows/' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Join Our Facebook Group »', 'cartflows' ); ?></a>
|
307 |
-
</p>
|
308 |
-
</div>
|
309 |
-
</div>
|
310 |
-
|
311 |
-
<div class="postbox">
|
312 |
-
<h2 class="hndle">
|
313 |
-
<span class="dashicons dashicons-sos"></span>
|
314 |
-
<span><?php esc_html_e( 'Five Star Support', 'cartflows' ); ?></span>
|
315 |
-
</h2>
|
316 |
-
<div class="inside">
|
317 |
-
<p>
|
318 |
-
<?php esc_html_e( 'Got a question? Get in touch with CartFlows developers. We\'re happy to help!', 'cartflows' ); ?>
|
319 |
-
</p>
|
320 |
-
<p>
|
321 |
-
<a href="<?php echo esc_url( 'https://cartflows.com/contact' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Submit a Ticket »', 'cartflows' ); ?></a>
|
322 |
-
</p>
|
323 |
-
</div>
|
324 |
-
</div>
|
325 |
-
<?php
|
326 |
-
if ( 'true' == $debug_on ) {
|
327 |
-
?>
|
328 |
-
<div class="postbox">
|
329 |
-
<h2 class="hndle">
|
330 |
-
<span class="dashicons dashicons-editor-code"></span>
|
331 |
-
<span><?php esc_html_e( 'Load Minified CSS', 'cartflows' ); ?></span>
|
332 |
-
</h2>
|
333 |
-
<div class="inside">
|
334 |
-
<form method="post" class="wrap wcf-clear" action="">
|
335 |
-
<p>
|
336 |
-
<?php esc_html_e( 'Load the Minified CSS from here. Just Enable it by checking the below given checkbox.', 'cartflows' ); ?>
|
337 |
-
</p>
|
338 |
-
<?php
|
339 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
340 |
-
array(
|
341 |
-
'id' => 'allow_minified_files',
|
342 |
-
'name' => '_cartflows_debug_data[allow_minified_files]',
|
343 |
-
'title' => __( 'Load minified CSS & JS Files', 'cartflows' ),
|
344 |
-
'value' => $debug_data['allow_minified_files'],
|
345 |
-
)
|
346 |
-
);
|
347 |
-
?>
|
348 |
-
<?php submit_button( __( 'Save', 'cartflows' ), 'button-primary button', 'submit', false ); ?>
|
349 |
-
<?php wp_nonce_field( 'cartflows-debug-settings', 'cartflows-debug-settings-nonce' ); ?>
|
350 |
-
</form>
|
351 |
-
</div>
|
352 |
-
</div>
|
353 |
-
<?php
|
354 |
-
}
|
355 |
-
?>
|
356 |
-
</div>
|
357 |
-
</div>
|
358 |
-
</div>
|
359 |
-
<!-- /post-body -->
|
360 |
-
<br class="clear">
|
361 |
-
</div>
|
362 |
-
</div>
|
363 |
-
<?php endif; ?>
|
364 |
-
|
365 |
-
<?php
|
366 |
-
/**
|
367 |
-
* Loads Zapier settings admin view.
|
368 |
-
*/
|
369 |
-
do_action( 'cartflows_after_general_settings' );
|
370 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* General settings
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$settings = Cartflows_Helper::get_common_settings();
|
9 |
+
|
10 |
+
$debug_data = Cartflows_Helper::get_debug_settings();
|
11 |
+
|
12 |
+
$permalink_settings = Cartflows_Helper::get_permalink_settings();
|
13 |
+
|
14 |
+
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
15 |
+
|
16 |
+
$debug_on = ( isset( $_GET['debug'] ) ) ? sanitize_text_field( wp_unslash( $_GET['debug'] ) ) : 'false'; //phpcs:ignore
|
17 |
+
|
18 |
+
$error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOOLEAN );
|
19 |
+
?>
|
20 |
+
|
21 |
+
|
22 |
+
<?php if ( $error_log ) : ?>
|
23 |
+
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
24 |
+
<?php Cartflows_Logger::status_logs_file(); ?>
|
25 |
+
</div>
|
26 |
+
<?php else : ?>
|
27 |
+
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
28 |
+
<input type="hidden" name="action" value="wcf_save_common_settings">
|
29 |
+
<h1 class="screen-reader-text"><?php esc_html_e( 'General Settings', 'cartflows' ); ?></h1>
|
30 |
+
|
31 |
+
<div id="poststuff">
|
32 |
+
<div id="post-body" class="columns-2">
|
33 |
+
<div id="post-body-content">
|
34 |
+
<div class="postbox introduction">
|
35 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
36 |
+
<span><?php esc_html_e( 'Getting Started', 'cartflows' ); ?></span>
|
37 |
+
</h2>
|
38 |
+
<div class="inside">
|
39 |
+
<div class="iframe-wrap">
|
40 |
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/SlE0moPKjMY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
41 |
+
</div>
|
42 |
+
<p>
|
43 |
+
<?php
|
44 |
+
esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
|
45 |
+
?>
|
46 |
+
</p>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<div class="general-settings-form postbox">
|
51 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
52 |
+
<span><?php esc_html_e( 'General Settings', 'cartflows' ); ?></span>
|
53 |
+
</h2>
|
54 |
+
<div class="inside">
|
55 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
56 |
+
<div class="form-wrap">
|
57 |
+
<?php
|
58 |
+
|
59 |
+
do_action( 'cartflows_before_settings_fields', $settings );
|
60 |
+
|
61 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
62 |
+
array(
|
63 |
+
'id' => 'wcf_disallow_indexing',
|
64 |
+
'name' => '_cartflows_common[disallow_indexing]',
|
65 |
+
'title' => __( 'Disallow search engines from indexing flows', 'cartflows' ),
|
66 |
+
'value' => $settings['disallow_indexing'],
|
67 |
+
)
|
68 |
+
);
|
69 |
+
|
70 |
+
if ( wcf()->is_woo_active ) {
|
71 |
+
echo Cartflows_Admin_Fields::flow_checkout_selection_field(
|
72 |
+
array(
|
73 |
+
'id' => 'wcf_global_checkout',
|
74 |
+
'name' => '_cartflows_common[global_checkout]',
|
75 |
+
'title' => __( 'Global Checkout', 'cartflows' ),
|
76 |
+
'value' => $settings['global_checkout'],
|
77 |
+
)
|
78 |
+
);
|
79 |
+
}
|
80 |
+
echo Cartflows_Admin_Fields::select_field(
|
81 |
+
array(
|
82 |
+
'id' => 'wcf_default_page_builder',
|
83 |
+
'name' => '_cartflows_common[default_page_builder]',
|
84 |
+
'title' => __( 'Show Templates designed with', 'cartflows' ),
|
85 |
+
'description' => __( 'CartFlows offers flow templates that can be imported in one click. These templates are available in few different page builders. Please choose your preferred page builder from the list so you will only see templates that are made using that page builder..', 'cartflows' ),
|
86 |
+
'value' => $settings['default_page_builder'],
|
87 |
+
'options' => array(
|
88 |
+
'elementor' => __( 'Elementor', 'cartflows' ),
|
89 |
+
'beaver-builder' => __( 'Beaver Builder', 'cartflows' ),
|
90 |
+
'divi' => __( 'Divi', 'cartflows' ),
|
91 |
+
'other' => __( 'Other', 'cartflows' ),
|
92 |
+
),
|
93 |
+
)
|
94 |
+
);
|
95 |
+
|
96 |
+
do_action( 'cartflows_after_settings_fields', $settings );
|
97 |
+
|
98 |
+
?>
|
99 |
+
</div>
|
100 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
101 |
+
<?php wp_nonce_field( 'cartflows-common-settings', 'cartflows-common-settings-nonce' ); ?>
|
102 |
+
</form>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<div class="general-settingss-form postbox">
|
107 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
108 |
+
<span><?php esc_html_e( 'Permalink Settings', 'cartflows' ); ?></span>
|
109 |
+
</h2>
|
110 |
+
<div class="inside">
|
111 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
112 |
+
<div class="form-wrap wcf_permalink_settings">
|
113 |
+
<?php
|
114 |
+
|
115 |
+
echo Cartflows_Admin_Fields::radio_field(
|
116 |
+
array(
|
117 |
+
'id' => 'permalink_structure',
|
118 |
+
'name' => '_cartflows_permalink[permalink_structure]',
|
119 |
+
'value' => $permalink_settings['permalink_structure'],
|
120 |
+
'options' => array(
|
121 |
+
'' =>
|
122 |
+
array(
|
123 |
+
'label' => __( 'Default', 'cartflows' ),
|
124 |
+
'description' => 'Default WordPress Permalink',
|
125 |
+
),
|
126 |
+
|
127 |
+
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
128 |
+
array(
|
129 |
+
'label' => __( 'Flow and Step Slug', 'cartflows' ),
|
130 |
+
'description' => '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
131 |
+
),
|
132 |
+
|
133 |
+
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%' =>
|
134 |
+
array(
|
135 |
+
'label' => __( 'Flow Slug', 'cartflows' ),
|
136 |
+
'description' => '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/%stepname%/',
|
137 |
+
),
|
138 |
+
|
139 |
+
'/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
140 |
+
array(
|
141 |
+
'label' => __( 'Step Slug', 'cartflows' ),
|
142 |
+
'description' => '/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
143 |
+
),
|
144 |
+
),
|
145 |
+
)
|
146 |
+
);
|
147 |
+
?>
|
148 |
+
<hr/>
|
149 |
+
<?php
|
150 |
+
|
151 |
+
echo Cartflows_Admin_Fields::title_field(
|
152 |
+
array(
|
153 |
+
'title' => __( 'Post Type Permalink Base', 'cartflows' ),
|
154 |
+
)
|
155 |
+
);
|
156 |
+
|
157 |
+
echo Cartflows_Admin_Fields::text_field(
|
158 |
+
array(
|
159 |
+
'id' => 'wcf_permalink_step_base',
|
160 |
+
'name' => '_cartflows_permalink[permalink]',
|
161 |
+
'title' => __( 'Step Base', 'cartflows' ),
|
162 |
+
'value' => $permalink_settings['permalink'],
|
163 |
+
'placeholder' => CARTFLOWS_STEP_POST_TYPE,
|
164 |
+
)
|
165 |
+
);
|
166 |
+
|
167 |
+
echo Cartflows_Admin_Fields::text_field(
|
168 |
+
array(
|
169 |
+
'id' => 'wcf_permalink_flow_base',
|
170 |
+
'name' => '_cartflows_permalink[permalink_flow_base]',
|
171 |
+
'title' => __( 'Flow Base', 'cartflows' ),
|
172 |
+
'value' => $permalink_settings['permalink_flow_base'],
|
173 |
+
'placeholder' => CARTFLOWS_FLOW_POST_TYPE,
|
174 |
+
)
|
175 |
+
);
|
176 |
+
|
177 |
+
?>
|
178 |
+
|
179 |
+
|
180 |
+
</div>
|
181 |
+
<p>
|
182 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
183 |
+
<?php submit_button( __( 'Set Default', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'reset', false ); ?>
|
184 |
+
<?php wp_nonce_field( 'cartflows-permalink-settings', 'cartflows-permalink-settings-nonce' ); ?>
|
185 |
+
</p>
|
186 |
+
|
187 |
+
|
188 |
+
</form>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
|
192 |
+
|
193 |
+
<div class="general-settingss-form postbox">
|
194 |
+
<h2 class="wcf-facebook-hndle wcf-normal-cusror ui-sortable-handle hndle">
|
195 |
+
|
196 |
+
<span><?php esc_html_e( 'Facebook Pixel Settings', 'cartflows' ); ?></span>
|
197 |
+
</h2>
|
198 |
+
|
199 |
+
<form method="post" class="wrap wcf-clear" action="">
|
200 |
+
<div class="form-wrap">
|
201 |
+
<input type="hidden" name="action" value="wcf_save_facebook_pixel_settings">
|
202 |
+
<div id="post-body">
|
203 |
+
|
204 |
+
<div class="inside">
|
205 |
+
<div class="form-wrap">
|
206 |
+
<?php
|
207 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
208 |
+
array(
|
209 |
+
'id' => 'wcf_facebook_pixel_tracking',
|
210 |
+
'name' => '_cartflows_facebook[facebook_pixel_tracking]',
|
211 |
+
'title' => __( 'Enable Facebook Pixel Tracking', 'cartflows' ),
|
212 |
+
'value' => $facebook_settings['facebook_pixel_tracking'],
|
213 |
+
)
|
214 |
+
);
|
215 |
+
|
216 |
+
echo "<div class='wcf-fb-pixel-wrapper'>";
|
217 |
+
|
218 |
+
echo Cartflows_Admin_Fields::text_field(
|
219 |
+
array(
|
220 |
+
'id' => 'wcf_facebook_pixel_id',
|
221 |
+
'name' => '_cartflows_facebook[facebook_pixel_id]',
|
222 |
+
'title' => __( 'Enter Facebook pixel ID', 'cartflows' ),
|
223 |
+
'value' => $facebook_settings['facebook_pixel_id'],
|
224 |
+
)
|
225 |
+
);
|
226 |
+
|
227 |
+
|
228 |
+
echo Cartflows_Admin_Fields::title_field(
|
229 |
+
array(
|
230 |
+
'title' => __( 'Enable Events:', 'cartflows' ),
|
231 |
+
)
|
232 |
+
);
|
233 |
+
|
234 |
+
|
235 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
236 |
+
array(
|
237 |
+
'id' => 'wcf_facebook_pixel_initiate_checkout',
|
238 |
+
'name' => '_cartflows_facebook[facebook_pixel_initiate_checkout]',
|
239 |
+
'title' => __( 'Initiate Checkout', 'cartflows' ),
|
240 |
+
'value' => $facebook_settings['facebook_pixel_initiate_checkout'],
|
241 |
+
)
|
242 |
+
);
|
243 |
+
|
244 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
245 |
+
array(
|
246 |
+
'id' => 'wcf_facebook_pixel_add_payment_info',
|
247 |
+
'name' => '_cartflows_facebook[facebook_pixel_add_payment_info]',
|
248 |
+
'title' => __( 'Add Payment Info', 'cartflows' ),
|
249 |
+
'value' => $facebook_settings['facebook_pixel_add_payment_info'],
|
250 |
+
)
|
251 |
+
);
|
252 |
+
|
253 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
254 |
+
array(
|
255 |
+
'id' => 'wcf_facebook_pixel_purchase_complete',
|
256 |
+
'name' => '_cartflows_facebook[facebook_pixel_purchase_complete]',
|
257 |
+
'title' => __( 'Purchase Complete', 'cartflows' ),
|
258 |
+
'value' => $facebook_settings['facebook_pixel_purchase_complete'],
|
259 |
+
)
|
260 |
+
);
|
261 |
+
|
262 |
+
echo '</div>';
|
263 |
+
|
264 |
+
?>
|
265 |
+
</div>
|
266 |
+
|
267 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-facebook-setting-save-btn button-primary button', 'submit', false ); ?>
|
268 |
+
<?php wp_nonce_field( 'cartflows-facebook-settings', 'cartflows-facebook-settings-nonce' ); ?>
|
269 |
+
</div>
|
270 |
+
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
</form>
|
274 |
+
|
275 |
+
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
<div class="postbox-container" id="postbox-container-1">
|
279 |
+
<div id="side-sortables">
|
280 |
+
|
281 |
+
<div class="postbox">
|
282 |
+
<h2 class="hndle">
|
283 |
+
<span class="dashicons dashicons-book"></span>
|
284 |
+
<span><?php esc_html_e( 'Knowledge Base', 'cartflows' ); ?></span>
|
285 |
+
</h2>
|
286 |
+
<div class="inside">
|
287 |
+
<p>
|
288 |
+
<?php esc_html_e( 'Not sure how something works? Take a peek at the knowledge base and learn.', 'cartflows' ); ?>
|
289 |
+
</p>
|
290 |
+
<p>
|
291 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/docs' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Visit Knowledge Base »', 'cartflows' ); ?></a>
|
292 |
+
</p>
|
293 |
+
</div>
|
294 |
+
</div>
|
295 |
+
|
296 |
+
<div class="postbox">
|
297 |
+
<h2 class="hndle">
|
298 |
+
<span class="dashicons dashicons-groups"></span>
|
299 |
+
<span><?php esc_html_e( 'Community', 'cartflows' ); ?></span>
|
300 |
+
</h2>
|
301 |
+
<div class="inside">
|
302 |
+
<p>
|
303 |
+
<?php esc_html_e( 'Join the community of super helpful CartFlows users. Say hello, ask questions, give feedback and help each other!', 'cartflows' ); ?>
|
304 |
+
</p>
|
305 |
+
<p>
|
306 |
+
<a href="<?php echo esc_url( 'https://www.facebook.com/groups/cartflows/' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Join Our Facebook Group »', 'cartflows' ); ?></a>
|
307 |
+
</p>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
+
|
311 |
+
<div class="postbox">
|
312 |
+
<h2 class="hndle">
|
313 |
+
<span class="dashicons dashicons-sos"></span>
|
314 |
+
<span><?php esc_html_e( 'Five Star Support', 'cartflows' ); ?></span>
|
315 |
+
</h2>
|
316 |
+
<div class="inside">
|
317 |
+
<p>
|
318 |
+
<?php esc_html_e( 'Got a question? Get in touch with CartFlows developers. We\'re happy to help!', 'cartflows' ); ?>
|
319 |
+
</p>
|
320 |
+
<p>
|
321 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/contact' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Submit a Ticket »', 'cartflows' ); ?></a>
|
322 |
+
</p>
|
323 |
+
</div>
|
324 |
+
</div>
|
325 |
+
<?php
|
326 |
+
if ( 'true' == $debug_on ) {
|
327 |
+
?>
|
328 |
+
<div class="postbox">
|
329 |
+
<h2 class="hndle">
|
330 |
+
<span class="dashicons dashicons-editor-code"></span>
|
331 |
+
<span><?php esc_html_e( 'Load Minified CSS', 'cartflows' ); ?></span>
|
332 |
+
</h2>
|
333 |
+
<div class="inside">
|
334 |
+
<form method="post" class="wrap wcf-clear" action="">
|
335 |
+
<p>
|
336 |
+
<?php esc_html_e( 'Load the Minified CSS from here. Just Enable it by checking the below given checkbox.', 'cartflows' ); ?>
|
337 |
+
</p>
|
338 |
+
<?php
|
339 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
340 |
+
array(
|
341 |
+
'id' => 'allow_minified_files',
|
342 |
+
'name' => '_cartflows_debug_data[allow_minified_files]',
|
343 |
+
'title' => __( 'Load minified CSS & JS Files', 'cartflows' ),
|
344 |
+
'value' => $debug_data['allow_minified_files'],
|
345 |
+
)
|
346 |
+
);
|
347 |
+
?>
|
348 |
+
<?php submit_button( __( 'Save', 'cartflows' ), 'button-primary button', 'submit', false ); ?>
|
349 |
+
<?php wp_nonce_field( 'cartflows-debug-settings', 'cartflows-debug-settings-nonce' ); ?>
|
350 |
+
</form>
|
351 |
+
</div>
|
352 |
+
</div>
|
353 |
+
<?php
|
354 |
+
}
|
355 |
+
?>
|
356 |
+
</div>
|
357 |
+
</div>
|
358 |
+
</div>
|
359 |
+
<!-- /post-body -->
|
360 |
+
<br class="clear">
|
361 |
+
</div>
|
362 |
+
</div>
|
363 |
+
<?php endif; ?>
|
364 |
+
|
365 |
+
<?php
|
366 |
+
/**
|
367 |
+
* Loads Zapier settings admin view.
|
368 |
+
*/
|
369 |
+
do_action( 'cartflows_after_general_settings' );
|
370 |
+
?>
|
languages/cartflows.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the CartFlows package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: CartFlows 1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -53,6 +53,7 @@ msgstr ""
|
|
53 |
|
54 |
#: classes/class-cartflows-admin.php:153 classes/class-cartflows-admin.php:154
|
55 |
#: includes/admin/cartflows-general-bck.php:34
|
|
|
56 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:148
|
57 |
msgid "Settings"
|
58 |
msgstr ""
|
@@ -70,22 +71,22 @@ msgid "Flows Library"
|
|
70 |
msgstr ""
|
71 |
|
72 |
#: classes/class-cartflows-admin.php:467
|
73 |
-
#: modules/flow/view/meta-flow-steps.php:
|
74 |
msgid "Ready Templates"
|
75 |
msgstr ""
|
76 |
|
77 |
#: classes/class-cartflows-admin.php:470
|
78 |
-
#: modules/flow/view/meta-flow-steps.php:
|
79 |
msgid "Create Your Own"
|
80 |
msgstr ""
|
81 |
|
82 |
#: classes/class-cartflows-admin.php:481
|
83 |
-
#: modules/flow/view/meta-flow-steps.php:
|
84 |
msgid "Search Sites"
|
85 |
msgstr ""
|
86 |
|
87 |
#: classes/class-cartflows-admin.php:482
|
88 |
-
#: modules/flow/view/meta-flow-steps.php:
|
89 |
msgid "Search Flow..."
|
90 |
msgstr ""
|
91 |
|
@@ -96,7 +97,7 @@ msgstr ""
|
|
96 |
#: classes/class-cartflows-admin.php:500
|
97 |
#: classes/class-cartflows-importer.php:636
|
98 |
#: classes/class-cartflows-importer.php:735
|
99 |
-
#: modules/flow/view/meta-flow-steps.php:
|
100 |
msgid "Learn How"
|
101 |
msgstr ""
|
102 |
|
@@ -109,10 +110,15 @@ msgid "Clone this flow"
|
|
109 |
msgstr ""
|
110 |
|
111 |
#: classes/class-cartflows-cloning.php:423
|
112 |
-
#: modules/flow/view/meta-flow-steps.php:
|
113 |
msgid "Clone"
|
114 |
msgstr ""
|
115 |
|
|
|
|
|
|
|
|
|
|
|
116 |
#: classes/class-cartflows-flow-frontend.php:53
|
117 |
msgid ""
|
118 |
"Test mode is active — which displays random products for previewing. It can "
|
@@ -246,61 +252,61 @@ msgstr ""
|
|
246 |
msgid "Select Step Type"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: classes/class-cartflows-importer.php:
|
250 |
msgid "Import from Cloud"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: classes/class-cartflows-importer.php:
|
254 |
msgid "Sales Landing"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: classes/class-cartflows-importer.php:
|
258 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
259 |
#: modules/flow/view/meta-flow-steps.php:12
|
260 |
msgid "Checkout (Woo)"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: classes/class-cartflows-importer.php:
|
264 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
265 |
#: modules/flow/view/meta-flow-steps.php:13
|
266 |
msgid "Thank You (Woo)"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: classes/class-cartflows-importer.php:
|
270 |
#: modules/flow/classes/class-cartflows-step-post-type.php:237
|
271 |
#: modules/flow/view/meta-flow-steps.php:11
|
272 |
msgid "Landing"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: classes/class-cartflows-importer.php:
|
276 |
msgid "Thank You"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: classes/class-cartflows-importer.php:
|
280 |
#. translators: %s: template ID
|
281 |
msgid "Invalid template id %1$s or post id %2$s."
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: classes/class-cartflows-importer.php:
|
285 |
#. translators: %s: flow ID
|
286 |
msgid "Invalid flow id %1$s OR step type %2$s."
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: classes/class-cartflows-importer.php:
|
290 |
msgid ""
|
291 |
"Elementor is not activated. Please activate plugin Elementor Page Builder "
|
292 |
"to import the step."
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: classes/class-cartflows-importer.php:
|
296 |
msgid "Action failed. Invalid Security Nonce."
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: classes/class-cartflows-importer.php:
|
300 |
msgid "User have not plugin install permissions."
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: classes/class-cartflows-importer.php:
|
304 |
msgid "Plugin Successfully Activated"
|
305 |
msgstr ""
|
306 |
|
@@ -319,25 +325,25 @@ msgstr ""
|
|
319 |
msgid "Select CartFlows Template for this Course"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: classes/class-cartflows-loader.php:
|
323 |
#. translators: %s: html tags
|
324 |
msgid ""
|
325 |
"You are using an older version of %1$sCartFlows Pro%2$s. Please update "
|
326 |
"%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: classes/class-cartflows-loader.php:
|
330 |
#. translators: %s: html tags
|
331 |
msgid ""
|
332 |
"This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
|
333 |
"activated."
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: classes/class-cartflows-loader.php:
|
337 |
msgid "Activate WooCommerce"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: classes/class-cartflows-loader.php:
|
341 |
msgid "Install WooCommerce"
|
342 |
msgstr ""
|
343 |
|
@@ -345,112 +351,55 @@ msgstr ""
|
|
345 |
msgid "Action failed. Please refresh the page and retry."
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: classes/class-cartflows-meta-fields.php:
|
349 |
msgid "Thin 100"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: classes/class-cartflows-meta-fields.php:
|
353 |
msgid "Extra-Light 200"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: classes/class-cartflows-meta-fields.php:
|
357 |
msgid "Light 300"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: classes/class-cartflows-meta-fields.php:
|
361 |
msgid "Normal 400"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: classes/class-cartflows-meta-fields.php:
|
365 |
msgid "Medium 500"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: classes/class-cartflows-meta-fields.php:
|
369 |
msgid "Semi-Bold 600"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: classes/class-cartflows-meta-fields.php:
|
373 |
msgid "Bold 700"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: classes/class-cartflows-meta-fields.php:
|
377 |
msgid "Extra-Bold 800"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: classes/class-cartflows-meta-fields.php:
|
381 |
msgid "Ultra-Bold 900"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: classes/class-cartflows-meta-fields.php:
|
385 |
-
#: classes/class-cartflows-meta-fields.php:
|
386 |
-
#: classes/class-cartflows-meta-fields.php:1426
|
387 |
-
msgid "Remove"
|
388 |
-
msgstr ""
|
389 |
-
|
390 |
-
#: classes/class-cartflows-meta-fields.php:446
|
391 |
-
msgid "Field Width"
|
392 |
-
msgstr ""
|
393 |
-
|
394 |
-
#: classes/class-cartflows-meta-fields.php:450
|
395 |
-
msgid "33%"
|
396 |
-
msgstr ""
|
397 |
-
|
398 |
-
#: classes/class-cartflows-meta-fields.php:451
|
399 |
-
msgid "50%"
|
400 |
-
msgstr ""
|
401 |
-
|
402 |
-
#: classes/class-cartflows-meta-fields.php:452
|
403 |
-
msgid "100%"
|
404 |
-
msgstr ""
|
405 |
-
|
406 |
-
#: classes/class-cartflows-meta-fields.php:463
|
407 |
-
msgid "Field Label"
|
408 |
-
msgstr ""
|
409 |
-
|
410 |
-
#: classes/class-cartflows-meta-fields.php:477
|
411 |
-
msgid "Options"
|
412 |
-
msgstr ""
|
413 |
-
|
414 |
-
#: classes/class-cartflows-meta-fields.php:492
|
415 |
-
#: classes/class-cartflows-meta-fields.php:505
|
416 |
-
#: includes/admin/cartflows-general.php:123
|
417 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:569
|
418 |
-
msgid "Default"
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
-
#: classes/class-cartflows-meta-fields.php:496
|
422 |
-
msgid "Checked"
|
423 |
-
msgstr ""
|
424 |
-
|
425 |
-
#: classes/class-cartflows-meta-fields.php:497
|
426 |
-
msgid "Un-Checked"
|
427 |
-
msgstr ""
|
428 |
-
|
429 |
-
#: classes/class-cartflows-meta-fields.php:518
|
430 |
-
msgid "Placeholder"
|
431 |
-
msgstr ""
|
432 |
-
|
433 |
-
#: classes/class-cartflows-meta-fields.php:530
|
434 |
-
msgid "Required"
|
435 |
-
msgstr ""
|
436 |
-
|
437 |
-
#: classes/class-cartflows-meta-fields.php:542
|
438 |
-
msgid "Enable this field"
|
439 |
-
msgstr ""
|
440 |
-
|
441 |
-
#: classes/class-cartflows-meta-fields.php:562
|
442 |
-
msgid "Label"
|
443 |
-
msgstr ""
|
444 |
-
|
445 |
-
#: classes/class-cartflows-meta-fields.php:999
|
446 |
-
#: classes/class-cartflows-meta-fields.php:1418
|
447 |
msgid "Search for a product…"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: classes/class-cartflows-meta-fields.php:
|
451 |
msgid "Search for a coupon…"
|
452 |
msgstr ""
|
453 |
|
|
|
|
|
|
|
|
|
454 |
#: classes/class-cartflows-meta.php:34
|
455 |
msgid "Update"
|
456 |
msgstr ""
|
@@ -463,6 +412,7 @@ msgstr ""
|
|
463 |
#: classes/class-cartflows-meta.php:63
|
464 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:192
|
465 |
#: modules/landing/classes/class-cartflows-landing-meta.php:136
|
|
|
466 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:154
|
467 |
msgid "Custom Script"
|
468 |
msgstr ""
|
@@ -694,7 +644,7 @@ msgstr ""
|
|
694 |
|
695 |
#: includes/admin/cartflows-error-log.php:41
|
696 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:225
|
697 |
-
#: modules/flow/view/meta-flow-steps.php:
|
698 |
msgid "View"
|
699 |
msgstr ""
|
700 |
|
@@ -728,7 +678,7 @@ msgid "Disallow search engines from indexing flows"
|
|
728 |
msgstr ""
|
729 |
|
730 |
#: includes/admin/cartflows-general.php:75
|
731 |
-
#: modules/flow/view/meta-flow-steps.php:
|
732 |
msgid "Global Checkout"
|
733 |
msgstr ""
|
734 |
|
@@ -758,6 +708,12 @@ msgstr ""
|
|
758 |
msgid "Permalink Settings"
|
759 |
msgstr ""
|
760 |
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
#: includes/admin/cartflows-general.php:129
|
762 |
msgid "Flow and Step Slug"
|
763 |
msgstr ""
|
@@ -893,6 +849,7 @@ msgid "Import"
|
|
893 |
msgstr ""
|
894 |
|
895 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:254
|
|
|
896 |
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:88
|
897 |
msgid ""
|
898 |
"WooCommerce functions do not exist. If you are in an IFrame, please reload "
|
@@ -900,6 +857,7 @@ msgid ""
|
|
900 |
msgstr ""
|
901 |
|
902 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:255
|
|
|
903 |
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:89
|
904 |
msgid "Click Here to Reload"
|
905 |
msgstr ""
|
@@ -911,6 +869,7 @@ msgstr ""
|
|
911 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:336
|
912 |
#: modules/checkout/templates/embed/checkout-template-simple.php:25
|
913 |
#: modules/checkout/templates/wcf-template.php:36
|
|
|
914 |
msgid "Your cart is currently empty."
|
915 |
msgstr ""
|
916 |
|
@@ -960,11 +919,13 @@ msgstr ""
|
|
960 |
|
961 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:150
|
962 |
#: modules/landing/classes/class-cartflows-landing-meta.php:130
|
|
|
963 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:130
|
964 |
msgid "Shortcodes"
|
965 |
msgstr ""
|
966 |
|
967 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:156
|
|
|
968 |
msgid "Select Product"
|
969 |
msgstr ""
|
970 |
|
@@ -1013,206 +974,257 @@ msgstr ""
|
|
1013 |
msgid "Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
#. translators: %s: link
|
1018 |
msgid "Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature."
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1022 |
#. translators: %s: link
|
1023 |
msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1027 |
msgid "Place Order Button Text"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1031 |
msgid "Place order"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1035 |
msgid "It will change the Place Order Button text on checkout page."
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1039 |
msgid "Enable cart editing on checkout"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1043 |
#. translators: %s: link
|
1044 |
msgid "Users will able to remove products from the checkout page."
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1048 |
msgid "One Column (Available in CartFlows Pro) "
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1052 |
msgid "Two Step (Available in CartFlows Pro) "
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1056 |
msgid "Checkout Skin"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1060 |
msgid "One Column"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1064 |
msgid "Two Column"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1068 |
msgid "Two Step"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1072 |
msgid "Primary Color"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1076 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1077 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1078 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
|
|
1079 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:209
|
1080 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1081 |
msgid "Font Family"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1085 |
msgid "Advance Options"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1089 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1090 |
msgid "Heading"
|
1091 |
msgstr ""
|
1092 |
|
1093 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1094 |
msgid "Heading Color"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1098 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1099 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1100 |
-
#: modules/
|
|
|
|
|
1101 |
msgid "Font Weight"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1105 |
msgid "Input Fields"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1109 |
msgid "Floating Labels (Available in CartFlows Pro)"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1113 |
msgid "Style"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1117 |
msgid "Floating Labels"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1121 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1122 |
msgid "Size"
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1126 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1127 |
msgid "Extra Small"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1131 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1132 |
msgid "Small"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1136 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1137 |
msgid "Medium"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1141 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1142 |
msgid "Large"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1146 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1147 |
msgid "Extra Large"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1151 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1152 |
msgid "Custom"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1156 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1157 |
msgid "Top Bottom Spacing"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1161 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1162 |
msgid "Left Right Spacing"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1166 |
msgid "Text / Placeholder Color"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1170 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1171 |
msgid "Background Color"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1175 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
|
|
1176 |
msgid "Border Color"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1180 |
msgid "Label Color"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1184 |
msgid "Buttons"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1188 |
msgid "Text Color"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1192 |
msgid "Text Hover Color"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1196 |
msgid "Background Hover Color"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
|
|
1200 |
msgid "Border Hover Color"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1204 |
msgid "Sections"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1208 |
msgid "Highlight Area Background Color"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1212 |
msgid "Header Logo"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1216 |
msgid "Logo Width (In px)"
|
1217 |
msgstr ""
|
1218 |
|
@@ -1295,7 +1307,7 @@ msgid ""
|
|
1295 |
msgstr ""
|
1296 |
|
1297 |
#: modules/flow/classes/class-cartflows-flow-meta.php:769
|
1298 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1299 |
msgid "Add New Step"
|
1300 |
msgstr ""
|
1301 |
|
@@ -1352,57 +1364,57 @@ msgstr ""
|
|
1352 |
|
1353 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:354
|
1354 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:360
|
1355 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1356 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1357 |
#. translators: %s: singular custom post type name
|
1358 |
msgid "%s updated."
|
1359 |
msgstr ""
|
1360 |
|
1361 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:356
|
1362 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1363 |
#. translators: %s: singular custom post type name
|
1364 |
msgid "Custom %s updated."
|
1365 |
msgstr ""
|
1366 |
|
1367 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:358
|
1368 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1369 |
#. translators: %s: singular custom post type name
|
1370 |
msgid "Custom %s deleted."
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:362
|
1374 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1375 |
#. translators: %1$s: singular custom post type name ,%2$s: date and time of
|
1376 |
#. the revision
|
1377 |
msgid "%1$s restored to revision from %2$s"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:364
|
1381 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1382 |
#. translators: %s: singular custom post type name
|
1383 |
msgid "%s published."
|
1384 |
msgstr ""
|
1385 |
|
1386 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:366
|
1387 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1388 |
#. translators: %s: singular custom post type name
|
1389 |
msgid "%s saved."
|
1390 |
msgstr ""
|
1391 |
|
1392 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:368
|
1393 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1394 |
#. translators: %s: singular custom post type name
|
1395 |
msgid "%s submitted."
|
1396 |
msgstr ""
|
1397 |
|
1398 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:370
|
1399 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1400 |
#. translators: %s: singular custom post type name
|
1401 |
msgid "%s scheduled for."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:372
|
1405 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1406 |
#. translators: %s: singular custom post type name
|
1407 |
msgid "%s draft updated."
|
1408 |
msgstr ""
|
@@ -1421,12 +1433,12 @@ msgid "All Steps"
|
|
1421 |
msgstr ""
|
1422 |
|
1423 |
#: modules/flow/classes/class-cartflows-step-post-type.php:164
|
1424 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1425 |
msgid "Edit Step"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
#: modules/flow/classes/class-cartflows-step-post-type.php:165
|
1429 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1430 |
msgid "View Step"
|
1431 |
msgstr ""
|
1432 |
|
@@ -1446,49 +1458,54 @@ msgstr ""
|
|
1446 |
msgid "Step Flow"
|
1447 |
msgstr ""
|
1448 |
|
1449 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
|
|
|
|
|
|
|
|
|
|
1450 |
#: modules/flow/view/meta-flow-steps.php:14
|
1451 |
msgid "Upsell (Woo)"
|
1452 |
msgstr ""
|
1453 |
|
1454 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1455 |
#: modules/flow/view/meta-flow-steps.php:15
|
1456 |
msgid "Downsell (Woo)"
|
1457 |
msgstr ""
|
1458 |
|
1459 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1460 |
msgid "No Product Assigned"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1464 |
msgid "Global Checkout - Remove selected checkout product"
|
1465 |
msgstr ""
|
1466 |
|
1467 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1468 |
msgid "Edit"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1472 |
msgid "Clone Step"
|
1473 |
msgstr ""
|
1474 |
|
1475 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1476 |
msgid "Delete Step"
|
1477 |
msgstr ""
|
1478 |
|
1479 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1480 |
msgid "Delete"
|
1481 |
msgstr ""
|
1482 |
|
1483 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1484 |
msgid "Steps Library"
|
1485 |
msgstr ""
|
1486 |
|
1487 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1488 |
msgid "Create Step"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
-
#: modules/flow/view/meta-flow-steps.php:
|
1492 |
msgid "You need a Cartflows Pro version to import Upsell / Downsell"
|
1493 |
msgstr ""
|
1494 |
|
@@ -1500,14 +1517,117 @@ msgstr ""
|
|
1500 |
msgid "Next Step Link"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
-
#: modules/
|
1504 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1505 |
msgstr ""
|
1506 |
|
|
|
1507 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:136
|
1508 |
msgid "Design"
|
1509 |
msgstr ""
|
1510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:142
|
1512 |
msgid "Edit Fields"
|
1513 |
msgstr ""
|
@@ -1521,47 +1641,47 @@ msgid "Text"
|
|
1521 |
msgstr ""
|
1522 |
|
1523 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:200
|
1524 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1525 |
msgid "Color"
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1529 |
msgid "Advanced Options"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1533 |
msgid "Container Width (In px)"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1537 |
msgid "Section Background Color"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1541 |
msgid "Enable Order Overview "
|
1542 |
msgstr ""
|
1543 |
|
1544 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1545 |
msgid "Enable Order Details "
|
1546 |
msgstr ""
|
1547 |
|
1548 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1549 |
msgid "Enable Billing Details "
|
1550 |
msgstr ""
|
1551 |
|
1552 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1553 |
msgid "Enable Shipping Details "
|
1554 |
msgstr ""
|
1555 |
|
1556 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1557 |
msgid "Redirect After Purchase"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1561 |
msgid "Redirect Link"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
-
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:
|
1565 |
msgid "https://"
|
1566 |
msgstr ""
|
1567 |
|
@@ -1816,12 +1936,12 @@ msgctxt "flow step singular name"
|
|
1816 |
msgid "Step"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1820 |
msgctxt "cartflows"
|
1821 |
msgid "CartFlows — Boxed"
|
1822 |
msgstr ""
|
1823 |
|
1824 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1825 |
msgctxt "cartflows"
|
1826 |
msgid "Template for Page Builders"
|
1827 |
msgstr ""
|
2 |
# This file is distributed under the same license as the CartFlows package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: CartFlows 1.4.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
+
"POT-Creation-Date: 2020-02-11 07:35:02+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
53 |
|
54 |
#: classes/class-cartflows-admin.php:153 classes/class-cartflows-admin.php:154
|
55 |
#: includes/admin/cartflows-general-bck.php:34
|
56 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:150
|
57 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:148
|
58 |
msgid "Settings"
|
59 |
msgstr ""
|
71 |
msgstr ""
|
72 |
|
73 |
#: classes/class-cartflows-admin.php:467
|
74 |
+
#: modules/flow/view/meta-flow-steps.php:156
|
75 |
msgid "Ready Templates"
|
76 |
msgstr ""
|
77 |
|
78 |
#: classes/class-cartflows-admin.php:470
|
79 |
+
#: modules/flow/view/meta-flow-steps.php:159
|
80 |
msgid "Create Your Own"
|
81 |
msgstr ""
|
82 |
|
83 |
#: classes/class-cartflows-admin.php:481
|
84 |
+
#: modules/flow/view/meta-flow-steps.php:171
|
85 |
msgid "Search Sites"
|
86 |
msgstr ""
|
87 |
|
88 |
#: classes/class-cartflows-admin.php:482
|
89 |
+
#: modules/flow/view/meta-flow-steps.php:172
|
90 |
msgid "Search Flow..."
|
91 |
msgstr ""
|
92 |
|
97 |
#: classes/class-cartflows-admin.php:500
|
98 |
#: classes/class-cartflows-importer.php:636
|
99 |
#: classes/class-cartflows-importer.php:735
|
100 |
+
#: modules/flow/view/meta-flow-steps.php:202
|
101 |
msgid "Learn How"
|
102 |
msgstr ""
|
103 |
|
110 |
msgstr ""
|
111 |
|
112 |
#: classes/class-cartflows-cloning.php:423
|
113 |
+
#: modules/flow/view/meta-flow-steps.php:115
|
114 |
msgid "Clone"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: classes/class-cartflows-default-meta.php:710
|
118 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:487
|
119 |
+
msgid "Submit"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
#: classes/class-cartflows-flow-frontend.php:53
|
123 |
msgid ""
|
124 |
"Test mode is active — which displays random products for previewing. It can "
|
252 |
msgid "Select Step Type"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: classes/class-cartflows-importer.php:930
|
256 |
msgid "Import from Cloud"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: classes/class-cartflows-importer.php:1244
|
260 |
msgid "Sales Landing"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: classes/class-cartflows-importer.php:1248
|
264 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:251
|
265 |
#: modules/flow/view/meta-flow-steps.php:12
|
266 |
msgid "Checkout (Woo)"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: classes/class-cartflows-importer.php:1252
|
270 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:258
|
271 |
#: modules/flow/view/meta-flow-steps.php:13
|
272 |
msgid "Thank You (Woo)"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: classes/class-cartflows-importer.php:1260
|
276 |
#: modules/flow/classes/class-cartflows-step-post-type.php:237
|
277 |
#: modules/flow/view/meta-flow-steps.php:11
|
278 |
msgid "Landing"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: classes/class-cartflows-importer.php:1264
|
282 |
msgid "Thank You"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: classes/class-cartflows-importer.php:1366
|
286 |
#. translators: %s: template ID
|
287 |
msgid "Invalid template id %1$s or post id %2$s."
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: classes/class-cartflows-importer.php:1424
|
291 |
#. translators: %s: flow ID
|
292 |
msgid "Invalid flow id %1$s OR step type %2$s."
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: classes/class-cartflows-importer.php:1549
|
296 |
msgid ""
|
297 |
"Elementor is not activated. Please activate plugin Elementor Page Builder "
|
298 |
"to import the step."
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: classes/class-cartflows-importer.php:1652
|
302 |
msgid "Action failed. Invalid Security Nonce."
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: classes/class-cartflows-importer.php:1659
|
306 |
msgid "User have not plugin install permissions."
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: classes/class-cartflows-importer.php:1681
|
310 |
msgid "Plugin Successfully Activated"
|
311 |
msgstr ""
|
312 |
|
325 |
msgid "Select CartFlows Template for this Course"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: classes/class-cartflows-loader.php:215
|
329 |
#. translators: %s: html tags
|
330 |
msgid ""
|
331 |
"You are using an older version of %1$sCartFlows Pro%2$s. Please update "
|
332 |
"%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: classes/class-cartflows-loader.php:452
|
336 |
#. translators: %s: html tags
|
337 |
msgid ""
|
338 |
"This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
|
339 |
"activated."
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: classes/class-cartflows-loader.php:462
|
343 |
msgid "Activate WooCommerce"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: classes/class-cartflows-loader.php:470
|
347 |
msgid "Install WooCommerce"
|
348 |
msgstr ""
|
349 |
|
351 |
msgid "Action failed. Please refresh the page and retry."
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: classes/class-cartflows-meta-fields.php:80
|
355 |
msgid "Thin 100"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: classes/class-cartflows-meta-fields.php:81
|
359 |
msgid "Extra-Light 200"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: classes/class-cartflows-meta-fields.php:82
|
363 |
msgid "Light 300"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: classes/class-cartflows-meta-fields.php:83
|
367 |
msgid "Normal 400"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: classes/class-cartflows-meta-fields.php:84
|
371 |
msgid "Medium 500"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: classes/class-cartflows-meta-fields.php:85
|
375 |
msgid "Semi-Bold 600"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: classes/class-cartflows-meta-fields.php:86
|
379 |
msgid "Bold 700"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: classes/class-cartflows-meta-fields.php:87
|
383 |
msgid "Extra-Bold 800"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: classes/class-cartflows-meta-fields.php:88
|
387 |
msgid "Ultra-Bold 900"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: classes/class-cartflows-meta-fields.php:551
|
391 |
+
#: classes/class-cartflows-meta-fields.php:746
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
msgid "Search for a product…"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: classes/class-cartflows-meta-fields.php:592
|
396 |
msgid "Search for a coupon…"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: classes/class-cartflows-meta-fields.php:754
|
400 |
+
msgid "Remove"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
#: classes/class-cartflows-meta.php:34
|
404 |
msgid "Update"
|
405 |
msgstr ""
|
412 |
#: classes/class-cartflows-meta.php:63
|
413 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:192
|
414 |
#: modules/landing/classes/class-cartflows-landing-meta.php:136
|
415 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:156
|
416 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:154
|
417 |
msgid "Custom Script"
|
418 |
msgstr ""
|
644 |
|
645 |
#: includes/admin/cartflows-error-log.php:41
|
646 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:225
|
647 |
+
#: modules/flow/view/meta-flow-steps.php:104
|
648 |
msgid "View"
|
649 |
msgstr ""
|
650 |
|
678 |
msgstr ""
|
679 |
|
680 |
#: includes/admin/cartflows-general.php:75
|
681 |
+
#: modules/flow/view/meta-flow-steps.php:93
|
682 |
msgid "Global Checkout"
|
683 |
msgstr ""
|
684 |
|
708 |
msgid "Permalink Settings"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/admin/cartflows-general.php:123
|
712 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:603
|
713 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:380
|
714 |
+
msgid "Default"
|
715 |
+
msgstr ""
|
716 |
+
|
717 |
#: includes/admin/cartflows-general.php:129
|
718 |
msgid "Flow and Step Slug"
|
719 |
msgstr ""
|
849 |
msgstr ""
|
850 |
|
851 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:254
|
852 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:146
|
853 |
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:88
|
854 |
msgid ""
|
855 |
"WooCommerce functions do not exist. If you are in an IFrame, please reload "
|
857 |
msgstr ""
|
858 |
|
859 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:255
|
860 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:147
|
861 |
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:89
|
862 |
msgid "Click Here to Reload"
|
863 |
msgstr ""
|
869 |
#: modules/checkout/classes/class-cartflows-checkout-markup.php:336
|
870 |
#: modules/checkout/templates/embed/checkout-template-simple.php:25
|
871 |
#: modules/checkout/templates/wcf-template.php:36
|
872 |
+
#: modules/optin/templates/optin-template-simple.php:25
|
873 |
msgid "Your cart is currently empty."
|
874 |
msgstr ""
|
875 |
|
919 |
|
920 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:150
|
921 |
#: modules/landing/classes/class-cartflows-landing-meta.php:130
|
922 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:126
|
923 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:130
|
924 |
msgid "Shortcodes"
|
925 |
msgstr ""
|
926 |
|
927 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:156
|
928 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:132
|
929 |
msgid "Select Product"
|
930 |
msgstr ""
|
931 |
|
974 |
msgid "Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature"
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:365
|
978 |
+
#. translators: %s: link
|
979 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature"
|
980 |
+
msgstr ""
|
981 |
+
|
982 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:375
|
983 |
+
#. translators: %s: link
|
984 |
+
msgid ""
|
985 |
+
"Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab "
|
986 |
+
"feature"
|
987 |
+
msgstr ""
|
988 |
+
|
989 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:398
|
990 |
#. translators: %s: link
|
991 |
msgid "Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature."
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:425
|
995 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:267
|
996 |
#. translators: %s: link
|
997 |
msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:448
|
1001 |
msgid "Place Order Button Text"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:452
|
1005 |
msgid "Place order"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:454
|
1009 |
msgid "It will change the Place Order Button text on checkout page."
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:464
|
1013 |
msgid "Enable cart editing on checkout"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:472
|
1017 |
#. translators: %s: link
|
1018 |
msgid "Users will able to remove products from the checkout page."
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:502
|
1022 |
msgid "One Column (Available in CartFlows Pro) "
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:503
|
1026 |
msgid "Two Step (Available in CartFlows Pro) "
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:509
|
1030 |
msgid "Checkout Skin"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:513
|
1034 |
msgid "One Column"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:514
|
1038 |
msgid "Two Column"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:515
|
1042 |
msgid "Two Step"
|
1043 |
msgstr ""
|
1044 |
|
1045 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:524
|
1046 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:343
|
1047 |
msgid "Primary Color"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:533
|
1051 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:568
|
1052 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:614
|
1053 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:706
|
1054 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:352
|
1055 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:391
|
1056 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:503
|
1057 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:209
|
1058 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:240
|
1059 |
msgid "Font Family"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:541
|
1063 |
msgid "Advance Options"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:553
|
1067 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:225
|
1068 |
msgid "Heading"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:559
|
1072 |
msgid "Heading Color"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:577
|
1076 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:623
|
1077 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:715
|
1078 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:400
|
1079 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:512
|
1080 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:249
|
1081 |
msgid "Font Weight"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:585
|
1085 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:363
|
1086 |
msgid "Input Fields"
|
1087 |
msgstr ""
|
1088 |
|
1089 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:593
|
1090 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:370
|
1091 |
msgid "Floating Labels (Available in CartFlows Pro)"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:599
|
1095 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:376
|
1096 |
msgid "Style"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:604
|
1100 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:381
|
1101 |
msgid "Floating Labels"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:631
|
1105 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:723
|
1106 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:408
|
1107 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:520
|
1108 |
msgid "Size"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:635
|
1112 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:727
|
1113 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:412
|
1114 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:524
|
1115 |
msgid "Extra Small"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:636
|
1119 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:728
|
1120 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:413
|
1121 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:525
|
1122 |
msgid "Small"
|
1123 |
msgstr ""
|
1124 |
|
1125 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:637
|
1126 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:729
|
1127 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:414
|
1128 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:526
|
1129 |
msgid "Medium"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:638
|
1133 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:730
|
1134 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:415
|
1135 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:527
|
1136 |
msgid "Large"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:639
|
1140 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:731
|
1141 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:416
|
1142 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:528
|
1143 |
msgid "Extra Large"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:640
|
1147 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:732
|
1148 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:417
|
1149 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:529
|
1150 |
msgid "Custom"
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:647
|
1154 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:739
|
1155 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:424
|
1156 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:536
|
1157 |
msgid "Top Bottom Spacing"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:655
|
1161 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:747
|
1162 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:432
|
1163 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:544
|
1164 |
msgid "Left Right Spacing"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:663
|
1168 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:448
|
1169 |
msgid "Text / Placeholder Color"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:671
|
1173 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:771
|
1174 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:456
|
1175 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:581
|
1176 |
msgid "Background Color"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:679
|
1180 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:787
|
1181 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:464
|
1182 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:597
|
1183 |
msgid "Border Color"
|
1184 |
msgstr ""
|
1185 |
|
1186 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:686
|
1187 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:440
|
1188 |
msgid "Label Color"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:699
|
1192 |
msgid "Buttons"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:755
|
1196 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:565
|
1197 |
msgid "Text Color"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:763
|
1201 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:573
|
1202 |
msgid "Text Hover Color"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:779
|
1206 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:589
|
1207 |
msgid "Background Hover Color"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:795
|
1211 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:605
|
1212 |
msgid "Border Hover Color"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:808
|
1216 |
msgid "Sections"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:814
|
1220 |
msgid "Highlight Area Background Color"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:853
|
1224 |
msgid "Header Logo"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:861
|
1228 |
msgid "Logo Width (In px)"
|
1229 |
msgstr ""
|
1230 |
|
1307 |
msgstr ""
|
1308 |
|
1309 |
#: modules/flow/classes/class-cartflows-flow-meta.php:769
|
1310 |
+
#: modules/flow/view/meta-flow-steps.php:133
|
1311 |
msgid "Add New Step"
|
1312 |
msgstr ""
|
1313 |
|
1364 |
|
1365 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:354
|
1366 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:360
|
1367 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:397
|
1368 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:403
|
1369 |
#. translators: %s: singular custom post type name
|
1370 |
msgid "%s updated."
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:356
|
1374 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:399
|
1375 |
#. translators: %s: singular custom post type name
|
1376 |
msgid "Custom %s updated."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:358
|
1380 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:401
|
1381 |
#. translators: %s: singular custom post type name
|
1382 |
msgid "Custom %s deleted."
|
1383 |
msgstr ""
|
1384 |
|
1385 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:362
|
1386 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:405
|
1387 |
#. translators: %1$s: singular custom post type name ,%2$s: date and time of
|
1388 |
#. the revision
|
1389 |
msgid "%1$s restored to revision from %2$s"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:364
|
1393 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:407
|
1394 |
#. translators: %s: singular custom post type name
|
1395 |
msgid "%s published."
|
1396 |
msgstr ""
|
1397 |
|
1398 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:366
|
1399 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:409
|
1400 |
#. translators: %s: singular custom post type name
|
1401 |
msgid "%s saved."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:368
|
1405 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:411
|
1406 |
#. translators: %s: singular custom post type name
|
1407 |
msgid "%s submitted."
|
1408 |
msgstr ""
|
1409 |
|
1410 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:370
|
1411 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:413
|
1412 |
#. translators: %s: singular custom post type name
|
1413 |
msgid "%s scheduled for."
|
1414 |
msgstr ""
|
1415 |
|
1416 |
#: modules/flow/classes/class-cartflows-flow-post-type.php:372
|
1417 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:415
|
1418 |
#. translators: %s: singular custom post type name
|
1419 |
msgid "%s draft updated."
|
1420 |
msgstr ""
|
1433 |
msgstr ""
|
1434 |
|
1435 |
#: modules/flow/classes/class-cartflows-step-post-type.php:164
|
1436 |
+
#: modules/flow/view/meta-flow-steps.php:106
|
1437 |
msgid "Edit Step"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
#: modules/flow/classes/class-cartflows-step-post-type.php:165
|
1441 |
+
#: modules/flow/view/meta-flow-steps.php:102
|
1442 |
msgid "View Step"
|
1443 |
msgstr ""
|
1444 |
|
1458 |
msgid "Step Flow"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:244
|
1462 |
+
#: modules/flow/view/meta-flow-steps.php:16
|
1463 |
+
msgid "Optin (Woo)"
|
1464 |
+
msgstr ""
|
1465 |
+
|
1466 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:265
|
1467 |
#: modules/flow/view/meta-flow-steps.php:14
|
1468 |
msgid "Upsell (Woo)"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:272
|
1472 |
#: modules/flow/view/meta-flow-steps.php:15
|
1473 |
msgid "Downsell (Woo)"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: modules/flow/view/meta-flow-steps.php:85
|
1477 |
msgid "No Product Assigned"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: modules/flow/view/meta-flow-steps.php:89
|
1481 |
msgid "Global Checkout - Remove selected checkout product"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: modules/flow/view/meta-flow-steps.php:108
|
1485 |
msgid "Edit"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
+
#: modules/flow/view/meta-flow-steps.php:113
|
1489 |
msgid "Clone Step"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
+
#: modules/flow/view/meta-flow-steps.php:118
|
1493 |
msgid "Delete Step"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
+
#: modules/flow/view/meta-flow-steps.php:120
|
1497 |
msgid "Delete"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: modules/flow/view/meta-flow-steps.php:149
|
1501 |
msgid "Steps Library"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: modules/flow/view/meta-flow-steps.php:198
|
1505 |
msgid "Create Step"
|
1506 |
msgstr ""
|
1507 |
|
1508 |
+
#: modules/flow/view/meta-flow-steps.php:200
|
1509 |
msgid "You need a Cartflows Pro version to import Upsell / Downsell"
|
1510 |
msgstr ""
|
1511 |
|
1517 |
msgid "Next Step Link"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:165
|
1521 |
+
msgid "Please place shortcode on Optin step-type only."
|
1522 |
+
msgstr ""
|
1523 |
+
|
1524 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:225
|
1525 |
+
msgid ""
|
1526 |
+
"No product is selected. Please select a Simple, Virtual and Free product "
|
1527 |
+
"from the meta settings."
|
1528 |
+
msgstr ""
|
1529 |
+
|
1530 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:242
|
1531 |
+
msgid "Please update the selected product's price to zero (0)."
|
1532 |
+
msgstr ""
|
1533 |
+
|
1534 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:251
|
1535 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:255
|
1536 |
+
msgid "Please select a Simple, Virtual and Free product."
|
1537 |
+
msgstr ""
|
1538 |
+
|
1539 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:65
|
1540 |
+
msgid "Optin Settings"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:138
|
1544 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:136
|
1545 |
msgid "Design"
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:144
|
1549 |
+
msgid "Form Fields"
|
1550 |
+
msgstr ""
|
1551 |
+
|
1552 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:213
|
1553 |
+
msgid "Add this shortcode to your optin page"
|
1554 |
+
msgstr ""
|
1555 |
+
|
1556 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:238
|
1557 |
+
msgid "Select Free Product"
|
1558 |
+
msgstr ""
|
1559 |
+
|
1560 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:239
|
1561 |
+
msgid "Select Free and Virtual product only."
|
1562 |
+
msgstr ""
|
1563 |
+
|
1564 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:290
|
1565 |
+
msgid "Pass Fields as URL Parameters"
|
1566 |
+
msgstr ""
|
1567 |
+
|
1568 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:293
|
1569 |
+
msgid "Enable"
|
1570 |
+
msgstr ""
|
1571 |
+
|
1572 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:294
|
1573 |
+
msgid ""
|
1574 |
+
"You can pass specific fields from the form to next step as URL query "
|
1575 |
+
"parameters."
|
1576 |
+
msgstr ""
|
1577 |
+
|
1578 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:305
|
1579 |
+
msgid "Enter form field"
|
1580 |
+
msgstr ""
|
1581 |
+
|
1582 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:308
|
1583 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:318
|
1584 |
+
msgid "Enter comma seprated field name. E.g. first_name, last_name"
|
1585 |
+
msgstr ""
|
1586 |
+
|
1587 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:310
|
1588 |
+
msgid "Fields to pass, separated by commas"
|
1589 |
+
msgstr ""
|
1590 |
+
|
1591 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:320
|
1592 |
+
#. translators: %s: link
|
1593 |
+
msgid ""
|
1594 |
+
"You can pass field value as a URL parameter to the next step. %1$sClick "
|
1595 |
+
"here%2$s for more information."
|
1596 |
+
msgstr ""
|
1597 |
+
|
1598 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:477
|
1599 |
+
msgid "Submit Button"
|
1600 |
+
msgstr ""
|
1601 |
+
|
1602 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:483
|
1603 |
+
msgid "Button Text"
|
1604 |
+
msgstr ""
|
1605 |
+
|
1606 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:494
|
1607 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:217
|
1608 |
+
msgid "Font Size"
|
1609 |
+
msgstr ""
|
1610 |
+
|
1611 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:552
|
1612 |
+
msgid "Position"
|
1613 |
+
msgstr ""
|
1614 |
+
|
1615 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:556
|
1616 |
+
msgid "Left"
|
1617 |
+
msgstr ""
|
1618 |
+
|
1619 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:557
|
1620 |
+
msgid "Center"
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:558
|
1624 |
+
msgid "Right"
|
1625 |
+
msgstr ""
|
1626 |
+
|
1627 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:65
|
1628 |
+
msgid "Thank You Page Settings"
|
1629 |
+
msgstr ""
|
1630 |
+
|
1631 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:142
|
1632 |
msgid "Edit Fields"
|
1633 |
msgstr ""
|
1641 |
msgstr ""
|
1642 |
|
1643 |
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:200
|
1644 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:231
|
1645 |
msgid "Color"
|
1646 |
msgstr ""
|
1647 |
|
1648 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:257
|
1649 |
msgid "Advanced Options"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:267
|
1653 |
msgid "Container Width (In px)"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:275
|
1657 |
msgid "Section Background Color"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:289
|
1661 |
msgid "Enable Order Overview "
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:297
|
1665 |
msgid "Enable Order Details "
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:305
|
1669 |
msgid "Enable Billing Details "
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:313
|
1673 |
msgid "Enable Shipping Details "
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:329
|
1677 |
msgid "Redirect After Purchase"
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:338
|
1681 |
msgid "Redirect Link"
|
1682 |
msgstr ""
|
1683 |
|
1684 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:342
|
1685 |
msgid "https://"
|
1686 |
msgstr ""
|
1687 |
|
1936 |
msgid "Step"
|
1937 |
msgstr ""
|
1938 |
|
1939 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:313
|
1940 |
msgctxt "cartflows"
|
1941 |
msgid "CartFlows — Boxed"
|
1942 |
msgstr ""
|
1943 |
|
1944 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:314
|
1945 |
msgctxt "cartflows"
|
1946 |
msgid "Template for Page Builders"
|
1947 |
msgstr ""
|
modules/checkout/classes/class-cartflows-checkout-markup.php
CHANGED
@@ -1,1300 +1,1300 @@
|
|
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_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Modify WooCommerce paypal arguments.
|
84 |
-
*
|
85 |
-
* @param array $args argumenets for payment.
|
86 |
-
* @param WC_Order $order order data.
|
87 |
-
* @return array
|
88 |
-
*/
|
89 |
-
public function modify_paypal_args( $args, $order ) {
|
90 |
-
|
91 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
92 |
-
|
93 |
-
if ( ! $checkout_id ) {
|
94 |
-
return $args;
|
95 |
-
}
|
96 |
-
|
97 |
-
// Set cancel return URL.
|
98 |
-
$args['cancel_return'] = esc_url_raw( $order->get_cancel_order_url_raw( get_permalink( $checkout_id ) ) );
|
99 |
-
|
100 |
-
return $args;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Modify WooCommerce paypal arguments.
|
105 |
-
*
|
106 |
-
* @param string $product_name product name.
|
107 |
-
* @param object $cart_item cart item.
|
108 |
-
* @param string $cart_item_key cart item key.
|
109 |
-
* @return string
|
110 |
-
*/
|
111 |
-
public function wcf_add_remove_label( $product_name, $cart_item, $cart_item_key ) {
|
112 |
-
|
113 |
-
$checkout_id = get_the_ID();
|
114 |
-
if ( ! $checkout_id ) {
|
115 |
-
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? wp_unslash( $_POST['option']['checkout_id'] ) : '';//phpcs:ignore
|
116 |
-
}
|
117 |
-
|
118 |
-
if ( ! empty( $checkout_id ) ) {
|
119 |
-
$is_remove_product_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-remove-product-field' );
|
120 |
-
if ( 'checkout' === get_post_meta( $checkout_id, 'wcf-step-type', true ) && ( 'yes' === $is_remove_product_option ) ) {
|
121 |
-
$remove_label = apply_filters(
|
122 |
-
'woocommerce_cart_item_remove_link',
|
123 |
-
sprintf(
|
124 |
-
'<a href="#" rel="nofollow" class="remove cartflows-icon-close" data-id="%s" data-item-key="%s" ></a>',
|
125 |
-
esc_attr( $cart_item['product_id'] ),
|
126 |
-
$cart_item_key
|
127 |
-
),
|
128 |
-
$cart_item_key
|
129 |
-
);
|
130 |
-
|
131 |
-
$product_name = $remove_label . $product_name;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
return $product_name;
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Change order button text .
|
141 |
-
*
|
142 |
-
* @param string $woo_button_text place order.
|
143 |
-
* @return string
|
144 |
-
*/
|
145 |
-
public function place_order_button_text( $woo_button_text ) {
|
146 |
-
|
147 |
-
$checkout_id = get_the_ID();
|
148 |
-
if ( ! $checkout_id ) {
|
149 |
-
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? intval( $_POST['option']['checkout_id'] ) : 0; //phpcs:ignore
|
150 |
-
}
|
151 |
-
|
152 |
-
$wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
|
153 |
-
|
154 |
-
if ( ! empty( $wcf_order_button_text ) ) {
|
155 |
-
$woo_button_text = $wcf_order_button_text;
|
156 |
-
}
|
157 |
-
|
158 |
-
return $woo_button_text;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Display all WooCommerce notices.
|
163 |
-
*
|
164 |
-
* @since 1.1.5
|
165 |
-
*/
|
166 |
-
public function display_woo_notices() {
|
167 |
-
|
168 |
-
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
169 |
-
woocommerce_output_all_notices();
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Redirect from default to the global checkout page
|
176 |
-
*
|
177 |
-
* @since 1.0.0
|
178 |
-
*/
|
179 |
-
public function global_checkout_template_redirect() {
|
180 |
-
|
181 |
-
if ( ! is_checkout() ) {
|
182 |
-
return;
|
183 |
-
}
|
184 |
-
|
185 |
-
if ( _is_wcf_checkout_type() || _is_wcf_thankyou_type() ) {
|
186 |
-
return;
|
187 |
-
}
|
188 |
-
|
189 |
-
// Return if the key OR Order paramater is found in the URL for certain Payment gateways.
|
190 |
-
if ( isset( $_GET['key'] ) || isset( $_GET['order'] ) ) { //phpcs:ignore
|
191 |
-
return;
|
192 |
-
}
|
193 |
-
|
194 |
-
// redirect only for cartflows checkout pages.
|
195 |
-
$order_pay_endpoint = get_option( 'woocommerce_checkout_pay_endpoint', 'order-pay' );
|
196 |
-
$order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );
|
197 |
-
|
198 |
-
$common = Cartflows_Helper::get_common_settings();
|
199 |
-
|
200 |
-
$global_checkout = $common['global_checkout'];
|
201 |
-
|
202 |
-
if (
|
203 |
-
isset( $_SERVER['REQUEST_URI'] ) &&
|
204 |
-
// ignore on order-pay.
|
205 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_pay_endpoint . '/' ) &&
|
206 |
-
// ignore on TY page.
|
207 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_received_endpoint . '/' ) &&
|
208 |
-
// ignore if order-pay in query param.
|
209 |
-
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $order_pay_endpoint . '=' )
|
210 |
-
) {
|
211 |
-
|
212 |
-
if ( '' !== $global_checkout ) {
|
213 |
-
|
214 |
-
$link = apply_filters( 'cartflows_global_checkout_url', get_permalink( $global_checkout ) );
|
215 |
-
|
216 |
-
if ( ! empty( $link ) ) {
|
217 |
-
|
218 |
-
wp_safe_redirect( $link );
|
219 |
-
die();
|
220 |
-
}
|
221 |
-
}
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Check for checkout flag
|
227 |
-
*
|
228 |
-
* @param bool $is_checkout is checkout.
|
229 |
-
*
|
230 |
-
* @return bool
|
231 |
-
*/
|
232 |
-
public function woo_checkout_flag( $is_checkout ) {
|
233 |
-
|
234 |
-
if ( ! is_admin() ) {
|
235 |
-
|
236 |
-
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
237 |
-
|
238 |
-
$is_checkout = true;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
|
242 |
-
return $is_checkout;
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Render checkout shortcode markup.
|
247 |
-
*
|
248 |
-
* @param array $atts attributes.
|
249 |
-
* @return string
|
250 |
-
*/
|
251 |
-
public function checkout_shortcode_markup( $atts ) {
|
252 |
-
|
253 |
-
if ( ! function_exists( 'wc_print_notices' ) ) {
|
254 |
-
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
255 |
-
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
256 |
-
|
257 |
-
return $notice_out;
|
258 |
-
}
|
259 |
-
|
260 |
-
$atts = shortcode_atts(
|
261 |
-
array(
|
262 |
-
'id' => 0,
|
263 |
-
),
|
264 |
-
$atts
|
265 |
-
);
|
266 |
-
|
267 |
-
$checkout_id = intval( $atts['id'] );
|
268 |
-
|
269 |
-
if ( empty( $checkout_id ) ) {
|
270 |
-
|
271 |
-
if ( ! _is_wcf_checkout_type() ) {
|
272 |
-
|
273 |
-
return '<h4>' . __( 'Checkout ID not found', 'cartflows' ) . '</h4>';
|
274 |
-
}
|
275 |
-
|
276 |
-
global $post;
|
277 |
-
|
278 |
-
$checkout_id = intval( $post->ID );
|
279 |
-
}
|
280 |
-
|
281 |
-
$output = '';
|
282 |
-
|
283 |
-
ob_start();
|
284 |
-
|
285 |
-
do_action( 'cartflows_checkout_form_before', $checkout_id );
|
286 |
-
|
287 |
-
$checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
|
288 |
-
|
289 |
-
$template_default = CARTFLOWS_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php';
|
290 |
-
|
291 |
-
$template_layout = apply_filters( 'cartflows_checkout_layout_template', $checkout_layout );
|
292 |
-
|
293 |
-
if ( file_exists( $template_layout ) ) {
|
294 |
-
include $template_layout;
|
295 |
-
} else {
|
296 |
-
include $template_default;
|
297 |
-
}
|
298 |
-
|
299 |
-
$output .= ob_get_clean();
|
300 |
-
|
301 |
-
return $output;
|
302 |
-
}
|
303 |
-
|
304 |
-
/**
|
305 |
-
* Configure Cart Data.
|
306 |
-
*
|
307 |
-
* @since 1.0.0
|
308 |
-
*
|
309 |
-
* @return void
|
310 |
-
*/
|
311 |
-
public function preconfigured_cart_data() {
|
312 |
-
|
313 |
-
if ( is_admin() ) {
|
314 |
-
return;
|
315 |
-
}
|
316 |
-
|
317 |
-
global $post;
|
318 |
-
|
319 |
-
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
320 |
-
|
321 |
-
if ( wp_doing_ajax() ) {
|
322 |
-
return;
|
323 |
-
} else {
|
324 |
-
|
325 |
-
if ( _is_wcf_checkout_type() ) {
|
326 |
-
$checkout_id = $post->ID;
|
327 |
-
} else {
|
328 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
329 |
-
}
|
330 |
-
|
331 |
-
$global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
|
332 |
-
|
333 |
-
if ( ! empty( $global_checkout ) && $checkout_id === $global_checkout ) {
|
334 |
-
|
335 |
-
if ( WC()->cart->is_empty() ) {
|
336 |
-
wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
|
337 |
-
}
|
338 |
-
|
339 |
-
return;
|
340 |
-
}
|
341 |
-
|
342 |
-
if ( apply_filters( 'cartflows_skip_configure_cart', false, $checkout_id ) ) {
|
343 |
-
return;
|
344 |
-
}
|
345 |
-
|
346 |
-
do_action( 'cartflows_checkout_before_configure_cart', $checkout_id );
|
347 |
-
|
348 |
-
$flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
|
349 |
-
|
350 |
-
if ( wcf()->flow->is_flow_testmode( $flow_id ) ) {
|
351 |
-
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products', 'dummy' );
|
352 |
-
} else {
|
353 |
-
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
|
354 |
-
}
|
355 |
-
|
356 |
-
if ( ! is_array( $products ) ) {
|
357 |
-
|
358 |
-
if ( 'dummy' === $products ) {
|
359 |
-
|
360 |
-
$args = array(
|
361 |
-
'posts_per_page' => 1,
|
362 |
-
'orderby' => 'rand',
|
363 |
-
'post_type' => 'product',
|
364 |
-
'meta_query' => array( //phpcs:ignore
|
365 |
-
// Exclude out of stock products.
|
366 |
-
array(
|
367 |
-
'key' => '_stock_status',
|
368 |
-
'value' => 'outofstock',
|
369 |
-
'compare' => 'NOT IN',
|
370 |
-
),
|
371 |
-
),
|
372 |
-
'tax_query' => array( //phpcs:ignore
|
373 |
-
array(
|
374 |
-
'taxonomy' => 'product_type',
|
375 |
-
'field' => 'slug',
|
376 |
-
'terms' => 'simple',
|
377 |
-
),
|
378 |
-
),
|
379 |
-
);
|
380 |
-
|
381 |
-
$random_product = get_posts( $args );
|
382 |
-
|
383 |
-
if ( isset( $random_product[0]->ID ) ) {
|
384 |
-
$products = array(
|
385 |
-
array(
|
386 |
-
'product' => $random_product[0]->ID,
|
387 |
-
),
|
388 |
-
);
|
389 |
-
} else {
|
390 |
-
return;
|
391 |
-
}
|
392 |
-
} else {
|
393 |
-
return;
|
394 |
-
}
|
395 |
-
}
|
396 |
-
|
397 |
-
/* Empty the current cart */
|
398 |
-
WC()->cart->empty_cart();
|
399 |
-
|
400 |
-
if ( is_array( $products ) && count( $products ) < 1 ) {
|
401 |
-
wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
|
402 |
-
return;
|
403 |
-
}
|
404 |
-
|
405 |
-
/* Set customer session if not set */
|
406 |
-
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
407 |
-
WC()->session->set_customer_session_cookie( true );
|
408 |
-
}
|
409 |
-
|
410 |
-
$cart_product_count = 0;
|
411 |
-
|
412 |
-
foreach ( $products as $index => $data ) {
|
413 |
-
|
414 |
-
if ( ! isset( $data['product'] ) ) {
|
415 |
-
return;
|
416 |
-
}
|
417 |
-
|
418 |
-
if ( apply_filters( 'cartflows_skip_other_products', false, $cart_product_count ) ) {
|
419 |
-
break;
|
420 |
-
}
|
421 |
-
|
422 |
-
$product_id = $data['product'];
|
423 |
-
$_product = wc_get_product( $product_id );
|
424 |
-
|
425 |
-
if ( ! empty( $_product ) ) {
|
426 |
-
|
427 |
-
$quantity = 1;
|
428 |
-
|
429 |
-
if ( ! $_product->is_type( 'grouped' ) && ! $_product->is_type( 'external' ) ) {
|
430 |
-
|
431 |
-
if ( $_product->is_type( 'variable' ) ) {
|
432 |
-
|
433 |
-
$default_attributes = $_product->get_default_attributes();
|
434 |
-
|
435 |
-
if ( ! empty( $default_attributes ) ) {
|
436 |
-
|
437 |
-
foreach ( $_product->get_children() as $variation_id ) {
|
438 |
-
|
439 |
-
$single_variation = new WC_Product_Variation( $variation_id );
|
440 |
-
|
441 |
-
if ( $default_attributes == $single_variation->get_attributes() ) {
|
442 |
-
WC()->cart->add_to_cart( $variation_id, $quantity );
|
443 |
-
$cart_product_count++;
|
444 |
-
}
|
445 |
-
}
|
446 |
-
} else {
|
447 |
-
|
448 |
-
$product_childrens = $_product->get_children();
|
449 |
-
|
450 |
-
if ( isset( $product_childrens[0] ) ) {
|
451 |
-
WC()->cart->add_to_cart( $product_childrens[0], $quantity );
|
452 |
-
$cart_product_count++;
|
453 |
-
} else {
|
454 |
-
echo '<p>' . esc_html__( 'Variations Not set', 'cartflows' ) . '</p>';
|
455 |
-
}
|
456 |
-
}
|
457 |
-
} else {
|
458 |
-
WC()->cart->add_to_cart( $product_id, $quantity );
|
459 |
-
$cart_product_count++;
|
460 |
-
}
|
461 |
-
} else {
|
462 |
-
$wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
|
463 |
-
wc_add_notice( $wrong_product_notice );
|
464 |
-
/**
|
465 |
-
WC()->cart->add_to_cart( $product_id, $quantity );.
|
466 |
-
*/
|
467 |
-
}
|
468 |
-
}
|
469 |
-
}
|
470 |
-
|
471 |
-
/* Since 1.2.2 */
|
472 |
-
wcf_do_action_deprecated( 'cartflows_checkout_aftet_configure_cart', array( $checkout_id ), '1.2.2', 'cartflows_checkout_after_configure_cart' );
|
473 |
-
do_action( 'cartflows_checkout_after_configure_cart', $checkout_id );
|
474 |
-
}
|
475 |
-
}
|
476 |
-
}
|
477 |
-
|
478 |
-
/**
|
479 |
-
* Load shortcode data.
|
480 |
-
*
|
481 |
-
* @return void
|
482 |
-
*/
|
483 |
-
public function shortcode_load_data() {
|
484 |
-
|
485 |
-
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
486 |
-
|
487 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
488 |
-
|
489 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
490 |
-
|
491 |
-
/* Show notices if cart has errors */
|
492 |
-
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
493 |
-
|
494 |
-
add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'order_wrap_div_start' ), 99 );
|
495 |
-
|
496 |
-
add_action( 'woocommerce_checkout_after_order_review', array( $this, 'order_wrap_div_end' ), 99 );
|
497 |
-
|
498 |
-
// Outputting the hidden field in checkout page.
|
499 |
-
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
500 |
-
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
501 |
-
|
502 |
-
remove_all_actions( 'woocommerce_checkout_billing' );
|
503 |
-
remove_all_actions( 'woocommerce_checkout_shipping' );
|
504 |
-
|
505 |
-
// Hook in actions once.
|
506 |
-
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
507 |
-
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
508 |
-
|
509 |
-
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
510 |
-
|
511 |
-
add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
|
512 |
-
|
513 |
-
add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
|
514 |
-
|
515 |
-
add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
|
516 |
-
|
517 |
-
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
518 |
-
|
519 |
-
global $post;
|
520 |
-
|
521 |
-
if ( _is_wcf_checkout_type() ) {
|
522 |
-
$checkout_id = $post->ID;
|
523 |
-
} else {
|
524 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
525 |
-
}
|
526 |
-
|
527 |
-
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
528 |
-
}
|
529 |
-
}
|
530 |
-
|
531 |
-
/**
|
532 |
-
* Render checkout ID hidden field.
|
533 |
-
*
|
534 |
-
* @param array $checkout checkout session data.
|
535 |
-
* @return void
|
536 |
-
*/
|
537 |
-
public function checkout_shortcode_post_id( $checkout ) {
|
538 |
-
|
539 |
-
global $post;
|
540 |
-
|
541 |
-
if ( _is_wcf_checkout_type() ) {
|
542 |
-
$checkout_id = $post->ID;
|
543 |
-
} else {
|
544 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
545 |
-
}
|
546 |
-
|
547 |
-
$flow_id = get_post_meta( $checkout_id, 'wcf-flow-id', true );
|
548 |
-
|
549 |
-
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
550 |
-
echo '<input type="hidden" class="input-hidden _wcf_checkout_id" name="_wcf_checkout_id" value="' . intval( $checkout_id ) . '">';
|
551 |
-
}
|
552 |
-
|
553 |
-
/**
|
554 |
-
* Load shortcode scripts.
|
555 |
-
*
|
556 |
-
* @return void
|
557 |
-
*/
|
558 |
-
public function shortcode_scripts() {
|
559 |
-
|
560 |
-
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
561 |
-
|
562 |
-
wp_enqueue_script(
|
563 |
-
'wcf-checkout-template',
|
564 |
-
wcf()->utils->get_js_url( 'checkout-template' ),
|
565 |
-
array( 'jquery' ),
|
566 |
-
CARTFLOWS_VER,
|
567 |
-
true
|
568 |
-
);
|
569 |
-
|
570 |
-
do_action( 'cartflows_checkout_scripts' );
|
571 |
-
|
572 |
-
$style = $this->generate_style();
|
573 |
-
|
574 |
-
wp_add_inline_style( 'wcf-checkout-template', $style );
|
575 |
-
|
576 |
-
}
|
577 |
-
|
578 |
-
/**
|
579 |
-
* Load compatibility scripts.
|
580 |
-
*
|
581 |
-
* @return void
|
582 |
-
*/
|
583 |
-
public function compatibility_scripts() {
|
584 |
-
|
585 |
-
global $post;
|
586 |
-
|
587 |
-
if ( _is_wcf_checkout_type() ) {
|
588 |
-
$checkout_id = $post->ID;
|
589 |
-
} else {
|
590 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
591 |
-
}
|
592 |
-
|
593 |
-
// Add DIVI Compatibility css if DIVI theme is enabled.
|
594 |
-
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
595 |
-
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id )
|
596 |
-
) {
|
597 |
-
wp_enqueue_style( 'wcf-checkout-template-divi', wcf()->utils->get_css_url( 'checkout-template-divi' ), '', CARTFLOWS_VER );
|
598 |
-
}
|
599 |
-
|
600 |
-
// Add Flatsome Compatibility css if Flatsome theme is enabled.
|
601 |
-
if ( Cartflows_Compatibility::get_instance()->is_flatsome_enabled() ) {
|
602 |
-
wp_enqueue_style( 'wcf-checkout-template-flatsome', wcf()->utils->get_css_url( 'checkout-template-flatsome' ), '', CARTFLOWS_VER );
|
603 |
-
}
|
604 |
-
|
605 |
-
// Add The7 Compatibility css if The7 theme is enabled.
|
606 |
-
if ( Cartflows_Compatibility::get_instance()->is_the_seven_enabled() ) {
|
607 |
-
wp_enqueue_style( 'wcf-checkout-template-the-seven', wcf()->utils->get_css_url( 'checkout-template-the-seven' ), '', CARTFLOWS_VER );
|
608 |
-
}
|
609 |
-
}
|
610 |
-
|
611 |
-
/**
|
612 |
-
* Generate styles.
|
613 |
-
*
|
614 |
-
* @return string
|
615 |
-
*/
|
616 |
-
public function generate_style() {
|
617 |
-
|
618 |
-
global $post;
|
619 |
-
|
620 |
-
if ( _is_wcf_checkout_type() ) {
|
621 |
-
$checkout_id = $post->ID;
|
622 |
-
} else {
|
623 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
624 |
-
}
|
625 |
-
|
626 |
-
CartFlows_Font_Families::render_fonts( $checkout_id );
|
627 |
-
|
628 |
-
$primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' );
|
629 |
-
|
630 |
-
$base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' );
|
631 |
-
|
632 |
-
$header_logo_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-width' );
|
633 |
-
|
634 |
-
/**
|
635 |
-
$base_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-weight' );*/
|
636 |
-
$r = '';
|
637 |
-
$g = '';
|
638 |
-
$b = '';
|
639 |
-
|
640 |
-
$field_tb_padding = '';
|
641 |
-
$field_lr_padding = '';
|
642 |
-
|
643 |
-
$field_heading_color = '';
|
644 |
-
$field_color = '';
|
645 |
-
$field_bg_color = '';
|
646 |
-
$field_border_color = '';
|
647 |
-
$field_label_color = '';
|
648 |
-
$submit_tb_padding = '';
|
649 |
-
$submit_lr_padding = '';
|
650 |
-
$hl_bg_color = '';
|
651 |
-
$field_input_size = '';
|
652 |
-
$box_border_color = '';
|
653 |
-
$section_bg_color = '';
|
654 |
-
$submit_button_height = '';
|
655 |
-
$submit_color = '';
|
656 |
-
$submit_bg_color = $primary_color;
|
657 |
-
$submit_border_color = $primary_color;
|
658 |
-
|
659 |
-
$submit_hover_color = '';
|
660 |
-
$submit_bg_hover_color = $primary_color;
|
661 |
-
$submit_border_hover_color = $primary_color;
|
662 |
-
|
663 |
-
$section_heading_color = '';
|
664 |
-
|
665 |
-
$is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' );
|
666 |
-
|
667 |
-
$button_font_family = '';
|
668 |
-
$button_font_weight = '';
|
669 |
-
$input_font_family = '';
|
670 |
-
$input_font_weight = '';
|
671 |
-
$heading_font_family = '';
|
672 |
-
$heading_font_weight = '';
|
673 |
-
$base_font_family = $base_font_family;
|
674 |
-
/**
|
675 |
-
$base_font_weight = $base_font_weight;*/
|
676 |
-
|
677 |
-
if ( 'yes' == $is_advance_option ) {
|
678 |
-
|
679 |
-
/**
|
680 |
-
* Get Font Family and Font Weight weight values
|
681 |
-
*/
|
682 |
-
$section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' );
|
683 |
-
|
684 |
-
$heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' );
|
685 |
-
$heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' );
|
686 |
-
$section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' );
|
687 |
-
$button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' );
|
688 |
-
$button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' );
|
689 |
-
$input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' );
|
690 |
-
$input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' );
|
691 |
-
$field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' );
|
692 |
-
$field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' );
|
693 |
-
$field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' );
|
694 |
-
|
695 |
-
$field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' );
|
696 |
-
|
697 |
-
$field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' );
|
698 |
-
|
699 |
-
$field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' );
|
700 |
-
|
701 |
-
$field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' );
|
702 |
-
|
703 |
-
$field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' );
|
704 |
-
|
705 |
-
$submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' );
|
706 |
-
|
707 |
-
$submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' );
|
708 |
-
|
709 |
-
$submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' );
|
710 |
-
|
711 |
-
$submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color );
|
712 |
-
|
713 |
-
$submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color );
|
714 |
-
|
715 |
-
$submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color );
|
716 |
-
|
717 |
-
$submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' );
|
718 |
-
|
719 |
-
$submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color );
|
720 |
-
|
721 |
-
$hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' );
|
722 |
-
|
723 |
-
$box_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-box-border-color' );
|
724 |
-
|
725 |
-
$submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' );
|
726 |
-
|
727 |
-
/**
|
728 |
-
* Get font values
|
729 |
-
*/
|
730 |
-
|
731 |
-
if ( 'custom' == $submit_button_height ) {
|
732 |
-
$submit_button_height = '38px';
|
733 |
-
}
|
734 |
-
|
735 |
-
if ( 'custom' == $field_input_size ) {
|
736 |
-
$field_input_size = '38px';
|
737 |
-
}
|
738 |
-
}
|
739 |
-
if ( isset( $primary_color ) ) {
|
740 |
-
|
741 |
-
list($r, $g, $b) = sscanf( $primary_color, '#%02x%02x%02x' );
|
742 |
-
}
|
743 |
-
$output = "
|
744 |
-
.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{
|
745 |
-
color:$primary_color !important;
|
746 |
-
border:1px solid $primary_color !important;
|
747 |
-
}
|
748 |
-
.wcf-embed-checkout-form .wcf-checkout-header-image img{
|
749 |
-
width: {$header_logo_width}px;
|
750 |
-
}
|
751 |
-
.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
|
752 |
-
.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:before{
|
753 |
-
color: {$primary_color};
|
754 |
-
}
|
755 |
-
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{
|
756 |
-
background-color: {$primary_color};
|
757 |
-
}
|
758 |
-
.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
|
759 |
-
.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:focus,
|
760 |
-
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:focus,
|
761 |
-
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus{
|
762 |
-
border-color: {$primary_color};
|
763 |
-
box-shadow: 0 0 2px rgba( " . $r . ',' . $g . ',' . $b . ", .8);
|
764 |
-
}
|
765 |
-
.wcf-embed-checkout-form .woocommerce-checkout label{
|
766 |
-
color: {$field_label_color};
|
767 |
-
}
|
768 |
-
.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
|
769 |
-
background-color: {$hl_bg_color};
|
770 |
-
font-family: {$input_font_family};
|
771 |
-
font-weight: {$input_font_weight};
|
772 |
-
}
|
773 |
-
|
774 |
-
.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
|
775 |
-
.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
|
776 |
-
.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before
|
777 |
-
{
|
778 |
-
border-bottom-color: {$hl_bg_color};
|
779 |
-
border-right-color: transparent;
|
780 |
-
border-left-color: transparent;
|
781 |
-
border-top-color: transparent;
|
782 |
-
position: absolute;
|
783 |
-
}
|
784 |
-
|
785 |
-
.wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
|
786 |
-
.wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label{
|
787 |
-
font-family: {$input_font_family};
|
788 |
-
font-weight: {$input_font_weight};
|
789 |
-
}
|
790 |
-
|
791 |
-
.wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type='text'],
|
792 |
-
.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
793 |
-
.wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
794 |
-
.wcf-embed-checkout-form .select2-container--default .select2-selection--single {
|
795 |
-
color: {$field_color};
|
796 |
-
background: {$field_bg_color};
|
797 |
-
border-color: {$field_border_color};
|
798 |
-
padding-top: {$field_tb_padding}px;
|
799 |
-
padding-bottom: {$field_tb_padding}px;
|
800 |
-
padding-left: {$field_lr_padding}px;
|
801 |
-
padding-right: {$field_lr_padding}px;
|
802 |
-
min-height: {$field_input_size};
|
803 |
-
font-family: {$input_font_family};
|
804 |
-
font-weight: {$input_font_weight};
|
805 |
-
}
|
806 |
-
|
807 |
-
.wcf-embed-checkout-form .woocommerce .col2-set .col-1,
|
808 |
-
.wcf-embed-checkout-form .woocommerce .col2-set .col-2,
|
809 |
-
.wcf-embed-checkout-form .woocommerce-checkout .shop_table,
|
810 |
-
.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
811 |
-
.wcf-embed-checkout-form .woocommerce-checkout #payment,
|
812 |
-
.wcf-embed-checkout-form .woocommerce form.checkout_coupon
|
813 |
-
{
|
814 |
-
background-color: {$section_bg_color};
|
815 |
-
border-color: {$box_border_color};
|
816 |
-
font-family: {$input_font_family};
|
817 |
-
font-weight: {$input_font_weight};
|
818 |
-
}
|
819 |
-
|
820 |
-
.woocommerce table.shop_table th{
|
821 |
-
color: {$field_label_color};
|
822 |
-
}
|
823 |
-
/*.wcf-embed-checkout-form .woocommerce .woocommerce-info,
|
824 |
-
.wcf-embed-checkout-form .woocommerce-message{
|
825 |
-
border-top-color: {$primary_color};
|
826 |
-
background-color: {$hl_bg_color};
|
827 |
-
}*/
|
828 |
-
.wcf-embed-checkout-form .woocommerce a{
|
829 |
-
color: {$primary_color};
|
830 |
-
}
|
831 |
-
.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
|
832 |
-
color: {$field_color};
|
833 |
-
}
|
834 |
-
.wcf-embed-checkout-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
835 |
-
color: {$field_color};
|
836 |
-
}
|
837 |
-
.wcf-embed-checkout-form ::-moz-placeholder { /* Firefox 19+ */
|
838 |
-
color: {$field_color};
|
839 |
-
}
|
840 |
-
.wcf-embed-checkout-form :-ms-input-placeholder { /* IE 10+ */
|
841 |
-
color: {$field_color};
|
842 |
-
}
|
843 |
-
.wcf-embed-checkout-form :-moz-placeholder { /* Firefox 18- */
|
844 |
-
color: {$field_color};
|
845 |
-
}
|
846 |
-
.wcf-embed-checkout-form .woocommerce form p.form-row label {
|
847 |
-
color: {$field_label_color};
|
848 |
-
font-family: {$input_font_family};
|
849 |
-
font-weight: {$input_font_weight};
|
850 |
-
}
|
851 |
-
.wcf-embed-checkout-form .woocommerce #order_review button,
|
852 |
-
.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
853 |
-
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
854 |
-
color: {$submit_color};
|
855 |
-
background: {$submit_bg_color};
|
856 |
-
padding-top: {$submit_tb_padding}px;
|
857 |
-
padding-bottom: {$submit_tb_padding}px;
|
858 |
-
padding-left: {$submit_lr_padding}px;
|
859 |
-
padding-right: {$submit_lr_padding}px;
|
860 |
-
border-color: {$submit_border_color};
|
861 |
-
min-height: {$submit_button_height};
|
862 |
-
font-family: {$button_font_family};
|
863 |
-
font-weight: {$button_font_weight};
|
864 |
-
}
|
865 |
-
.wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
866 |
-
.wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button{
|
867 |
-
background: {$submit_bg_color};
|
868 |
-
border: 1px {$submit_border_color} solid;
|
869 |
-
color: {$submit_color};
|
870 |
-
min-height: {$submit_button_height};
|
871 |
-
font-family: {$button_font_family};
|
872 |
-
font-weight: {$button_font_weight};
|
873 |
-
}
|
874 |
-
.wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
875 |
-
.wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
876 |
-
.wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
877 |
-
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
|
878 |
-
color: {$submit_hover_color};
|
879 |
-
background-color: {$submit_bg_hover_color};
|
880 |
-
border-color: {$submit_border_hover_color};
|
881 |
-
}
|
882 |
-
.wcf-embed-checkout-form .woocommerce h3,
|
883 |
-
.wcf-embed-checkout-form .woocommerce h3 span,
|
884 |
-
.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
|
885 |
-
color: {$section_heading_color};
|
886 |
-
font-family: {$heading_font_family};
|
887 |
-
font-weight: {$heading_font_weight};
|
888 |
-
}
|
889 |
-
.wcf-embed-checkout-form .woocommerce-info::before,
|
890 |
-
.wcf-embed-checkout-form .woocommerce-message::before{
|
891 |
-
color: {$primary_color};
|
892 |
-
}
|
893 |
-
.wcf-embed-checkout-form{
|
894 |
-
font-family: {$base_font_family};
|
895 |
-
}
|
896 |
-
img.emoji, img.wp-smiley {}";
|
897 |
-
|
898 |
-
return $output;
|
899 |
-
}
|
900 |
-
|
901 |
-
/**
|
902 |
-
* Get ajax end points.
|
903 |
-
*
|
904 |
-
* @param string $endpoint_url end point URL.
|
905 |
-
* @param string $request end point request.
|
906 |
-
* @return string
|
907 |
-
*/
|
908 |
-
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
909 |
-
|
910 |
-
global $post;
|
911 |
-
|
912 |
-
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
913 |
-
|
914 |
-
if ( _is_wcf_checkout_type() ) {
|
915 |
-
|
916 |
-
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
917 |
-
|
918 |
-
if ( '' === $request ) {
|
919 |
-
$query_args = array(
|
920 |
-
'wc-ajax' => '%%endpoint%%',
|
921 |
-
);
|
922 |
-
} else {
|
923 |
-
$query_args = array(
|
924 |
-
'wc-ajax' => $request,
|
925 |
-
);
|
926 |
-
}
|
927 |
-
|
928 |
-
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
929 |
-
$uri = $uri[0];
|
930 |
-
|
931 |
-
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
932 |
-
}
|
933 |
-
}
|
934 |
-
}
|
935 |
-
|
936 |
-
return $endpoint_url;
|
937 |
-
}
|
938 |
-
|
939 |
-
|
940 |
-
/**
|
941 |
-
* Save checkout fields.
|
942 |
-
*
|
943 |
-
* @param int $order_id order id.
|
944 |
-
* @param array $posted posted data.
|
945 |
-
* @return void
|
946 |
-
*/
|
947 |
-
public function save_checkout_fields( $order_id, $posted ) {
|
948 |
-
|
949 |
-
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
950 |
-
|
951 |
-
$checkout_id = wc_clean( intval( $_POST['_wcf_checkout_id'] ) ); //phpcs:ignore
|
952 |
-
|
953 |
-
update_post_meta( $order_id, '_wcf_checkout_id', $checkout_id );
|
954 |
-
|
955 |
-
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
956 |
-
|
957 |
-
$flow_id = wc_clean( intval( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
958 |
-
|
959 |
-
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
960 |
-
}
|
961 |
-
}
|
962 |
-
|
963 |
-
}
|
964 |
-
|
965 |
-
/**
|
966 |
-
* Enable Logo In Header Of Checkout Page
|
967 |
-
*
|
968 |
-
* @return void
|
969 |
-
*/
|
970 |
-
public function enable_logo_in_header() {
|
971 |
-
global $post;
|
972 |
-
|
973 |
-
if ( _is_wcf_checkout_type() ) {
|
974 |
-
$checkout_id = $post->ID;
|
975 |
-
} else {
|
976 |
-
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
977 |
-
}
|
978 |
-
|
979 |
-
$header_logo_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-image' );
|
980 |
-
$add_image_markup = '';
|
981 |
-
|
982 |
-
if ( isset( $header_logo_image ) && ! empty( $header_logo_image ) ) {
|
983 |
-
$add_image_markup = '<div class="wcf-checkout-header-image">';
|
984 |
-
$add_image_markup .= '<img src="' . $header_logo_image . '" />';
|
985 |
-
$add_image_markup .= '</div>';
|
986 |
-
}
|
987 |
-
|
988 |
-
echo $add_image_markup;
|
989 |
-
}
|
990 |
-
|
991 |
-
/**
|
992 |
-
* Add text to the bootom of the checkout page.
|
993 |
-
*
|
994 |
-
* @return void
|
995 |
-
*/
|
996 |
-
public function show_cartflows_copyright_message() {
|
997 |
-
$output_string = '';
|
998 |
-
|
999 |
-
$output_string .= '<div class="wcf-footer-primary">';
|
1000 |
-
$output_string .= '<div class="wcf-footer-content">';
|
1001 |
-
$output_string .= '<p class="wcf-footer-message">';
|
1002 |
-
$output_string .= 'Checkout powered by CartFlows';
|
1003 |
-
$output_string .= '</p>';
|
1004 |
-
$output_string .= '</div>';
|
1005 |
-
$output_string .= '</div>';
|
1006 |
-
|
1007 |
-
echo $output_string;
|
1008 |
-
}
|
1009 |
-
|
1010 |
-
/**
|
1011 |
-
* Redirect users to our checkout if hidden param
|
1012 |
-
*
|
1013 |
-
* @param string $redirect redirect url.
|
1014 |
-
* @param object $user user.
|
1015 |
-
* @return string
|
1016 |
-
*/
|
1017 |
-
public function after_login_redirect( $redirect, $user ) {
|
1018 |
-
|
1019 |
-
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1020 |
-
|
1021 |
-
$checkout_id = intval( $_POST['_wcf_checkout_id'] ); //phpcs:ignore
|
1022 |
-
|
1023 |
-
$redirect = get_permalink( $checkout_id );
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
return $redirect;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
/**
|
1030 |
-
* Display coupon code field after review order fields.
|
1031 |
-
*/
|
1032 |
-
public function display_custom_coupon_field() {
|
1033 |
-
|
1034 |
-
$coupon_enabled = apply_filters( 'woocommerce_coupons_enabled', true );
|
1035 |
-
$show_coupon = apply_filters( 'cartflows_show_coupon_field', true );
|
1036 |
-
|
1037 |
-
if ( ! ( $coupon_enabled && $show_coupon ) ) {
|
1038 |
-
return;
|
1039 |
-
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
$coupon_field = array(
|
1043 |
-
'field_text' => __( 'Coupon Code', 'cartflows' ),
|
1044 |
-
'button_text' => __( 'Apply', 'cartflows' ),
|
1045 |
-
'class' => '',
|
1046 |
-
);
|
1047 |
-
|
1048 |
-
$coupon_field = apply_filters( 'cartflows_coupon_field_options', $coupon_field );
|
1049 |
-
|
1050 |
-
ob_start();
|
1051 |
-
?>
|
1052 |
-
<div class="wcf-custom-coupon-field <?php echo $coupon_field['class']; ?>" id="wcf_custom_coupon_field">
|
1053 |
-
<div class="wcf-coupon-col-1">
|
1054 |
-
<span>
|
1055 |
-
<input type="text" name="coupon_code" class="input-text wcf-coupon-code-input" placeholder="<?php echo $coupon_field['field_text']; ?>" id="coupon_code" value="">
|
1056 |
-
</span>
|
1057 |
-
</div>
|
1058 |
-
<div class="wcf-coupon-col-2">
|
1059 |
-
<span>
|
1060 |
-
<button type="button" class="button wcf-submit-coupon wcf-btn-small" name="apply_coupon" value="Apply"><?php echo $coupon_field['button_text']; ?></button>
|
1061 |
-
</span>
|
1062 |
-
</div>
|
1063 |
-
</div>
|
1064 |
-
<?php
|
1065 |
-
echo ob_get_clean();
|
1066 |
-
}
|
1067 |
-
|
1068 |
-
/**
|
1069 |
-
* Apply filter to change class of remove coupon field.
|
1070 |
-
*
|
1071 |
-
* @param string $coupon coupon.
|
1072 |
-
* @return string
|
1073 |
-
*/
|
1074 |
-
public function remove_coupon_text( $coupon ) {
|
1075 |
-
|
1076 |
-
$coupon = str_replace( 'woocommerce-remove-coupon', 'wcf-remove-coupon', $coupon );
|
1077 |
-
return $coupon;
|
1078 |
-
|
1079 |
-
}
|
1080 |
-
/**
|
1081 |
-
* Apply filter to change the placeholder text of coupon field.
|
1082 |
-
*
|
1083 |
-
* @return string
|
1084 |
-
*/
|
1085 |
-
public function coupon_field_placeholder() {
|
1086 |
-
return apply_filters( 'cartflows_coupon_field_placeholder', __( 'Coupon Code', 'cartflows' ) );
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
/**
|
1090 |
-
* Apply filter to change the button text of coupon field.
|
1091 |
-
*
|
1092 |
-
* @return string
|
1093 |
-
*/
|
1094 |
-
public function coupon_button_text() {
|
1095 |
-
return apply_filters( 'cartflows_coupon_button_text', __( 'Apply', 'cartflows' ) );
|
1096 |
-
}
|
1097 |
-
|
1098 |
-
/**
|
1099 |
-
* Apply coupon on submit of custom coupon form.
|
1100 |
-
*/
|
1101 |
-
public function apply_coupon() {
|
1102 |
-
|
1103 |
-
$response = '';
|
1104 |
-
|
1105 |
-
check_ajax_referer( 'wcf-apply-coupon', 'security' );
|
1106 |
-
if ( ! empty( $_POST['coupon_code'] ) ) {
|
1107 |
-
$result = WC()->cart->add_discount( sanitize_text_field( wp_unslash( $_POST['coupon_code'] ) ) );
|
1108 |
-
} else {
|
1109 |
-
wc_add_notice( WC_Coupon::get_generic_coupon_error( WC_Coupon::E_WC_COUPON_PLEASE_ENTER ), 'error' );
|
1110 |
-
}
|
1111 |
-
|
1112 |
-
$response = array(
|
1113 |
-
'status' => $result,
|
1114 |
-
'msg' => wc_print_notices( true ),
|
1115 |
-
);
|
1116 |
-
|
1117 |
-
echo wp_json_encode( $response );
|
1118 |
-
|
1119 |
-
die();
|
1120 |
-
}
|
1121 |
-
|
1122 |
-
|
1123 |
-
/**
|
1124 |
-
* Added ajax nonce to localize variable.
|
1125 |
-
*
|
1126 |
-
* @param array $vars localize variables.
|
1127 |
-
*/
|
1128 |
-
public function add_localize_vars( $vars ) {
|
1129 |
-
|
1130 |
-
$vars['wcf_validate_coupon_nonce'] = wp_create_nonce( 'wcf-apply-coupon' );
|
1131 |
-
|
1132 |
-
$vars['wcf_validate_remove_coupon_nonce'] = wp_create_nonce( 'wcf-remove-coupon' );
|
1133 |
-
|
1134 |
-
$vars['wcf_validate_remove_cart_product_nonce'] = wp_create_nonce( 'wcf-remove-cart-product' );
|
1135 |
-
|
1136 |
-
$vars['allow_persistance'] = apply_filters( 'cartflows_allow_persistace', 'yes' );
|
1137 |
-
|
1138 |
-
return $vars;
|
1139 |
-
}
|
1140 |
-
|
1141 |
-
/**
|
1142 |
-
* Add custom class to the fields to change the UI to three column.
|
1143 |
-
*
|
1144 |
-
* @param array $fields fields.
|
1145 |
-
*/
|
1146 |
-
public function add_three_column_layout_fields( $fields ) {
|
1147 |
-
|
1148 |
-
if ( empty( $fields['billing']['billing_address_2'] ) ) {
|
1149 |
-
|
1150 |
-
if ( isset( $fields['billing']['billing_address_1'] ) && is_array( $fields['billing']['billing_address_1'] ) ) {
|
1151 |
-
$fields['billing']['billing_address_1']['class'][] = 'form-row-full';
|
1152 |
-
}
|
1153 |
-
}
|
1154 |
-
|
1155 |
-
if ( ! empty( $fields['billing']['billing_company'] ) ) {
|
1156 |
-
|
1157 |
-
if ( isset( $fields['billing']['billing_company'] ) && is_array( $fields['billing']['billing_company'] ) ) {
|
1158 |
-
$fields['billing']['billing_company']['class'][] = 'form-row-full';
|
1159 |
-
}
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
if ( ! empty( $fields['shipping']['shipping_company'] ) ) {
|
1163 |
-
|
1164 |
-
if ( isset( $fields['shipping']['shipping_company'] ) && is_array( $fields['shipping']['shipping_company'] ) ) {
|
1165 |
-
$fields['shipping']['shipping_company']['class'][] = 'form-row-full';
|
1166 |
-
}
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
if ( ! empty( $fields['billing']['billing_country'] ) ) {
|
1170 |
-
|
1171 |
-
if ( isset( $fields['billing']['billing_country'] ) && is_array( $fields['billing']['billing_country'] ) ) {
|
1172 |
-
$fields['billing']['billing_country']['class'][] = 'form-row-full';
|
1173 |
-
}
|
1174 |
-
}
|
1175 |
-
|
1176 |
-
if ( ! empty( $fields['shipping']['shipping_country'] ) ) {
|
1177 |
-
|
1178 |
-
if ( isset( $fields['shipping']['shipping_country'] ) && is_array( $fields['shipping']['shipping_country'] ) ) {
|
1179 |
-
$fields['shipping']['shipping_country']['class'][] = 'form-row-full';
|
1180 |
-
}
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
if ( ! empty( $fields['billing']['billing_phone'] ) ) {
|
1184 |
-
|
1185 |
-
if ( isset( $fields['billing']['billing_phone'] ) && is_array( $fields['billing']['billing_phone'] ) ) {
|
1186 |
-
$fields['billing']['billing_phone']['class'][] = 'form-row-full';
|
1187 |
-
}
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
if ( ! empty( $fields['billing']['billing_email'] ) ) {
|
1191 |
-
|
1192 |
-
if ( isset( $fields['billing']['billing_email'] ) && is_array( $fields['billing']['billing_email'] ) ) {
|
1193 |
-
$fields['billing']['billing_email']['class'][] = 'form-row-full';
|
1194 |
-
}
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
if ( empty( $fields['shipping']['shipping_address_2'] ) ) {
|
1198 |
-
|
1199 |
-
if ( isset( $fields['shipping']['shipping_address_1'] ) && is_array( $fields['shipping']['shipping_address_1'] ) ) {
|
1200 |
-
$fields['shipping']['shipping_address_1']['class'][] = 'form-row-full';
|
1201 |
-
}
|
1202 |
-
}
|
1203 |
-
|
1204 |
-
if ( isset( $fields['billing']['billing_city'] ) &&
|
1205 |
-
isset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] ) ) {
|
1206 |
-
|
1207 |
-
$fields['billing']['billing_city']['class'][] = 'wcf-column-33';
|
1208 |
-
$fields['billing']['billing_state']['class'][] = 'wcf-column-33';
|
1209 |
-
$fields['billing']['billing_postcode']['class'][] = 'wcf-column-33';
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
if ( isset( $fields['shipping']['shipping_city'] ) &&
|
1213 |
-
isset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] ) ) {
|
1214 |
-
|
1215 |
-
$fields['shipping']['shipping_city']['class'][] = 'wcf-column-33';
|
1216 |
-
$fields['shipping']['shipping_state']['class'][] = 'wcf-column-33';
|
1217 |
-
$fields['shipping']['shipping_postcode']['class'][] = 'wcf-column-33';
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
return $fields;
|
1221 |
-
}
|
1222 |
-
|
1223 |
-
/**
|
1224 |
-
* Add opening dev
|
1225 |
-
*
|
1226 |
-
* @since 1.0.0
|
1227 |
-
*/
|
1228 |
-
public function order_wrap_div_start() {
|
1229 |
-
|
1230 |
-
echo "<div class='wcf-order-wrap'> ";
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
/**
|
1234 |
-
* Add closing dev
|
1235 |
-
*
|
1236 |
-
* @since 1.0.0
|
1237 |
-
*/
|
1238 |
-
public function order_wrap_div_end() {
|
1239 |
-
|
1240 |
-
echo '</div> ';
|
1241 |
-
}
|
1242 |
-
/**
|
1243 |
-
* Remove coupon.
|
1244 |
-
*/
|
1245 |
-
public function remove_coupon() {
|
1246 |
-
|
1247 |
-
check_ajax_referer( 'wcf-remove-coupon', 'security' );
|
1248 |
-
$coupon = isset( $_POST['coupon_code'] ) ? wc_clean( wp_unslash( $_POST['coupon_code'] ) ) : false; //phpcs:ignore
|
1249 |
-
|
1250 |
-
if ( empty( $coupon ) ) {
|
1251 |
-
echo "<div class='woocommerce-error'>" . esc_html__( 'Sorry there was a problem removing this coupon.', 'cartflows' );
|
1252 |
-
} else {
|
1253 |
-
WC()->cart->remove_coupon( $coupon );
|
1254 |
-
echo "<div class='woocommerce-error'>" . esc_html__( 'Coupon has been removed.', 'cartflows' ) . '</div>';
|
1255 |
-
}
|
1256 |
-
wc_print_notices();
|
1257 |
-
wp_die();
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
/**
|
1261 |
-
* Remove cart item.
|
1262 |
-
*/
|
1263 |
-
public function wcf_woo_remove_cart_product() {
|
1264 |
-
|
1265 |
-
check_ajax_referer( 'wcf-remove-cart-product', 'security' );
|
1266 |
-
$product_key = isset( $_POST['p_key'] ) ? wc_clean( wp_unslash( $_POST['p_key'] ) ) : false; //phpcs:ignore
|
1267 |
-
$product_id = isset( $_POST['p_id'] ) ? wc_clean( wp_unslash( $_POST['p_id'] ) ) : ''; //phpcs:ignore
|
1268 |
-
$product_title = get_the_title( $product_id );
|
1269 |
-
|
1270 |
-
$needs_shipping = false;
|
1271 |
-
|
1272 |
-
if ( empty( $product_key ) ) {
|
1273 |
-
$msg = "<div class='woocommerce-message'>" . __( 'Sorry there was a problem removing ', 'cartflows' ) . $product_title;
|
1274 |
-
} else {
|
1275 |
-
WC()->cart->remove_cart_item( $product_key );
|
1276 |
-
$msg = "<div class='woocommerce-message'>" . $product_title . __( ' has been removed.', 'cartflows' ) . '</div>';
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
|
1280 |
-
if ( $values['data']->needs_shipping() ) {
|
1281 |
-
$needs_shipping = true;
|
1282 |
-
break;
|
1283 |
-
}
|
1284 |
-
}
|
1285 |
-
|
1286 |
-
$response = array(
|
1287 |
-
'need_shipping' => $needs_shipping,
|
1288 |
-
'msg' => $msg,
|
1289 |
-
);
|
1290 |
-
|
1291 |
-
echo wp_json_encode( $response );
|
1292 |
-
wp_die();
|
1293 |
-
}
|
1294 |
-
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
/**
|
1298 |
-
* Kicking this off by calling 'get_instance()' method
|
1299 |
-
*/
|
1300 |
-
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_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Modify WooCommerce paypal arguments.
|
84 |
+
*
|
85 |
+
* @param array $args argumenets for payment.
|
86 |
+
* @param WC_Order $order order data.
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
public function modify_paypal_args( $args, $order ) {
|
90 |
+
|
91 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
92 |
+
|
93 |
+
if ( ! $checkout_id ) {
|
94 |
+
return $args;
|
95 |
+
}
|
96 |
+
|
97 |
+
// Set cancel return URL.
|
98 |
+
$args['cancel_return'] = esc_url_raw( $order->get_cancel_order_url_raw( get_permalink( $checkout_id ) ) );
|
99 |
+
|
100 |
+
return $args;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Modify WooCommerce paypal arguments.
|
105 |
+
*
|
106 |
+
* @param string $product_name product name.
|
107 |
+
* @param object $cart_item cart item.
|
108 |
+
* @param string $cart_item_key cart item key.
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
public function wcf_add_remove_label( $product_name, $cart_item, $cart_item_key ) {
|
112 |
+
|
113 |
+
$checkout_id = get_the_ID();
|
114 |
+
if ( ! $checkout_id ) {
|
115 |
+
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? wp_unslash( $_POST['option']['checkout_id'] ) : '';//phpcs:ignore
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( ! empty( $checkout_id ) ) {
|
119 |
+
$is_remove_product_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-remove-product-field' );
|
120 |
+
if ( 'checkout' === get_post_meta( $checkout_id, 'wcf-step-type', true ) && ( 'yes' === $is_remove_product_option ) ) {
|
121 |
+
$remove_label = apply_filters(
|
122 |
+
'woocommerce_cart_item_remove_link',
|
123 |
+
sprintf(
|
124 |
+
'<a href="#" rel="nofollow" class="remove cartflows-icon-close" data-id="%s" data-item-key="%s" ></a>',
|
125 |
+
esc_attr( $cart_item['product_id'] ),
|
126 |
+
$cart_item_key
|
127 |
+
),
|
128 |
+
$cart_item_key
|
129 |
+
);
|
130 |
+
|
131 |
+
$product_name = $remove_label . $product_name;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
return $product_name;
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Change order button text .
|
141 |
+
*
|
142 |
+
* @param string $woo_button_text place order.
|
143 |
+
* @return string
|
144 |
+
*/
|
145 |
+
public function place_order_button_text( $woo_button_text ) {
|
146 |
+
|
147 |
+
$checkout_id = get_the_ID();
|
148 |
+
if ( ! $checkout_id ) {
|
149 |
+
$checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? intval( $_POST['option']['checkout_id'] ) : 0; //phpcs:ignore
|
150 |
+
}
|
151 |
+
|
152 |
+
$wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
|
153 |
+
|
154 |
+
if ( ! empty( $wcf_order_button_text ) ) {
|
155 |
+
$woo_button_text = $wcf_order_button_text;
|
156 |
+
}
|
157 |
+
|
158 |
+
return $woo_button_text;
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Display all WooCommerce notices.
|
163 |
+
*
|
164 |
+
* @since 1.1.5
|
165 |
+
*/
|
166 |
+
public function display_woo_notices() {
|
167 |
+
|
168 |
+
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
169 |
+
woocommerce_output_all_notices();
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Redirect from default to the global checkout page
|
176 |
+
*
|
177 |
+
* @since 1.0.0
|
178 |
+
*/
|
179 |
+
public function global_checkout_template_redirect() {
|
180 |
+
|
181 |
+
if ( ! is_checkout() ) {
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
if ( _is_wcf_checkout_type() || _is_wcf_thankyou_type() ) {
|
186 |
+
return;
|
187 |
+
}
|
188 |
+
|
189 |
+
// Return if the key OR Order paramater is found in the URL for certain Payment gateways.
|
190 |
+
if ( isset( $_GET['key'] ) || isset( $_GET['order'] ) ) { //phpcs:ignore
|
191 |
+
return;
|
192 |
+
}
|
193 |
+
|
194 |
+
// redirect only for cartflows checkout pages.
|
195 |
+
$order_pay_endpoint = get_option( 'woocommerce_checkout_pay_endpoint', 'order-pay' );
|
196 |
+
$order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );
|
197 |
+
|
198 |
+
$common = Cartflows_Helper::get_common_settings();
|
199 |
+
|
200 |
+
$global_checkout = $common['global_checkout'];
|
201 |
+
|
202 |
+
if (
|
203 |
+
isset( $_SERVER['REQUEST_URI'] ) &&
|
204 |
+
// ignore on order-pay.
|
205 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_pay_endpoint . '/' ) &&
|
206 |
+
// ignore on TY page.
|
207 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/' . $order_received_endpoint . '/' ) &&
|
208 |
+
// ignore if order-pay in query param.
|
209 |
+
false === wcf_mb_strpos( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $order_pay_endpoint . '=' )
|
210 |
+
) {
|
211 |
+
|
212 |
+
if ( '' !== $global_checkout ) {
|
213 |
+
|
214 |
+
$link = apply_filters( 'cartflows_global_checkout_url', get_permalink( $global_checkout ) );
|
215 |
+
|
216 |
+
if ( ! empty( $link ) ) {
|
217 |
+
|
218 |
+
wp_safe_redirect( $link );
|
219 |
+
die();
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Check for checkout flag
|
227 |
+
*
|
228 |
+
* @param bool $is_checkout is checkout.
|
229 |
+
*
|
230 |
+
* @return bool
|
231 |
+
*/
|
232 |
+
public function woo_checkout_flag( $is_checkout ) {
|
233 |
+
|
234 |
+
if ( ! is_admin() ) {
|
235 |
+
|
236 |
+
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
237 |
+
|
238 |
+
$is_checkout = true;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
return $is_checkout;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Render checkout shortcode markup.
|
247 |
+
*
|
248 |
+
* @param array $atts attributes.
|
249 |
+
* @return string
|
250 |
+
*/
|
251 |
+
public function checkout_shortcode_markup( $atts ) {
|
252 |
+
|
253 |
+
if ( ! function_exists( 'wc_print_notices' ) ) {
|
254 |
+
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
255 |
+
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
256 |
+
|
257 |
+
return $notice_out;
|
258 |
+
}
|
259 |
+
|
260 |
+
$atts = shortcode_atts(
|
261 |
+
array(
|
262 |
+
'id' => 0,
|
263 |
+
),
|
264 |
+
$atts
|
265 |
+
);
|
266 |
+
|
267 |
+
$checkout_id = intval( $atts['id'] );
|
268 |
+
|
269 |
+
if ( empty( $checkout_id ) ) {
|
270 |
+
|
271 |
+
if ( ! _is_wcf_checkout_type() ) {
|
272 |
+
|
273 |
+
return '<h4>' . __( 'Checkout ID not found', 'cartflows' ) . '</h4>';
|
274 |
+
}
|
275 |
+
|
276 |
+
global $post;
|
277 |
+
|
278 |
+
$checkout_id = intval( $post->ID );
|
279 |
+
}
|
280 |
+
|
281 |
+
$output = '';
|
282 |
+
|
283 |
+
ob_start();
|
284 |
+
|
285 |
+
do_action( 'cartflows_checkout_form_before', $checkout_id );
|
286 |
+
|
287 |
+
$checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
|
288 |
+
|
289 |
+
$template_default = CARTFLOWS_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php';
|
290 |
+
|
291 |
+
$template_layout = apply_filters( 'cartflows_checkout_layout_template', $checkout_layout );
|
292 |
+
|
293 |
+
if ( file_exists( $template_layout ) ) {
|
294 |
+
include $template_layout;
|
295 |
+
} else {
|
296 |
+
include $template_default;
|
297 |
+
}
|
298 |
+
|
299 |
+
$output .= ob_get_clean();
|
300 |
+
|
301 |
+
return $output;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Configure Cart Data.
|
306 |
+
*
|
307 |
+
* @since 1.0.0
|
308 |
+
*
|
309 |
+
* @return void
|
310 |
+
*/
|
311 |
+
public function preconfigured_cart_data() {
|
312 |
+
|
313 |
+
if ( is_admin() ) {
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
|
317 |
+
global $post;
|
318 |
+
|
319 |
+
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
320 |
+
|
321 |
+
if ( wp_doing_ajax() ) {
|
322 |
+
return;
|
323 |
+
} else {
|
324 |
+
|
325 |
+
if ( _is_wcf_checkout_type() ) {
|
326 |
+
$checkout_id = $post->ID;
|
327 |
+
} else {
|
328 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
329 |
+
}
|
330 |
+
|
331 |
+
$global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
|
332 |
+
|
333 |
+
if ( ! empty( $global_checkout ) && $checkout_id === $global_checkout ) {
|
334 |
+
|
335 |
+
if ( WC()->cart->is_empty() ) {
|
336 |
+
wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
|
337 |
+
}
|
338 |
+
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
if ( apply_filters( 'cartflows_skip_configure_cart', false, $checkout_id ) ) {
|
343 |
+
return;
|
344 |
+
}
|
345 |
+
|
346 |
+
do_action( 'cartflows_checkout_before_configure_cart', $checkout_id );
|
347 |
+
|
348 |
+
$flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
|
349 |
+
|
350 |
+
if ( wcf()->flow->is_flow_testmode( $flow_id ) ) {
|
351 |
+
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products', 'dummy' );
|
352 |
+
} else {
|
353 |
+
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
|
354 |
+
}
|
355 |
+
|
356 |
+
if ( ! is_array( $products ) ) {
|
357 |
+
|
358 |
+
if ( 'dummy' === $products ) {
|
359 |
+
|
360 |
+
$args = array(
|
361 |
+
'posts_per_page' => 1,
|
362 |
+
'orderby' => 'rand',
|
363 |
+
'post_type' => 'product',
|
364 |
+
'meta_query' => array( //phpcs:ignore
|
365 |
+
// Exclude out of stock products.
|
366 |
+
array(
|
367 |
+
'key' => '_stock_status',
|
368 |
+
'value' => 'outofstock',
|
369 |
+
'compare' => 'NOT IN',
|
370 |
+
),
|
371 |
+
),
|
372 |
+
'tax_query' => array( //phpcs:ignore
|
373 |
+
array(
|
374 |
+
'taxonomy' => 'product_type',
|
375 |
+
'field' => 'slug',
|
376 |
+
'terms' => 'simple',
|
377 |
+
),
|
378 |
+
),
|
379 |
+
);
|
380 |
+
|
381 |
+
$random_product = get_posts( $args );
|
382 |
+
|
383 |
+
if ( isset( $random_product[0]->ID ) ) {
|
384 |
+
$products = array(
|
385 |
+
array(
|
386 |
+
'product' => $random_product[0]->ID,
|
387 |
+
),
|
388 |
+
);
|
389 |
+
} else {
|
390 |
+
return;
|
391 |
+
}
|
392 |
+
} else {
|
393 |
+
return;
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
/* Empty the current cart */
|
398 |
+
WC()->cart->empty_cart();
|
399 |
+
|
400 |
+
if ( is_array( $products ) && count( $products ) < 1 ) {
|
401 |
+
wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
+
/* Set customer session if not set */
|
406 |
+
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
407 |
+
WC()->session->set_customer_session_cookie( true );
|
408 |
+
}
|
409 |
+
|
410 |
+
$cart_product_count = 0;
|
411 |
+
|
412 |
+
foreach ( $products as $index => $data ) {
|
413 |
+
|
414 |
+
if ( ! isset( $data['product'] ) ) {
|
415 |
+
return;
|
416 |
+
}
|
417 |
+
|
418 |
+
if ( apply_filters( 'cartflows_skip_other_products', false, $cart_product_count ) ) {
|
419 |
+
break;
|
420 |
+
}
|
421 |
+
|
422 |
+
$product_id = $data['product'];
|
423 |
+
$_product = wc_get_product( $product_id );
|
424 |
+
|
425 |
+
if ( ! empty( $_product ) ) {
|
426 |
+
|
427 |
+
$quantity = 1;
|
428 |
+
|
429 |
+
if ( ! $_product->is_type( 'grouped' ) && ! $_product->is_type( 'external' ) ) {
|
430 |
+
|
431 |
+
if ( $_product->is_type( 'variable' ) ) {
|
432 |
+
|
433 |
+
$default_attributes = $_product->get_default_attributes();
|
434 |
+
|
435 |
+
if ( ! empty( $default_attributes ) ) {
|
436 |
+
|
437 |
+
foreach ( $_product->get_children() as $variation_id ) {
|
438 |
+
|
439 |
+
$single_variation = new WC_Product_Variation( $variation_id );
|
440 |
+
|
441 |
+
if ( $default_attributes == $single_variation->get_attributes() ) {
|
442 |
+
WC()->cart->add_to_cart( $variation_id, $quantity );
|
443 |
+
$cart_product_count++;
|
444 |
+
}
|
445 |
+
}
|
446 |
+
} else {
|
447 |
+
|
448 |
+
$product_childrens = $_product->get_children();
|
449 |
+
|
450 |
+
if ( isset( $product_childrens[0] ) ) {
|
451 |
+
WC()->cart->add_to_cart( $product_childrens[0], $quantity );
|
452 |
+
$cart_product_count++;
|
453 |
+
} else {
|
454 |
+
echo '<p>' . esc_html__( 'Variations Not set', 'cartflows' ) . '</p>';
|
455 |
+
}
|
456 |
+
}
|
457 |
+
} else {
|
458 |
+
WC()->cart->add_to_cart( $product_id, $quantity );
|
459 |
+
$cart_product_count++;
|
460 |
+
}
|
461 |
+
} else {
|
462 |
+
$wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
|
463 |
+
wc_add_notice( $wrong_product_notice );
|
464 |
+
/**
|
465 |
+
WC()->cart->add_to_cart( $product_id, $quantity );.
|
466 |
+
*/
|
467 |
+
}
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
/* Since 1.2.2 */
|
472 |
+
wcf_do_action_deprecated( 'cartflows_checkout_aftet_configure_cart', array( $checkout_id ), '1.2.2', 'cartflows_checkout_after_configure_cart' );
|
473 |
+
do_action( 'cartflows_checkout_after_configure_cart', $checkout_id );
|
474 |
+
}
|
475 |
+
}
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Load shortcode data.
|
480 |
+
*
|
481 |
+
* @return void
|
482 |
+
*/
|
483 |
+
public function shortcode_load_data() {
|
484 |
+
|
485 |
+
if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
|
486 |
+
|
487 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
488 |
+
|
489 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
|
490 |
+
|
491 |
+
/* Show notices if cart has errors */
|
492 |
+
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
493 |
+
|
494 |
+
add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'order_wrap_div_start' ), 99 );
|
495 |
+
|
496 |
+
add_action( 'woocommerce_checkout_after_order_review', array( $this, 'order_wrap_div_end' ), 99 );
|
497 |
+
|
498 |
+
// Outputting the hidden field in checkout page.
|
499 |
+
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
500 |
+
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
501 |
+
|
502 |
+
remove_all_actions( 'woocommerce_checkout_billing' );
|
503 |
+
remove_all_actions( 'woocommerce_checkout_shipping' );
|
504 |
+
|
505 |
+
// Hook in actions once.
|
506 |
+
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
507 |
+
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
508 |
+
|
509 |
+
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
|
510 |
+
|
511 |
+
add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
|
512 |
+
|
513 |
+
add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
|
514 |
+
|
515 |
+
add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
|
516 |
+
|
517 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
518 |
+
|
519 |
+
global $post;
|
520 |
+
|
521 |
+
if ( _is_wcf_checkout_type() ) {
|
522 |
+
$checkout_id = $post->ID;
|
523 |
+
} else {
|
524 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
525 |
+
}
|
526 |
+
|
527 |
+
do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Render checkout ID hidden field.
|
533 |
+
*
|
534 |
+
* @param array $checkout checkout session data.
|
535 |
+
* @return void
|
536 |
+
*/
|
537 |
+
public function checkout_shortcode_post_id( $checkout ) {
|
538 |
+
|
539 |
+
global $post;
|
540 |
+
|
541 |
+
if ( _is_wcf_checkout_type() ) {
|
542 |
+
$checkout_id = $post->ID;
|
543 |
+
} else {
|
544 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
545 |
+
}
|
546 |
+
|
547 |
+
$flow_id = get_post_meta( $checkout_id, 'wcf-flow-id', true );
|
548 |
+
|
549 |
+
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
550 |
+
echo '<input type="hidden" class="input-hidden _wcf_checkout_id" name="_wcf_checkout_id" value="' . intval( $checkout_id ) . '">';
|
551 |
+
}
|
552 |
+
|
553 |
+
/**
|
554 |
+
* Load shortcode scripts.
|
555 |
+
*
|
556 |
+
* @return void
|
557 |
+
*/
|
558 |
+
public function shortcode_scripts() {
|
559 |
+
|
560 |
+
wp_enqueue_style( 'wcf-checkout-template', wcf()->utils->get_css_url( 'checkout-template' ), '', CARTFLOWS_VER );
|
561 |
+
|
562 |
+
wp_enqueue_script(
|
563 |
+
'wcf-checkout-template',
|
564 |
+
wcf()->utils->get_js_url( 'checkout-template' ),
|
565 |
+
array( 'jquery' ),
|
566 |
+
CARTFLOWS_VER,
|
567 |
+
true
|
568 |
+
);
|
569 |
+
|
570 |
+
do_action( 'cartflows_checkout_scripts' );
|
571 |
+
|
572 |
+
$style = $this->generate_style();
|
573 |
+
|
574 |
+
wp_add_inline_style( 'wcf-checkout-template', $style );
|
575 |
+
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Load compatibility scripts.
|
580 |
+
*
|
581 |
+
* @return void
|
582 |
+
*/
|
583 |
+
public function compatibility_scripts() {
|
584 |
+
|
585 |
+
global $post;
|
586 |
+
|
587 |
+
if ( _is_wcf_checkout_type() ) {
|
588 |
+
$checkout_id = $post->ID;
|
589 |
+
} else {
|
590 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
591 |
+
}
|
592 |
+
|
593 |
+
// Add DIVI Compatibility css if DIVI theme is enabled.
|
594 |
+
if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
|
595 |
+
Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $checkout_id )
|
596 |
+
) {
|
597 |
+
wp_enqueue_style( 'wcf-checkout-template-divi', wcf()->utils->get_css_url( 'checkout-template-divi' ), '', CARTFLOWS_VER );
|
598 |
+
}
|
599 |
+
|
600 |
+
// Add Flatsome Compatibility css if Flatsome theme is enabled.
|
601 |
+
if ( Cartflows_Compatibility::get_instance()->is_flatsome_enabled() ) {
|
602 |
+
wp_enqueue_style( 'wcf-checkout-template-flatsome', wcf()->utils->get_css_url( 'checkout-template-flatsome' ), '', CARTFLOWS_VER );
|
603 |
+
}
|
604 |
+
|
605 |
+
// Add The7 Compatibility css if The7 theme is enabled.
|
606 |
+
if ( Cartflows_Compatibility::get_instance()->is_the_seven_enabled() ) {
|
607 |
+
wp_enqueue_style( 'wcf-checkout-template-the-seven', wcf()->utils->get_css_url( 'checkout-template-the-seven' ), '', CARTFLOWS_VER );
|
608 |
+
}
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Generate styles.
|
613 |
+
*
|
614 |
+
* @return string
|
615 |
+
*/
|
616 |
+
public function generate_style() {
|
617 |
+
|
618 |
+
global $post;
|
619 |
+
|
620 |
+
if ( _is_wcf_checkout_type() ) {
|
621 |
+
$checkout_id = $post->ID;
|
622 |
+
} else {
|
623 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
624 |
+
}
|
625 |
+
|
626 |
+
CartFlows_Font_Families::render_fonts( $checkout_id );
|
627 |
+
|
628 |
+
$primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' );
|
629 |
+
|
630 |
+
$base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' );
|
631 |
+
|
632 |
+
$header_logo_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-width' );
|
633 |
+
|
634 |
+
/**
|
635 |
+
$base_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-weight' );*/
|
636 |
+
$r = '';
|
637 |
+
$g = '';
|
638 |
+
$b = '';
|
639 |
+
|
640 |
+
$field_tb_padding = '';
|
641 |
+
$field_lr_padding = '';
|
642 |
+
|
643 |
+
$field_heading_color = '';
|
644 |
+
$field_color = '';
|
645 |
+
$field_bg_color = '';
|
646 |
+
$field_border_color = '';
|
647 |
+
$field_label_color = '';
|
648 |
+
$submit_tb_padding = '';
|
649 |
+
$submit_lr_padding = '';
|
650 |
+
$hl_bg_color = '';
|
651 |
+
$field_input_size = '';
|
652 |
+
$box_border_color = '';
|
653 |
+
$section_bg_color = '';
|
654 |
+
$submit_button_height = '';
|
655 |
+
$submit_color = '';
|
656 |
+
$submit_bg_color = $primary_color;
|
657 |
+
$submit_border_color = $primary_color;
|
658 |
+
|
659 |
+
$submit_hover_color = '';
|
660 |
+
$submit_bg_hover_color = $primary_color;
|
661 |
+
$submit_border_hover_color = $primary_color;
|
662 |
+
|
663 |
+
$section_heading_color = '';
|
664 |
+
|
665 |
+
$is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' );
|
666 |
+
|
667 |
+
$button_font_family = '';
|
668 |
+
$button_font_weight = '';
|
669 |
+
$input_font_family = '';
|
670 |
+
$input_font_weight = '';
|
671 |
+
$heading_font_family = '';
|
672 |
+
$heading_font_weight = '';
|
673 |
+
$base_font_family = $base_font_family;
|
674 |
+
/**
|
675 |
+
$base_font_weight = $base_font_weight;*/
|
676 |
+
|
677 |
+
if ( 'yes' == $is_advance_option ) {
|
678 |
+
|
679 |
+
/**
|
680 |
+
* Get Font Family and Font Weight weight values
|
681 |
+
*/
|
682 |
+
$section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' );
|
683 |
+
|
684 |
+
$heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' );
|
685 |
+
$heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' );
|
686 |
+
$section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' );
|
687 |
+
$button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' );
|
688 |
+
$button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' );
|
689 |
+
$input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' );
|
690 |
+
$input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' );
|
691 |
+
$field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' );
|
692 |
+
$field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' );
|
693 |
+
$field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' );
|
694 |
+
|
695 |
+
$field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' );
|
696 |
+
|
697 |
+
$field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' );
|
698 |
+
|
699 |
+
$field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' );
|
700 |
+
|
701 |
+
$field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' );
|
702 |
+
|
703 |
+
$field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' );
|
704 |
+
|
705 |
+
$submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' );
|
706 |
+
|
707 |
+
$submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' );
|
708 |
+
|
709 |
+
$submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' );
|
710 |
+
|
711 |
+
$submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color );
|
712 |
+
|
713 |
+
$submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color );
|
714 |
+
|
715 |
+
$submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color );
|
716 |
+
|
717 |
+
$submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' );
|
718 |
+
|
719 |
+
$submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color );
|
720 |
+
|
721 |
+
$hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' );
|
722 |
+
|
723 |
+
$box_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-box-border-color' );
|
724 |
+
|
725 |
+
$submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' );
|
726 |
+
|
727 |
+
/**
|
728 |
+
* Get font values
|
729 |
+
*/
|
730 |
+
|
731 |
+
if ( 'custom' == $submit_button_height ) {
|
732 |
+
$submit_button_height = '38px';
|
733 |
+
}
|
734 |
+
|
735 |
+
if ( 'custom' == $field_input_size ) {
|
736 |
+
$field_input_size = '38px';
|
737 |
+
}
|
738 |
+
}
|
739 |
+
if ( isset( $primary_color ) ) {
|
740 |
+
|
741 |
+
list($r, $g, $b) = sscanf( $primary_color, '#%02x%02x%02x' );
|
742 |
+
}
|
743 |
+
$output = "
|
744 |
+
.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{
|
745 |
+
color:$primary_color !important;
|
746 |
+
border:1px solid $primary_color !important;
|
747 |
+
}
|
748 |
+
.wcf-embed-checkout-form .wcf-checkout-header-image img{
|
749 |
+
width: {$header_logo_width}px;
|
750 |
+
}
|
751 |
+
.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
|
752 |
+
.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:before{
|
753 |
+
color: {$primary_color};
|
754 |
+
}
|
755 |
+
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{
|
756 |
+
background-color: {$primary_color};
|
757 |
+
}
|
758 |
+
.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
|
759 |
+
.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:focus,
|
760 |
+
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:focus,
|
761 |
+
.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus{
|
762 |
+
border-color: {$primary_color};
|
763 |
+
box-shadow: 0 0 2px rgba( " . $r . ',' . $g . ',' . $b . ", .8);
|
764 |
+
}
|
765 |
+
.wcf-embed-checkout-form .woocommerce-checkout label{
|
766 |
+
color: {$field_label_color};
|
767 |
+
}
|
768 |
+
.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
|
769 |
+
background-color: {$hl_bg_color};
|
770 |
+
font-family: {$input_font_family};
|
771 |
+
font-weight: {$input_font_weight};
|
772 |
+
}
|
773 |
+
|
774 |
+
.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
|
775 |
+
.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
|
776 |
+
.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before
|
777 |
+
{
|
778 |
+
border-bottom-color: {$hl_bg_color};
|
779 |
+
border-right-color: transparent;
|
780 |
+
border-left-color: transparent;
|
781 |
+
border-top-color: transparent;
|
782 |
+
position: absolute;
|
783 |
+
}
|
784 |
+
|
785 |
+
.wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
|
786 |
+
.wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label{
|
787 |
+
font-family: {$input_font_family};
|
788 |
+
font-weight: {$input_font_weight};
|
789 |
+
}
|
790 |
+
|
791 |
+
.wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type='text'],
|
792 |
+
.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
|
793 |
+
.wcf-embed-checkout-form .woocommerce form .form-row textarea,
|
794 |
+
.wcf-embed-checkout-form .select2-container--default .select2-selection--single {
|
795 |
+
color: {$field_color};
|
796 |
+
background: {$field_bg_color};
|
797 |
+
border-color: {$field_border_color};
|
798 |
+
padding-top: {$field_tb_padding}px;
|
799 |
+
padding-bottom: {$field_tb_padding}px;
|
800 |
+
padding-left: {$field_lr_padding}px;
|
801 |
+
padding-right: {$field_lr_padding}px;
|
802 |
+
min-height: {$field_input_size};
|
803 |
+
font-family: {$input_font_family};
|
804 |
+
font-weight: {$input_font_weight};
|
805 |
+
}
|
806 |
+
|
807 |
+
.wcf-embed-checkout-form .woocommerce .col2-set .col-1,
|
808 |
+
.wcf-embed-checkout-form .woocommerce .col2-set .col-2,
|
809 |
+
.wcf-embed-checkout-form .woocommerce-checkout .shop_table,
|
810 |
+
.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
|
811 |
+
.wcf-embed-checkout-form .woocommerce-checkout #payment,
|
812 |
+
.wcf-embed-checkout-form .woocommerce form.checkout_coupon
|
813 |
+
{
|
814 |
+
background-color: {$section_bg_color};
|
815 |
+
border-color: {$box_border_color};
|
816 |
+
font-family: {$input_font_family};
|
817 |
+
font-weight: {$input_font_weight};
|
818 |
+
}
|
819 |
+
|
820 |
+
.woocommerce table.shop_table th{
|
821 |
+
color: {$field_label_color};
|
822 |
+
}
|
823 |
+
/*.wcf-embed-checkout-form .woocommerce .woocommerce-info,
|
824 |
+
.wcf-embed-checkout-form .woocommerce-message{
|
825 |
+
border-top-color: {$primary_color};
|
826 |
+
background-color: {$hl_bg_color};
|
827 |
+
}*/
|
828 |
+
.wcf-embed-checkout-form .woocommerce a{
|
829 |
+
color: {$primary_color};
|
830 |
+
}
|
831 |
+
.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
|
832 |
+
color: {$field_color};
|
833 |
+
}
|
834 |
+
.wcf-embed-checkout-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
835 |
+
color: {$field_color};
|
836 |
+
}
|
837 |
+
.wcf-embed-checkout-form ::-moz-placeholder { /* Firefox 19+ */
|
838 |
+
color: {$field_color};
|
839 |
+
}
|
840 |
+
.wcf-embed-checkout-form :-ms-input-placeholder { /* IE 10+ */
|
841 |
+
color: {$field_color};
|
842 |
+
}
|
843 |
+
.wcf-embed-checkout-form :-moz-placeholder { /* Firefox 18- */
|
844 |
+
color: {$field_color};
|
845 |
+
}
|
846 |
+
.wcf-embed-checkout-form .woocommerce form p.form-row label {
|
847 |
+
color: {$field_label_color};
|
848 |
+
font-family: {$input_font_family};
|
849 |
+
font-weight: {$input_font_weight};
|
850 |
+
}
|
851 |
+
.wcf-embed-checkout-form .woocommerce #order_review button,
|
852 |
+
.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
|
853 |
+
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
|
854 |
+
color: {$submit_color};
|
855 |
+
background: {$submit_bg_color};
|
856 |
+
padding-top: {$submit_tb_padding}px;
|
857 |
+
padding-bottom: {$submit_tb_padding}px;
|
858 |
+
padding-left: {$submit_lr_padding}px;
|
859 |
+
padding-right: {$submit_lr_padding}px;
|
860 |
+
border-color: {$submit_border_color};
|
861 |
+
min-height: {$submit_button_height};
|
862 |
+
font-family: {$button_font_family};
|
863 |
+
font-weight: {$button_font_weight};
|
864 |
+
}
|
865 |
+
.wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
|
866 |
+
.wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button{
|
867 |
+
background: {$submit_bg_color};
|
868 |
+
border: 1px {$submit_border_color} solid;
|
869 |
+
color: {$submit_color};
|
870 |
+
min-height: {$submit_button_height};
|
871 |
+
font-family: {$button_font_family};
|
872 |
+
font-weight: {$button_font_weight};
|
873 |
+
}
|
874 |
+
.wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
|
875 |
+
.wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
876 |
+
.wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
|
877 |
+
.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
|
878 |
+
color: {$submit_hover_color};
|
879 |
+
background-color: {$submit_bg_hover_color};
|
880 |
+
border-color: {$submit_border_hover_color};
|
881 |
+
}
|
882 |
+
.wcf-embed-checkout-form .woocommerce h3,
|
883 |
+
.wcf-embed-checkout-form .woocommerce h3 span,
|
884 |
+
.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
|
885 |
+
color: {$section_heading_color};
|
886 |
+
font-family: {$heading_font_family};
|
887 |
+
font-weight: {$heading_font_weight};
|
888 |
+
}
|
889 |
+
.wcf-embed-checkout-form .woocommerce-info::before,
|
890 |
+
.wcf-embed-checkout-form .woocommerce-message::before{
|
891 |
+
color: {$primary_color};
|
892 |
+
}
|
893 |
+
.wcf-embed-checkout-form{
|
894 |
+
font-family: {$base_font_family};
|
895 |
+
}
|
896 |
+
img.emoji, img.wp-smiley {}";
|
897 |
+
|
898 |
+
return $output;
|
899 |
+
}
|
900 |
+
|
901 |
+
/**
|
902 |
+
* Get ajax end points.
|
903 |
+
*
|
904 |
+
* @param string $endpoint_url end point URL.
|
905 |
+
* @param string $request end point request.
|
906 |
+
* @return string
|
907 |
+
*/
|
908 |
+
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
909 |
+
|
910 |
+
global $post;
|
911 |
+
|
912 |
+
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
913 |
+
|
914 |
+
if ( _is_wcf_checkout_type() ) {
|
915 |
+
|
916 |
+
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
917 |
+
|
918 |
+
if ( '' === $request ) {
|
919 |
+
$query_args = array(
|
920 |
+
'wc-ajax' => '%%endpoint%%',
|
921 |
+
);
|
922 |
+
} else {
|
923 |
+
$query_args = array(
|
924 |
+
'wc-ajax' => $request,
|
925 |
+
);
|
926 |
+
}
|
927 |
+
|
928 |
+
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
929 |
+
$uri = $uri[0];
|
930 |
+
|
931 |
+
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
932 |
+
}
|
933 |
+
}
|
934 |
+
}
|
935 |
+
|
936 |
+
return $endpoint_url;
|
937 |
+
}
|
938 |
+
|
939 |
+
|
940 |
+
/**
|
941 |
+
* Save checkout fields.
|
942 |
+
*
|
943 |
+
* @param int $order_id order id.
|
944 |
+
* @param array $posted posted data.
|
945 |
+
* @return void
|
946 |
+
*/
|
947 |
+
public function save_checkout_fields( $order_id, $posted ) {
|
948 |
+
|
949 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
950 |
+
|
951 |
+
$checkout_id = wc_clean( intval( $_POST['_wcf_checkout_id'] ) ); //phpcs:ignore
|
952 |
+
|
953 |
+
update_post_meta( $order_id, '_wcf_checkout_id', $checkout_id );
|
954 |
+
|
955 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
956 |
+
|
957 |
+
$flow_id = wc_clean( intval( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
958 |
+
|
959 |
+
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
960 |
+
}
|
961 |
+
}
|
962 |
+
|
963 |
+
}
|
964 |
+
|
965 |
+
/**
|
966 |
+
* Enable Logo In Header Of Checkout Page
|
967 |
+
*
|
968 |
+
* @return void
|
969 |
+
*/
|
970 |
+
public function enable_logo_in_header() {
|
971 |
+
global $post;
|
972 |
+
|
973 |
+
if ( _is_wcf_checkout_type() ) {
|
974 |
+
$checkout_id = $post->ID;
|
975 |
+
} else {
|
976 |
+
$checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
|
977 |
+
}
|
978 |
+
|
979 |
+
$header_logo_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-header-logo-image' );
|
980 |
+
$add_image_markup = '';
|
981 |
+
|
982 |
+
if ( isset( $header_logo_image ) && ! empty( $header_logo_image ) ) {
|
983 |
+
$add_image_markup = '<div class="wcf-checkout-header-image">';
|
984 |
+
$add_image_markup .= '<img src="' . $header_logo_image . '" />';
|
985 |
+
$add_image_markup .= '</div>';
|
986 |
+
}
|
987 |
+
|
988 |
+
echo $add_image_markup;
|
989 |
+
}
|
990 |
+
|
991 |
+
/**
|
992 |
+
* Add text to the bootom of the checkout page.
|
993 |
+
*
|
994 |
+
* @return void
|
995 |
+
*/
|
996 |
+
public function show_cartflows_copyright_message() {
|
997 |
+
$output_string = '';
|
998 |
+
|
999 |
+
$output_string .= '<div class="wcf-footer-primary">';
|
1000 |
+
$output_string .= '<div class="wcf-footer-content">';
|
1001 |
+
$output_string .= '<p class="wcf-footer-message">';
|
1002 |
+
$output_string .= 'Checkout powered by CartFlows';
|
1003 |
+
$output_string .= '</p>';
|
1004 |
+
$output_string .= '</div>';
|
1005 |
+
$output_string .= '</div>';
|
1006 |
+
|
1007 |
+
echo $output_string;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
/**
|
1011 |
+
* Redirect users to our checkout if hidden param
|
1012 |
+
*
|
1013 |
+
* @param string $redirect redirect url.
|
1014 |
+
* @param object $user user.
|
1015 |
+
* @return string
|
1016 |
+
*/
|
1017 |
+
public function after_login_redirect( $redirect, $user ) {
|
1018 |
+
|
1019 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
1020 |
+
|
1021 |
+
$checkout_id = intval( $_POST['_wcf_checkout_id'] ); //phpcs:ignore
|
1022 |
+
|
1023 |
+
$redirect = get_permalink( $checkout_id );
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
return $redirect;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
/**
|
1030 |
+
* Display coupon code field after review order fields.
|
1031 |
+
*/
|
1032 |
+
public function display_custom_coupon_field() {
|
1033 |
+
|
1034 |
+
$coupon_enabled = apply_filters( 'woocommerce_coupons_enabled', true );
|
1035 |
+
$show_coupon = apply_filters( 'cartflows_show_coupon_field', true );
|
1036 |
+
|
1037 |
+
if ( ! ( $coupon_enabled && $show_coupon ) ) {
|
1038 |
+
return;
|
1039 |
+
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
$coupon_field = array(
|
1043 |
+
'field_text' => __( 'Coupon Code', 'cartflows' ),
|
1044 |
+
'button_text' => __( 'Apply', 'cartflows' ),
|
1045 |
+
'class' => '',
|
1046 |
+
);
|
1047 |
+
|
1048 |
+
$coupon_field = apply_filters( 'cartflows_coupon_field_options', $coupon_field );
|
1049 |
+
|
1050 |
+
ob_start();
|
1051 |
+
?>
|
1052 |
+
<div class="wcf-custom-coupon-field <?php echo $coupon_field['class']; ?>" id="wcf_custom_coupon_field">
|
1053 |
+
<div class="wcf-coupon-col-1">
|
1054 |
+
<span>
|
1055 |
+
<input type="text" name="coupon_code" class="input-text wcf-coupon-code-input" placeholder="<?php echo $coupon_field['field_text']; ?>" id="coupon_code" value="">
|
1056 |
+
</span>
|
1057 |
+
</div>
|
1058 |
+
<div class="wcf-coupon-col-2">
|
1059 |
+
<span>
|
1060 |
+
<button type="button" class="button wcf-submit-coupon wcf-btn-small" name="apply_coupon" value="Apply"><?php echo $coupon_field['button_text']; ?></button>
|
1061 |
+
</span>
|
1062 |
+
</div>
|
1063 |
+
</div>
|
1064 |
+
<?php
|
1065 |
+
echo ob_get_clean();
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
/**
|
1069 |
+
* Apply filter to change class of remove coupon field.
|
1070 |
+
*
|
1071 |
+
* @param string $coupon coupon.
|
1072 |
+
* @return string
|
1073 |
+
*/
|
1074 |
+
public function remove_coupon_text( $coupon ) {
|
1075 |
+
|
1076 |
+
$coupon = str_replace( 'woocommerce-remove-coupon', 'wcf-remove-coupon', $coupon );
|
1077 |
+
return $coupon;
|
1078 |
+
|
1079 |
+
}
|
1080 |
+
/**
|
1081 |
+
* Apply filter to change the placeholder text of coupon field.
|
1082 |
+
*
|
1083 |
+
* @return string
|
1084 |
+
*/
|
1085 |
+
public function coupon_field_placeholder() {
|
1086 |
+
return apply_filters( 'cartflows_coupon_field_placeholder', __( 'Coupon Code', 'cartflows' ) );
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
/**
|
1090 |
+
* Apply filter to change the button text of coupon field.
|
1091 |
+
*
|
1092 |
+
* @return string
|
1093 |
+
*/
|
1094 |
+
public function coupon_button_text() {
|
1095 |
+
return apply_filters( 'cartflows_coupon_button_text', __( 'Apply', 'cartflows' ) );
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* Apply coupon on submit of custom coupon form.
|
1100 |
+
*/
|
1101 |
+
public function apply_coupon() {
|
1102 |
+
|
1103 |
+
$response = '';
|
1104 |
+
|
1105 |
+
check_ajax_referer( 'wcf-apply-coupon', 'security' );
|
1106 |
+
if ( ! empty( $_POST['coupon_code'] ) ) {
|
1107 |
+
$result = WC()->cart->add_discount( sanitize_text_field( wp_unslash( $_POST['coupon_code'] ) ) );
|
1108 |
+
} else {
|
1109 |
+
wc_add_notice( WC_Coupon::get_generic_coupon_error( WC_Coupon::E_WC_COUPON_PLEASE_ENTER ), 'error' );
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
$response = array(
|
1113 |
+
'status' => $result,
|
1114 |
+
'msg' => wc_print_notices( true ),
|
1115 |
+
);
|
1116 |
+
|
1117 |
+
echo wp_json_encode( $response );
|
1118 |
+
|
1119 |
+
die();
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
|
1123 |
+
/**
|
1124 |
+
* Added ajax nonce to localize variable.
|
1125 |
+
*
|
1126 |
+
* @param array $vars localize variables.
|
1127 |
+
*/
|
1128 |
+
public function add_localize_vars( $vars ) {
|
1129 |
+
|
1130 |
+
$vars['wcf_validate_coupon_nonce'] = wp_create_nonce( 'wcf-apply-coupon' );
|
1131 |
+
|
1132 |
+
$vars['wcf_validate_remove_coupon_nonce'] = wp_create_nonce( 'wcf-remove-coupon' );
|
1133 |
+
|
1134 |
+
$vars['wcf_validate_remove_cart_product_nonce'] = wp_create_nonce( 'wcf-remove-cart-product' );
|
1135 |
+
|
1136 |
+
$vars['allow_persistance'] = apply_filters( 'cartflows_allow_persistace', 'yes' );
|
1137 |
+
|
1138 |
+
return $vars;
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
/**
|
1142 |
+
* Add custom class to the fields to change the UI to three column.
|
1143 |
+
*
|
1144 |
+
* @param array $fields fields.
|
1145 |
+
*/
|
1146 |
+
public function add_three_column_layout_fields( $fields ) {
|
1147 |
+
|
1148 |
+
if ( empty( $fields['billing']['billing_address_2'] ) ) {
|
1149 |
+
|
1150 |
+
if ( isset( $fields['billing']['billing_address_1'] ) && is_array( $fields['billing']['billing_address_1'] ) ) {
|
1151 |
+
$fields['billing']['billing_address_1']['class'][] = 'form-row-full';
|
1152 |
+
}
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
if ( ! empty( $fields['billing']['billing_company'] ) ) {
|
1156 |
+
|
1157 |
+
if ( isset( $fields['billing']['billing_company'] ) && is_array( $fields['billing']['billing_company'] ) ) {
|
1158 |
+
$fields['billing']['billing_company']['class'][] = 'form-row-full';
|
1159 |
+
}
|
1160 |
+
}
|
1161 |
+
|
1162 |
+
if ( ! empty( $fields['shipping']['shipping_company'] ) ) {
|
1163 |
+
|
1164 |
+
if ( isset( $fields['shipping']['shipping_company'] ) && is_array( $fields['shipping']['shipping_company'] ) ) {
|
1165 |
+
$fields['shipping']['shipping_company']['class'][] = 'form-row-full';
|
1166 |
+
}
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
if ( ! empty( $fields['billing']['billing_country'] ) ) {
|
1170 |
+
|
1171 |
+
if ( isset( $fields['billing']['billing_country'] ) && is_array( $fields['billing']['billing_country'] ) ) {
|
1172 |
+
$fields['billing']['billing_country']['class'][] = 'form-row-full';
|
1173 |
+
}
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
if ( ! empty( $fields['shipping']['shipping_country'] ) ) {
|
1177 |
+
|
1178 |
+
if ( isset( $fields['shipping']['shipping_country'] ) && is_array( $fields['shipping']['shipping_country'] ) ) {
|
1179 |
+
$fields['shipping']['shipping_country']['class'][] = 'form-row-full';
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
if ( ! empty( $fields['billing']['billing_phone'] ) ) {
|
1184 |
+
|
1185 |
+
if ( isset( $fields['billing']['billing_phone'] ) && is_array( $fields['billing']['billing_phone'] ) ) {
|
1186 |
+
$fields['billing']['billing_phone']['class'][] = 'form-row-full';
|
1187 |
+
}
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
if ( ! empty( $fields['billing']['billing_email'] ) ) {
|
1191 |
+
|
1192 |
+
if ( isset( $fields['billing']['billing_email'] ) && is_array( $fields['billing']['billing_email'] ) ) {
|
1193 |
+
$fields['billing']['billing_email']['class'][] = 'form-row-full';
|
1194 |
+
}
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
if ( empty( $fields['shipping']['shipping_address_2'] ) ) {
|
1198 |
+
|
1199 |
+
if ( isset( $fields['shipping']['shipping_address_1'] ) && is_array( $fields['shipping']['shipping_address_1'] ) ) {
|
1200 |
+
$fields['shipping']['shipping_address_1']['class'][] = 'form-row-full';
|
1201 |
+
}
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
if ( isset( $fields['billing']['billing_city'] ) &&
|
1205 |
+
isset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] ) ) {
|
1206 |
+
|
1207 |
+
$fields['billing']['billing_city']['class'][] = 'wcf-column-33';
|
1208 |
+
$fields['billing']['billing_state']['class'][] = 'wcf-column-33';
|
1209 |
+
$fields['billing']['billing_postcode']['class'][] = 'wcf-column-33';
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
if ( isset( $fields['shipping']['shipping_city'] ) &&
|
1213 |
+
isset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] ) ) {
|
1214 |
+
|
1215 |
+
$fields['shipping']['shipping_city']['class'][] = 'wcf-column-33';
|
1216 |
+
$fields['shipping']['shipping_state']['class'][] = 'wcf-column-33';
|
1217 |
+
$fields['shipping']['shipping_postcode']['class'][] = 'wcf-column-33';
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
return $fields;
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
/**
|
1224 |
+
* Add opening dev
|
1225 |
+
*
|
1226 |
+
* @since 1.0.0
|
1227 |
+
*/
|
1228 |
+
public function order_wrap_div_start() {
|
1229 |
+
|
1230 |
+
echo "<div class='wcf-order-wrap'> ";
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
/**
|
1234 |
+
* Add closing dev
|
1235 |
+
*
|
1236 |
+
* @since 1.0.0
|
1237 |
+
*/
|
1238 |
+
public function order_wrap_div_end() {
|
1239 |
+
|
1240 |
+
echo '</div> ';
|
1241 |
+
}
|
1242 |
+
/**
|
1243 |
+
* Remove coupon.
|
1244 |
+
*/
|
1245 |
+
public function remove_coupon() {
|
1246 |
+
|
1247 |
+
check_ajax_referer( 'wcf-remove-coupon', 'security' );
|
1248 |
+
$coupon = isset( $_POST['coupon_code'] ) ? wc_clean( wp_unslash( $_POST['coupon_code'] ) ) : false; //phpcs:ignore
|
1249 |
+
|
1250 |
+
if ( empty( $coupon ) ) {
|
1251 |
+
echo "<div class='woocommerce-error'>" . esc_html__( 'Sorry there was a problem removing this coupon.', 'cartflows' );
|
1252 |
+
} else {
|
1253 |
+
WC()->cart->remove_coupon( $coupon );
|
1254 |
+
echo "<div class='woocommerce-error'>" . esc_html__( 'Coupon has been removed.', 'cartflows' ) . '</div>';
|
1255 |
+
}
|
1256 |
+
wc_print_notices();
|
1257 |
+
wp_die();
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
/**
|
1261 |
+
* Remove cart item.
|
1262 |
+
*/
|
1263 |
+
public function wcf_woo_remove_cart_product() {
|
1264 |
+
|
1265 |
+
check_ajax_referer( 'wcf-remove-cart-product', 'security' );
|
1266 |
+
$product_key = isset( $_POST['p_key'] ) ? wc_clean( wp_unslash( $_POST['p_key'] ) ) : false; //phpcs:ignore
|
1267 |
+
$product_id = isset( $_POST['p_id'] ) ? wc_clean( wp_unslash( $_POST['p_id'] ) ) : ''; //phpcs:ignore
|
1268 |
+
$product_title = get_the_title( $product_id );
|
1269 |
+
|
1270 |
+
$needs_shipping = false;
|
1271 |
+
|
1272 |
+
if ( empty( $product_key ) ) {
|
1273 |
+
$msg = "<div class='woocommerce-message'>" . __( 'Sorry there was a problem removing ', 'cartflows' ) . $product_title;
|
1274 |
+
} else {
|
1275 |
+
WC()->cart->remove_cart_item( $product_key );
|
1276 |
+
$msg = "<div class='woocommerce-message'>" . $product_title . __( ' has been removed.', 'cartflows' ) . '</div>';
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
|
1280 |
+
if ( $values['data']->needs_shipping() ) {
|
1281 |
+
$needs_shipping = true;
|
1282 |
+
break;
|
1283 |
+
}
|
1284 |
+
}
|
1285 |
+
|
1286 |
+
$response = array(
|
1287 |
+
'need_shipping' => $needs_shipping,
|
1288 |
+
'msg' => $msg,
|
1289 |
+
);
|
1290 |
+
|
1291 |
+
echo wp_json_encode( $response );
|
1292 |
+
wp_die();
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
/**
|
1298 |
+
* Kicking this off by calling 'get_instance()' method
|
1299 |
+
*/
|
1300 |
+
Cartflows_Checkout_Markup::get_instance();
|
modules/checkout/classes/class-cartflows-checkout-meta.php
CHANGED
@@ -1,881 +1,915 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Checkout post meta
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Meta Boxes setup
|
10 |
-
*/
|
11 |
-
class Cartflows_Checkout_Meta extends Cartflows_Meta {
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Instance
|
16 |
-
*
|
17 |
-
* @var $instance
|
18 |
-
*/
|
19 |
-
private static $instance;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Meta Option
|
23 |
-
*
|
24 |
-
* @var $meta_option
|
25 |
-
*/
|
26 |
-
private static $meta_option = null;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Initiator
|
30 |
-
*/
|
31 |
-
public static function get_instance() {
|
32 |
-
if ( ! isset( self::$instance ) ) {
|
33 |
-
self::$instance = new self();
|
34 |
-
}
|
35 |
-
|
36 |
-
return self::$instance;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Constructor
|
41 |
-
*/
|
42 |
-
public function __construct() {
|
43 |
-
|
44 |
-
/* Init Metabox */
|
45 |
-
add_action( 'load-post.php', array( $this, 'init_metabox' ) );
|
46 |
-
add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
|
47 |
-
}
|
48 |
-
/**
|
49 |
-
* Init Metabox
|
50 |
-
*/
|
51 |
-
public function init_metabox() {
|
52 |
-
|
53 |
-
add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
|
54 |
-
add_action( 'save_post', array( $this, 'save_meta_box' ) );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Setup Metabox
|
59 |
-
*/
|
60 |
-
public function setup_meta_box() {
|
61 |
-
|
62 |
-
if ( _is_wcf_checkout_type() ) {
|
63 |
-
add_meta_box(
|
64 |
-
'wcf-checkout-settings', // Id.
|
65 |
-
__( 'Checkout Layout', 'cartflows' ), // Title.
|
66 |
-
array( $this, 'markup_meta_box' ), // Callback.
|
67 |
-
wcf()->utils->get_step_post_type(), // Post_type.
|
68 |
-
'normal', // Context.
|
69 |
-
'high' // Priority.
|
70 |
-
);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Metabox Markup
|
76 |
-
*
|
77 |
-
* @param object $post Post object.
|
78 |
-
* @return void
|
79 |
-
*/
|
80 |
-
public function markup_meta_box( $post ) {
|
81 |
-
|
82 |
-
wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
|
83 |
-
|
84 |
-
$stored = get_post_meta( $post->ID );
|
85 |
-
|
86 |
-
$checkout_meta = self::get_meta_option( $post->ID );
|
87 |
-
|
88 |
-
// Set stored and override defaults.
|
89 |
-
foreach ( $stored as $key => $value ) {
|
90 |
-
if ( array_key_exists( $key, $checkout_meta ) ) {
|
91 |
-
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
|
92 |
-
} else {
|
93 |
-
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
|
94 |
-
}
|
95 |
-
}
|
96 |
-
|
97 |
-
// Get defaults.
|
98 |
-
$meta = self::get_meta_option( $post->ID );
|
99 |
-
$checkout_data = array();
|
100 |
-
|
101 |
-
foreach ( $meta as $key => $value ) {
|
102 |
-
$checkout_data[ $key ] = $meta[ $key ]['default'];
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post->ID );
|
107 |
-
|
108 |
-
// For loop
|
109 |
-
foreach ( $billing_fields as $key => $value ) {
|
110 |
-
|
111 |
-
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
112 |
-
}
|
113 |
-
|
114 |
-
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post->ID );
|
115 |
-
|
116 |
-
foreach ( $shipping_fields as $key => $value ) {
|
117 |
-
|
118 |
-
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
119 |
-
}
|
120 |
-
|
121 |
-
$additional_fields = Cartflows_Helper::get_checkout_fields( 'additional', $post->ID );
|
122 |
-
|
123 |
-
foreach ( $additional_fields as $key => $value ) {
|
124 |
-
|
125 |
-
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
126 |
-
}
|
127 |
-
*/
|
128 |
-
|
129 |
-
do_action( 'wcf_checkout_settings_markup_before' );
|
130 |
-
$this->tabs_markup( $checkout_data, $post->ID );
|
131 |
-
do_action( 'wcf_checkout_settings_markup_after' );
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Page Header Tabs
|
136 |
-
*
|
137 |
-
* @param array $options options.
|
138 |
-
* @param int $post_id post ID.
|
139 |
-
*/
|
140 |
-
public function tabs_markup( $options, $post_id ) {
|
141 |
-
|
142 |
-
$active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
|
143 |
-
|
144 |
-
if ( empty( $active_tab ) ) {
|
145 |
-
$active_tab = 'wcf-checkout-shortcodes';
|
146 |
-
}
|
147 |
-
|
148 |
-
$tab_array = array(
|
149 |
-
array(
|
150 |
-
'title' => __( 'Shortcodes', 'cartflows' ),
|
151 |
-
'id' => 'wcf-checkout-shortcodes',
|
152 |
-
'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
153 |
-
'icon' => 'dashicons-editor-code',
|
154 |
-
),
|
155 |
-
array(
|
156 |
-
'title' => __( 'Select Product', 'cartflows' ),
|
157 |
-
'id' => 'wcf-checkout-general',
|
158 |
-
'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
159 |
-
'icon' => 'dashicons-info',
|
160 |
-
),
|
161 |
-
array(
|
162 |
-
'title' => __( 'Order Bump', 'cartflows' ),
|
163 |
-
'id' => 'wcf-product-order-bump',
|
164 |
-
'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
165 |
-
'icon' => 'dashicons-cart',
|
166 |
-
),
|
167 |
-
array(
|
168 |
-
'title' => __( 'Checkout Offer', 'cartflows' ),
|
169 |
-
'id' => 'wcf-pre-checkout-offer',
|
170 |
-
'class' => 'wcf-pre-checkout-offer' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
171 |
-
'icon' => 'dashicons-arrow-up-alt',
|
172 |
-
),
|
173 |
-
array(
|
174 |
-
'title' => __( 'Checkout Design', 'cartflows' ),
|
175 |
-
'id' => 'wcf-checkout-style',
|
176 |
-
'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
177 |
-
'icon' => 'dashicons-admin-customizer',
|
178 |
-
),
|
179 |
-
array(
|
180 |
-
'title' => __( 'Checkout Fields', 'cartflows' ),
|
181 |
-
'id' => 'wcf-checkout-custom-fields',
|
182 |
-
'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
183 |
-
'icon' => 'dashicons-welcome-widgets-menus',
|
184 |
-
),
|
185 |
-
array(
|
186 |
-
'title' => __( 'Checkout Settings', 'cartflows' ),
|
187 |
-
'id' => 'wcf-checkout-custom-settings',
|
188 |
-
'class' => 'wcf-checkout-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
189 |
-
'icon' => 'dashicons-admin-generic',
|
190 |
-
),
|
191 |
-
array(
|
192 |
-
'title' => __( 'Custom Script', 'cartflows' ),
|
193 |
-
'id' => 'wcf-checkout-custom-script-header',
|
194 |
-
'class' => 'wcf-checkout-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
195 |
-
'icon' => 'dashicons-format-aside',
|
196 |
-
),
|
197 |
-
);
|
198 |
-
|
199 |
-
$show_logo = filter_input( INPUT_GET, 'logo-tab', FILTER_VALIDATE_BOOLEAN );
|
200 |
-
|
201 |
-
if ( $show_logo ) {
|
202 |
-
$logo_tab = array(
|
203 |
-
'title' => __( 'Logo (Optional)', 'cartflows' ),
|
204 |
-
'id' => 'wcf-checkout-header',
|
205 |
-
'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
206 |
-
'icon' => 'dashicons-format-image',
|
207 |
-
);
|
208 |
-
array_push( $tab_array, $logo_tab );
|
209 |
-
}
|
210 |
-
|
211 |
-
$tabs = apply_filters( 'cartflows_checkout_tabs', $tab_array, $active_tab );
|
212 |
-
|
213 |
-
?>
|
214 |
-
<div class="wcf-checkout-table wcf-metabox-wrap widefat">
|
215 |
-
<div class="wcf-table-container">
|
216 |
-
<div class="wcf-column-left">
|
217 |
-
<div class="wcf-tab-wrapper">
|
218 |
-
|
219 |
-
<?php foreach ( $tabs as $key => $tab ) { ?>
|
220 |
-
<div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
|
221 |
-
<span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
|
222 |
-
<span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
|
223 |
-
</div>
|
224 |
-
<?php } ?>
|
225 |
-
|
226 |
-
<input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
|
227 |
-
</div>
|
228 |
-
</div>
|
229 |
-
<div class="wcf-column-right">
|
230 |
-
<?php $this->tab_shortcodes( $options, $post_id ); ?>
|
231 |
-
<?php $this->tab_general( $options, $post_id ); ?>
|
232 |
-
<?php $this->tab_style( $options, $post_id ); ?>
|
233 |
-
<?php $this->tab_pre_checkout_offer( $options, $post_id ); ?>
|
234 |
-
<?php $this->tab_product_bump( $options, $post_id ); ?>
|
235 |
-
<?php $this->tab_custom_fields( $options, $post_id ); ?>
|
236 |
-
<?php $this->tab_custom_settings( $options, $post_id ); ?>
|
237 |
-
<?php $this->tab_header_content( $options, $post_id ); ?>
|
238 |
-
<?php $this->tab_custom_script( $options, $post_id ); ?>
|
239 |
-
<?php do_action( 'cartflows_checkout_tabs_content', $options, $post_id ); ?>
|
240 |
-
<?php $this->right_column_footer( $options, $post_id ); ?>
|
241 |
-
</div>
|
242 |
-
</div>
|
243 |
-
</div>
|
244 |
-
|
245 |
-
<?php
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Shortcodes tab
|
250 |
-
*
|
251 |
-
* @param array $options options.
|
252 |
-
* @param int $post_id post ID.
|
253 |
-
*/
|
254 |
-
public function tab_shortcodes( $options, $post_id ) {
|
255 |
-
?>
|
256 |
-
<div class="wcf-checkout-shortcodes wcf-tab-content widefat">
|
257 |
-
|
258 |
-
<?php
|
259 |
-
|
260 |
-
echo wcf()->meta->get_shortcode_field(
|
261 |
-
array(
|
262 |
-
'label' => 'Checkout Page',
|
263 |
-
'name' => 'wcf-checkout-shortcode',
|
264 |
-
'content' => '[cartflows_checkout]',
|
265 |
-
'help' => esc_html__( 'Add this shortcode to your checkout page', 'cartflows' ),
|
266 |
-
)
|
267 |
-
);
|
268 |
-
?>
|
269 |
-
</div>
|
270 |
-
<?php
|
271 |
-
}
|
272 |
-
|
273 |
-
|
274 |
-
/**
|
275 |
-
* General tab
|
276 |
-
*
|
277 |
-
* @param array $options options.
|
278 |
-
* @param int $post_id post ID.
|
279 |
-
*/
|
280 |
-
public function tab_general( $options, $post_id ) {
|
281 |
-
?>
|
282 |
-
<div class="wcf-checkout-general wcf-tab-content widefat">
|
283 |
-
|
284 |
-
<?php
|
285 |
-
|
286 |
-
echo wcf()->meta->get_product_selection_repeater(
|
287 |
-
array(
|
288 |
-
'name' => 'wcf-checkout-products',
|
289 |
-
'value' => $options['wcf-checkout-products'],
|
290 |
-
'allow_clear' => true,
|
291 |
-
)
|
292 |
-
);
|
293 |
-
|
294 |
-
if ( ! _is_cartflows_pro() ) {
|
295 |
-
|
296 |
-
echo wcf()->meta->get_hr_line_field( array() );
|
297 |
-
echo wcf()->meta->get_description_field(
|
298 |
-
array(
|
299 |
-
'name' => 'wcf-upgrade-to-pro',
|
300 |
-
/* translators: %s: link */
|
301 |
-
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon, Product Variations & Quantity Options.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
302 |
-
)
|
303 |
-
);
|
304 |
-
}
|
305 |
-
|
306 |
-
do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
|
307 |
-
|
308 |
-
?>
|
309 |
-
</div>
|
310 |
-
<?php
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Pre Checkout tab
|
315 |
-
*
|
316 |
-
* @param array $options options.
|
317 |
-
* @param int $post_id post ID.
|
318 |
-
*/
|
319 |
-
public function tab_pre_checkout_offer( $options, $post_id ) {
|
320 |
-
?>
|
321 |
-
<div class="wcf-pre-checkout-offer wcf-tab-content widefat">
|
322 |
-
<?php
|
323 |
-
if ( ! _is_cartflows_pro() ) {
|
324 |
-
echo wcf()->meta->get_description_field(
|
325 |
-
array(
|
326 |
-
'name' => 'wcf-upgrade-to-pro',
|
327 |
-
/* translators: %s: link */
|
328 |
-
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
329 |
-
)
|
330 |
-
);
|
331 |
-
} elseif ( _is_cartflows_pro_ver_less_than( '1.2.0' ) ) {
|
332 |
-
|
333 |
-
$version = '1.2.0';
|
334 |
-
echo wcf()->meta->get_description_field(
|
335 |
-
array(
|
336 |
-
'name' => 'wcf-upgrade-to-pro',
|
337 |
-
/* translators: %s: link */
|
338 |
-
'content' => '<i>' . sprintf( esc_html__( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
|
339 |
-
)
|
340 |
-
);
|
341 |
-
}
|
342 |
-
?>
|
343 |
-
|
344 |
-
<?php do_action( 'cartflows_pre_checkout_offer_tab_content', $options, $post_id ); ?>
|
345 |
-
</div>
|
346 |
-
<?php
|
347 |
-
}
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
*
|
353 |
-
*
|
354 |
-
* @param
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
)
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
'
|
510 |
-
'
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
'
|
526 |
-
'
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
'
|
534 |
-
'
|
535 |
-
'
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
'
|
543 |
-
'
|
544 |
-
'
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
'
|
568 |
-
'
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
'
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
'
|
600 |
-
'
|
601 |
-
|
602 |
-
|
603 |
-
'
|
604 |
-
'
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
)
|
609 |
-
);
|
610 |
-
|
611 |
-
echo wcf()->meta->
|
612 |
-
array(
|
613 |
-
'
|
614 |
-
'
|
615 |
-
'
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
'
|
623 |
-
'
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
'
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
'
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
'
|
666 |
-
)
|
667 |
-
);
|
668 |
-
|
669 |
-
echo wcf()->meta->
|
670 |
-
array(
|
671 |
-
'
|
672 |
-
'
|
673 |
-
'
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
'
|
681 |
-
'
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
),
|
700 |
-
)
|
701 |
-
);
|
702 |
-
|
703 |
-
echo wcf()->meta->
|
704 |
-
array(
|
705 |
-
'
|
706 |
-
'
|
707 |
-
'
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
'
|
715 |
-
'
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
'
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
'
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
'
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
'
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
'
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
'
|
781 |
-
'
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
'name' => 'wcf-
|
789 |
-
'value' => $options['wcf-
|
790 |
-
)
|
791 |
-
);
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
/**
|
836 |
-
*
|
837 |
-
*
|
838 |
-
* @param
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
/**
|
879 |
-
|
880 |
-
|
881 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Checkout post meta
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Meta Boxes setup
|
10 |
+
*/
|
11 |
+
class Cartflows_Checkout_Meta extends Cartflows_Meta {
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance
|
16 |
+
*
|
17 |
+
* @var $instance
|
18 |
+
*/
|
19 |
+
private static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Meta Option
|
23 |
+
*
|
24 |
+
* @var $meta_option
|
25 |
+
*/
|
26 |
+
private static $meta_option = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initiator
|
30 |
+
*/
|
31 |
+
public static function get_instance() {
|
32 |
+
if ( ! isset( self::$instance ) ) {
|
33 |
+
self::$instance = new self();
|
34 |
+
}
|
35 |
+
|
36 |
+
return self::$instance;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Constructor
|
41 |
+
*/
|
42 |
+
public function __construct() {
|
43 |
+
|
44 |
+
/* Init Metabox */
|
45 |
+
add_action( 'load-post.php', array( $this, 'init_metabox' ) );
|
46 |
+
add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* Init Metabox
|
50 |
+
*/
|
51 |
+
public function init_metabox() {
|
52 |
+
|
53 |
+
add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
|
54 |
+
add_action( 'save_post', array( $this, 'save_meta_box' ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Setup Metabox
|
59 |
+
*/
|
60 |
+
public function setup_meta_box() {
|
61 |
+
|
62 |
+
if ( _is_wcf_checkout_type() ) {
|
63 |
+
add_meta_box(
|
64 |
+
'wcf-checkout-settings', // Id.
|
65 |
+
__( 'Checkout Layout', 'cartflows' ), // Title.
|
66 |
+
array( $this, 'markup_meta_box' ), // Callback.
|
67 |
+
wcf()->utils->get_step_post_type(), // Post_type.
|
68 |
+
'normal', // Context.
|
69 |
+
'high' // Priority.
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Metabox Markup
|
76 |
+
*
|
77 |
+
* @param object $post Post object.
|
78 |
+
* @return void
|
79 |
+
*/
|
80 |
+
public function markup_meta_box( $post ) {
|
81 |
+
|
82 |
+
wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
|
83 |
+
|
84 |
+
$stored = get_post_meta( $post->ID );
|
85 |
+
|
86 |
+
$checkout_meta = self::get_meta_option( $post->ID );
|
87 |
+
|
88 |
+
// Set stored and override defaults.
|
89 |
+
foreach ( $stored as $key => $value ) {
|
90 |
+
if ( array_key_exists( $key, $checkout_meta ) ) {
|
91 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
|
92 |
+
} else {
|
93 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
// Get defaults.
|
98 |
+
$meta = self::get_meta_option( $post->ID );
|
99 |
+
$checkout_data = array();
|
100 |
+
|
101 |
+
foreach ( $meta as $key => $value ) {
|
102 |
+
$checkout_data[ $key ] = $meta[ $key ]['default'];
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
$billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post->ID );
|
107 |
+
|
108 |
+
// For loop
|
109 |
+
foreach ( $billing_fields as $key => $value ) {
|
110 |
+
|
111 |
+
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
112 |
+
}
|
113 |
+
|
114 |
+
$shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post->ID );
|
115 |
+
|
116 |
+
foreach ( $shipping_fields as $key => $value ) {
|
117 |
+
|
118 |
+
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
119 |
+
}
|
120 |
+
|
121 |
+
$additional_fields = Cartflows_Helper::get_checkout_fields( 'additional', $post->ID );
|
122 |
+
|
123 |
+
foreach ( $additional_fields as $key => $value ) {
|
124 |
+
|
125 |
+
$checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
|
126 |
+
}
|
127 |
+
*/
|
128 |
+
|
129 |
+
do_action( 'wcf_checkout_settings_markup_before' );
|
130 |
+
$this->tabs_markup( $checkout_data, $post->ID );
|
131 |
+
do_action( 'wcf_checkout_settings_markup_after' );
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Page Header Tabs
|
136 |
+
*
|
137 |
+
* @param array $options options.
|
138 |
+
* @param int $post_id post ID.
|
139 |
+
*/
|
140 |
+
public function tabs_markup( $options, $post_id ) {
|
141 |
+
|
142 |
+
$active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
|
143 |
+
|
144 |
+
if ( empty( $active_tab ) ) {
|
145 |
+
$active_tab = 'wcf-checkout-shortcodes';
|
146 |
+
}
|
147 |
+
|
148 |
+
$tab_array = array(
|
149 |
+
array(
|
150 |
+
'title' => __( 'Shortcodes', 'cartflows' ),
|
151 |
+
'id' => 'wcf-checkout-shortcodes',
|
152 |
+
'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
153 |
+
'icon' => 'dashicons-editor-code',
|
154 |
+
),
|
155 |
+
array(
|
156 |
+
'title' => __( 'Select Product', 'cartflows' ),
|
157 |
+
'id' => 'wcf-checkout-general',
|
158 |
+
'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
159 |
+
'icon' => 'dashicons-info',
|
160 |
+
),
|
161 |
+
array(
|
162 |
+
'title' => __( 'Order Bump', 'cartflows' ),
|
163 |
+
'id' => 'wcf-product-order-bump',
|
164 |
+
'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
165 |
+
'icon' => 'dashicons-cart',
|
166 |
+
),
|
167 |
+
array(
|
168 |
+
'title' => __( 'Checkout Offer', 'cartflows' ),
|
169 |
+
'id' => 'wcf-pre-checkout-offer',
|
170 |
+
'class' => 'wcf-pre-checkout-offer' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
171 |
+
'icon' => 'dashicons-arrow-up-alt',
|
172 |
+
),
|
173 |
+
array(
|
174 |
+
'title' => __( 'Checkout Design', 'cartflows' ),
|
175 |
+
'id' => 'wcf-checkout-style',
|
176 |
+
'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
177 |
+
'icon' => 'dashicons-admin-customizer',
|
178 |
+
),
|
179 |
+
array(
|
180 |
+
'title' => __( 'Checkout Fields', 'cartflows' ),
|
181 |
+
'id' => 'wcf-checkout-custom-fields',
|
182 |
+
'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
183 |
+
'icon' => 'dashicons-welcome-widgets-menus',
|
184 |
+
),
|
185 |
+
array(
|
186 |
+
'title' => __( 'Checkout Settings', 'cartflows' ),
|
187 |
+
'id' => 'wcf-checkout-custom-settings',
|
188 |
+
'class' => 'wcf-checkout-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
189 |
+
'icon' => 'dashicons-admin-generic',
|
190 |
+
),
|
191 |
+
array(
|
192 |
+
'title' => __( 'Custom Script', 'cartflows' ),
|
193 |
+
'id' => 'wcf-checkout-custom-script-header',
|
194 |
+
'class' => 'wcf-checkout-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
195 |
+
'icon' => 'dashicons-format-aside',
|
196 |
+
),
|
197 |
+
);
|
198 |
+
|
199 |
+
$show_logo = filter_input( INPUT_GET, 'logo-tab', FILTER_VALIDATE_BOOLEAN );
|
200 |
+
|
201 |
+
if ( $show_logo ) {
|
202 |
+
$logo_tab = array(
|
203 |
+
'title' => __( 'Logo (Optional)', 'cartflows' ),
|
204 |
+
'id' => 'wcf-checkout-header',
|
205 |
+
'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
206 |
+
'icon' => 'dashicons-format-image',
|
207 |
+
);
|
208 |
+
array_push( $tab_array, $logo_tab );
|
209 |
+
}
|
210 |
+
|
211 |
+
$tabs = apply_filters( 'cartflows_checkout_tabs', $tab_array, $active_tab );
|
212 |
+
|
213 |
+
?>
|
214 |
+
<div class="wcf-checkout-table wcf-metabox-wrap widefat">
|
215 |
+
<div class="wcf-table-container">
|
216 |
+
<div class="wcf-column-left">
|
217 |
+
<div class="wcf-tab-wrapper">
|
218 |
+
|
219 |
+
<?php foreach ( $tabs as $key => $tab ) { ?>
|
220 |
+
<div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
|
221 |
+
<span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
|
222 |
+
<span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
|
223 |
+
</div>
|
224 |
+
<?php } ?>
|
225 |
+
|
226 |
+
<input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
|
227 |
+
</div>
|
228 |
+
</div>
|
229 |
+
<div class="wcf-column-right">
|
230 |
+
<?php $this->tab_shortcodes( $options, $post_id ); ?>
|
231 |
+
<?php $this->tab_general( $options, $post_id ); ?>
|
232 |
+
<?php $this->tab_style( $options, $post_id ); ?>
|
233 |
+
<?php $this->tab_pre_checkout_offer( $options, $post_id ); ?>
|
234 |
+
<?php $this->tab_product_bump( $options, $post_id ); ?>
|
235 |
+
<?php $this->tab_custom_fields( $options, $post_id ); ?>
|
236 |
+
<?php $this->tab_custom_settings( $options, $post_id ); ?>
|
237 |
+
<?php $this->tab_header_content( $options, $post_id ); ?>
|
238 |
+
<?php $this->tab_custom_script( $options, $post_id ); ?>
|
239 |
+
<?php do_action( 'cartflows_checkout_tabs_content', $options, $post_id ); ?>
|
240 |
+
<?php $this->right_column_footer( $options, $post_id ); ?>
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
</div>
|
244 |
+
|
245 |
+
<?php
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Shortcodes tab
|
250 |
+
*
|
251 |
+
* @param array $options options.
|
252 |
+
* @param int $post_id post ID.
|
253 |
+
*/
|
254 |
+
public function tab_shortcodes( $options, $post_id ) {
|
255 |
+
?>
|
256 |
+
<div class="wcf-checkout-shortcodes wcf-tab-content widefat">
|
257 |
+
|
258 |
+
<?php
|
259 |
+
|
260 |
+
echo wcf()->meta->get_shortcode_field(
|
261 |
+
array(
|
262 |
+
'label' => 'Checkout Page',
|
263 |
+
'name' => 'wcf-checkout-shortcode',
|
264 |
+
'content' => '[cartflows_checkout]',
|
265 |
+
'help' => esc_html__( 'Add this shortcode to your checkout page', 'cartflows' ),
|
266 |
+
)
|
267 |
+
);
|
268 |
+
?>
|
269 |
+
</div>
|
270 |
+
<?php
|
271 |
+
}
|
272 |
+
|
273 |
+
|
274 |
+
/**
|
275 |
+
* General tab
|
276 |
+
*
|
277 |
+
* @param array $options options.
|
278 |
+
* @param int $post_id post ID.
|
279 |
+
*/
|
280 |
+
public function tab_general( $options, $post_id ) {
|
281 |
+
?>
|
282 |
+
<div class="wcf-checkout-general wcf-tab-content widefat">
|
283 |
+
|
284 |
+
<?php
|
285 |
+
|
286 |
+
echo wcf()->meta->get_product_selection_repeater(
|
287 |
+
array(
|
288 |
+
'name' => 'wcf-checkout-products',
|
289 |
+
'value' => $options['wcf-checkout-products'],
|
290 |
+
'allow_clear' => true,
|
291 |
+
)
|
292 |
+
);
|
293 |
+
|
294 |
+
if ( ! _is_cartflows_pro() ) {
|
295 |
+
|
296 |
+
echo wcf()->meta->get_hr_line_field( array() );
|
297 |
+
echo wcf()->meta->get_description_field(
|
298 |
+
array(
|
299 |
+
'name' => 'wcf-upgrade-to-pro',
|
300 |
+
/* translators: %s: link */
|
301 |
+
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon, Product Variations & Quantity Options.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
302 |
+
)
|
303 |
+
);
|
304 |
+
}
|
305 |
+
|
306 |
+
do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
|
307 |
+
|
308 |
+
?>
|
309 |
+
</div>
|
310 |
+
<?php
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Pre Checkout tab
|
315 |
+
*
|
316 |
+
* @param array $options options.
|
317 |
+
* @param int $post_id post ID.
|
318 |
+
*/
|
319 |
+
public function tab_pre_checkout_offer( $options, $post_id ) {
|
320 |
+
?>
|
321 |
+
<div class="wcf-pre-checkout-offer wcf-tab-content widefat">
|
322 |
+
<?php
|
323 |
+
if ( ! _is_cartflows_pro() ) {
|
324 |
+
echo wcf()->meta->get_description_field(
|
325 |
+
array(
|
326 |
+
'name' => 'wcf-upgrade-to-pro',
|
327 |
+
/* translators: %s: link */
|
328 |
+
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
329 |
+
)
|
330 |
+
);
|
331 |
+
} elseif ( _is_cartflows_pro_ver_less_than( '1.2.0' ) ) {
|
332 |
+
|
333 |
+
$version = '1.2.0';
|
334 |
+
echo wcf()->meta->get_description_field(
|
335 |
+
array(
|
336 |
+
'name' => 'wcf-upgrade-to-pro',
|
337 |
+
/* translators: %s: link */
|
338 |
+
'content' => '<i>' . sprintf( esc_html__( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
|
339 |
+
)
|
340 |
+
);
|
341 |
+
}
|
342 |
+
?>
|
343 |
+
|
344 |
+
<?php do_action( 'cartflows_pre_checkout_offer_tab_content', $options, $post_id ); ?>
|
345 |
+
</div>
|
346 |
+
<?php
|
347 |
+
}
|
348 |
+
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Pre Checkout tab
|
352 |
+
*
|
353 |
+
* @param array $options options.
|
354 |
+
* @param int $post_id post ID.
|
355 |
+
*/
|
356 |
+
public function animate_title_settings( $options, $post_id ) {
|
357 |
+
|
358 |
+
echo wcf()->meta->get_hr_line_field( array() );
|
359 |
+
|
360 |
+
if ( ! _is_cartflows_pro() ) {
|
361 |
+
echo wcf()->meta->get_description_field(
|
362 |
+
array(
|
363 |
+
'name' => 'wcf-upgrade-to-pro',
|
364 |
+
/* translators: %s: link */
|
365 |
+
'content' => '<i>' . sprintf( __( 'Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
366 |
+
)
|
367 |
+
);
|
368 |
+
} elseif ( _is_cartflows_pro_ver_less_than( '1.4.0' ) ) {
|
369 |
+
|
370 |
+
$version = '1.4.0';
|
371 |
+
echo wcf()->meta->get_description_field(
|
372 |
+
array(
|
373 |
+
'name' => 'wcf-upgrade-to-pro',
|
374 |
+
/* translators: %s: link */
|
375 |
+
'content' => '<i>' . sprintf( __( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
|
376 |
+
)
|
377 |
+
);
|
378 |
+
}
|
379 |
+
|
380 |
+
do_action( 'cartflows_animate_browser_tab_settings', $options, $post_id );
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Product bump tab
|
385 |
+
*
|
386 |
+
* @param array $options options.
|
387 |
+
* @param int $post_id post ID.
|
388 |
+
*/
|
389 |
+
public function tab_product_bump( $options, $post_id ) {
|
390 |
+
?>
|
391 |
+
<div class="wcf-product-order-bump wcf-tab-content widefat">
|
392 |
+
<?php
|
393 |
+
if ( ! _is_cartflows_pro() ) {
|
394 |
+
echo wcf()->meta->get_description_field(
|
395 |
+
array(
|
396 |
+
'name' => 'wcf-upgrade-to-pro',
|
397 |
+
/* translators: %s: link */
|
398 |
+
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
399 |
+
)
|
400 |
+
);
|
401 |
+
}
|
402 |
+
?>
|
403 |
+
|
404 |
+
<?php do_action( 'cartflows_order_bump_tab_content', $options, $post_id ); ?>
|
405 |
+
</div>
|
406 |
+
<?php
|
407 |
+
}
|
408 |
+
/**
|
409 |
+
* Tab custom fields
|
410 |
+
*
|
411 |
+
* @param array $options options.
|
412 |
+
* @param int $post_id post ID.
|
413 |
+
*/
|
414 |
+
public function tab_custom_fields( $options, $post_id ) {
|
415 |
+
?>
|
416 |
+
<div class="wcf-checkout-custom-fields wcf-tab-content widefat">
|
417 |
+
<?php
|
418 |
+
/* Custom Checkout Fields Section */
|
419 |
+
|
420 |
+
if ( ! _is_cartflows_pro() ) {
|
421 |
+
echo wcf()->meta->get_description_field(
|
422 |
+
array(
|
423 |
+
'name' => 'wcf-upgrade-to-pro',
|
424 |
+
/* translators: %s: link */
|
425 |
+
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
426 |
+
)
|
427 |
+
);
|
428 |
+
}
|
429 |
+
?>
|
430 |
+
<?php do_action( 'cartflows_custom_fields_tab_content', $options, $post_id ); ?>
|
431 |
+
</div>
|
432 |
+
<?php
|
433 |
+
}
|
434 |
+
/**
|
435 |
+
* Tab custom settings
|
436 |
+
*
|
437 |
+
* @param array $options options.
|
438 |
+
* @param int $post_id post ID.
|
439 |
+
*/
|
440 |
+
public function tab_custom_settings( $options, $post_id ) {
|
441 |
+
?>
|
442 |
+
<div class="wcf-checkout-custom-settings wcf-tab-content widefat">
|
443 |
+
<div class="wcf-custom-settings-fields">
|
444 |
+
<?php
|
445 |
+
|
446 |
+
echo wcf()->meta->get_text_field(
|
447 |
+
array(
|
448 |
+
'label' => __( 'Place Order Button Text', 'cartflows' ),
|
449 |
+
'name' => 'wcf-checkout-place-order-button-text',
|
450 |
+
'value' => $options['wcf-checkout-place-order-button-text'],
|
451 |
+
'attr' => array(
|
452 |
+
'placeholder' => __( 'Place order', 'cartflows' ),
|
453 |
+
),
|
454 |
+
'help' => __( 'It will change the Place Order Button text on checkout page.', 'cartflows' ),
|
455 |
+
)
|
456 |
+
);
|
457 |
+
|
458 |
+
echo wcf()->meta->get_hr_line_field( array() );
|
459 |
+
|
460 |
+
echo wcf()->meta->get_checkbox_field(
|
461 |
+
array(
|
462 |
+
'name' => 'wcf-remove-product-field',
|
463 |
+
'value' => $options['wcf-remove-product-field'],
|
464 |
+
'after' => esc_html__( 'Enable cart editing on checkout', 'cartflows' ),
|
465 |
+
)
|
466 |
+
);
|
467 |
+
|
468 |
+
echo wcf()->meta->get_description_field(
|
469 |
+
array(
|
470 |
+
'name' => '',
|
471 |
+
/* translators: %s: link */
|
472 |
+
'content' => '<i>' . sprintf( esc_html__( 'Users will able to remove products from the checkout page.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
473 |
+
)
|
474 |
+
);
|
475 |
+
|
476 |
+
$this->animate_title_settings( $options, $post_id );
|
477 |
+
?>
|
478 |
+
</div>
|
479 |
+
<?php do_action( 'cartflows_custom_settings_tab_content', $options, $post_id ); ?>
|
480 |
+
</div>
|
481 |
+
<?php
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Tab style
|
486 |
+
*
|
487 |
+
* @param array $options options.
|
488 |
+
* @param int $post_id post ID.
|
489 |
+
*/
|
490 |
+
public function tab_style( $options, $post_id ) {
|
491 |
+
?>
|
492 |
+
|
493 |
+
<div class="wcf-checkout-style wcf-tab-content widefat">
|
494 |
+
<div class="wcf-cs-fields">
|
495 |
+
<div class="wcf-cs-checkbox-field">
|
496 |
+
<?php
|
497 |
+
|
498 |
+
$layout_pro_option = array();
|
499 |
+
|
500 |
+
if ( ! _is_cartflows_pro() ) {
|
501 |
+
$layout_pro_option = array(
|
502 |
+
'one-column' => __( 'One Column (Available in CartFlows Pro) ', 'cartflows' ),
|
503 |
+
'two-step' => __( 'Two Step (Available in CartFlows Pro) ', 'cartflows' ),
|
504 |
+
);
|
505 |
+
}
|
506 |
+
|
507 |
+
echo wcf()->meta->get_select_field(
|
508 |
+
array(
|
509 |
+
'label' => __( 'Checkout Skin', 'cartflows' ),
|
510 |
+
'name' => 'wcf-checkout-layout',
|
511 |
+
'value' => $options['wcf-checkout-layout'],
|
512 |
+
'options' => array(
|
513 |
+
'one-column' => esc_html__( 'One Column', 'cartflows' ),
|
514 |
+
'two-column' => esc_html__( 'Two Column', 'cartflows' ),
|
515 |
+
'two-step' => esc_html__( 'Two Step', 'cartflows' ),
|
516 |
+
),
|
517 |
+
'pro-options' => $layout_pro_option,
|
518 |
+
|
519 |
+
)
|
520 |
+
);
|
521 |
+
|
522 |
+
echo wcf()->meta->get_color_picker_field(
|
523 |
+
array(
|
524 |
+
'label' => __( 'Primary Color', 'cartflows' ),
|
525 |
+
'name' => 'wcf-primary-color',
|
526 |
+
'value' => $options['wcf-primary-color'],
|
527 |
+
)
|
528 |
+
);
|
529 |
+
|
530 |
+
echo wcf()->meta->get_font_family_field(
|
531 |
+
array(
|
532 |
+
'for' => 'wcf-base',
|
533 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
534 |
+
'name' => 'wcf-base-font-family',
|
535 |
+
'value' => $options['wcf-base-font-family'],
|
536 |
+
)
|
537 |
+
);
|
538 |
+
|
539 |
+
echo wcf()->meta->get_checkbox_field(
|
540 |
+
array(
|
541 |
+
'label' => __( 'Advance Options', 'cartflows' ),
|
542 |
+
'name' => 'wcf-advance-options-fields',
|
543 |
+
'value' => $options['wcf-advance-options-fields'],
|
544 |
+
'after' => 'Enable',
|
545 |
+
)
|
546 |
+
);
|
547 |
+
?>
|
548 |
+
</div>
|
549 |
+
<div class="wcf-cs-fields-options">
|
550 |
+
<?php
|
551 |
+
echo wcf()->meta->get_section(
|
552 |
+
array(
|
553 |
+
'label' => __( 'Heading', 'cartflows' ),
|
554 |
+
)
|
555 |
+
);
|
556 |
+
|
557 |
+
echo wcf()->meta->get_color_picker_field(
|
558 |
+
array(
|
559 |
+
'label' => __( 'Heading Color', 'cartflows' ),
|
560 |
+
'name' => 'wcf-heading-color',
|
561 |
+
'value' => $options['wcf-heading-color'],
|
562 |
+
)
|
563 |
+
);
|
564 |
+
|
565 |
+
echo wcf()->meta->get_font_family_field(
|
566 |
+
array(
|
567 |
+
'for' => 'wcf-heading',
|
568 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
569 |
+
'name' => 'wcf-heading-font-family',
|
570 |
+
'value' => $options['wcf-heading-font-family'],
|
571 |
+
)
|
572 |
+
);
|
573 |
+
|
574 |
+
echo wcf()->meta->get_font_weight_field(
|
575 |
+
array(
|
576 |
+
'for' => 'wcf-heading',
|
577 |
+
'label' => esc_html__( 'Font Weight', 'cartflows' ),
|
578 |
+
'name' => 'wcf-heading-font-weight',
|
579 |
+
'value' => $options['wcf-heading-font-weight'],
|
580 |
+
)
|
581 |
+
);
|
582 |
+
|
583 |
+
echo wcf()->meta->get_section(
|
584 |
+
array(
|
585 |
+
'label' => __( 'Input Fields', 'cartflows' ),
|
586 |
+
)
|
587 |
+
);
|
588 |
+
|
589 |
+
$fields_skin_pro_option = array();
|
590 |
+
|
591 |
+
if ( ! _is_cartflows_pro() ) {
|
592 |
+
$fields_skin_pro_option = array(
|
593 |
+
'style-one' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
|
594 |
+
);
|
595 |
+
}
|
596 |
+
|
597 |
+
echo wcf()->meta->get_select_field(
|
598 |
+
array(
|
599 |
+
'label' => __( 'Style', 'cartflows' ),
|
600 |
+
'name' => 'wcf-fields-skins',
|
601 |
+
'value' => $options['wcf-fields-skins'],
|
602 |
+
'options' => array(
|
603 |
+
'default' => esc_html__( 'Default', 'cartflows' ),
|
604 |
+
'style-one' => esc_html__( 'Floating Labels', 'cartflows' ),
|
605 |
+
),
|
606 |
+
'pro-options' => $fields_skin_pro_option,
|
607 |
+
|
608 |
+
)
|
609 |
+
);
|
610 |
+
|
611 |
+
echo wcf()->meta->get_font_family_field(
|
612 |
+
array(
|
613 |
+
'for' => 'wcf-input',
|
614 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
615 |
+
'name' => 'wcf-input-font-family',
|
616 |
+
'value' => $options['wcf-input-font-family'],
|
617 |
+
)
|
618 |
+
);
|
619 |
+
|
620 |
+
echo wcf()->meta->get_font_weight_field(
|
621 |
+
array(
|
622 |
+
'for' => 'wcf-input',
|
623 |
+
'label' => esc_html__( 'Font Weight', 'cartflows' ),
|
624 |
+
'name' => 'wcf-input-font-weight',
|
625 |
+
'value' => $options['wcf-input-font-weight'],
|
626 |
+
)
|
627 |
+
);
|
628 |
+
|
629 |
+
echo wcf()->meta->get_select_field(
|
630 |
+
array(
|
631 |
+
'label' => __( 'Size', 'cartflows' ),
|
632 |
+
'name' => 'wcf-input-field-size',
|
633 |
+
'value' => $options['wcf-input-field-size'],
|
634 |
+
'options' => array(
|
635 |
+
'33px' => esc_html__( 'Extra Small', 'cartflows' ),
|
636 |
+
'38px' => esc_html__( 'Small', 'cartflows' ),
|
637 |
+
'44px' => esc_html__( 'Medium', 'cartflows' ),
|
638 |
+
'58px' => esc_html__( 'Large', 'cartflows' ),
|
639 |
+
'68px' => esc_html__( 'Extra Large', 'cartflows' ),
|
640 |
+
'custom' => esc_html__( 'Custom', 'cartflows' ),
|
641 |
+
),
|
642 |
+
)
|
643 |
+
);
|
644 |
+
|
645 |
+
echo wcf()->meta->get_number_field(
|
646 |
+
array(
|
647 |
+
'label' => __( 'Top Bottom Spacing', 'cartflows' ),
|
648 |
+
'name' => 'wcf-field-tb-padding',
|
649 |
+
'value' => $options['wcf-field-tb-padding'],
|
650 |
+
)
|
651 |
+
);
|
652 |
+
|
653 |
+
echo wcf()->meta->get_number_field(
|
654 |
+
array(
|
655 |
+
'label' => __( 'Left Right Spacing', 'cartflows' ),
|
656 |
+
'name' => 'wcf-field-lr-padding',
|
657 |
+
'value' => $options['wcf-field-lr-padding'],
|
658 |
+
)
|
659 |
+
);
|
660 |
+
|
661 |
+
echo wcf()->meta->get_color_picker_field(
|
662 |
+
array(
|
663 |
+
'label' => __( 'Text / Placeholder Color', 'cartflows' ),
|
664 |
+
'name' => 'wcf-field-color',
|
665 |
+
'value' => $options['wcf-field-color'],
|
666 |
+
)
|
667 |
+
);
|
668 |
+
|
669 |
+
echo wcf()->meta->get_color_picker_field(
|
670 |
+
array(
|
671 |
+
'label' => __( 'Background Color', 'cartflows' ),
|
672 |
+
'name' => 'wcf-field-bg-color',
|
673 |
+
'value' => $options['wcf-field-bg-color'],
|
674 |
+
)
|
675 |
+
);
|
676 |
+
|
677 |
+
echo wcf()->meta->get_color_picker_field(
|
678 |
+
array(
|
679 |
+
'label' => __( 'Border Color', 'cartflows' ),
|
680 |
+
'name' => 'wcf-field-border-color',
|
681 |
+
'value' => $options['wcf-field-border-color'],
|
682 |
+
)
|
683 |
+
);
|
684 |
+
echo wcf()->meta->get_color_picker_field(
|
685 |
+
array(
|
686 |
+
'label' => __( 'Label Color', 'cartflows' ),
|
687 |
+
'name' => 'wcf-field-label-color',
|
688 |
+
'value' => $options['wcf-field-label-color'],
|
689 |
+
)
|
690 |
+
);
|
691 |
+
|
692 |
+
?>
|
693 |
+
</div>
|
694 |
+
<div class="wcf-cs-button-options">
|
695 |
+
<?php
|
696 |
+
|
697 |
+
echo wcf()->meta->get_section(
|
698 |
+
array(
|
699 |
+
'label' => __( 'Buttons', 'cartflows' ),
|
700 |
+
)
|
701 |
+
);
|
702 |
+
|
703 |
+
echo wcf()->meta->get_font_family_field(
|
704 |
+
array(
|
705 |
+
'for' => 'wcf-button',
|
706 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
707 |
+
'name' => 'wcf-button-font-family',
|
708 |
+
'value' => $options['wcf-button-font-family'],
|
709 |
+
)
|
710 |
+
);
|
711 |
+
|
712 |
+
echo wcf()->meta->get_font_weight_field(
|
713 |
+
array(
|
714 |
+
'for' => 'wcf-button',
|
715 |
+
'label' => esc_html__( 'Font Weight', 'cartflows' ),
|
716 |
+
'name' => 'wcf-button-font-weight',
|
717 |
+
'value' => $options['wcf-button-font-weight'],
|
718 |
+
)
|
719 |
+
);
|
720 |
+
|
721 |
+
echo wcf()->meta->get_select_field(
|
722 |
+
array(
|
723 |
+
'label' => __( 'Size', 'cartflows' ),
|
724 |
+
'name' => 'wcf-input-button-size',
|
725 |
+
'value' => $options['wcf-input-button-size'],
|
726 |
+
'options' => array(
|
727 |
+
'33px' => esc_html__( 'Extra Small', 'cartflows' ),
|
728 |
+
'38px' => esc_html__( 'Small', 'cartflows' ),
|
729 |
+
'44px' => esc_html__( 'Medium', 'cartflows' ),
|
730 |
+
'58px' => esc_html__( 'Large', 'cartflows' ),
|
731 |
+
'68px' => esc_html__( 'Extra Large', 'cartflows' ),
|
732 |
+
'custom' => esc_html__( 'Custom', 'cartflows' ),
|
733 |
+
),
|
734 |
+
)
|
735 |
+
);
|
736 |
+
|
737 |
+
echo wcf()->meta->get_number_field(
|
738 |
+
array(
|
739 |
+
'label' => __( 'Top Bottom Spacing', 'cartflows' ),
|
740 |
+
'name' => 'wcf-submit-tb-padding',
|
741 |
+
'value' => $options['wcf-submit-tb-padding'],
|
742 |
+
)
|
743 |
+
);
|
744 |
+
|
745 |
+
echo wcf()->meta->get_number_field(
|
746 |
+
array(
|
747 |
+
'label' => __( 'Left Right Spacing', 'cartflows' ),
|
748 |
+
'name' => 'wcf-submit-lr-padding',
|
749 |
+
'value' => $options['wcf-submit-lr-padding'],
|
750 |
+
)
|
751 |
+
);
|
752 |
+
|
753 |
+
echo wcf()->meta->get_color_picker_field(
|
754 |
+
array(
|
755 |
+
'label' => __( 'Text Color', 'cartflows' ),
|
756 |
+
'name' => 'wcf-submit-color',
|
757 |
+
'value' => $options['wcf-submit-color'],
|
758 |
+
)
|
759 |
+
);
|
760 |
+
|
761 |
+
echo wcf()->meta->get_color_picker_field(
|
762 |
+
array(
|
763 |
+
'label' => __( 'Text Hover Color', 'cartflows' ),
|
764 |
+
'name' => 'wcf-submit-hover-color',
|
765 |
+
'value' => $options['wcf-submit-hover-color'],
|
766 |
+
)
|
767 |
+
);
|
768 |
+
|
769 |
+
echo wcf()->meta->get_color_picker_field(
|
770 |
+
array(
|
771 |
+
'label' => __( 'Background Color', 'cartflows' ),
|
772 |
+
'name' => 'wcf-submit-bg-color',
|
773 |
+
'value' => $options['wcf-submit-bg-color'],
|
774 |
+
)
|
775 |
+
);
|
776 |
+
|
777 |
+
echo wcf()->meta->get_color_picker_field(
|
778 |
+
array(
|
779 |
+
'label' => __( 'Background Hover Color', 'cartflows' ),
|
780 |
+
'name' => 'wcf-submit-bg-hover-color',
|
781 |
+
'value' => $options['wcf-submit-bg-hover-color'],
|
782 |
+
)
|
783 |
+
);
|
784 |
+
|
785 |
+
echo wcf()->meta->get_color_picker_field(
|
786 |
+
array(
|
787 |
+
'label' => __( 'Border Color', 'cartflows' ),
|
788 |
+
'name' => 'wcf-submit-border-color',
|
789 |
+
'value' => $options['wcf-submit-border-color'],
|
790 |
+
)
|
791 |
+
);
|
792 |
+
|
793 |
+
echo wcf()->meta->get_color_picker_field(
|
794 |
+
array(
|
795 |
+
'label' => __( 'Border Hover Color', 'cartflows' ),
|
796 |
+
'name' => 'wcf-submit-border-hover-color',
|
797 |
+
'value' => $options['wcf-submit-border-hover-color'],
|
798 |
+
)
|
799 |
+
);
|
800 |
+
|
801 |
+
?>
|
802 |
+
</div>
|
803 |
+
<div class="wcf-cs-section-options">
|
804 |
+
<?php
|
805 |
+
|
806 |
+
echo wcf()->meta->get_section(
|
807 |
+
array(
|
808 |
+
'label' => __( 'Sections', 'cartflows' ),
|
809 |
+
)
|
810 |
+
);
|
811 |
+
|
812 |
+
echo wcf()->meta->get_color_picker_field(
|
813 |
+
array(
|
814 |
+
'label' => __( 'Highlight Area Background Color', 'cartflows' ),
|
815 |
+
'name' => 'wcf-hl-bg-color',
|
816 |
+
'value' => $options['wcf-hl-bg-color'],
|
817 |
+
)
|
818 |
+
);
|
819 |
+
|
820 |
+
echo wcf()->meta->get_hidden_field(
|
821 |
+
array(
|
822 |
+
'name' => 'wcf-field-google-font-url',
|
823 |
+
'value' => $options['wcf-field-google-font-url'],
|
824 |
+
)
|
825 |
+
);
|
826 |
+
?>
|
827 |
+
</div>
|
828 |
+
<?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
|
829 |
+
</div>
|
830 |
+
</div>
|
831 |
+
<?php
|
832 |
+
}
|
833 |
+
|
834 |
+
|
835 |
+
/**
|
836 |
+
* Tab Header (Used for add logo into header)
|
837 |
+
*
|
838 |
+
* @param array $options options.
|
839 |
+
* @param int $post_id post ID.
|
840 |
+
*/
|
841 |
+
public function tab_header_content( $options, $post_id ) {
|
842 |
+
?>
|
843 |
+
|
844 |
+
<div class="wcf-checkout-header wcf-tab-content widefat">
|
845 |
+
<?php
|
846 |
+
|
847 |
+
$layout_pro_option = array();
|
848 |
+
|
849 |
+
echo wcf()->meta->get_image_field(
|
850 |
+
array(
|
851 |
+
'name' => 'wcf-header-logo-image',
|
852 |
+
'value' => $options['wcf-header-logo-image'],
|
853 |
+
'label' => esc_html__( 'Header Logo', 'cartflows' ),
|
854 |
+
)
|
855 |
+
);
|
856 |
+
|
857 |
+
echo wcf()->meta->get_number_field(
|
858 |
+
array(
|
859 |
+
'name' => 'wcf-header-logo-width',
|
860 |
+
'value' => $options['wcf-header-logo-width'],
|
861 |
+
'label' => esc_html__( 'Logo Width (In px)', 'cartflows' ),
|
862 |
+
)
|
863 |
+
);
|
864 |
+
?>
|
865 |
+
<?php do_action( 'cartflows_checkout_header_tab_content', $options, $post_id ); ?>
|
866 |
+
</div>
|
867 |
+
<?php
|
868 |
+
}
|
869 |
+
/**
|
870 |
+
* Get metabox options
|
871 |
+
*
|
872 |
+
* @param int $post_id post ID.
|
873 |
+
*/
|
874 |
+
public static function get_meta_option( $post_id ) {
|
875 |
+
|
876 |
+
if ( null === self::$meta_option ) {
|
877 |
+
|
878 |
+
/**
|
879 |
+
* Set metabox options
|
880 |
+
*
|
881 |
+
* @see http://php.net/manual/en/filter.filters.sanitize.php
|
882 |
+
*/
|
883 |
+
self::$meta_option = wcf()->options->get_checkout_fields( $post_id );
|
884 |
+
}
|
885 |
+
|
886 |
+
return self::$meta_option;
|
887 |
+
}
|
888 |
+
|
889 |
+
/**
|
890 |
+
* Metabox Save
|
891 |
+
*
|
892 |
+
* @param number $post_id Post ID.
|
893 |
+
* @return void
|
894 |
+
*/
|
895 |
+
public function save_meta_box( $post_id ) {
|
896 |
+
|
897 |
+
// Checks save status.
|
898 |
+
$is_autosave = wp_is_post_autosave( $post_id );
|
899 |
+
$is_revision = wp_is_post_revision( $post_id );
|
900 |
+
|
901 |
+
$is_valid_nonce = ( isset( $_POST['nonce-checkout-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-checkout-step-meta'] ) ), 'save-nonce-checkout-step-meta' ) ) ? true : false;
|
902 |
+
|
903 |
+
// Exits script depending on save status.
|
904 |
+
if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
|
905 |
+
return;
|
906 |
+
}
|
907 |
+
|
908 |
+
wcf()->options->save_checkout_fields( $post_id );
|
909 |
+
}
|
910 |
+
}
|
911 |
+
|
912 |
+
/**
|
913 |
+
* Kicking this off by calling 'get_instance()' method
|
914 |
+
*/
|
915 |
+
Cartflows_Checkout_Meta::get_instance();
|
modules/flow/classes/class-cartflows-flow-post-type.php
CHANGED
@@ -1,383 +1,383 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Flow post type
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Initialization
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*/
|
13 |
-
class Cartflows_Flow_Post_Type {
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Member Variable
|
18 |
-
*
|
19 |
-
* @var instance
|
20 |
-
*/
|
21 |
-
private static $instance;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Initiator
|
25 |
-
*/
|
26 |
-
public static function get_instance() {
|
27 |
-
if ( ! isset( self::$instance ) ) {
|
28 |
-
self::$instance = new self();
|
29 |
-
}
|
30 |
-
return self::$instance;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Constructor
|
35 |
-
*/
|
36 |
-
public function __construct() {
|
37 |
-
|
38 |
-
add_action( 'init', array( $this, 'flow_post_type' ) );
|
39 |
-
add_action( 'admin_menu', array( $this, 'register_as_submenu' ), 100 );
|
40 |
-
add_action( 'do_meta_boxes', array( $this, 'wcf_change_metabox_position' ) );
|
41 |
-
|
42 |
-
add_filter( 'post_updated_messages', array( $this, 'custom_post_type_post_update_messages' ) );
|
43 |
-
|
44 |
-
add_filter( 'display_post_states', array( $this, 'add_cartflows_post_state' ), 15, 1 );
|
45 |
-
|
46 |
-
add_filter( 'hidden_meta_boxes', array( $this, 'display_flow_slug_meta_box' ), 10, 2 );
|
47 |
-
|
48 |
-
/* View Post URL */
|
49 |
-
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
50 |
-
add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 10, 2 );
|
51 |
-
add_action( 'template_redirect', array( $this, 'redirect_to_step' ), 10 );
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Add CartFlows post status.
|
56 |
-
*
|
57 |
-
* @param array $post_states post data.
|
58 |
-
* @return array
|
59 |
-
*/
|
60 |
-
public function add_cartflows_post_state( $post_states ) {
|
61 |
-
|
62 |
-
global $post;
|
63 |
-
|
64 |
-
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
65 |
-
|
66 |
-
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
67 |
-
$flow_title = get_the_title( $flow_id );
|
68 |
-
|
69 |
-
$post_states['cartflows_step'] = '( ' . __( 'Flow: ', 'cartflows' ) . $flow_id . ' | ' . __( 'Name: ', 'cartflows' ) . $flow_title . ')';
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
return $post_states;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Display slugdiv.
|
78 |
-
*
|
79 |
-
* @param array $hidden metaboxes.
|
80 |
-
* @param obj $screen screen.
|
81 |
-
* @return array
|
82 |
-
*/
|
83 |
-
public function display_flow_slug_meta_box( $hidden, $screen ) {
|
84 |
-
$post_type = $screen->id;
|
85 |
-
if ( ! empty( $post_type ) && CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
86 |
-
$pos = array_search( 'slugdiv', $hidden, true );
|
87 |
-
unset( $hidden[ $pos ] );
|
88 |
-
}
|
89 |
-
|
90 |
-
return $hidden;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Create custom post type
|
95 |
-
*/
|
96 |
-
public function flow_post_type() {
|
97 |
-
|
98 |
-
$labels = array(
|
99 |
-
'name' => esc_html_x( 'Flows', 'flow general name', 'cartflows' ),
|
100 |
-
'singular_name' => esc_html_x( 'Flow', 'flow singular name', 'cartflows' ),
|
101 |
-
'search_items' => esc_html__( 'Search Flows', 'cartflows' ),
|
102 |
-
'all_items' => esc_html__( 'All Flows', 'cartflows' ),
|
103 |
-
'edit_item' => esc_html__( 'Edit Flow', 'cartflows' ),
|
104 |
-
'view_item' => esc_html__( 'View Flow', 'cartflows' ),
|
105 |
-
'add_new' => esc_html__( 'Add New', 'cartflows' ),
|
106 |
-
'update_item' => esc_html__( 'Update Flow', 'cartflows' ),
|
107 |
-
'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
|
108 |
-
'new_item_name' => esc_html__( 'New Flow Name', 'cartflows' ),
|
109 |
-
);
|
110 |
-
|
111 |
-
$args = array(
|
112 |
-
'labels' => $labels,
|
113 |
-
'show_in_menu' => false,
|
114 |
-
'public' => false, // it's not public, not own permalink.
|
115 |
-
'publicly_queryable' => true, // you should be able to query it.
|
116 |
-
'show_ui' => true,
|
117 |
-
'query_var' => true,
|
118 |
-
'can_export' => true,
|
119 |
-
'show_in_admin_bar' => true,
|
120 |
-
'exclude_from_search' => true,
|
121 |
-
'has_archive' => false, // it shouldn't have archive page.
|
122 |
-
'rewrite' => false, // it shouldn't have rewrite rules.
|
123 |
-
'supports' => array( 'title', 'thumbnail', 'slug' ),
|
124 |
-
'capability_type' => 'post',
|
125 |
-
);
|
126 |
-
|
127 |
-
if ( ! _is_cartflows_pro() ) {
|
128 |
-
|
129 |
-
$flow_posts = get_posts(
|
130 |
-
array(
|
131 |
-
'posts_per_page' => 4,
|
132 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
133 |
-
'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit', 'trash' ),
|
134 |
-
)
|
135 |
-
);
|
136 |
-
|
137 |
-
if ( is_array( $flow_posts ) ) {
|
138 |
-
|
139 |
-
$flow_count = count( $flow_posts );
|
140 |
-
|
141 |
-
if ( $flow_count > 3 || 3 === $flow_count ) {
|
142 |
-
|
143 |
-
$args['capabilities'] = array(
|
144 |
-
'create_posts' => 'do_not_allow',
|
145 |
-
);
|
146 |
-
$args['map_meta_cap'] = true;
|
147 |
-
|
148 |
-
// Add new notice button.
|
149 |
-
add_action( 'admin_print_footer_scripts', array( $this, 'add_new_notice_button' ) );
|
150 |
-
|
151 |
-
// Add the notice popup HTML to admin footer.
|
152 |
-
add_action( 'admin_footer', array( $this, 'upgrade_to_pro_notice_popup' ) );
|
153 |
-
}
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
register_post_type( CARTFLOWS_FLOW_POST_TYPE, $args );
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Show custom add new button.
|
162 |
-
*/
|
163 |
-
public function add_new_notice_button() {
|
164 |
-
|
165 |
-
$screen = get_current_screen();
|
166 |
-
|
167 |
-
if ( is_object( $screen ) && CARTFLOWS_FLOW_POST_TYPE === $screen->post_type && 'edit-cartflows_flow' === $screen->id ) {
|
168 |
-
?>
|
169 |
-
<script>
|
170 |
-
jQuery('.wrap h1.wp-heading-inline').after('<a type="button" class="wcf-custom-add-new-button button">Add New</a>');
|
171 |
-
</script>
|
172 |
-
<?php
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Upgrade to pro notice popup.
|
178 |
-
*
|
179 |
-
* @since 1.3.4
|
180 |
-
*
|
181 |
-
* @return void
|
182 |
-
*/
|
183 |
-
public function upgrade_to_pro_notice_popup() {
|
184 |
-
|
185 |
-
?>
|
186 |
-
<div id="cartflows-upgrade-notice-overlay" style="display:none;"></div>
|
187 |
-
<div id="cartflows-upgrade-notice-popup" style="display:none;">
|
188 |
-
<div class="inner">
|
189 |
-
<div class="heading">
|
190 |
-
<span><?php esc_html_e( 'Upgrade to CartFlows Pro', 'cartflows' ); ?></span>
|
191 |
-
<span class="cartflows-close-popup-button tb-close-icon"></span>
|
192 |
-
</div>
|
193 |
-
<div class="contents">
|
194 |
-
<div class="wcf-notice">
|
195 |
-
<p>Upgrade to CartFlows Pro for adding more flows and other features. <a href ="https://cartflows.com/" target="_blank"> Click here</a> to upgrade.</p>
|
196 |
-
</div>
|
197 |
-
</div>
|
198 |
-
</div>
|
199 |
-
</div>
|
200 |
-
<?php
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Change metabox position.
|
205 |
-
*/
|
206 |
-
public function wcf_change_metabox_position() {
|
207 |
-
|
208 |
-
remove_meta_box( 'slugdiv', CARTFLOWS_FLOW_POST_TYPE, 'normal' );
|
209 |
-
add_meta_box( 'slugdiv', __( 'Slug', 'cartflows' ), 'post_slug_meta_box', CARTFLOWS_FLOW_POST_TYPE, 'side', 'high' );
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Add post raw actions
|
214 |
-
*
|
215 |
-
* @param array $actions actions.
|
216 |
-
* @param array $post post data.
|
217 |
-
* @return array
|
218 |
-
*/
|
219 |
-
public function post_row_actions( $actions, $post ) {
|
220 |
-
|
221 |
-
$first_step = $this->get_first_step_url( $post );
|
222 |
-
|
223 |
-
if ( $first_step && isset( $actions['view'] ) ) {
|
224 |
-
|
225 |
-
$actions['view'] = '<a href="' . $first_step . '">' . __( 'View', 'cartflows' ) . '</a>';
|
226 |
-
}
|
227 |
-
|
228 |
-
return $actions;
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Returns previous post link
|
233 |
-
*
|
234 |
-
* @param string $prev_link previous link.
|
235 |
-
* @param array $post post data.
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
public function preview_post_link( $prev_link, $post ) {
|
239 |
-
|
240 |
-
if ( $this->is_flow_post_type( $post ) ) {
|
241 |
-
|
242 |
-
$first_step = $this->get_first_step_url( $post );
|
243 |
-
|
244 |
-
if ( $first_step ) {
|
245 |
-
|
246 |
-
return $first_step;
|
247 |
-
}
|
248 |
-
|
249 |
-
return '';
|
250 |
-
}
|
251 |
-
|
252 |
-
return $prev_link;
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Check if post type is flow
|
257 |
-
*
|
258 |
-
* @param array $post post data.
|
259 |
-
* @return bool
|
260 |
-
*/
|
261 |
-
public function is_flow_post_type( $post ) {
|
262 |
-
|
263 |
-
if ( isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
264 |
-
|
265 |
-
return true;
|
266 |
-
}
|
267 |
-
|
268 |
-
return false;
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Redirect to first step
|
273 |
-
*
|
274 |
-
* @return void
|
275 |
-
*/
|
276 |
-
public function redirect_to_step() {
|
277 |
-
|
278 |
-
global $post;
|
279 |
-
|
280 |
-
$first_step = $this->get_first_step_url( $post );
|
281 |
-
|
282 |
-
if ( $first_step ) {
|
283 |
-
|
284 |
-
wp_safe_redirect( $first_step );
|
285 |
-
die;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Return first step URL
|
291 |
-
*
|
292 |
-
* @param array $post post data.
|
293 |
-
* @return bool
|
294 |
-
*/
|
295 |
-
public function get_first_step_url( $post ) {
|
296 |
-
|
297 |
-
if ( $this->is_flow_post_type( $post ) ) {
|
298 |
-
|
299 |
-
$flow_id = $post->ID;
|
300 |
-
$title = $post->post_title;
|
301 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
302 |
-
|
303 |
-
if ( is_array( $steps ) && ! empty( $steps ) && isset( $steps[0]['id'] ) ) {
|
304 |
-
|
305 |
-
return get_permalink( $steps[0]['id'] );
|
306 |
-
}
|
307 |
-
}
|
308 |
-
|
309 |
-
return false;
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Register the admin menu for Custom Layouts
|
314 |
-
*
|
315 |
-
* @since 1.0.0
|
316 |
-
* Moved the menu under Appearance -> Custom Layouts
|
317 |
-
public function register_admin_menu() {
|
318 |
-
add_submenu_page(
|
319 |
-
CARTFLOWS_SLUG,
|
320 |
-
__( 'Flows', 'wcf' ),
|
321 |
-
__( 'Flows', 'wcf' ),
|
322 |
-
'edit_pages',
|
323 |
-
'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE
|
324 |
-
);
|
325 |
-
}
|
326 |
-
*/
|
327 |
-
public function register_as_submenu() {
|
328 |
-
|
329 |
-
global $submenu;
|
330 |
-
|
331 |
-
$submenu[ CARTFLOWS_SLUG ][0] = array( //phpcs:ignore
|
332 |
-
__( 'Flows', 'cartflows' ),
|
333 |
-
'edit_pages',
|
334 |
-
'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE,
|
335 |
-
);
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Add Update messages for any custom post type
|
340 |
-
*
|
341 |
-
* @param array $messages Array of default messages.
|
342 |
-
*/
|
343 |
-
public function custom_post_type_post_update_messages( $messages ) {
|
344 |
-
|
345 |
-
$custom_post_type = get_post_type( get_the_ID() );
|
346 |
-
|
347 |
-
if ( CARTFLOWS_FLOW_POST_TYPE == $custom_post_type ) {
|
348 |
-
|
349 |
-
$obj = get_post_type_object( $custom_post_type );
|
350 |
-
$singular_name = $obj->labels->singular_name;
|
351 |
-
$messages[ $custom_post_type ] = array(
|
352 |
-
0 => '', // Unused. Messages start at index 1.
|
353 |
-
/* translators: %s: singular custom post type name */
|
354 |
-
1 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
355 |
-
/* translators: %s: singular custom post type name */
|
356 |
-
2 => sprintf( __( 'Custom %s updated.', 'cartflows' ), $singular_name ),
|
357 |
-
/* translators: %s: singular custom post type name */
|
358 |
-
3 => sprintf( __( 'Custom %s deleted.', 'cartflows' ), $singular_name ),
|
359 |
-
/* translators: %s: singular custom post type name */
|
360 |
-
4 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
361 |
-
/* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */
|
362 |
-
5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'cartflows' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, //phpcs:ignore
|
363 |
-
/* translators: %s: singular custom post type name */
|
364 |
-
6 => sprintf( __( '%s published.', 'cartflows' ), $singular_name ),
|
365 |
-
/* translators: %s: singular custom post type name */
|
366 |
-
7 => sprintf( __( '%s saved.', 'cartflows' ), $singular_name ),
|
367 |
-
/* translators: %s: singular custom post type name */
|
368 |
-
8 => sprintf( __( '%s submitted.', 'cartflows' ), $singular_name ),
|
369 |
-
/* translators: %s: singular custom post type name */
|
370 |
-
9 => sprintf( __( '%s scheduled for.', 'cartflows' ), $singular_name ),
|
371 |
-
/* translators: %s: singular custom post type name */
|
372 |
-
10 => sprintf( __( '%s draft updated.', 'cartflows' ), $singular_name ),
|
373 |
-
);
|
374 |
-
}
|
375 |
-
|
376 |
-
return $messages;
|
377 |
-
}
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Kicking this off by calling 'get_instance()' method
|
382 |
-
*/
|
383 |
-
Cartflows_Flow_Post_Type::get_instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Flow post type
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Initialization
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Flow_Post_Type {
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Member Variable
|
18 |
+
*
|
19 |
+
* @var instance
|
20 |
+
*/
|
21 |
+
private static $instance;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initiator
|
25 |
+
*/
|
26 |
+
public static function get_instance() {
|
27 |
+
if ( ! isset( self::$instance ) ) {
|
28 |
+
self::$instance = new self();
|
29 |
+
}
|
30 |
+
return self::$instance;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
|
38 |
+
add_action( 'init', array( $this, 'flow_post_type' ) );
|
39 |
+
add_action( 'admin_menu', array( $this, 'register_as_submenu' ), 100 );
|
40 |
+
add_action( 'do_meta_boxes', array( $this, 'wcf_change_metabox_position' ) );
|
41 |
+
|
42 |
+
add_filter( 'post_updated_messages', array( $this, 'custom_post_type_post_update_messages' ) );
|
43 |
+
|
44 |
+
add_filter( 'display_post_states', array( $this, 'add_cartflows_post_state' ), 15, 1 );
|
45 |
+
|
46 |
+
add_filter( 'hidden_meta_boxes', array( $this, 'display_flow_slug_meta_box' ), 10, 2 );
|
47 |
+
|
48 |
+
/* View Post URL */
|
49 |
+
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
50 |
+
add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 10, 2 );
|
51 |
+
add_action( 'template_redirect', array( $this, 'redirect_to_step' ), 10 );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Add CartFlows post status.
|
56 |
+
*
|
57 |
+
* @param array $post_states post data.
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
public function add_cartflows_post_state( $post_states ) {
|
61 |
+
|
62 |
+
global $post;
|
63 |
+
|
64 |
+
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
65 |
+
|
66 |
+
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
67 |
+
$flow_title = get_the_title( $flow_id );
|
68 |
+
|
69 |
+
$post_states['cartflows_step'] = '( ' . __( 'Flow: ', 'cartflows' ) . $flow_id . ' | ' . __( 'Name: ', 'cartflows' ) . $flow_title . ')';
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
return $post_states;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Display slugdiv.
|
78 |
+
*
|
79 |
+
* @param array $hidden metaboxes.
|
80 |
+
* @param obj $screen screen.
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function display_flow_slug_meta_box( $hidden, $screen ) {
|
84 |
+
$post_type = $screen->id;
|
85 |
+
if ( ! empty( $post_type ) && CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
86 |
+
$pos = array_search( 'slugdiv', $hidden, true );
|
87 |
+
unset( $hidden[ $pos ] );
|
88 |
+
}
|
89 |
+
|
90 |
+
return $hidden;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Create custom post type
|
95 |
+
*/
|
96 |
+
public function flow_post_type() {
|
97 |
+
|
98 |
+
$labels = array(
|
99 |
+
'name' => esc_html_x( 'Flows', 'flow general name', 'cartflows' ),
|
100 |
+
'singular_name' => esc_html_x( 'Flow', 'flow singular name', 'cartflows' ),
|
101 |
+
'search_items' => esc_html__( 'Search Flows', 'cartflows' ),
|
102 |
+
'all_items' => esc_html__( 'All Flows', 'cartflows' ),
|
103 |
+
'edit_item' => esc_html__( 'Edit Flow', 'cartflows' ),
|
104 |
+
'view_item' => esc_html__( 'View Flow', 'cartflows' ),
|
105 |
+
'add_new' => esc_html__( 'Add New', 'cartflows' ),
|
106 |
+
'update_item' => esc_html__( 'Update Flow', 'cartflows' ),
|
107 |
+
'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
|
108 |
+
'new_item_name' => esc_html__( 'New Flow Name', 'cartflows' ),
|
109 |
+
);
|
110 |
+
|
111 |
+
$args = array(
|
112 |
+
'labels' => $labels,
|
113 |
+
'show_in_menu' => false,
|
114 |
+
'public' => false, // it's not public, not own permalink.
|
115 |
+
'publicly_queryable' => true, // you should be able to query it.
|
116 |
+
'show_ui' => true,
|
117 |
+
'query_var' => true,
|
118 |
+
'can_export' => true,
|
119 |
+
'show_in_admin_bar' => true,
|
120 |
+
'exclude_from_search' => true,
|
121 |
+
'has_archive' => false, // it shouldn't have archive page.
|
122 |
+
'rewrite' => false, // it shouldn't have rewrite rules.
|
123 |
+
'supports' => array( 'title', 'thumbnail', 'slug' ),
|
124 |
+
'capability_type' => 'post',
|
125 |
+
);
|
126 |
+
|
127 |
+
if ( ! _is_cartflows_pro() ) {
|
128 |
+
|
129 |
+
$flow_posts = get_posts(
|
130 |
+
array(
|
131 |
+
'posts_per_page' => 4,
|
132 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
133 |
+
'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit', 'trash' ),
|
134 |
+
)
|
135 |
+
);
|
136 |
+
|
137 |
+
if ( is_array( $flow_posts ) ) {
|
138 |
+
|
139 |
+
$flow_count = count( $flow_posts );
|
140 |
+
|
141 |
+
if ( $flow_count > 3 || 3 === $flow_count ) {
|
142 |
+
|
143 |
+
$args['capabilities'] = array(
|
144 |
+
'create_posts' => 'do_not_allow',
|
145 |
+
);
|
146 |
+
$args['map_meta_cap'] = true;
|
147 |
+
|
148 |
+
// Add new notice button.
|
149 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'add_new_notice_button' ) );
|
150 |
+
|
151 |
+
// Add the notice popup HTML to admin footer.
|
152 |
+
add_action( 'admin_footer', array( $this, 'upgrade_to_pro_notice_popup' ) );
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
register_post_type( CARTFLOWS_FLOW_POST_TYPE, $args );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Show custom add new button.
|
162 |
+
*/
|
163 |
+
public function add_new_notice_button() {
|
164 |
+
|
165 |
+
$screen = get_current_screen();
|
166 |
+
|
167 |
+
if ( is_object( $screen ) && CARTFLOWS_FLOW_POST_TYPE === $screen->post_type && 'edit-cartflows_flow' === $screen->id ) {
|
168 |
+
?>
|
169 |
+
<script>
|
170 |
+
jQuery('.wrap h1.wp-heading-inline').after('<a type="button" class="wcf-custom-add-new-button button">Add New</a>');
|
171 |
+
</script>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Upgrade to pro notice popup.
|
178 |
+
*
|
179 |
+
* @since 1.3.4
|
180 |
+
*
|
181 |
+
* @return void
|
182 |
+
*/
|
183 |
+
public function upgrade_to_pro_notice_popup() {
|
184 |
+
|
185 |
+
?>
|
186 |
+
<div id="cartflows-upgrade-notice-overlay" style="display:none;"></div>
|
187 |
+
<div id="cartflows-upgrade-notice-popup" style="display:none;">
|
188 |
+
<div class="inner">
|
189 |
+
<div class="heading">
|
190 |
+
<span><?php esc_html_e( 'Upgrade to CartFlows Pro', 'cartflows' ); ?></span>
|
191 |
+
<span class="cartflows-close-popup-button tb-close-icon"></span>
|
192 |
+
</div>
|
193 |
+
<div class="contents">
|
194 |
+
<div class="wcf-notice">
|
195 |
+
<p>Upgrade to CartFlows Pro for adding more flows and other features. <a href ="https://cartflows.com/" target="_blank"> Click here</a> to upgrade.</p>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<?php
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Change metabox position.
|
205 |
+
*/
|
206 |
+
public function wcf_change_metabox_position() {
|
207 |
+
|
208 |
+
remove_meta_box( 'slugdiv', CARTFLOWS_FLOW_POST_TYPE, 'normal' );
|
209 |
+
add_meta_box( 'slugdiv', __( 'Slug', 'cartflows' ), 'post_slug_meta_box', CARTFLOWS_FLOW_POST_TYPE, 'side', 'high' );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Add post raw actions
|
214 |
+
*
|
215 |
+
* @param array $actions actions.
|
216 |
+
* @param array $post post data.
|
217 |
+
* @return array
|
218 |
+
*/
|
219 |
+
public function post_row_actions( $actions, $post ) {
|
220 |
+
|
221 |
+
$first_step = $this->get_first_step_url( $post );
|
222 |
+
|
223 |
+
if ( $first_step && isset( $actions['view'] ) ) {
|
224 |
+
|
225 |
+
$actions['view'] = '<a href="' . $first_step . '">' . __( 'View', 'cartflows' ) . '</a>';
|
226 |
+
}
|
227 |
+
|
228 |
+
return $actions;
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Returns previous post link
|
233 |
+
*
|
234 |
+
* @param string $prev_link previous link.
|
235 |
+
* @param array $post post data.
|
236 |
+
* @return string
|
237 |
+
*/
|
238 |
+
public function preview_post_link( $prev_link, $post ) {
|
239 |
+
|
240 |
+
if ( $this->is_flow_post_type( $post ) ) {
|
241 |
+
|
242 |
+
$first_step = $this->get_first_step_url( $post );
|
243 |
+
|
244 |
+
if ( $first_step ) {
|
245 |
+
|
246 |
+
return $first_step;
|
247 |
+
}
|
248 |
+
|
249 |
+
return '';
|
250 |
+
}
|
251 |
+
|
252 |
+
return $prev_link;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Check if post type is flow
|
257 |
+
*
|
258 |
+
* @param array $post post data.
|
259 |
+
* @return bool
|
260 |
+
*/
|
261 |
+
public function is_flow_post_type( $post ) {
|
262 |
+
|
263 |
+
if ( isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
264 |
+
|
265 |
+
return true;
|
266 |
+
}
|
267 |
+
|
268 |
+
return false;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Redirect to first step
|
273 |
+
*
|
274 |
+
* @return void
|
275 |
+
*/
|
276 |
+
public function redirect_to_step() {
|
277 |
+
|
278 |
+
global $post;
|
279 |
+
|
280 |
+
$first_step = $this->get_first_step_url( $post );
|
281 |
+
|
282 |
+
if ( $first_step ) {
|
283 |
+
|
284 |
+
wp_safe_redirect( $first_step );
|
285 |
+
die;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Return first step URL
|
291 |
+
*
|
292 |
+
* @param array $post post data.
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public function get_first_step_url( $post ) {
|
296 |
+
|
297 |
+
if ( $this->is_flow_post_type( $post ) ) {
|
298 |
+
|
299 |
+
$flow_id = $post->ID;
|
300 |
+
$title = $post->post_title;
|
301 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
302 |
+
|
303 |
+
if ( is_array( $steps ) && ! empty( $steps ) && isset( $steps[0]['id'] ) ) {
|
304 |
+
|
305 |
+
return get_permalink( $steps[0]['id'] );
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
return false;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Register the admin menu for Custom Layouts
|
314 |
+
*
|
315 |
+
* @since 1.0.0
|
316 |
+
* Moved the menu under Appearance -> Custom Layouts
|
317 |
+
public function register_admin_menu() {
|
318 |
+
add_submenu_page(
|
319 |
+
CARTFLOWS_SLUG,
|
320 |
+
__( 'Flows', 'wcf' ),
|
321 |
+
__( 'Flows', 'wcf' ),
|
322 |
+
'edit_pages',
|
323 |
+
'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE
|
324 |
+
);
|
325 |
+
}
|
326 |
+
*/
|
327 |
+
public function register_as_submenu() {
|
328 |
+
|
329 |
+
global $submenu;
|
330 |
+
|
331 |
+
$submenu[ CARTFLOWS_SLUG ][0] = array( //phpcs:ignore
|
332 |
+
__( 'Flows', 'cartflows' ),
|
333 |
+
'edit_pages',
|
334 |
+
'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE,
|
335 |
+
);
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Add Update messages for any custom post type
|
340 |
+
*
|
341 |
+
* @param array $messages Array of default messages.
|
342 |
+
*/
|
343 |
+
public function custom_post_type_post_update_messages( $messages ) {
|
344 |
+
|
345 |
+
$custom_post_type = get_post_type( get_the_ID() );
|
346 |
+
|
347 |
+
if ( CARTFLOWS_FLOW_POST_TYPE == $custom_post_type ) {
|
348 |
+
|
349 |
+
$obj = get_post_type_object( $custom_post_type );
|
350 |
+
$singular_name = $obj->labels->singular_name;
|
351 |
+
$messages[ $custom_post_type ] = array(
|
352 |
+
0 => '', // Unused. Messages start at index 1.
|
353 |
+
/* translators: %s: singular custom post type name */
|
354 |
+
1 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
355 |
+
/* translators: %s: singular custom post type name */
|
356 |
+
2 => sprintf( __( 'Custom %s updated.', 'cartflows' ), $singular_name ),
|
357 |
+
/* translators: %s: singular custom post type name */
|
358 |
+
3 => sprintf( __( 'Custom %s deleted.', 'cartflows' ), $singular_name ),
|
359 |
+
/* translators: %s: singular custom post type name */
|
360 |
+
4 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
361 |
+
/* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */
|
362 |
+
5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'cartflows' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, //phpcs:ignore
|
363 |
+
/* translators: %s: singular custom post type name */
|
364 |
+
6 => sprintf( __( '%s published.', 'cartflows' ), $singular_name ),
|
365 |
+
/* translators: %s: singular custom post type name */
|
366 |
+
7 => sprintf( __( '%s saved.', 'cartflows' ), $singular_name ),
|
367 |
+
/* translators: %s: singular custom post type name */
|
368 |
+
8 => sprintf( __( '%s submitted.', 'cartflows' ), $singular_name ),
|
369 |
+
/* translators: %s: singular custom post type name */
|
370 |
+
9 => sprintf( __( '%s scheduled for.', 'cartflows' ), $singular_name ),
|
371 |
+
/* translators: %s: singular custom post type name */
|
372 |
+
10 => sprintf( __( '%s draft updated.', 'cartflows' ), $singular_name ),
|
373 |
+
);
|
374 |
+
}
|
375 |
+
|
376 |
+
return $messages;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Kicking this off by calling 'get_instance()' method
|
382 |
+
*/
|
383 |
+
Cartflows_Flow_Post_Type::get_instance();
|
modules/flow/classes/class-cartflows-permalink.php
CHANGED
@@ -1,159 +1,159 @@
|
|
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 |
-
add_action( 'pre_get_posts', array( $this, 'add_cpt_post_names_to_main_query' ), 20 );
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Modify permalink
|
47 |
-
*
|
48 |
-
* @param string $post_link post link.
|
49 |
-
* @param array $post post data.
|
50 |
-
* @param string $leavename leave name.
|
51 |
-
* @return string
|
52 |
-
*/
|
53 |
-
public function post_type_permalinks( $post_link, $post, $leavename ) {
|
54 |
-
|
55 |
-
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE == $post->post_type ) {
|
56 |
-
|
57 |
-
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
58 |
-
$flow_name = get_post_field( 'post_name', $flow_id );
|
59 |
-
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
60 |
-
|
61 |
-
if ( isset( $cf_permalink['permalink_structure'] ) && ! empty( $cf_permalink['permalink_structure'] ) ) {
|
62 |
-
|
63 |
-
$search = array( 'cartflows_flow', '%flowname%', 'cartflows_step' );
|
64 |
-
$replace = array( $cf_permalink['permalink_flow_base'], $flow_name, $cf_permalink['permalink'] );
|
65 |
-
$post_link = str_replace( $search, $replace, $post_link );
|
66 |
-
} else {
|
67 |
-
|
68 |
-
// If elementor page preview, return post link as it is.
|
69 |
-
if ( isset( $_REQUEST['elementor-preview'] ) ) { //phpcs:ignore
|
70 |
-
return $post_link;
|
71 |
-
}
|
72 |
-
|
73 |
-
$structure = get_option( 'permalink_structure' );
|
74 |
-
|
75 |
-
if ( '/%postname%/' === $structure ) {
|
76 |
-
|
77 |
-
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
|
78 |
-
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
return $post_link;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Reqrite rules for acrtflows step.
|
88 |
-
*/
|
89 |
-
public function rewrite_step_rule() {
|
90 |
-
|
91 |
-
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
92 |
-
|
93 |
-
if ( isset( $cf_permalink['permalink_structure'] ) ) {
|
94 |
-
switch ( $cf_permalink['permalink_structure'] ) {
|
95 |
-
case '/cartflows_flow/%flowname%/cartflows_step':
|
96 |
-
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
97 |
-
break;
|
98 |
-
|
99 |
-
case '/cartflows_flow/%flowname%':
|
100 |
-
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/([^/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
101 |
-
break;
|
102 |
-
|
103 |
-
case '/%flowname%/cartflows_step':
|
104 |
-
add_rewrite_rule( '([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
105 |
-
|
106 |
-
break;
|
107 |
-
|
108 |
-
default:
|
109 |
-
break;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Have WordPress match postname to any of our public post types.
|
117 |
-
* All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts.
|
118 |
-
* By default, WordPress only accounts for posts and pages where the slug is /post-name/.
|
119 |
-
*
|
120 |
-
* @param string $query query statement.
|
121 |
-
*/
|
122 |
-
public function add_cpt_post_names_to_main_query( $query ) {
|
123 |
-
|
124 |
-
// Bail if this is not the main query.
|
125 |
-
if ( ! $query->is_main_query() ) {
|
126 |
-
return;
|
127 |
-
}
|
128 |
-
|
129 |
-
// Bail if this query doesn't match our very specific rewrite rule.
|
130 |
-
if ( ! isset( $query->query['thrive-variations'] ) && ! isset( $query->query['page'] ) || 2 !== count( $query->query ) ) {
|
131 |
-
return;
|
132 |
-
}
|
133 |
-
|
134 |
-
// Bail if we're not querying based on the post name.
|
135 |
-
if ( empty( $query->query['name'] ) ) {
|
136 |
-
return;
|
137 |
-
}
|
138 |
-
|
139 |
-
// Add cartflows step post type to existing post type array.
|
140 |
-
if ( isset( $query->query_vars['post_type'] ) && is_array( $query->query_vars['post_type'] ) ) {
|
141 |
-
|
142 |
-
$post_types = $query->query_vars['post_type'];
|
143 |
-
|
144 |
-
$post_types[] = CARTFLOWS_STEP_POST_TYPE;
|
145 |
-
|
146 |
-
$query->set( 'post_type', $post_types );
|
147 |
-
|
148 |
-
} else {
|
149 |
-
|
150 |
-
// Add CPT to the list of post types WP will include when it queries based on the post name.
|
151 |
-
$query->set( 'post_type', array( 'post', 'page', CARTFLOWS_STEP_POST_TYPE ) );
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Kicking this off by calling 'get_instance()' method
|
158 |
-
*/
|
159 |
-
Cartflows_Permalink::get_instance();
|
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 |
+
add_action( 'pre_get_posts', array( $this, 'add_cpt_post_names_to_main_query' ), 20 );
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Modify permalink
|
47 |
+
*
|
48 |
+
* @param string $post_link post link.
|
49 |
+
* @param array $post post data.
|
50 |
+
* @param string $leavename leave name.
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
public function post_type_permalinks( $post_link, $post, $leavename ) {
|
54 |
+
|
55 |
+
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE == $post->post_type ) {
|
56 |
+
|
57 |
+
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
58 |
+
$flow_name = get_post_field( 'post_name', $flow_id );
|
59 |
+
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
60 |
+
|
61 |
+
if ( isset( $cf_permalink['permalink_structure'] ) && ! empty( $cf_permalink['permalink_structure'] ) ) {
|
62 |
+
|
63 |
+
$search = array( 'cartflows_flow', '%flowname%', 'cartflows_step' );
|
64 |
+
$replace = array( $cf_permalink['permalink_flow_base'], $flow_name, $cf_permalink['permalink'] );
|
65 |
+
$post_link = str_replace( $search, $replace, $post_link );
|
66 |
+
} else {
|
67 |
+
|
68 |
+
// If elementor page preview, return post link as it is.
|
69 |
+
if ( isset( $_REQUEST['elementor-preview'] ) ) { //phpcs:ignore
|
70 |
+
return $post_link;
|
71 |
+
}
|
72 |
+
|
73 |
+
$structure = get_option( 'permalink_structure' );
|
74 |
+
|
75 |
+
if ( '/%postname%/' === $structure ) {
|
76 |
+
|
77 |
+
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
|
78 |
+
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
return $post_link;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Reqrite rules for acrtflows step.
|
88 |
+
*/
|
89 |
+
public function rewrite_step_rule() {
|
90 |
+
|
91 |
+
$cf_permalink = Cartflows_Helper::get_permalink_settings();
|
92 |
+
|
93 |
+
if ( isset( $cf_permalink['permalink_structure'] ) ) {
|
94 |
+
switch ( $cf_permalink['permalink_structure'] ) {
|
95 |
+
case '/cartflows_flow/%flowname%/cartflows_step':
|
96 |
+
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
97 |
+
break;
|
98 |
+
|
99 |
+
case '/cartflows_flow/%flowname%':
|
100 |
+
add_rewrite_rule( '^' . $cf_permalink['permalink_flow_base'] . '/([^/]*)/([^/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
101 |
+
break;
|
102 |
+
|
103 |
+
case '/%flowname%/cartflows_step':
|
104 |
+
add_rewrite_rule( '([^/]*)/' . $cf_permalink['permalink'] . '/([^\/]*)/?', 'index.php?cartflows_step=$matches[2]', 'top' );
|
105 |
+
|
106 |
+
break;
|
107 |
+
|
108 |
+
default:
|
109 |
+
break;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Have WordPress match postname to any of our public post types.
|
117 |
+
* All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts.
|
118 |
+
* By default, WordPress only accounts for posts and pages where the slug is /post-name/.
|
119 |
+
*
|
120 |
+
* @param string $query query statement.
|
121 |
+
*/
|
122 |
+
public function add_cpt_post_names_to_main_query( $query ) {
|
123 |
+
|
124 |
+
// Bail if this is not the main query.
|
125 |
+
if ( ! $query->is_main_query() ) {
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
|
129 |
+
// Bail if this query doesn't match our very specific rewrite rule.
|
130 |
+
if ( ! isset( $query->query['thrive-variations'] ) && ! isset( $query->query['page'] ) || 2 !== count( $query->query ) ) {
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
|
134 |
+
// Bail if we're not querying based on the post name.
|
135 |
+
if ( empty( $query->query['name'] ) ) {
|
136 |
+
return;
|
137 |
+
}
|
138 |
+
|
139 |
+
// Add cartflows step post type to existing post type array.
|
140 |
+
if ( isset( $query->query_vars['post_type'] ) && is_array( $query->query_vars['post_type'] ) ) {
|
141 |
+
|
142 |
+
$post_types = $query->query_vars['post_type'];
|
143 |
+
|
144 |
+
$post_types[] = CARTFLOWS_STEP_POST_TYPE;
|
145 |
+
|
146 |
+
$query->set( 'post_type', $post_types );
|
147 |
+
|
148 |
+
} else {
|
149 |
+
|
150 |
+
// Add CPT to the list of post types WP will include when it queries based on the post name.
|
151 |
+
$query->set( 'post_type', array( 'post', 'page', CARTFLOWS_STEP_POST_TYPE ) );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Kicking this off by calling 'get_instance()' method
|
158 |
+
*/
|
159 |
+
Cartflows_Permalink::get_instance();
|
modules/flow/classes/class-cartflows-step-post-type.php
CHANGED
@@ -240,6 +240,13 @@ class Cartflows_Step_Post_Type {
|
|
240 |
'slug' => 'landing',
|
241 |
),
|
242 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
array(
|
244 |
'name' => __( 'Checkout (Woo)', 'cartflows' ),
|
245 |
'slug' => 'checkout',
|
240 |
'slug' => 'landing',
|
241 |
),
|
242 |
),
|
243 |
+
array(
|
244 |
+
'name' => __( 'Optin (Woo)', 'cartflows' ),
|
245 |
+
'slug' => 'optin',
|
246 |
+
'args' => array(
|
247 |
+
'slug' => 'optin',
|
248 |
+
),
|
249 |
+
),
|
250 |
array(
|
251 |
'name' => __( 'Checkout (Woo)', 'cartflows' ),
|
252 |
'slug' => 'checkout',
|
modules/flow/view/meta-flow-steps.php
CHANGED
@@ -13,6 +13,7 @@ $steps = array(
|
|
13 |
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
|
|
16 |
);
|
17 |
|
18 |
?>
|
13 |
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
16 |
+
'optin' => __( 'Optin (Woo)', 'cartflows' ),
|
17 |
);
|
18 |
|
19 |
?>
|
modules/optin/class-cartflows-optin.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Checkout
|
4 |
+
*
|
5 |
+
* @package Woo Funnel Cart
|
6 |
+
*/
|
7 |
+
|
8 |
+
define( 'CARTFLOWS_OPTIN_DIR', CARTFLOWS_DIR . 'modules/optin/' );
|
9 |
+
define( 'CARTFLOWS_OPTIN_URL', CARTFLOWS_URL . 'modules/optin/' );
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Initial Setup
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
class Cartflows_Optin {
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Member Variable
|
21 |
+
*
|
22 |
+
* @var object instance
|
23 |
+
*/
|
24 |
+
private static $instance;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Initiator
|
28 |
+
*/
|
29 |
+
public static function get_instance() {
|
30 |
+
if ( ! isset( self::$instance ) ) {
|
31 |
+
self::$instance = new self();
|
32 |
+
}
|
33 |
+
return self::$instance;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Constructor function that initializes required actions and hooks
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
require_once CARTFLOWS_OPTIN_DIR . 'classes/class-cartflows-optin-markup.php';
|
41 |
+
require_once CARTFLOWS_OPTIN_DIR . 'classes/class-cartflows-optin-meta.php';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
/**
|
45 |
+
* Kicking this off by calling 'get_instance()' method
|
46 |
+
*/
|
47 |
+
Cartflows_Optin::get_instance();
|
modules/optin/classes/class-cartflows-optin-markup.php
ADDED
@@ -0,0 +1,802 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
$this->elementor_editor_compatibility();
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Elementor editor compatibility.
|
70 |
+
*/
|
71 |
+
public function elementor_editor_compatibility() {
|
72 |
+
|
73 |
+
if ( ! empty( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] && is_admin() ) { //phpcs:ignore
|
74 |
+
|
75 |
+
if ( isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) { //phpcs:ignore
|
76 |
+
|
77 |
+
if ( _wcf_check_is_optin_by_id( intval( $_GET['post'] ) ) ) { //phpcs:ignore
|
78 |
+
|
79 |
+
/* Submit Button */
|
80 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Change order button text .
|
88 |
+
*
|
89 |
+
* @param string $woo_button_text place order.
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function place_order_button_text( $woo_button_text ) {
|
93 |
+
|
94 |
+
$optin_id = get_the_ID();
|
95 |
+
|
96 |
+
$wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
|
97 |
+
|
98 |
+
if ( ! empty( $wcf_order_button_text ) ) {
|
99 |
+
$woo_button_text = $wcf_order_button_text;
|
100 |
+
}
|
101 |
+
|
102 |
+
return $woo_button_text;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Display all WooCommerce notices.
|
107 |
+
*
|
108 |
+
* @since 1.1.5
|
109 |
+
*/
|
110 |
+
public function display_woo_notices() {
|
111 |
+
|
112 |
+
if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
|
113 |
+
woocommerce_output_all_notices();
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Check for checkout flag
|
119 |
+
*
|
120 |
+
* @param bool $is_checkout is checkout.
|
121 |
+
*
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
public function woo_checkout_flag( $is_checkout ) {
|
125 |
+
|
126 |
+
if ( ! is_admin() ) {
|
127 |
+
|
128 |
+
if ( _is_wcf_optin_type() ) {
|
129 |
+
|
130 |
+
$is_checkout = true;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
return $is_checkout;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Render checkout shortcode markup.
|
139 |
+
*
|
140 |
+
* @param array $atts attributes.
|
141 |
+
* @return string
|
142 |
+
*/
|
143 |
+
public function optin_shortcode_markup( $atts ) {
|
144 |
+
|
145 |
+
if ( ! function_exists( 'wc_print_notices' ) ) {
|
146 |
+
$notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
|
147 |
+
$notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
|
148 |
+
|
149 |
+
return $notice_out;
|
150 |
+
}
|
151 |
+
|
152 |
+
$atts = shortcode_atts(
|
153 |
+
array(
|
154 |
+
'id' => 0,
|
155 |
+
),
|
156 |
+
$atts
|
157 |
+
);
|
158 |
+
|
159 |
+
$optin_id = intval( $atts['id'] );
|
160 |
+
|
161 |
+
if ( empty( $optin_id ) ) {
|
162 |
+
|
163 |
+
if ( ! _is_wcf_optin_type() ) {
|
164 |
+
|
165 |
+
return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>';
|
166 |
+
}
|
167 |
+
|
168 |
+
global $post;
|
169 |
+
|
170 |
+
$optin_id = intval( $post->ID );
|
171 |
+
}
|
172 |
+
|
173 |
+
$output = '';
|
174 |
+
|
175 |
+
ob_start();
|
176 |
+
|
177 |
+
do_action( 'cartflows_optin_form_before', $optin_id );
|
178 |
+
|
179 |
+
$optin_layout = 'default';
|
180 |
+
|
181 |
+
$template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php';
|
182 |
+
|
183 |
+
include $template_default;
|
184 |
+
|
185 |
+
$output .= ob_get_clean();
|
186 |
+
|
187 |
+
return $output;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Configure Cart Data.
|
192 |
+
*
|
193 |
+
* @since 1.0.0
|
194 |
+
*
|
195 |
+
* @return void
|
196 |
+
*/
|
197 |
+
public function preconfigured_cart_data() {
|
198 |
+
|
199 |
+
if ( is_admin() ) {
|
200 |
+
return;
|
201 |
+
}
|
202 |
+
|
203 |
+
global $post;
|
204 |
+
|
205 |
+
if ( _is_wcf_optin_type() ) {
|
206 |
+
|
207 |
+
if ( wp_doing_ajax() ) {
|
208 |
+
return;
|
209 |
+
} else {
|
210 |
+
|
211 |
+
$optin_id = $post->ID;
|
212 |
+
|
213 |
+
do_action( 'cartflows_optin_before_configure_cart', $optin_id );
|
214 |
+
|
215 |
+
$products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
|
216 |
+
|
217 |
+
if ( ! is_array( $products ) ) {
|
218 |
+
return;
|
219 |
+
}
|
220 |
+
|
221 |
+
/* Empty the current cart */
|
222 |
+
WC()->cart->empty_cart();
|
223 |
+
|
224 |
+
if ( is_array( $products ) && count( $products ) < 1 ) {
|
225 |
+
wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
|
226 |
+
return;
|
227 |
+
}
|
228 |
+
|
229 |
+
/* Set customer session if not set */
|
230 |
+
if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
|
231 |
+
WC()->session->set_customer_session_cookie( true );
|
232 |
+
}
|
233 |
+
|
234 |
+
$product_id = reset( $products );
|
235 |
+
$_product = wc_get_product( $product_id );
|
236 |
+
|
237 |
+
if ( ! empty( $_product ) ) {
|
238 |
+
|
239 |
+
if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) {
|
240 |
+
|
241 |
+
if ( $_product->get_price() > 0 ) {
|
242 |
+
wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' );
|
243 |
+
} else {
|
244 |
+
|
245 |
+
$quantity = 1;
|
246 |
+
|
247 |
+
WC()->cart->add_to_cart( $product_id, $quantity );
|
248 |
+
}
|
249 |
+
} else {
|
250 |
+
|
251 |
+
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
252 |
+
}
|
253 |
+
} else {
|
254 |
+
|
255 |
+
wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
|
256 |
+
}
|
257 |
+
|
258 |
+
do_action( 'cartflows_optin_after_configure_cart', $optin_id );
|
259 |
+
}
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Load shortcode data.
|
265 |
+
*
|
266 |
+
* @return void
|
267 |
+
*/
|
268 |
+
public function shortcode_load_data() {
|
269 |
+
|
270 |
+
if ( _is_wcf_optin_type() ) {
|
271 |
+
|
272 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
|
273 |
+
|
274 |
+
/* Show notices if cart has errors */
|
275 |
+
add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
|
276 |
+
|
277 |
+
// Outputting the hidden field in checkout page.
|
278 |
+
add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
279 |
+
add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
|
280 |
+
|
281 |
+
/* Remove unnecessary option */
|
282 |
+
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
|
283 |
+
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
|
284 |
+
|
285 |
+
remove_all_actions( 'woocommerce_before_checkout_form' );
|
286 |
+
remove_all_actions( 'woocommerce_checkout_billing' );
|
287 |
+
remove_all_actions( 'woocommerce_checkout_shipping' );
|
288 |
+
remove_all_actions( 'woocommerce_checkout_before_order_review' );
|
289 |
+
remove_all_actions( 'woocommerce_checkout_order_review' );
|
290 |
+
remove_all_actions( 'woocommerce_checkout_after_order_review' );
|
291 |
+
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
|
292 |
+
add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) );
|
293 |
+
|
294 |
+
/* Paypal Expresss remove */
|
295 |
+
|
296 |
+
if ( function_exists( 'wc_gateway_ppec' ) ) {
|
297 |
+
remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) );
|
298 |
+
}
|
299 |
+
|
300 |
+
// Hook in actions once.
|
301 |
+
add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 );
|
302 |
+
add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
|
303 |
+
add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
|
304 |
+
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
|
305 |
+
|
306 |
+
/* Submit Button */
|
307 |
+
add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
|
308 |
+
|
309 |
+
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
310 |
+
|
311 |
+
global $post;
|
312 |
+
|
313 |
+
$optin_id = $post->ID;
|
314 |
+
|
315 |
+
do_action( 'cartflows_optin_before_shortcode', $optin_id );
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Disable payment gateways.
|
321 |
+
*
|
322 |
+
* @param array $available_gateways gateways.
|
323 |
+
* @return array
|
324 |
+
*/
|
325 |
+
public function disable_payment_gateways( $available_gateways ) {
|
326 |
+
|
327 |
+
if ( ! is_admin() ) {
|
328 |
+
|
329 |
+
$available_gateways = array();
|
330 |
+
}
|
331 |
+
|
332 |
+
return $available_gateways;
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Render checkout ID hidden field.
|
337 |
+
*
|
338 |
+
* @param array $checkout checkout session data.
|
339 |
+
* @return void
|
340 |
+
*/
|
341 |
+
public function checkout_shortcode_post_id( $checkout ) {
|
342 |
+
|
343 |
+
if ( ! _is_wcf_optin_type() ) {
|
344 |
+
return;
|
345 |
+
}
|
346 |
+
|
347 |
+
global $post;
|
348 |
+
|
349 |
+
$optin_id = $post->ID;
|
350 |
+
|
351 |
+
$flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true );
|
352 |
+
|
353 |
+
echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
|
354 |
+
echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">';
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Load shortcode scripts.
|
359 |
+
*
|
360 |
+
* @return void
|
361 |
+
*/
|
362 |
+
public function shortcode_scripts() {
|
363 |
+
|
364 |
+
wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
|
365 |
+
|
366 |
+
wp_enqueue_script(
|
367 |
+
'wcf-optin-template',
|
368 |
+
wcf()->utils->get_js_url( 'optin-template' ),
|
369 |
+
array( 'jquery' ),
|
370 |
+
CARTFLOWS_VER,
|
371 |
+
true
|
372 |
+
);
|
373 |
+
|
374 |
+
do_action( 'cartflows_optin_scripts' );
|
375 |
+
|
376 |
+
$style = $this->generate_style();
|
377 |
+
|
378 |
+
wp_add_inline_style( 'wcf-optin-template', $style );
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Generate styles.
|
383 |
+
*
|
384 |
+
* @return string
|
385 |
+
*/
|
386 |
+
public function generate_style() {
|
387 |
+
|
388 |
+
global $post;
|
389 |
+
|
390 |
+
$optin_id = $post->ID;
|
391 |
+
|
392 |
+
/* Load all fonts */
|
393 |
+
CartFlows_Font_Families::render_fonts( $optin_id );
|
394 |
+
|
395 |
+
$r = '';
|
396 |
+
$g = '';
|
397 |
+
$b = '';
|
398 |
+
$output = '';
|
399 |
+
|
400 |
+
/* Global */
|
401 |
+
$primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' );
|
402 |
+
$base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' );
|
403 |
+
|
404 |
+
/* Input Fields */
|
405 |
+
$input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' );
|
406 |
+
$input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' );
|
407 |
+
$field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' );
|
408 |
+
$field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' );
|
409 |
+
$field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' );
|
410 |
+
$field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' );
|
411 |
+
$field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' );
|
412 |
+
$field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' );
|
413 |
+
$field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' );
|
414 |
+
|
415 |
+
if ( 'custom' == $field_input_size ) {
|
416 |
+
$field_input_size = '38px';
|
417 |
+
}
|
418 |
+
|
419 |
+
/* Submit Button */
|
420 |
+
$submit_button_width = '100%';
|
421 |
+
$optin_button_position = '';
|
422 |
+
$button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' );
|
423 |
+
$button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' );
|
424 |
+
$button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' );
|
425 |
+
$submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' );
|
426 |
+
$submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' );
|
427 |
+
$submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' );
|
428 |
+
$submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' );
|
429 |
+
$submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' );
|
430 |
+
$submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' );
|
431 |
+
$submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color );
|
432 |
+
$submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color );
|
433 |
+
$submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color );
|
434 |
+
$submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color );
|
435 |
+
|
436 |
+
if ( 'custom' == $submit_button_height ) {
|
437 |
+
$submit_button_height = '38px';
|
438 |
+
$submit_button_width = 'auto';
|
439 |
+
|
440 |
+
switch ( $submit_button_position ) {
|
441 |
+
case 'left':
|
442 |
+
$optin_button_position = '0 auto 0 0';
|
443 |
+
break;
|
444 |
+
case 'center':
|
445 |
+
$optin_button_position = '0 auto';
|
446 |
+
break;
|
447 |
+
case 'right':
|
448 |
+
$optin_button_position = '0 0 0 auto';
|
449 |
+
break;
|
450 |
+
|
451 |
+
default:
|
452 |
+
$optin_button_position = '0 auto';
|
453 |
+
break;
|
454 |
+
}
|
455 |
+
|
456 |
+
$output .= ".wcf-optin-form .woocommerce #order_review #payment button{
|
457 |
+
margin: {$optin_button_position};
|
458 |
+
}";
|
459 |
+
}
|
460 |
+
|
461 |
+
$output .= "
|
462 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before,
|
463 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:before{
|
464 |
+
color: {$primary_color};
|
465 |
+
}
|
466 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{
|
467 |
+
background-color: {$primary_color};
|
468 |
+
}
|
469 |
+
.wcf-optin-form .woocommerce #payment input[type=checkbox]:focus,
|
470 |
+
.wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:focus,
|
471 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:checked:focus,
|
472 |
+
.wcf-optin-form .woocommerce #payment input[type=radio]:not(:checked):focus{
|
473 |
+
border-color: {$primary_color};
|
474 |
+
box-shadow: 0 0 2px rgba( " . $r . ',' . $g . ',' . $b . ", .8);
|
475 |
+
}
|
476 |
+
.wcf-optin-form .woocommerce-checkout label{
|
477 |
+
color: {$field_label_color};
|
478 |
+
}
|
479 |
+
|
480 |
+
.wcf-optin-form #order_review .wcf-custom-coupon-field input[type='text'],
|
481 |
+
.wcf-optin-form .woocommerce form .form-row input.input-text,
|
482 |
+
.wcf-optin-form .woocommerce form .form-row textarea,
|
483 |
+
.wcf-optin-form .select2-container--default .select2-selection--single {
|
484 |
+
color: {$field_color};
|
485 |
+
background: {$field_bg_color};
|
486 |
+
border-color: {$field_border_color};
|
487 |
+
padding-top: {$field_tb_padding}px;
|
488 |
+
padding-bottom: {$field_tb_padding}px;
|
489 |
+
padding-left: {$field_lr_padding}px;
|
490 |
+
padding-right: {$field_lr_padding}px;
|
491 |
+
min-height: {$field_input_size};
|
492 |
+
font-family: {$input_font_family};
|
493 |
+
font-weight: {$input_font_weight};
|
494 |
+
}
|
495 |
+
|
496 |
+
.wcf-optin-form .woocommerce .col2-set .col-1,
|
497 |
+
.wcf-optin-form .woocommerce .col2-set .col-2,
|
498 |
+
.wcf-optin-form .woocommerce-checkout .shop_table,
|
499 |
+
.wcf-optin-form .woocommerce-checkout #order_review_heading,
|
500 |
+
.wcf-optin-form .woocommerce-checkout #payment,
|
501 |
+
.wcf-optin-form .woocommerce form.checkout_coupon {
|
502 |
+
font-family: {$input_font_family};
|
503 |
+
font-weight: {$input_font_weight};
|
504 |
+
}
|
505 |
+
|
506 |
+
.woocommerce table.shop_table th{
|
507 |
+
color: {$field_label_color};
|
508 |
+
}
|
509 |
+
|
510 |
+
.wcf-optin-form .woocommerce a{
|
511 |
+
color: {$primary_color};
|
512 |
+
}
|
513 |
+
.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered {
|
514 |
+
color: {$field_color};
|
515 |
+
}
|
516 |
+
.wcf-optin-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
517 |
+
color: {$field_color};
|
518 |
+
}
|
519 |
+
.wcf-optin-form ::-moz-placeholder { /* Firefox 19+ */
|
520 |
+
color: {$field_color};
|
521 |
+
}
|
522 |
+
.wcf-optin-form :-ms-input-placeholder { /* IE 10+ */
|
523 |
+
color: {$field_color};
|
524 |
+
}
|
525 |
+
.wcf-optin-form :-moz-placeholder { /* Firefox 18- */
|
526 |
+
color: {$field_color};
|
527 |
+
}
|
528 |
+
.wcf-optin-form .woocommerce form p.form-row label {
|
529 |
+
color: {$field_label_color};
|
530 |
+
font-family: {$input_font_family};
|
531 |
+
font-weight: {$input_font_weight};
|
532 |
+
}
|
533 |
+
.wcf-optin-form .woocommerce #order_review button,
|
534 |
+
.wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button,
|
535 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small {
|
536 |
+
color: {$submit_color};
|
537 |
+
background: {$submit_bg_color};
|
538 |
+
padding-top: {$submit_tb_padding}px;
|
539 |
+
padding-bottom: {$submit_tb_padding}px;
|
540 |
+
padding-left: {$submit_lr_padding}px;
|
541 |
+
padding-right: {$submit_lr_padding}px;
|
542 |
+
border-color: {$submit_border_color};
|
543 |
+
min-height: {$submit_button_height};
|
544 |
+
font-size: {$button_font_size}px;
|
545 |
+
font-family: {$button_font_family};
|
546 |
+
font-weight: {$button_font_weight};
|
547 |
+
width: {$submit_button_width};
|
548 |
+
|
549 |
+
}
|
550 |
+
|
551 |
+
.wcf-optin-form .woocommerce-checkout form.woocommerce-form-login .button,
|
552 |
+
.wcf-optin-form .woocommerce-checkout form.checkout_coupon .button{
|
553 |
+
background: {$submit_bg_color};
|
554 |
+
border: 1px {$submit_border_color} solid;
|
555 |
+
color: {$submit_color};
|
556 |
+
min-height: {$submit_button_height};
|
557 |
+
font-family: {$button_font_family};
|
558 |
+
font-weight: {$button_font_weight};
|
559 |
+
}
|
560 |
+
.wcf-optin-form .woocommerce-checkout form.login .button:hover,
|
561 |
+
.wcf-optin-form .woocommerce-checkout form.checkout_coupon .button:hover,
|
562 |
+
.wcf-optin-form .woocommerce #payment #place_order:hover,
|
563 |
+
.wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{
|
564 |
+
color: {$submit_hover_color};
|
565 |
+
background-color: {$submit_bg_hover_color};
|
566 |
+
border-color: {$submit_border_hover_color};
|
567 |
+
}
|
568 |
+
.wcf-optin-form .woocommerce-info::before,
|
569 |
+
.wcf-optin-form .woocommerce-message::before{
|
570 |
+
color: {$primary_color};
|
571 |
+
}
|
572 |
+
.wcf-optin-form{
|
573 |
+
font-family: {$base_font_family};
|
574 |
+
}
|
575 |
+
img.emoji, img.wp-smiley {}";
|
576 |
+
|
577 |
+
return $output;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Get ajax end points.
|
582 |
+
*
|
583 |
+
* @param string $endpoint_url end point URL.
|
584 |
+
* @param string $request end point request.
|
585 |
+
* @return string
|
586 |
+
*/
|
587 |
+
public function get_ajax_endpoint( $endpoint_url, $request ) {
|
588 |
+
|
589 |
+
global $post;
|
590 |
+
|
591 |
+
if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
592 |
+
|
593 |
+
if ( _is_wcf_optin_type() ) {
|
594 |
+
|
595 |
+
if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
|
596 |
+
|
597 |
+
if ( '' === $request ) {
|
598 |
+
$query_args = array(
|
599 |
+
'wc-ajax' => '%%endpoint%%',
|
600 |
+
);
|
601 |
+
} else {
|
602 |
+
$query_args = array(
|
603 |
+
'wc-ajax' => $request,
|
604 |
+
);
|
605 |
+
}
|
606 |
+
|
607 |
+
$uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
|
608 |
+
$uri = $uri[0];
|
609 |
+
|
610 |
+
$endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
|
611 |
+
}
|
612 |
+
}
|
613 |
+
}
|
614 |
+
|
615 |
+
return $endpoint_url;
|
616 |
+
}
|
617 |
+
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Save checkout fields.
|
621 |
+
*
|
622 |
+
* @param int $order_id order id.
|
623 |
+
* @param array $posted posted data.
|
624 |
+
* @return void
|
625 |
+
*/
|
626 |
+
public function save_optin_fields( $order_id, $posted ) {
|
627 |
+
|
628 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
629 |
+
|
630 |
+
$optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore
|
631 |
+
|
632 |
+
update_post_meta( $order_id, '_wcf_optin_id', $optin_id );
|
633 |
+
|
634 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
635 |
+
|
636 |
+
$flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
|
637 |
+
|
638 |
+
update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
|
639 |
+
}
|
640 |
+
}
|
641 |
+
|
642 |
+
}
|
643 |
+
|
644 |
+
/**
|
645 |
+
* Redirect users to our checkout if hidden param
|
646 |
+
*
|
647 |
+
* @param string $redirect redirect url.
|
648 |
+
* @param object $user user.
|
649 |
+
* @return string
|
650 |
+
*/
|
651 |
+
public function after_login_redirect( $redirect, $user ) {
|
652 |
+
|
653 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
654 |
+
|
655 |
+
$optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore
|
656 |
+
|
657 |
+
$redirect = get_permalink( $optin_id );
|
658 |
+
}
|
659 |
+
|
660 |
+
return $redirect;
|
661 |
+
}
|
662 |
+
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Add custom class to the fields to change the UI to three column.
|
666 |
+
*
|
667 |
+
* @param array $fields fields.
|
668 |
+
*/
|
669 |
+
public function set_optin_default_fields( $fields ) {
|
670 |
+
|
671 |
+
if ( _is_wcf_optin_type() ) {
|
672 |
+
|
673 |
+
global $post;
|
674 |
+
|
675 |
+
$optin_id = $post->ID;
|
676 |
+
} else {
|
677 |
+
|
678 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
679 |
+
|
680 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
681 |
+
} else {
|
682 |
+
return $fields;
|
683 |
+
}
|
684 |
+
}
|
685 |
+
|
686 |
+
$first_name = $fields['first_name'];
|
687 |
+
$last_name = $fields['last_name'];
|
688 |
+
|
689 |
+
/* Make fields required */
|
690 |
+
$first_name['required'] = true;
|
691 |
+
$last_name['required'] = true;
|
692 |
+
|
693 |
+
$fields = array(
|
694 |
+
'first_name' => $first_name,
|
695 |
+
'last_name' => $last_name,
|
696 |
+
);
|
697 |
+
|
698 |
+
return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id );
|
699 |
+
}
|
700 |
+
|
701 |
+
/**
|
702 |
+
* Add custom class to the fields to change the UI to three column.
|
703 |
+
*
|
704 |
+
* @param array $fields fields.
|
705 |
+
*/
|
706 |
+
public function set_optin_fields( $fields ) {
|
707 |
+
|
708 |
+
if ( _is_wcf_optin_type() ) {
|
709 |
+
|
710 |
+
global $post;
|
711 |
+
|
712 |
+
$optin_id = $post->ID;
|
713 |
+
} else {
|
714 |
+
|
715 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
716 |
+
|
717 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
718 |
+
} else {
|
719 |
+
return $fields;
|
720 |
+
}
|
721 |
+
}
|
722 |
+
|
723 |
+
$billing_first_name = $fields['billing']['billing_first_name'];
|
724 |
+
$billing_last_name = $fields['billing']['billing_last_name'];
|
725 |
+
$billing_email = $fields['billing']['billing_email'];
|
726 |
+
|
727 |
+
$fields['billing'] = array(
|
728 |
+
'billing_first_name' => $billing_first_name,
|
729 |
+
'billing_last_name' => $billing_last_name,
|
730 |
+
'billing_email' => $billing_email,
|
731 |
+
);
|
732 |
+
|
733 |
+
return apply_filters( 'cartflows_optin_fields', $fields, $optin_id );
|
734 |
+
}
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Billing field customization.
|
738 |
+
*
|
739 |
+
* @param array $fields fields data.
|
740 |
+
* @param string $country country name.
|
741 |
+
* @return array
|
742 |
+
*/
|
743 |
+
public function billing_optin_fields( $fields, $country ) {
|
744 |
+
|
745 |
+
if ( _is_wcf_optin_type() ) {
|
746 |
+
|
747 |
+
global $post;
|
748 |
+
|
749 |
+
$optin_id = $post->ID;
|
750 |
+
} else {
|
751 |
+
|
752 |
+
if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
|
753 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
754 |
+
} else {
|
755 |
+
return $fields;
|
756 |
+
}
|
757 |
+
}
|
758 |
+
|
759 |
+
if ( is_wc_endpoint_url( 'edit-address' ) ) {
|
760 |
+
return $fields;
|
761 |
+
}
|
762 |
+
|
763 |
+
$billing_first_name = $fields['billing_first_name'];
|
764 |
+
$billing_last_name = $fields['billing_last_name'];
|
765 |
+
$billing_email = $fields['billing_email'];
|
766 |
+
|
767 |
+
/* Make fields required */
|
768 |
+
$billing_first_name['required'] = true;
|
769 |
+
$billing_last_name['required'] = true;
|
770 |
+
|
771 |
+
$fields = array(
|
772 |
+
'billing_first_name' => $billing_first_name,
|
773 |
+
'billing_last_name' => $billing_last_name,
|
774 |
+
'billing_email' => $billing_email,
|
775 |
+
);
|
776 |
+
|
777 |
+
return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id );
|
778 |
+
}
|
779 |
+
|
780 |
+
|
781 |
+
/**
|
782 |
+
* Replace billing label.
|
783 |
+
*
|
784 |
+
* @param string $notice Notice.
|
785 |
+
* @param string $field_label Field name.
|
786 |
+
* @return string
|
787 |
+
*/
|
788 |
+
public function change_field_label_in_required_notice( $notice, $field_label ) {
|
789 |
+
|
790 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
791 |
+
|
792 |
+
$notice = str_replace( 'Billing ', '', $notice );
|
793 |
+
}
|
794 |
+
|
795 |
+
return $notice;
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
/**
|
800 |
+
* Kicking this off by calling 'get_instance()' method
|
801 |
+
*/
|
802 |
+
Cartflows_Optin_Markup::get_instance();
|
modules/optin/classes/class-cartflows-optin-meta.php
ADDED
@@ -0,0 +1,672 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Checkout post meta
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Meta Boxes setup
|
10 |
+
*/
|
11 |
+
class Cartflows_Optin_Meta extends Cartflows_Meta {
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance
|
16 |
+
*
|
17 |
+
* @var $instance
|
18 |
+
*/
|
19 |
+
private static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Meta Option
|
23 |
+
*
|
24 |
+
* @var $meta_option
|
25 |
+
*/
|
26 |
+
private static $meta_option = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initiator
|
30 |
+
*/
|
31 |
+
public static function get_instance() {
|
32 |
+
if ( ! isset( self::$instance ) ) {
|
33 |
+
self::$instance = new self();
|
34 |
+
}
|
35 |
+
|
36 |
+
return self::$instance;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Constructor
|
41 |
+
*/
|
42 |
+
public function __construct() {
|
43 |
+
|
44 |
+
/* Init Metabox */
|
45 |
+
add_action( 'load-post.php', array( $this, 'init_metabox' ) );
|
46 |
+
add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* Init Metabox
|
50 |
+
*/
|
51 |
+
public function init_metabox() {
|
52 |
+
|
53 |
+
add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
|
54 |
+
add_action( 'save_post', array( $this, 'save_meta_box' ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Setup Metabox
|
59 |
+
*/
|
60 |
+
public function setup_meta_box() {
|
61 |
+
|
62 |
+
if ( _is_wcf_optin_type() ) {
|
63 |
+
add_meta_box(
|
64 |
+
'wcf-optin-settings', // Id.
|
65 |
+
__( 'Optin Settings', 'cartflows' ), // Title.
|
66 |
+
array( $this, 'markup_meta_box' ), // Callback.
|
67 |
+
wcf()->utils->get_step_post_type(), // Post_type.
|
68 |
+
'normal', // Context.
|
69 |
+
'high' // Priority.
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Metabox Markup
|
76 |
+
*
|
77 |
+
* @param object $post Post object.
|
78 |
+
* @return void
|
79 |
+
*/
|
80 |
+
public function markup_meta_box( $post ) {
|
81 |
+
|
82 |
+
wp_nonce_field( 'save-nonce-optin-step-meta', 'nonce-optin-step-meta' );
|
83 |
+
|
84 |
+
$stored = get_post_meta( $post->ID );
|
85 |
+
|
86 |
+
$optin_meta = self::get_meta_option( $post->ID );
|
87 |
+
|
88 |
+
// Set stored and override defaults.
|
89 |
+
foreach ( $stored as $key => $value ) {
|
90 |
+
if ( array_key_exists( $key, $optin_meta ) ) {
|
91 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
|
92 |
+
} else {
|
93 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
// Get defaults.
|
98 |
+
$meta = self::get_meta_option( $post->ID );
|
99 |
+
$optin_meta = array();
|
100 |
+
|
101 |
+
foreach ( $meta as $key => $value ) {
|
102 |
+
$optin_meta[ $key ] = $meta[ $key ]['default'];
|
103 |
+
}
|
104 |
+
|
105 |
+
do_action( 'wcf_optin_settings_markup_before' );
|
106 |
+
$this->tabs_markup( $optin_meta, $post->ID );
|
107 |
+
do_action( 'wcf_optin_settings_markup_after' );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Page Header Tabs
|
112 |
+
*
|
113 |
+
* @param array $options options.
|
114 |
+
* @param int $post_id post ID.
|
115 |
+
*/
|
116 |
+
public function tabs_markup( $options, $post_id ) {
|
117 |
+
|
118 |
+
$active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
|
119 |
+
|
120 |
+
if ( empty( $active_tab ) ) {
|
121 |
+
$active_tab = 'wcf-optin-shortcodes';
|
122 |
+
}
|
123 |
+
|
124 |
+
$tab_array = array(
|
125 |
+
array(
|
126 |
+
'title' => __( 'Shortcodes', 'cartflows' ),
|
127 |
+
'id' => 'wcf-optin-shortcodes',
|
128 |
+
'class' => 'wcf-optin-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
129 |
+
'icon' => 'dashicons-editor-code',
|
130 |
+
),
|
131 |
+
array(
|
132 |
+
'title' => __( 'Select Product', 'cartflows' ),
|
133 |
+
'id' => 'wcf-optin-general',
|
134 |
+
'class' => 'wcf-optin-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
135 |
+
'icon' => 'dashicons-info',
|
136 |
+
),
|
137 |
+
array(
|
138 |
+
'title' => __( 'Design', 'cartflows' ),
|
139 |
+
'id' => 'wcf-optin-style',
|
140 |
+
'class' => 'wcf-optin-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
141 |
+
'icon' => 'dashicons-admin-customizer',
|
142 |
+
),
|
143 |
+
array(
|
144 |
+
'title' => __( 'Form Fields', 'cartflows' ),
|
145 |
+
'id' => 'wcf-optin-custom-fields',
|
146 |
+
'class' => 'wcf-optin-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
147 |
+
'icon' => 'dashicons-welcome-widgets-menus',
|
148 |
+
),
|
149 |
+
array(
|
150 |
+
'title' => __( 'Settings', 'cartflows' ),
|
151 |
+
'id' => 'wcf-optin-custom-settings',
|
152 |
+
'class' => 'wcf-optin-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
153 |
+
'icon' => 'dashicons-admin-generic',
|
154 |
+
),
|
155 |
+
array(
|
156 |
+
'title' => __( 'Custom Script', 'cartflows' ),
|
157 |
+
'id' => 'wcf-optin-custom-script-header',
|
158 |
+
'class' => 'wcf-optin-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
|
159 |
+
'icon' => 'dashicons-format-aside',
|
160 |
+
),
|
161 |
+
);
|
162 |
+
|
163 |
+
$tabs = $tab_array;
|
164 |
+
|
165 |
+
?>
|
166 |
+
<div class="wcf-optin-table wcf-metabox-wrap widefat">
|
167 |
+
<div class="wcf-table-container">
|
168 |
+
<div class="wcf-column-left">
|
169 |
+
<div class="wcf-tab-wrapper">
|
170 |
+
|
171 |
+
<?php foreach ( $tabs as $key => $tab ) { ?>
|
172 |
+
<div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
|
173 |
+
<span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
|
174 |
+
<span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
|
175 |
+
</div>
|
176 |
+
<?php } ?>
|
177 |
+
|
178 |
+
<input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<div class="wcf-column-right">
|
182 |
+
<?php $this->tab_shortcodes( $options, $post_id ); ?>
|
183 |
+
<?php $this->tab_general( $options, $post_id ); ?>
|
184 |
+
<?php $this->tab_style( $options, $post_id ); ?>
|
185 |
+
<?php $this->tab_custom_fields( $options, $post_id ); ?>
|
186 |
+
<?php $this->tab_custom_settings( $options, $post_id ); ?>
|
187 |
+
<?php $this->tab_custom_script( $options, $post_id ); ?>
|
188 |
+
<?php $this->right_column_footer( $options, $post_id ); ?>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Shortcodes tab
|
198 |
+
*
|
199 |
+
* @param array $options options.
|
200 |
+
* @param int $post_id post ID.
|
201 |
+
*/
|
202 |
+
public function tab_shortcodes( $options, $post_id ) {
|
203 |
+
?>
|
204 |
+
<div class="wcf-optin-shortcodes wcf-tab-content widefat">
|
205 |
+
|
206 |
+
<?php
|
207 |
+
|
208 |
+
echo wcf()->meta->get_shortcode_field(
|
209 |
+
array(
|
210 |
+
'label' => 'Optin Page',
|
211 |
+
'name' => 'wcf-optin-shortcode',
|
212 |
+
'content' => '[cartflows_optin]',
|
213 |
+
'help' => esc_html__( 'Add this shortcode to your optin page', 'cartflows' ),
|
214 |
+
)
|
215 |
+
);
|
216 |
+
?>
|
217 |
+
</div>
|
218 |
+
<?php
|
219 |
+
}
|
220 |
+
|
221 |
+
|
222 |
+
/**
|
223 |
+
* General tab
|
224 |
+
*
|
225 |
+
* @param array $options options.
|
226 |
+
* @param int $post_id post ID.
|
227 |
+
*/
|
228 |
+
public function tab_general( $options, $post_id ) {
|
229 |
+
?>
|
230 |
+
<div class="wcf-optin-general wcf-tab-content widefat">
|
231 |
+
|
232 |
+
<?php
|
233 |
+
|
234 |
+
echo wcf()->meta->get_product_selection_field(
|
235 |
+
array(
|
236 |
+
'name' => 'wcf-optin-product',
|
237 |
+
'value' => $options['wcf-optin-product'],
|
238 |
+
'label' => __( 'Select Free Product', 'cartflows' ),
|
239 |
+
'help' => __( 'Select Free and Virtual product only.', 'cartflows' ),
|
240 |
+
'multiple' => false,
|
241 |
+
'allow_clear' => true,
|
242 |
+
)
|
243 |
+
);
|
244 |
+
|
245 |
+
?>
|
246 |
+
</div>
|
247 |
+
<?php
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Tab custom fields
|
252 |
+
*
|
253 |
+
* @param array $options options.
|
254 |
+
* @param int $post_id post ID.
|
255 |
+
*/
|
256 |
+
public function tab_custom_fields( $options, $post_id ) {
|
257 |
+
?>
|
258 |
+
<div class="wcf-optin-custom-fields wcf-tab-content widefat">
|
259 |
+
<?php
|
260 |
+
/* Custom Checkout Fields Section */
|
261 |
+
|
262 |
+
if ( ! _is_cartflows_pro() ) {
|
263 |
+
echo wcf()->meta->get_description_field(
|
264 |
+
array(
|
265 |
+
'name' => 'wcf-upgrade-to-pro',
|
266 |
+
/* translators: %s: link */
|
267 |
+
'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
|
268 |
+
)
|
269 |
+
);
|
270 |
+
}
|
271 |
+
?>
|
272 |
+
<?php do_action( 'cartflows_optin_custom_fields_tab_content', $options, $post_id ); ?>
|
273 |
+
</div>
|
274 |
+
<?php
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Tab custom settings
|
279 |
+
*
|
280 |
+
* @param array $options options.
|
281 |
+
* @param int $post_id post ID.
|
282 |
+
*/
|
283 |
+
public function tab_custom_settings( $options, $post_id ) {
|
284 |
+
?>
|
285 |
+
<div class="wcf-optin-custom-settings wcf-tab-content widefat">
|
286 |
+
<div class="wcf-custom-settings-fields">
|
287 |
+
<?php
|
288 |
+
echo wcf()->meta->get_checkbox_field(
|
289 |
+
array(
|
290 |
+
'label' => __( 'Pass Fields as URL Parameters', 'cartflows' ),
|
291 |
+
'name' => 'wcf-optin-pass-fields',
|
292 |
+
'value' => $options['wcf-optin-pass-fields'],
|
293 |
+
'after' => __( 'Enable', 'cartflows' ),
|
294 |
+
'help' => __( 'You can pass specific fields from the form to next step as URL query parameters.', 'cartflows' ),
|
295 |
+
'toggle' => array(
|
296 |
+
'fields' => array(
|
297 |
+
'yes' => array( 'wcf-optin-pass-specific-fields' ),
|
298 |
+
),
|
299 |
+
),
|
300 |
+
)
|
301 |
+
);
|
302 |
+
|
303 |
+
echo wcf()->meta->get_text_field(
|
304 |
+
array(
|
305 |
+
'label' => __( 'Enter form field', 'cartflows' ),
|
306 |
+
'name' => 'wcf-optin-pass-specific-fields',
|
307 |
+
'value' => $options['wcf-optin-pass-specific-fields'],
|
308 |
+
'help' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
|
309 |
+
'attr' => array(
|
310 |
+
'placeholder' => __( 'Fields to pass, separated by commas', 'cartflows' ),
|
311 |
+
),
|
312 |
+
)
|
313 |
+
);
|
314 |
+
|
315 |
+
echo wcf()->meta->get_description_field(
|
316 |
+
array(
|
317 |
+
'name' => 'wcf-optin-pass-fields-doc',
|
318 |
+
'content' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
|
319 |
+
/* translators: %s: link */
|
320 |
+
'content' => sprintf( esc_html__( 'You can pass field value as a URL parameter to the next step. %1$sClick here%2$s for more information.', 'cartflows' ), '<a href="https://cartflows.com/docs/pass-variable-as-query-parameters-to-url/" target="_blank">', '</a>' ),
|
321 |
+
)
|
322 |
+
);
|
323 |
+
|
324 |
+
?>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
<?php
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Tab style
|
332 |
+
*
|
333 |
+
* @param array $options options.
|
334 |
+
* @param int $post_id post ID.
|
335 |
+
*/
|
336 |
+
public function tab_style( $options, $post_id ) {
|
337 |
+
?>
|
338 |
+
|
339 |
+
<div class="wcf-optin-style wcf-tab-content widefat">
|
340 |
+
<?php
|
341 |
+
echo wcf()->meta->get_color_picker_field(
|
342 |
+
array(
|
343 |
+
'label' => __( 'Primary Color', 'cartflows' ),
|
344 |
+
'name' => 'wcf-primary-color',
|
345 |
+
'value' => $options['wcf-primary-color'],
|
346 |
+
)
|
347 |
+
);
|
348 |
+
|
349 |
+
echo wcf()->meta->get_font_family_field(
|
350 |
+
array(
|
351 |
+
'for' => 'wcf-base',
|
352 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
353 |
+
'name' => 'wcf-base-font-family',
|
354 |
+
'value' => $options['wcf-base-font-family'],
|
355 |
+
)
|
356 |
+
);
|
357 |
+
?>
|
358 |
+
<div class="wcf-cs-fields">
|
359 |
+
<div class="wcf-cs-fields-options">
|
360 |
+
<?php
|
361 |
+
echo wcf()->meta->get_section(
|
362 |
+
array(
|
363 |
+
'label' => __( 'Input Fields', 'cartflows' ),
|
364 |
+
)
|
365 |
+
);
|
366 |
+
|
367 |
+
$fields_skin_pro_option = array();
|
368 |
+
if ( ! _is_cartflows_pro() ) {
|
369 |
+
$fields_skin_pro_option = array(
|
370 |
+
'floating-labels' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
|
371 |
+
);
|
372 |
+
}
|
373 |
+
|
374 |
+
echo wcf()->meta->get_select_field(
|
375 |
+
array(
|
376 |
+
'label' => __( 'Style', 'cartflows' ),
|
377 |
+
'name' => 'wcf-input-fields-skins',
|
378 |
+
'value' => $options['wcf-input-fields-skins'],
|
379 |
+
'options' => array(
|
380 |
+
'default' => esc_html__( 'Default', 'cartflows' ),
|
381 |
+
'floating-labels' => esc_html__( 'Floating Labels', 'cartflows' ),
|
382 |
+
),
|
383 |
+
'pro-options' => $fields_skin_pro_option,
|
384 |
+
|
385 |
+
)
|
386 |
+
);
|
387 |
+
|
388 |
+
echo wcf()->meta->get_font_family_field(
|
389 |
+
array(
|
390 |
+
'for' => 'wcf-input',
|
391 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
392 |
+
'name' => 'wcf-input-font-family',
|
393 |
+
'value' => $options['wcf-input-font-family'],
|
394 |
+
)
|
395 |
+
);
|
396 |
+
|
397 |
+
echo wcf()->meta->get_font_weight_field(
|
398 |
+
array(
|
399 |
+
'for' => 'wcf-input',
|
400 |
+
'label' => esc_html__( 'Font Weight', 'cartflows' ),
|
401 |
+
'name' => 'wcf-input-font-weight',
|
402 |
+
'value' => $options['wcf-input-font-weight'],
|
403 |
+
)
|
404 |
+
);
|
405 |
+
|
406 |
+
echo wcf()->meta->get_select_field(
|
407 |
+
array(
|
408 |
+
'label' => __( 'Size', 'cartflows' ),
|
409 |
+
'name' => 'wcf-input-field-size',
|
410 |
+
'value' => $options['wcf-input-field-size'],
|
411 |
+
'options' => array(
|
412 |
+
'33px' => esc_html__( 'Extra Small', 'cartflows' ),
|
413 |
+
'38px' => esc_html__( 'Small', 'cartflows' ),
|
414 |
+
'44px' => esc_html__( 'Medium', 'cartflows' ),
|
415 |
+
'58px' => esc_html__( 'Large', 'cartflows' ),
|
416 |
+
'68px' => esc_html__( 'Extra Large', 'cartflows' ),
|
417 |
+
'custom' => esc_html__( 'Custom', 'cartflows' ),
|
418 |
+
),
|
419 |
+
)
|
420 |
+
);
|
421 |
+
|
422 |
+
echo wcf()->meta->get_number_field(
|
423 |
+
array(
|
424 |
+
'label' => __( 'Top Bottom Spacing', 'cartflows' ),
|
425 |
+
'name' => 'wcf-field-tb-padding',
|
426 |
+
'value' => $options['wcf-field-tb-padding'],
|
427 |
+
)
|
428 |
+
);
|
429 |
+
|
430 |
+
echo wcf()->meta->get_number_field(
|
431 |
+
array(
|
432 |
+
'label' => __( 'Left Right Spacing', 'cartflows' ),
|
433 |
+
'name' => 'wcf-field-lr-padding',
|
434 |
+
'value' => $options['wcf-field-lr-padding'],
|
435 |
+
)
|
436 |
+
);
|
437 |
+
|
438 |
+
echo wcf()->meta->get_color_picker_field(
|
439 |
+
array(
|
440 |
+
'label' => __( 'Label Color', 'cartflows' ),
|
441 |
+
'name' => 'wcf-field-label-color',
|
442 |
+
'value' => $options['wcf-field-label-color'],
|
443 |
+
)
|
444 |
+
);
|
445 |
+
|
446 |
+
echo wcf()->meta->get_color_picker_field(
|
447 |
+
array(
|
448 |
+
'label' => __( 'Text / Placeholder Color', 'cartflows' ),
|
449 |
+
'name' => 'wcf-field-color',
|
450 |
+
'value' => $options['wcf-field-color'],
|
451 |
+
)
|
452 |
+
);
|
453 |
+
|
454 |
+
echo wcf()->meta->get_color_picker_field(
|
455 |
+
array(
|
456 |
+
'label' => __( 'Background Color', 'cartflows' ),
|
457 |
+
'name' => 'wcf-field-bg-color',
|
458 |
+
'value' => $options['wcf-field-bg-color'],
|
459 |
+
)
|
460 |
+
);
|
461 |
+
|
462 |
+
echo wcf()->meta->get_color_picker_field(
|
463 |
+
array(
|
464 |
+
'label' => __( 'Border Color', 'cartflows' ),
|
465 |
+
'name' => 'wcf-field-border-color',
|
466 |
+
'value' => $options['wcf-field-border-color'],
|
467 |
+
)
|
468 |
+
);
|
469 |
+
|
470 |
+
?>
|
471 |
+
</div>
|
472 |
+
<div class="wcf-cs-button-options">
|
473 |
+
<?php
|
474 |
+
|
475 |
+
echo wcf()->meta->get_section(
|
476 |
+
array(
|
477 |
+
'label' => __( 'Submit Button', 'cartflows' ),
|
478 |
+
)
|
479 |
+
);
|
480 |
+
|
481 |
+
echo wcf()->meta->get_text_field(
|
482 |
+
array(
|
483 |
+
'label' => __( 'Button Text', 'cartflows' ),
|
484 |
+
'name' => 'wcf-submit-button-text',
|
485 |
+
'value' => $options['wcf-submit-button-text'],
|
486 |
+
'attr' => array(
|
487 |
+
'placeholder' => __( 'Submit', 'cartflows' ),
|
488 |
+
),
|
489 |
+
)
|
490 |
+
);
|
491 |
+
|
492 |
+
echo wcf()->meta->get_number_field(
|
493 |
+
array(
|
494 |
+
'label' => __( 'Font Size', 'cartflows' ),
|
495 |
+
'name' => 'wcf-submit-font-size',
|
496 |
+
'value' => $options['wcf-submit-font-size'],
|
497 |
+
)
|
498 |
+
);
|
499 |
+
|
500 |
+
echo wcf()->meta->get_font_family_field(
|
501 |
+
array(
|
502 |
+
'for' => 'wcf-button',
|
503 |
+
'label' => esc_html__( 'Font Family', 'cartflows' ),
|
504 |
+
'name' => 'wcf-button-font-family',
|
505 |
+
'value' => $options['wcf-button-font-family'],
|
506 |
+
)
|
507 |
+
);
|
508 |
+
|
509 |
+
echo wcf()->meta->get_font_weight_field(
|
510 |
+
array(
|
511 |
+
'for' => 'wcf-button',
|
512 |
+
'label' => esc_html__( 'Font Weight', 'cartflows' ),
|
513 |
+
'name' => 'wcf-button-font-weight',
|
514 |
+
'value' => $options['wcf-button-font-weight'],
|
515 |
+
)
|
516 |
+
);
|
517 |
+
|
518 |
+
echo wcf()->meta->get_select_field(
|
519 |
+
array(
|
520 |
+
'label' => __( 'Size', 'cartflows' ),
|
521 |
+
'name' => 'wcf-submit-button-size',
|
522 |
+
'value' => $options['wcf-submit-button-size'],
|
523 |
+
'options' => array(
|
524 |
+
'33px' => esc_html__( 'Extra Small', 'cartflows' ),
|
525 |
+
'38px' => esc_html__( 'Small', 'cartflows' ),
|
526 |
+
'44px' => esc_html__( 'Medium', 'cartflows' ),
|
527 |
+
'58px' => esc_html__( 'Large', 'cartflows' ),
|
528 |
+
'68px' => esc_html__( 'Extra Large', 'cartflows' ),
|
529 |
+
'custom' => esc_html__( 'Custom', 'cartflows' ),
|
530 |
+
),
|
531 |
+
)
|
532 |
+
);
|
533 |
+
|
534 |
+
echo wcf()->meta->get_number_field(
|
535 |
+
array(
|
536 |
+
'label' => __( 'Top Bottom Spacing', 'cartflows' ),
|
537 |
+
'name' => 'wcf-submit-tb-padding',
|
538 |
+
'value' => $options['wcf-submit-tb-padding'],
|
539 |
+
)
|
540 |
+
);
|
541 |
+
|
542 |
+
echo wcf()->meta->get_number_field(
|
543 |
+
array(
|
544 |
+
'label' => __( 'Left Right Spacing', 'cartflows' ),
|
545 |
+
'name' => 'wcf-submit-lr-padding',
|
546 |
+
'value' => $options['wcf-submit-lr-padding'],
|
547 |
+
)
|
548 |
+
);
|
549 |
+
|
550 |
+
echo wcf()->meta->get_select_field(
|
551 |
+
array(
|
552 |
+
'label' => __( 'Position', 'cartflows' ),
|
553 |
+
'name' => 'wcf-submit-button-position',
|
554 |
+
'value' => $options['wcf-submit-button-position'],
|
555 |
+
'options' => array(
|
556 |
+
'left' => esc_html__( 'Left', 'cartflows' ),
|
557 |
+
'center' => esc_html__( 'Center', 'cartflows' ),
|
558 |
+
'right' => esc_html__( 'Right', 'cartflows' ),
|
559 |
+
),
|
560 |
+
)
|
561 |
+
);
|
562 |
+
|
563 |
+
echo wcf()->meta->get_color_picker_field(
|
564 |
+
array(
|
565 |
+
'label' => __( 'Text Color', 'cartflows' ),
|
566 |
+
'name' => 'wcf-submit-color',
|
567 |
+
'value' => $options['wcf-submit-color'],
|
568 |
+
)
|
569 |
+
);
|
570 |
+
|
571 |
+
echo wcf()->meta->get_color_picker_field(
|
572 |
+
array(
|
573 |
+
'label' => __( 'Text Hover Color', 'cartflows' ),
|
574 |
+
'name' => 'wcf-submit-hover-color',
|
575 |
+
'value' => $options['wcf-submit-hover-color'],
|
576 |
+
)
|
577 |
+
);
|
578 |
+
|
579 |
+
echo wcf()->meta->get_color_picker_field(
|
580 |
+
array(
|
581 |
+
'label' => __( 'Background Color', 'cartflows' ),
|
582 |
+
'name' => 'wcf-submit-bg-color',
|
583 |
+
'value' => $options['wcf-submit-bg-color'],
|
584 |
+
)
|
585 |
+
);
|
586 |
+
|
587 |
+
echo wcf()->meta->get_color_picker_field(
|
588 |
+
array(
|
589 |
+
'label' => __( 'Background Hover Color', 'cartflows' ),
|
590 |
+
'name' => 'wcf-submit-bg-hover-color',
|
591 |
+
'value' => $options['wcf-submit-bg-hover-color'],
|
592 |
+
)
|
593 |
+
);
|
594 |
+
|
595 |
+
echo wcf()->meta->get_color_picker_field(
|
596 |
+
array(
|
597 |
+
'label' => __( 'Border Color', 'cartflows' ),
|
598 |
+
'name' => 'wcf-submit-border-color',
|
599 |
+
'value' => $options['wcf-submit-border-color'],
|
600 |
+
)
|
601 |
+
);
|
602 |
+
|
603 |
+
echo wcf()->meta->get_color_picker_field(
|
604 |
+
array(
|
605 |
+
'label' => __( 'Border Hover Color', 'cartflows' ),
|
606 |
+
'name' => 'wcf-submit-border-hover-color',
|
607 |
+
'value' => $options['wcf-submit-border-hover-color'],
|
608 |
+
)
|
609 |
+
);
|
610 |
+
|
611 |
+
?>
|
612 |
+
</div>
|
613 |
+
</div>
|
614 |
+
<?php
|
615 |
+
echo wcf()->meta->get_hidden_field(
|
616 |
+
array(
|
617 |
+
'name' => 'wcf-field-google-font-url',
|
618 |
+
'value' => $options['wcf-field-google-font-url'],
|
619 |
+
)
|
620 |
+
);
|
621 |
+
?>
|
622 |
+
</div>
|
623 |
+
<?php
|
624 |
+
}
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Get metabox options
|
628 |
+
*
|
629 |
+
* @param int $post_id post ID.
|
630 |
+
*/
|
631 |
+
public static function get_meta_option( $post_id ) {
|
632 |
+
|
633 |
+
if ( null === self::$meta_option ) {
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Set metabox options
|
637 |
+
*
|
638 |
+
* @see http://php.net/manual/en/filter.filters.sanitize.php
|
639 |
+
*/
|
640 |
+
self::$meta_option = wcf()->options->get_optin_fields( $post_id );
|
641 |
+
}
|
642 |
+
|
643 |
+
return self::$meta_option;
|
644 |
+
}
|
645 |
+
|
646 |
+
/**
|
647 |
+
* Metabox Save
|
648 |
+
*
|
649 |
+
* @param number $post_id Post ID.
|
650 |
+
* @return void
|
651 |
+
*/
|
652 |
+
public function save_meta_box( $post_id ) {
|
653 |
+
|
654 |
+
// Checks save status.
|
655 |
+
$is_autosave = wp_is_post_autosave( $post_id );
|
656 |
+
$is_revision = wp_is_post_revision( $post_id );
|
657 |
+
|
658 |
+
$is_valid_nonce = ( isset( $_POST['nonce-optin-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-optin-step-meta'] ) ), 'save-nonce-optin-step-meta' ) ) ? true : false;
|
659 |
+
|
660 |
+
// Exits script depending on save status.
|
661 |
+
if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
|
662 |
+
return;
|
663 |
+
}
|
664 |
+
|
665 |
+
wcf()->options->save_optin_fields( $post_id );
|
666 |
+
}
|
667 |
+
}
|
668 |
+
|
669 |
+
/**
|
670 |
+
* Kicking this off by calling 'get_instance()' method
|
671 |
+
*/
|
672 |
+
Cartflows_Optin_Meta::get_instance();
|
modules/optin/templates/optin-template-simple.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Checkout template
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$optin_layout = 'one-column';
|
9 |
+
$fields_skins = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-fields-skins' );
|
10 |
+
?>
|
11 |
+
<div id="wcf-optin-form" class="wcf-optin-form wcf-optin-form-one-column wcf-field-<?php echo $fields_skins; ?>">
|
12 |
+
|
13 |
+
<!-- CHECKOUT SHORTCODE -->
|
14 |
+
<?php do_action( 'cartflows_optin_before_main_section', $optin_layout ); ?>
|
15 |
+
|
16 |
+
<?php
|
17 |
+
|
18 |
+
$checkout_html = do_shortcode( '[woocommerce_checkout]' );
|
19 |
+
|
20 |
+
if (
|
21 |
+
empty( $checkout_html ) ||
|
22 |
+
trim( $checkout_html ) == '<div class="woocommerce"></div>'
|
23 |
+
) {
|
24 |
+
|
25 |
+
echo esc_html__( 'Your cart is currently empty.', 'cartflows' );
|
26 |
+
} else {
|
27 |
+
echo $checkout_html;
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
|
31 |
+
<?php do_action( 'cartflows_optin_after_main_section', $optin_layout ); ?>
|
32 |
+
<!-- END CHECKOUT SHORTCODE -->
|
33 |
+
</div>
|
modules/thankyou/classes/class-cartflows-thankyou-markup.php
CHANGED
@@ -93,7 +93,15 @@ class Cartflows_Thankyou_Markup {
|
|
93 |
|
94 |
$order = false;
|
95 |
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
$args = array(
|
98 |
'limit' => 1,
|
99 |
'order' => 'DESC',
|
@@ -113,13 +121,13 @@ class Cartflows_Thankyou_Markup {
|
|
113 |
}
|
114 |
}
|
115 |
} else {
|
116 |
-
if ( ! isset( $_GET[
|
117 |
return '<p class="woocommerce-notice">Order not found. You cannot access this page directly.</p>';
|
118 |
}
|
119 |
|
120 |
// Get the order.
|
121 |
-
$order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET[
|
122 |
-
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET[
|
123 |
|
124 |
if ( $order_id > 0 ) {
|
125 |
$order = wc_get_order( $order_id );
|
@@ -228,6 +236,7 @@ class Cartflows_Thankyou_Markup {
|
|
228 |
|
229 |
$text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
|
230 |
$text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
|
|
|
231 |
$heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
|
232 |
$heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
|
233 |
$heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
|
@@ -247,13 +256,15 @@ class Cartflows_Thankyou_Markup {
|
|
247 |
color: {$text_color};
|
248 |
font-family: {$text_font_family};
|
249 |
max-width:{$container_width}px;
|
|
|
250 |
}
|
251 |
|
252 |
.woocommerce-order h2.woocommerce-column__title,
|
253 |
.woocommerce-order h2.woocommerce-order-details__title,
|
254 |
.woocommerce-order .woocommerce-thankyou-order-received,
|
255 |
.woocommerce-order-details h2,
|
256 |
-
.woocommerce-order h2.wc-bacs-bank-details-heading
|
|
|
257 |
color: {$heading_text_color};
|
258 |
font-family: {$heading_font_family};
|
259 |
font-weight: {$heading_font_weight};
|
@@ -262,7 +273,8 @@ class Cartflows_Thankyou_Markup {
|
|
262 |
.woocommerce-order ul.order_details,
|
263 |
.woocommerce-order .woocommerce-order-details,
|
264 |
.woocommerce-order .woocommerce-customer-details,
|
265 |
-
.woocommerce-order .woocommerce-bacs-bank-details
|
|
|
266 |
background-color: {$section_bg_color}
|
267 |
}
|
268 |
img.emoji, img.wp-smiley {}
|
93 |
|
94 |
$order = false;
|
95 |
|
96 |
+
$id_param = 'wcf-order';
|
97 |
+
$key_param = 'wcf-key';
|
98 |
+
|
99 |
+
if ( isset( $_GET['wcf-opt-order'] ) ) { //phpcs:ignore
|
100 |
+
$id_param = 'wcf-opt-order';
|
101 |
+
$key_param = 'wcf-opt-key';
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( ! isset( $_GET[ $id_param ] ) && wcf()->flow->is_flow_testmode() ) { //phpcs:ignore
|
105 |
$args = array(
|
106 |
'limit' => 1,
|
107 |
'order' => 'DESC',
|
121 |
}
|
122 |
}
|
123 |
} else {
|
124 |
+
if ( ! isset( $_GET[ $id_param ] ) ) { //phpcs:ignore
|
125 |
return '<p class="woocommerce-notice">Order not found. You cannot access this page directly.</p>';
|
126 |
}
|
127 |
|
128 |
// Get the order.
|
129 |
+
$order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET[ $id_param ] ) ? 0 : intval( $_GET[ $id_param ] ) ); //phpcs:ignore
|
130 |
+
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET[ $key_param ] ) ? '' : wc_clean( wp_unslash( $_GET[ $key_param ] ) ) ); //phpcs:ignore
|
131 |
|
132 |
if ( $order_id > 0 ) {
|
133 |
$order = wc_get_order( $order_id );
|
236 |
|
237 |
$text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
|
238 |
$text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
|
239 |
+
$text_font_size = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-size' );
|
240 |
$heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
|
241 |
$heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
|
242 |
$heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
|
256 |
color: {$text_color};
|
257 |
font-family: {$text_font_family};
|
258 |
max-width:{$container_width}px;
|
259 |
+
font-size: {$text_font_size}px;
|
260 |
}
|
261 |
|
262 |
.woocommerce-order h2.woocommerce-column__title,
|
263 |
.woocommerce-order h2.woocommerce-order-details__title,
|
264 |
.woocommerce-order .woocommerce-thankyou-order-received,
|
265 |
.woocommerce-order-details h2,
|
266 |
+
.woocommerce-order h2.wc-bacs-bank-details-heading,
|
267 |
+
.woocommerce-order h2.woocommerce-order-downloads__title {
|
268 |
color: {$heading_text_color};
|
269 |
font-family: {$heading_font_family};
|
270 |
font-weight: {$heading_font_weight};
|
273 |
.woocommerce-order ul.order_details,
|
274 |
.woocommerce-order .woocommerce-order-details,
|
275 |
.woocommerce-order .woocommerce-customer-details,
|
276 |
+
.woocommerce-order .woocommerce-bacs-bank-details,
|
277 |
+
.woocommerce-order .woocommerce-order-downloads{
|
278 |
background-color: {$section_bg_color}
|
279 |
}
|
280 |
img.emoji, img.wp-smiley {}
|
modules/thankyou/classes/class-cartflows-thankyou-meta.php
CHANGED
@@ -212,6 +212,14 @@ class Cartflows_Thankyou_Meta extends Cartflows_Meta {
|
|
212 |
)
|
213 |
);
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
echo wcf()->meta->get_section(
|
216 |
array(
|
217 |
'label' => __( 'Heading', 'cartflows' ),
|
212 |
)
|
213 |
);
|
214 |
|
215 |
+
echo wcf()->meta->get_number_field(
|
216 |
+
array(
|
217 |
+
'label' => __( 'Font Size', 'cartflows' ),
|
218 |
+
'name' => 'wcf-tq-font-size',
|
219 |
+
'value' => $options['wcf-tq-font-size'],
|
220 |
+
)
|
221 |
+
);
|
222 |
+
|
223 |
echo wcf()->meta->get_section(
|
224 |
array(
|
225 |
'label' => __( 'Heading', 'cartflows' ),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BrainstormForce
|
|
4 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -125,6 +125,11 @@ Glad you asked! CartFlows Pro is an optional add-on to CartFlows that adds addit
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
= Version 1.3.5 - Tuesday, 28th January 2020 =
|
129 |
* New: Option added for thank you page redirection.
|
130 |
* Fix: Pro version's two-step CSS conflict with the DIVI, the second tab was not displaying.
|
4 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.4.0
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= Version 1.4.0 - Tuesday, 11th February 2020 =
|
129 |
+
* New: Introduced a new optin step type for lead generation.
|
130 |
+
* Improvement: Added compatibility for a future release of CartFlows Pro.
|
131 |
+
* Fix: Fatal Error while editing the page in elementor preview mode if the WooCommerce is not installed.
|
132 |
+
|
133 |
= Version 1.3.5 - Tuesday, 28th January 2020 =
|
134 |
* New: Option added for thank you page redirection.
|
135 |
* Fix: Pro version's two-step CSS conflict with the DIVI, the second tab was not displaying.
|