Version Description
Download this release
Release Info
Developer | sandesh055 |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.5.0
- admin/assets/css/flow-admin-edit-rtl.css +5 -0
- admin/assets/css/flow-admin-edit.css +5 -0
- admin/assets/js/admin-menu-settings.js +15 -1
- assets/js/frontend.js +68 -2
- assets/min-js/frontend.min.js +1 -1
- cartflows.php +1 -1
- changelog.txt +4 -0
- classes/class-cartflows-admin.php +33 -0
- classes/class-cartflows-frontend.php +13 -5
- classes/class-cartflows-helper.php +62 -1
- classes/class-cartflows-loader.php +12 -1
- classes/class-cartflows-tracking.php +277 -0
- includes/admin/cartflows-general.php +200 -70
- languages/cartflows.pot +108 -59
- modules/flow/view/meta-flow-steps.php +210 -210
- readme.txt +5 -1
admin/assets/css/flow-admin-edit-rtl.css
CHANGED
@@ -98,6 +98,11 @@
|
|
98 |
vertical-align: middle;
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
.wcf-step-wrap.wcf-no-product-step{
|
102 |
border-right: 3px solid #f16334;
|
103 |
}
|
98 |
vertical-align: middle;
|
99 |
}
|
100 |
|
101 |
+
.wcf-global-checkout-badge.wcf-error-badge{
|
102 |
+
color: #fff;
|
103 |
+
background-color: #d54e21;
|
104 |
+
}
|
105 |
+
|
106 |
.wcf-step-wrap.wcf-no-product-step{
|
107 |
border-right: 3px solid #f16334;
|
108 |
}
|
admin/assets/css/flow-admin-edit.css
CHANGED
@@ -98,6 +98,11 @@
|
|
98 |
vertical-align: middle;
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
.wcf-step-wrap.wcf-no-product-step{
|
102 |
border-left: 3px solid #f16334;
|
103 |
}
|
98 |
vertical-align: middle;
|
99 |
}
|
100 |
|
101 |
+
.wcf-global-checkout-badge.wcf-error-badge{
|
102 |
+
color: #fff;
|
103 |
+
background-color: #d54e21;
|
104 |
+
}
|
105 |
+
|
106 |
.wcf-step-wrap.wcf-no-product-step{
|
107 |
border-left: 3px solid #f16334;
|
108 |
}
|
admin/assets/js/admin-menu-settings.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
(function ($) {
|
2 |
|
3 |
-
/* Disable/Enable
|
4 |
var wcf_toggle_fields_facebook_pixel = function () {
|
5 |
var fb_pixel_fields = ".wcf-fb-pixel-wrapper";
|
6 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
@@ -8,9 +8,23 @@
|
|
8 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
9 |
});
|
10 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
$(document).ready(function () {
|
13 |
wcf_toggle_fields_facebook_pixel();
|
|
|
14 |
});
|
15 |
|
16 |
})(jQuery);
|
1 |
(function ($) {
|
2 |
|
3 |
+
/* Disable/Enable Facebook Pixel Field section*/
|
4 |
var wcf_toggle_fields_facebook_pixel = function () {
|
5 |
var fb_pixel_fields = ".wcf-fb-pixel-wrapper";
|
6 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
8 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
9 |
});
|
10 |
}
|
11 |
+
/* Disable/Enable Facebook Pixel Field section*/
|
12 |
+
|
13 |
+
/* Disable/Enable Google Analytics Field section */
|
14 |
+
var wcf_toggle_fields_google_analytics = function (){
|
15 |
+
var google_analytics_fields = ".wcf-google-analytics-wrapper";
|
16 |
+
|
17 |
+
jQuery(google_analytics_fields).toggle(jQuery("#wcf_enable_google-analytics-id").is(":checked"));
|
18 |
+
|
19 |
+
jQuery("#wcf_enable_google-analytics-id").click(function () {
|
20 |
+
jQuery(google_analytics_fields).toggle(jQuery("#wcf_enable_google-analytics-id").is(":checked"));
|
21 |
+
});
|
22 |
+
}
|
23 |
+
/* Disable/Enable Google Analytics Field section */
|
24 |
|
25 |
$(document).ready(function () {
|
26 |
wcf_toggle_fields_facebook_pixel();
|
27 |
+
wcf_toggle_fields_google_analytics();
|
28 |
});
|
29 |
|
30 |
})(jQuery);
|
assets/js/frontend.js
CHANGED
@@ -75,6 +75,70 @@
|
|
75 |
}
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
$(document).ready(function($) {
|
79 |
|
80 |
/* Assign the class & link to specific button */
|
@@ -85,8 +149,10 @@
|
|
85 |
next_links.attr( 'href', cartflows.next_step );
|
86 |
}
|
87 |
remove_oceanwp_custom_style();
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
});
|
91 |
|
92 |
})(jQuery);
|
75 |
}
|
76 |
}
|
77 |
|
78 |
+
var trigger_google_events = function(){
|
79 |
+
console.log('here');
|
80 |
+
if( cartflows.wcf_ga_active['enable_google_analytics'] === "enable" ){
|
81 |
+
// Get all required Data
|
82 |
+
var google_a_id = cartflows.wcf_ga_active['google_analytics_id'];
|
83 |
+
var ga_for_other_page = cartflows.wcf_ga_active['enable_google_analytics_for_site'];
|
84 |
+
var ga_begin_checkout = cartflows.wcf_ga_active['enable_begin_checkout'];
|
85 |
+
var ga_add_payment_info = cartflows.wcf_ga_active['enable_add_payment_info'];
|
86 |
+
var ga_purchase_event = cartflows.wcf_ga_active['enable_purchase_event'];
|
87 |
+
var ga_add_to_cart = cartflows.wcf_ga_active['enable_add_to_cart'];
|
88 |
+
var cookies = $.cookie('wcf_ga_trans_data');
|
89 |
+
var ga_order_details = jQuery.parseJSON(cookies);
|
90 |
+
var is_checkout_page = cartflows.is_checkout_page;
|
91 |
+
|
92 |
+
if( 'disable' === ga_for_other_page ){
|
93 |
+
//Common page view event for cartflows pages.
|
94 |
+
gtag('event', 'page_view', { send_to: google_a_id, non_interaction : true } );
|
95 |
+
}
|
96 |
+
if( "1" === is_checkout_page ){
|
97 |
+
var param = cartflows.ga_param;
|
98 |
+
|
99 |
+
var event_data = {
|
100 |
+
send_to: google_a_id,
|
101 |
+
event_category: "ecommerce",
|
102 |
+
items: param,
|
103 |
+
non_interaction : true
|
104 |
+
}
|
105 |
+
|
106 |
+
if ('enable' === ga_begin_checkout) {
|
107 |
+
gtag('event', 'begin_checkout', event_data );
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( 'enable' === ga_add_to_cart ) {
|
111 |
+
gtag('event', 'add_to_cart', event_data );
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( 'enable' === ga_add_payment_info ) {
|
115 |
+
jQuery("form.woocommerce-checkout").on('submit', function () {
|
116 |
+
gtag('event', 'add_payment_info', { send_to: google_a_id, non_interaction : true } );
|
117 |
+
});
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
if( typeof cookies !== 'undefined' ){
|
122 |
+
var purchase_data = {
|
123 |
+
send_to: google_a_id,
|
124 |
+
event_category: "ecommerce",
|
125 |
+
transaction_id: ga_order_details.transaction_id,
|
126 |
+
value: ga_order_details.value,
|
127 |
+
currency: ga_order_details.currency,
|
128 |
+
shipping: ga_order_details.shipping,
|
129 |
+
tax: ga_order_details.tax,
|
130 |
+
items: ga_order_details.items,
|
131 |
+
non_interaction: true
|
132 |
+
}
|
133 |
+
|
134 |
+
if ('enable' === ga_purchase_event) {
|
135 |
+
gtag('event', 'purchase', purchase_data );
|
136 |
+
$.removeCookie('wcf_ga_trans_data', {path: '/'});
|
137 |
+
}
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
$(document).ready(function($) {
|
143 |
|
144 |
/* Assign the class & link to specific button */
|
149 |
next_links.attr( 'href', cartflows.next_step );
|
150 |
}
|
151 |
remove_oceanwp_custom_style();
|
152 |
+
if( '1' !== cartflows.is_pb_preview ) {
|
153 |
+
trigger_facebook_events();
|
154 |
+
trigger_google_events();
|
155 |
+
}
|
156 |
});
|
157 |
|
158 |
})(jQuery);
|
assets/min-js/frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(
|
1 |
+
!function(w){w(document).on("click",'a[href*="wcf-next-step"]',function(e){if(e.preventDefault(),void 0===cartflows.is_pb_preview||"1"!=cartflows.is_pb_preview)return window.location.href=cartflows.next_step,!1;e.stopPropagation()}),w(document).on("click",".wcf-next-step-link",function(e){if(void 0!==cartflows.is_pb_preview&&"1"==cartflows.is_pb_preview)return e.preventDefault(),e.stopPropagation(),!1});w(document).ready(function(e){var a=e('a[href*="wcf-next-step"]');0<a.length&&void 0!==cartflows.next_step&&(a.addClass("wcf-next-step-link"),a.attr("href",cartflows.next_step)),function(){if("OceanWP"===cartflows.current_theme&&"default"!==cartflows.page_template){var e=document.getElementById("oceanwp-style-css");null!=e&&e.remove()}}(),"1"!==cartflows.is_pb_preview&&(function(){if("enable"===cartflows.fb_active.facebook_pixel_tracking&&""!=cartflows.fb_active.facebook_pixel_id){var e=cartflows.fb_active.facebook_pixel_id,a=cartflows.fb_active.facebook_pixel_initiate_checkout,t=cartflows.fb_active.facebook_pixel_purchase_complete,c=cartflows.fb_active.facebook_pixel_add_payment_info,o=cartflows.is_checkout_page;if(fbq("init",e),fbq("track","PageView",{plugin:"CartFlows"}),"enable"===a&&"1"===o&&(fbq("track","AddToCart",cartflows.params),fbq("track","InitiateCheckout",cartflows.params)),"enable"===t){var n=w.cookie("wcf_order_details");void 0!==n&&(fbq("track","Purchase",jQuery.parseJSON(n)),w.removeCookie("wcf_order_details",{path:"/"}))}"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){var e=cartflows.params;fbq("track","AddPaymentInfo",e)})}}(),function(){if("enable"===cartflows.wcf_ga_active.enable_google_analytics){var e=cartflows.wcf_ga_active.google_analytics_id,a=cartflows.wcf_ga_active.enable_google_analytics_for_site,t=cartflows.wcf_ga_active.enable_begin_checkout,c=cartflows.wcf_ga_active.enable_add_payment_info,o=cartflows.wcf_ga_active.enable_purchase_event,n=cartflows.wcf_ga_active.enable_add_to_cart,i=w.cookie("wcf_ga_trans_data"),r=jQuery.parseJSON(i),_=cartflows.is_checkout_page;if("disable"===a&>ag("event","page_view",{send_to:e,non_interaction:!0}),"1"===_){var f=cartflows.ga_param,s={send_to:e,event_category:"ecommerce",items:f,non_interaction:!0};"enable"===t&>ag("event","begin_checkout",s),"enable"===n&>ag("event","add_to_cart",s),"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){gtag("event","add_payment_info",{send_to:e,non_interaction:!0})})}if(void 0!==i){var l={send_to:e,event_category:"ecommerce",transaction_id:r.transaction_id,value:r.value,currency:r.currency,shipping:r.shipping,tax:r.tax,items:r.items,non_interaction:!0};"enable"===o&&(gtag("event","purchase",l),w.removeCookie("wcf_ga_trans_data",{path:"/"}))}}}())})}(jQuery);
|
cartflows.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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
|
3 |
* Plugin Name: CartFlows
|
4 |
* Plugin URI: https://cartflows.com/
|
5 |
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
+
* Version: 1.5.0
|
7 |
* Author: CartFlows Inc
|
8 |
* Author URI: https://cartflows.com/
|
9 |
* Text Domain: cartflows
|
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
Version 1.4.2 - Wednesday, 19th February 2020
|
2 |
- New: Added option to change default order confirmations text on thank you page.
|
3 |
- New: Added ability to set optin step type as a home page.
|
1 |
+
Version 1.5.0 - Wednesday, 4th March 2020
|
2 |
+
- New: Native Google Analytics support added.
|
3 |
+
- Fix: PHP error in Elementor preview if WooCommerce was not installed and the Facebook Pixel setting was enabled.
|
4 |
+
|
5 |
Version 1.4.2 - Wednesday, 19th February 2020
|
6 |
- New: Added option to change default order confirmations text on thank you page.
|
7 |
- New: Added ability to set optin step type as a home page.
|
classes/class-cartflows-admin.php
CHANGED
@@ -318,6 +318,37 @@ class Cartflows_Admin {
|
|
318 |
}
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
/**
|
322 |
* Loop through the input and sanitize each of the values.
|
323 |
*
|
@@ -544,6 +575,8 @@ class Cartflows_Admin {
|
|
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.
|
318 |
}
|
319 |
}
|
320 |
|
321 |
+
/**
|
322 |
+
* Save google analytics Setting options.
|
323 |
+
*
|
324 |
+
* @since 1.1.14
|
325 |
+
*/
|
326 |
+
public static function save_google_analytics_settings() {
|
327 |
+
|
328 |
+
if ( isset( $_POST['cartflows-google-analytics-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-google-analytics-settings-nonce'] ) ), 'cartflows-google-analytics-settings' ) ) {
|
329 |
+
|
330 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
331 |
+
$new_settings = array();
|
332 |
+
|
333 |
+
if ( isset( $_POST['_cartflows_google_analytics'] ) ) {
|
334 |
+
$new_settings = self::sanitize_form_inputs( $_POST['_cartflows_google_analytics'] ); //phpcs:ignore
|
335 |
+
|
336 |
+
}
|
337 |
+
|
338 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_google_analytics', $new_settings, true );
|
339 |
+
|
340 |
+
$query = array(
|
341 |
+
'message' => 'saved',
|
342 |
+
);
|
343 |
+
|
344 |
+
$redirect_to = add_query_arg( $query, $url );
|
345 |
+
|
346 |
+
wp_safe_redirect( $redirect_to );
|
347 |
+
exit;
|
348 |
+
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
/**
|
353 |
* Loop through the input and sanitize each of the values.
|
354 |
*
|
575 |
self::save_common_settings();
|
576 |
self::save_debug_settings();
|
577 |
self::save_permalink_settings();
|
578 |
+
|
579 |
+
self::save_google_analytics_settings();
|
580 |
self::save_facebook_settings();
|
581 |
|
582 |
// Let extensions hook into saving.
|
classes/class-cartflows-frontend.php
CHANGED
@@ -96,6 +96,8 @@ class Cartflows_Frontend {
|
|
96 |
|
97 |
Cartflows_Helper::send_fb_response_if_enabled( $order->get_id() );
|
98 |
|
|
|
|
|
99 |
return $order_recieve_url;
|
100 |
}
|
101 |
|
@@ -403,15 +405,20 @@ class Cartflows_Frontend {
|
|
403 |
|
404 |
$page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true );
|
405 |
|
406 |
-
$fb_active
|
407 |
-
$
|
408 |
-
$
|
|
|
409 |
|
410 |
-
if ( 'enable' === $fb_active['facebook_pixel_tracking'] ) {
|
411 |
|
412 |
$params = Cartflows_Helper::prepare_cart_data_fb_response();
|
413 |
}
|
414 |
|
|
|
|
|
|
|
|
|
415 |
$localize = array(
|
416 |
'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
|
417 |
'is_pb_preview' => $compatibility->is_page_builder_preview(),
|
@@ -421,9 +428,10 @@ class Cartflows_Frontend {
|
|
421 |
'next_step' => $next_step_link,
|
422 |
'page_template' => $page_template,
|
423 |
'is_checkout_page' => _is_wcf_checkout_type(),
|
424 |
-
'is_thankyou_page' => $is_thankyou_page,
|
425 |
'params' => $params,
|
426 |
'fb_active' => $fb_active,
|
|
|
|
|
427 |
);
|
428 |
|
429 |
wp_localize_script( 'jquery', 'cartflows', apply_filters( 'global_cartflows_js_localize', $localize ) );
|
96 |
|
97 |
Cartflows_Helper::send_fb_response_if_enabled( $order->get_id() );
|
98 |
|
99 |
+
Cartflows_Tracking::send_ga_data_if_enabled( $order->get_id() );
|
100 |
+
|
101 |
return $order_recieve_url;
|
102 |
}
|
103 |
|
405 |
|
406 |
$page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true );
|
407 |
|
408 |
+
$fb_active = get_option( '_cartflows_facebook' );
|
409 |
+
$wcf_ga_active = get_option( '_cartflows_google_analytics' );
|
410 |
+
$params = array();
|
411 |
+
$ga_param = array();
|
412 |
|
413 |
+
if ( 'enable' === $fb_active['facebook_pixel_tracking'] && Cartflows_Loader::get_instance()->is_woo_active ) {
|
414 |
|
415 |
$params = Cartflows_Helper::prepare_cart_data_fb_response();
|
416 |
}
|
417 |
|
418 |
+
if ( 'enable' === $wcf_ga_active['enable_google_analytics'] ) {
|
419 |
+
$ga_param = Cartflows_Tracking::get_ga_items_list();
|
420 |
+
}
|
421 |
+
|
422 |
$localize = array(
|
423 |
'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
|
424 |
'is_pb_preview' => $compatibility->is_page_builder_preview(),
|
428 |
'next_step' => $next_step_link,
|
429 |
'page_template' => $page_template,
|
430 |
'is_checkout_page' => _is_wcf_checkout_type(),
|
|
|
431 |
'params' => $params,
|
432 |
'fb_active' => $fb_active,
|
433 |
+
'wcf_ga_active' => $wcf_ga_active,
|
434 |
+
'ga_param' => $ga_param,
|
435 |
);
|
436 |
|
437 |
wp_localize_script( 'jquery', 'cartflows', apply_filters( 'global_cartflows_js_localize', $localize ) );
|
classes/class-cartflows-helper.php
CHANGED
@@ -36,6 +36,13 @@ class Cartflows_Helper {
|
|
36 |
*/
|
37 |
private static $permalink_setting = null;
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
/**
|
40 |
* Installed Plugins
|
41 |
*
|
@@ -362,6 +369,43 @@ class Cartflows_Helper {
|
|
362 |
return self::$permalink_setting;
|
363 |
}
|
364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
/**
|
366 |
* Get Checkout field.
|
367 |
*
|
@@ -606,6 +650,11 @@ class Cartflows_Helper {
|
|
606 |
*/
|
607 |
public static function send_fb_response_if_enabled( $order_id, $offer_data = array() ) {
|
608 |
|
|
|
|
|
|
|
|
|
|
|
609 |
$fb_settings = self::get_facebook_settings();
|
610 |
if ( 'enable' === $fb_settings['facebook_pixel_tracking'] ) {
|
611 |
setcookie( 'wcf_order_details', wp_json_encode( self::prepare_purchase_data_fb_response( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
|
@@ -622,6 +671,12 @@ class Cartflows_Helper {
|
|
622 |
*/
|
623 |
public static function prepare_purchase_data_fb_response( $order_id, $offer_data = array() ) {
|
624 |
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
$thankyou['order_id'] = $order_id;
|
626 |
$thankyou['content_type'] = 'product';
|
627 |
$thankyou['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' );
|
@@ -649,7 +704,13 @@ class Cartflows_Helper {
|
|
649 |
* @return array
|
650 |
*/
|
651 |
public static function prepare_cart_data_fb_response() {
|
652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
$cart_total = WC()->cart->get_cart_contents_total();
|
654 |
$cart_items_count = WC()->cart->get_cart_contents_count();
|
655 |
$items = WC()->cart->get_cart();
|
36 |
*/
|
37 |
private static $permalink_setting = null;
|
38 |
|
39 |
+
/**
|
40 |
+
* Google Analytics Settings
|
41 |
+
*
|
42 |
+
* @var permalink_setting
|
43 |
+
*/
|
44 |
+
private static $google_analytics_settings = null;
|
45 |
+
|
46 |
/**
|
47 |
* Installed Plugins
|
48 |
*
|
369 |
return self::$permalink_setting;
|
370 |
}
|
371 |
|
372 |
+
|
373 |
+
/**
|
374 |
+
* Get debug settings data.
|
375 |
+
*
|
376 |
+
* @return array.
|
377 |
+
*/
|
378 |
+
public static function get_google_analytics_settings() {
|
379 |
+
|
380 |
+
if ( null === self::$google_analytics_settings ) {
|
381 |
+
|
382 |
+
$google_analytics_settings_default = apply_filters(
|
383 |
+
'cartflows_google_analytics_settings_default',
|
384 |
+
array(
|
385 |
+
'enable_google_analytics' => 'disable',
|
386 |
+
'enable_google_analytics_for_site' => 'disable',
|
387 |
+
'google_analytics_id' => '',
|
388 |
+
'enable_begin_checkout' => 'disable',
|
389 |
+
'enable_add_to_cart' => 'disable',
|
390 |
+
'enable_add_payment_info' => 'disable',
|
391 |
+
'enable_purchase_event' => 'disable',
|
392 |
+
)
|
393 |
+
);
|
394 |
+
|
395 |
+
$google_analytics_settings_data = self::get_admin_settings_option( '_cartflows_google_analytics', false, true );
|
396 |
+
|
397 |
+
$google_analytics_settings_data = wp_parse_args( $google_analytics_settings_data, $google_analytics_settings_default );
|
398 |
+
|
399 |
+
if ( ! did_action( 'wp' ) ) {
|
400 |
+
return $google_analytics_settings_data;
|
401 |
+
} else {
|
402 |
+
self::$google_analytics_settings = $google_analytics_settings_data;
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
return self::$google_analytics_settings = $google_analytics_settings_data; //phpcs:ignore
|
407 |
+
}
|
408 |
+
|
409 |
/**
|
410 |
* Get Checkout field.
|
411 |
*
|
650 |
*/
|
651 |
public static function send_fb_response_if_enabled( $order_id, $offer_data = array() ) {
|
652 |
|
653 |
+
// Stop Execution if WooCommerce is not installed & don't set the cookie.
|
654 |
+
if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
|
655 |
+
return;
|
656 |
+
}
|
657 |
+
|
658 |
$fb_settings = self::get_facebook_settings();
|
659 |
if ( 'enable' === $fb_settings['facebook_pixel_tracking'] ) {
|
660 |
setcookie( 'wcf_order_details', wp_json_encode( self::prepare_purchase_data_fb_response( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
|
671 |
*/
|
672 |
public static function prepare_purchase_data_fb_response( $order_id, $offer_data = array() ) {
|
673 |
|
674 |
+
$thankyou = array();
|
675 |
+
|
676 |
+
if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
|
677 |
+
return $thankyou;
|
678 |
+
}
|
679 |
+
|
680 |
$thankyou['order_id'] = $order_id;
|
681 |
$thankyou['content_type'] = 'product';
|
682 |
$thankyou['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' );
|
704 |
* @return array
|
705 |
*/
|
706 |
public static function prepare_cart_data_fb_response() {
|
707 |
+
|
708 |
+
$params = array();
|
709 |
+
|
710 |
+
if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
|
711 |
+
return $params;
|
712 |
+
}
|
713 |
+
|
714 |
$cart_total = WC()->cart->get_cart_contents_total();
|
715 |
$cart_items_count = WC()->cart->get_cart_contents_count();
|
716 |
$items = WC()->cart->get_cart();
|
classes/class-cartflows-loader.php
CHANGED
@@ -47,6 +47,13 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
47 |
*/
|
48 |
public $meta = null;
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* Member Variable
|
52 |
*
|
@@ -118,7 +125,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 |
|
@@ -240,8 +247,11 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
240 |
/* Meta Default Values */
|
241 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
242 |
|
|
|
|
|
243 |
$this->utils = Cartflows_Utils::get_instance();
|
244 |
$this->options = Cartflows_Default_Meta::get_instance();
|
|
|
245 |
}
|
246 |
|
247 |
/**
|
@@ -530,6 +540,7 @@ function wcf() {
|
|
530 |
return Cartflows_Loader::get_instance();
|
531 |
}
|
532 |
|
|
|
533 |
if ( ! function_exists( '_is_woo_installed' ) ) {
|
534 |
|
535 |
/**
|
47 |
*/
|
48 |
public $meta = null;
|
49 |
|
50 |
+
/**
|
51 |
+
* Member Variable
|
52 |
+
*
|
53 |
+
* @var Tracking_Data
|
54 |
+
*/
|
55 |
+
public $alldata;
|
56 |
+
|
57 |
/**
|
58 |
* Member Variable
|
59 |
*
|
125 |
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
126 |
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
127 |
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
128 |
+
define( 'CARTFLOWS_VER', '1.5.0' );
|
129 |
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
130 |
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
131 |
|
247 |
/* Meta Default Values */
|
248 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
249 |
|
250 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
|
251 |
+
|
252 |
$this->utils = Cartflows_Utils::get_instance();
|
253 |
$this->options = Cartflows_Default_Meta::get_instance();
|
254 |
+
$this->alldata = Cartflows_Tracking::get_instance();
|
255 |
}
|
256 |
|
257 |
/**
|
540 |
return Cartflows_Loader::get_instance();
|
541 |
}
|
542 |
|
543 |
+
|
544 |
if ( ! function_exists( '_is_woo_installed' ) ) {
|
545 |
|
546 |
/**
|
classes/class-cartflows-tracking.php
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cartflows_Tracking
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Flow Markup
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Tracking {
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Member Variable
|
18 |
+
*
|
19 |
+
* @var object instance
|
20 |
+
*/
|
21 |
+
private static $instance;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Member Variable
|
25 |
+
*
|
26 |
+
* @var object instance
|
27 |
+
*/
|
28 |
+
public static $google_analytics_settings = array();
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Initiator
|
32 |
+
*/
|
33 |
+
public static function get_instance() {
|
34 |
+
if ( ! isset( self::$instance ) ) {
|
35 |
+
self::$instance = new self();
|
36 |
+
}
|
37 |
+
return self::$instance;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Constructor
|
42 |
+
*/
|
43 |
+
public function __construct() {
|
44 |
+
|
45 |
+
add_action( 'wp_head', array( $this, 'wcf_render_gtag' ) );
|
46 |
+
|
47 |
+
// Set Google analytics values.
|
48 |
+
$this->get_google_analytics_settings( self::$google_analytics_settings );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get ga settings.
|
53 |
+
*
|
54 |
+
* @param array $google_analytics_settings ga settings.
|
55 |
+
*/
|
56 |
+
public function get_google_analytics_settings( $google_analytics_settings ) {
|
57 |
+
self::$google_analytics_settings = Cartflows_Helper::get_google_analytics_settings();
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Render google tag framework.
|
63 |
+
*/
|
64 |
+
public function wcf_render_gtag() {
|
65 |
+
$get_tracking_code = $this->wcf_ga_id();
|
66 |
+
|
67 |
+
if ( self::is_wcf_ga_tracking_on() ) {
|
68 |
+
?>
|
69 |
+
<!-- Google Analytics Script By CartFlows -->
|
70 |
+
<script type="text/javascript">
|
71 |
+
var tracking_id = '<?php echo $get_tracking_code; ?>';
|
72 |
+
</script>
|
73 |
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
74 |
+
<?php // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript ?>
|
75 |
+
<script async src=https://www.googletagmanager.com/gtag/js?id=<?php echo $get_tracking_code; ?>></script>
|
76 |
+
<script>
|
77 |
+
window.dataLayer = window.dataLayer || [];
|
78 |
+
function gtag(){dataLayer.push(arguments);}
|
79 |
+
gtag('js', new Date());
|
80 |
+
</script>
|
81 |
+
|
82 |
+
<!-- Google Analytics Script By CartFlows -->
|
83 |
+
<?php
|
84 |
+
if ( 'enable' === self::$google_analytics_settings['enable_google_analytics_for_site'] ) {
|
85 |
+
?>
|
86 |
+
<script>
|
87 |
+
gtag('config', tracking_id);
|
88 |
+
</script>
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Set cookies to send ga data.
|
96 |
+
*
|
97 |
+
* @param int $order_id order id.
|
98 |
+
* @param array $offer_data offer product data.
|
99 |
+
*/
|
100 |
+
public static function send_ga_data_if_enabled( $order_id, $offer_data = array() ) {
|
101 |
+
|
102 |
+
if ( self::is_wcf_ga_tracking_on() && self::wcf_track_ga_purchase() ) {
|
103 |
+
|
104 |
+
setcookie( 'wcf_ga_trans_data', wp_json_encode( self::get_ga_purchase_transactions_data( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Prepare cart data for GA response.
|
111 |
+
*
|
112 |
+
* @param int $order_id order id.
|
113 |
+
* @param array $offer_data offer product data.
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public static function get_ga_purchase_transactions_data( $order_id, $offer_data ) {
|
117 |
+
|
118 |
+
$response = array();
|
119 |
+
|
120 |
+
$order = wc_get_order( $order_id );
|
121 |
+
$cart_total = WC()->cart->get_cart_contents_total();
|
122 |
+
$cart_items_count = WC()->cart->get_cart_contents_count();
|
123 |
+
$items = $order->get_items();
|
124 |
+
$cart_tax = $order->get_cart_tax();
|
125 |
+
$response['items'] = array();
|
126 |
+
$cart_contents = array();
|
127 |
+
|
128 |
+
$response = array(
|
129 |
+
'transaction_id' => $order_id,
|
130 |
+
'affiliation' => get_bloginfo( 'name' ),
|
131 |
+
'value' => $order->get_total(),
|
132 |
+
'currency' => $order->get_currency(),
|
133 |
+
'tax' => $order->get_cart_tax(),
|
134 |
+
'shipping' => $order->get_shipping_total(),
|
135 |
+
'coupon' => WC()->cart->get_coupons(),
|
136 |
+
);
|
137 |
+
if ( empty( $offer_data ) ) {
|
138 |
+
// Iterating through each WC_Order_Item_Product objects.
|
139 |
+
foreach ( $items as $item => $value ) {
|
140 |
+
|
141 |
+
$_product = wc_get_product( $value['product_id'] );
|
142 |
+
|
143 |
+
if ( ! $_product->is_type( 'variable' ) ) {
|
144 |
+
$product_data = self::get_required_data( $_product );
|
145 |
+
} else {
|
146 |
+
$variable_product = wc_get_product( $value['variation_id'] );
|
147 |
+
$product_data = self::get_required_data( $variable_product );
|
148 |
+
}
|
149 |
+
array_push(
|
150 |
+
$cart_contents,
|
151 |
+
array(
|
152 |
+
'id' => $product_data['id'],
|
153 |
+
'name' => $product_data['name'],
|
154 |
+
'category' => wp_strip_all_tags( wc_get_product_category_list( $_product->get_id() ) ),
|
155 |
+
'price' => $product_data['price'],
|
156 |
+
'quantity' => $value['quantity'],
|
157 |
+
)
|
158 |
+
);
|
159 |
+
}
|
160 |
+
} else {
|
161 |
+
array_push(
|
162 |
+
$cart_contents,
|
163 |
+
array(
|
164 |
+
'id' => $offer_data['id'],
|
165 |
+
'name' => $offer_data['name'],
|
166 |
+
'quantity' => $offer_data['qty'],
|
167 |
+
'price' => $offer_data['price'],
|
168 |
+
)
|
169 |
+
);
|
170 |
+
}
|
171 |
+
|
172 |
+
$response['items'] = $cart_contents;
|
173 |
+
|
174 |
+
// Prepare the json data to send it to google.
|
175 |
+
return $response;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Prepare Ecommerce data for GA response.
|
180 |
+
*
|
181 |
+
* @return array
|
182 |
+
*/
|
183 |
+
public static function get_ga_items_list() {
|
184 |
+
|
185 |
+
$items = WC()->cart->get_cart();
|
186 |
+
$items_data = array();
|
187 |
+
|
188 |
+
foreach ( $items as $item => $value ) {
|
189 |
+
|
190 |
+
$_product = wc_get_product( $value['product_id'] );
|
191 |
+
|
192 |
+
if ( ! $_product->is_type( 'variable' ) ) {
|
193 |
+
$product_data = self::get_required_data( $_product );
|
194 |
+
} else {
|
195 |
+
$variable_product = wc_get_product( $value['variation_id'] );
|
196 |
+
$product_data = self::get_required_data( $variable_product );
|
197 |
+
}
|
198 |
+
|
199 |
+
array_push(
|
200 |
+
$items_data,
|
201 |
+
array(
|
202 |
+
'id' => $product_data['id'],
|
203 |
+
'name' => $product_data['name'],
|
204 |
+
'category' => wp_strip_all_tags( wc_get_product_category_list( $_product->get_id() ) ),
|
205 |
+
'price' => $product_data['price'],
|
206 |
+
'quantity' => $value['quantity'],
|
207 |
+
)
|
208 |
+
);
|
209 |
+
}
|
210 |
+
return $items_data;
|
211 |
+
}
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Check tracking on.
|
217 |
+
*/
|
218 |
+
public static function is_wcf_ga_tracking_on() {
|
219 |
+
|
220 |
+
$is_enabled = false;
|
221 |
+
|
222 |
+
if ( 'disable' === self::$google_analytics_settings['enable_google_analytics'] ) {
|
223 |
+
$is_enabled = false;
|
224 |
+
} else {
|
225 |
+
$is_enabled = true;
|
226 |
+
}
|
227 |
+
|
228 |
+
return apply_filters( 'cartflows_google_analytics_tracking_enabled', $is_enabled );
|
229 |
+
}
|
230 |
+
|
231 |
+
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Check purchase event enable.
|
235 |
+
*/
|
236 |
+
public static function wcf_track_ga_purchase() {
|
237 |
+
|
238 |
+
$google_analytics_settings = Cartflows_Helper::get_google_analytics_settings();
|
239 |
+
$wcf_track_ga_purchase = $google_analytics_settings['enable_purchase_event'];
|
240 |
+
|
241 |
+
if ( is_array( $google_analytics_settings ) && ! empty( $google_analytics_settings ) && 'enable' === $wcf_track_ga_purchase ) {
|
242 |
+
return true;
|
243 |
+
}
|
244 |
+
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Get product data.
|
250 |
+
*
|
251 |
+
* @param object $_product product data.
|
252 |
+
*/
|
253 |
+
public static function get_required_data( $_product ) {
|
254 |
+
|
255 |
+
$data = array(
|
256 |
+
'id' => $_product->get_id(),
|
257 |
+
'name' => $_product->get_name(),
|
258 |
+
'price' => $_product->get_price(),
|
259 |
+
);
|
260 |
+
return $data;
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Retreive google anlytics ID.
|
265 |
+
*/
|
266 |
+
public function wcf_ga_id() {
|
267 |
+
|
268 |
+
$get_ga_id = self::$google_analytics_settings['google_analytics_id'];
|
269 |
+
|
270 |
+
return empty( $get_ga_id ) ? false : $get_ga_id;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Kicking this off by calling 'get_instance()' method
|
276 |
+
*/
|
277 |
+
Cartflows_Tracking::get_instance();
|
includes/admin/cartflows-general.php
CHANGED
@@ -11,6 +11,8 @@ $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
|
@@ -31,6 +33,8 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
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>
|
@@ -46,7 +50,9 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
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>
|
@@ -102,7 +108,9 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
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>
|
@@ -188,8 +196,9 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
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 |
|
@@ -199,82 +208,201 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
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 |
-
|
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 |
-
</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 |
|
@@ -355,6 +483,8 @@ $error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOO
|
|
355 |
?>
|
356 |
</div>
|
357 |
</div>
|
|
|
|
|
358 |
</div>
|
359 |
<!-- /post-body -->
|
360 |
<br class="clear">
|
11 |
|
12 |
$permalink_settings = Cartflows_Helper::get_permalink_settings();
|
13 |
|
14 |
+
$google_analytics_settings = Cartflows_Helper::get_google_analytics_settings();
|
15 |
+
|
16 |
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
17 |
|
18 |
$debug_on = ( isset( $_GET['debug'] ) ) ? sanitize_text_field( wp_unslash( $_GET['debug'] ) ) : 'false'; //phpcs:ignore
|
33 |
<div id="poststuff">
|
34 |
<div id="post-body" class="columns-2">
|
35 |
<div id="post-body-content">
|
36 |
+
|
37 |
+
<!-- Getting Started -->
|
38 |
<div class="postbox introduction">
|
39 |
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
40 |
<span><?php esc_html_e( 'Getting Started', 'cartflows' ); ?></span>
|
50 |
</p>
|
51 |
</div>
|
52 |
</div>
|
53 |
+
<!-- Getting Started -->
|
54 |
|
55 |
+
<!-- General Settings -->
|
56 |
<div class="general-settings-form postbox">
|
57 |
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
58 |
<span><?php esc_html_e( 'General Settings', 'cartflows' ); ?></span>
|
108 |
</form>
|
109 |
</div>
|
110 |
</div>
|
111 |
+
<!-- General Settings -->
|
112 |
|
113 |
+
<!-- Permalink Settings -->
|
114 |
<div class="general-settingss-form postbox">
|
115 |
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
116 |
<span><?php esc_html_e( 'Permalink Settings', 'cartflows' ); ?></span>
|
196 |
</form>
|
197 |
</div>
|
198 |
</div>
|
199 |
+
<!-- Permalink Settings -->
|
200 |
|
201 |
+
<!-- Facebook Pixel Tracking -->
|
202 |
<div class="general-settingss-form postbox">
|
203 |
<h2 class="wcf-facebook-hndle wcf-normal-cusror ui-sortable-handle hndle">
|
204 |
|
208 |
<form method="post" class="wrap wcf-clear" action="">
|
209 |
<div class="form-wrap">
|
210 |
<input type="hidden" name="action" value="wcf_save_facebook_pixel_settings">
|
211 |
+
<div id="post-body">
|
212 |
+
|
213 |
+
<div class="inside">
|
214 |
+
<div class="form-wrap">
|
215 |
+
<?php
|
216 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
217 |
+
array(
|
218 |
+
'id' => 'wcf_facebook_pixel_tracking',
|
219 |
+
'name' => '_cartflows_facebook[facebook_pixel_tracking]',
|
220 |
+
'title' => __( 'Enable Facebook Pixel Tracking', 'cartflows' ),
|
221 |
+
'value' => $facebook_settings['facebook_pixel_tracking'],
|
222 |
+
)
|
223 |
+
);
|
224 |
+
|
225 |
+
echo "<div class='wcf-fb-pixel-wrapper'>";
|
226 |
+
|
227 |
+
echo Cartflows_Admin_Fields::text_field(
|
228 |
+
array(
|
229 |
+
'id' => 'wcf_facebook_pixel_id',
|
230 |
+
'name' => '_cartflows_facebook[facebook_pixel_id]',
|
231 |
+
'title' => __( 'Enter Facebook pixel ID', 'cartflows' ),
|
232 |
+
'value' => $facebook_settings['facebook_pixel_id'],
|
233 |
+
)
|
234 |
+
);
|
235 |
+
|
236 |
+
|
237 |
+
echo Cartflows_Admin_Fields::title_field(
|
238 |
+
array(
|
239 |
+
'title' => __( 'Enable Events:', 'cartflows' ),
|
240 |
+
)
|
241 |
+
);
|
242 |
+
|
243 |
+
|
244 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
245 |
+
array(
|
246 |
+
'id' => 'wcf_facebook_pixel_initiate_checkout',
|
247 |
+
'name' => '_cartflows_facebook[facebook_pixel_initiate_checkout]',
|
248 |
+
'title' => __( 'Initiate Checkout', 'cartflows' ),
|
249 |
+
'value' => $facebook_settings['facebook_pixel_initiate_checkout'],
|
250 |
+
)
|
251 |
+
);
|
252 |
+
|
253 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
254 |
+
array(
|
255 |
+
'id' => 'wcf_facebook_pixel_add_payment_info',
|
256 |
+
'name' => '_cartflows_facebook[facebook_pixel_add_payment_info]',
|
257 |
+
'title' => __( 'Add Payment Info', 'cartflows' ),
|
258 |
+
'value' => $facebook_settings['facebook_pixel_add_payment_info'],
|
259 |
+
)
|
260 |
+
);
|
261 |
+
|
262 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
263 |
+
array(
|
264 |
+
'id' => 'wcf_facebook_pixel_purchase_complete',
|
265 |
+
'name' => '_cartflows_facebook[facebook_pixel_purchase_complete]',
|
266 |
+
'title' => __( 'Purchase Complete', 'cartflows' ),
|
267 |
+
'value' => $facebook_settings['facebook_pixel_purchase_complete'],
|
268 |
+
)
|
269 |
+
);
|
270 |
+
|
271 |
+
echo '</div>';
|
272 |
+
|
273 |
+
?>
|
274 |
+
</div>
|
275 |
+
|
276 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-facebook-setting-save-btn button-primary button', 'submit', false ); ?>
|
277 |
+
<?php wp_nonce_field( 'cartflows-facebook-settings', 'cartflows-facebook-settings-nonce' ); ?>
|
|
|
|
|
278 |
</div>
|
279 |
+
</div>
|
280 |
</div>
|
281 |
</form>
|
282 |
+
</div>
|
283 |
+
<!-- Facebook Pixel Tracking -->
|
284 |
+
|
285 |
+
<!-- Google Analytics Tracking -->
|
286 |
+
<div class="general-settingss-form postbox">
|
287 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
288 |
+
<span><?php esc_html_e( 'Google Analytics Tracking', 'cartflows' ); ?></span>
|
289 |
+
</h2>
|
290 |
+
<div class="inside">
|
291 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
292 |
+
<div class="form-wrap">
|
293 |
+
<?php
|
294 |
+
|
295 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
296 |
+
array(
|
297 |
+
'id' => 'enable_google-analytics-id',
|
298 |
+
'name' => '_cartflows_google_analytics[enable_google_analytics]',
|
299 |
+
'title' => __( 'Enable Google Analytics Tracking', 'cartflows' ),
|
300 |
+
'value' => $google_analytics_settings['enable_google_analytics'],
|
301 |
+
)
|
302 |
+
);
|
303 |
+
|
304 |
+
echo "<div class='wcf-google-analytics-wrapper'>";
|
305 |
+
?>
|
306 |
+
<hr/>
|
307 |
+
<?php
|
308 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
309 |
+
array(
|
310 |
+
'id' => 'enable_google_analytics_for_site',
|
311 |
+
'name' => '_cartflows_google_analytics[enable_google_analytics_for_site]',
|
312 |
+
'title' => __( 'Enable for the whole website', 'cartflows' ),
|
313 |
+
'value' => $google_analytics_settings['enable_google_analytics_for_site'],
|
314 |
+
)
|
315 |
+
);
|
316 |
+
|
317 |
+
echo Cartflows_Admin_Fields::title_field(
|
318 |
+
array(
|
319 |
+
'title' => '',
|
320 |
+
'description' => __( 'If this option is unchecked, it will only apply to CartFlows steps.', 'cartflows' ),
|
321 |
+
)
|
322 |
+
);
|
323 |
+
?>
|
324 |
+
<hr/>
|
325 |
+
<?php
|
326 |
+
echo Cartflows_Admin_Fields::text_field(
|
327 |
+
array(
|
328 |
+
'id' => 'google-analytics-id',
|
329 |
+
'name' => '_cartflows_google_analytics[google_analytics_id]',
|
330 |
+
'title' => __( 'Google Analytics ID', 'cartflows' ),
|
331 |
+
'value' => $google_analytics_settings['google_analytics_id'],
|
332 |
+
'description' => __( 'Log into your <a href="https://analytics.google.com/" target="_blank">google analytics account</a> to find your ID. eg: UA-XXXXXX-X.', 'cartflows' ),
|
333 |
+
)
|
334 |
+
);
|
335 |
+
|
336 |
+
echo Cartflows_Admin_Fields::title_field(
|
337 |
+
array(
|
338 |
+
'title' => __( 'Enable Events:', 'cartflows' ),
|
339 |
+
)
|
340 |
+
);
|
341 |
+
|
342 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
343 |
+
array(
|
344 |
+
'id' => 'enable_begin_checkout',
|
345 |
+
'name' => '_cartflows_google_analytics[enable_begin_checkout]',
|
346 |
+
'title' => __( 'Begin Checkout', 'cartflows' ),
|
347 |
+
'value' => $google_analytics_settings['enable_begin_checkout'],
|
348 |
+
)
|
349 |
+
);
|
350 |
+
|
351 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
352 |
+
array(
|
353 |
+
'id' => 'enable_add_to_cart',
|
354 |
+
'name' => '_cartflows_google_analytics[enable_add_to_cart]',
|
355 |
+
'title' => __( 'Add To Cart', 'cartflows' ),
|
356 |
+
'value' => $google_analytics_settings['enable_add_to_cart'],
|
357 |
+
)
|
358 |
+
);
|
359 |
+
|
360 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
361 |
+
array(
|
362 |
+
'id' => 'enable_add_payment_info',
|
363 |
+
'name' => '_cartflows_google_analytics[enable_add_payment_info]',
|
364 |
+
'title' => __( 'Add Payment Info', 'cartflows' ),
|
365 |
+
'value' => $google_analytics_settings['enable_add_payment_info'],
|
366 |
+
)
|
367 |
+
);
|
368 |
+
|
369 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
370 |
+
array(
|
371 |
+
'id' => 'enable_purchase_event',
|
372 |
+
'name' => '_cartflows_google_analytics[enable_purchase_event]',
|
373 |
+
'title' => __( 'Purchase', 'cartflows' ),
|
374 |
+
'value' => $google_analytics_settings['enable_purchase_event'],
|
375 |
+
)
|
376 |
+
);
|
377 |
+
|
378 |
+
echo Cartflows_Admin_Fields::title_field(
|
379 |
+
array(
|
380 |
+
'title' => '',
|
381 |
+
'description' => __( 'Google Analytics not working correctly? <a href="https://cartflows.com/docs/troubleshooting-google-analytics-tracking-issues/" > Click here </a> to know more. ', 'cartflows' ),
|
382 |
+
)
|
383 |
+
);
|
384 |
+
|
385 |
+
do_action( 'cartflows_google_analytics_admin_fields', $google_analytics_settings );
|
386 |
+
|
387 |
+
echo '</div>';
|
388 |
+
?>
|
389 |
|
390 |
|
391 |
+
</div>
|
392 |
+
<p>
|
393 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
394 |
+
<?php wp_nonce_field( 'cartflows-google-analytics-settings', 'cartflows-google-analytics-settings-nonce' ); ?>
|
395 |
+
</p>
|
396 |
+
|
397 |
+
|
398 |
+
</form>
|
399 |
+
</div>
|
400 |
</div>
|
401 |
+
<!-- Google Analytics Tracking -->
|
402 |
+
|
403 |
</div>
|
404 |
+
|
405 |
+
<!-- Right Sidebar -->
|
406 |
<div class="postbox-container" id="postbox-container-1">
|
407 |
<div id="side-sortables">
|
408 |
|
483 |
?>
|
484 |
</div>
|
485 |
</div>
|
486 |
+
<!-- Right Sidebar -->
|
487 |
+
|
488 |
</div>
|
489 |
<!-- /post-body -->
|
490 |
<br class="clear">
|
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"
|
@@ -58,43 +58,43 @@ msgstr ""
|
|
58 |
msgid "Settings"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: classes/class-cartflows-admin.php:
|
62 |
msgid "Installing and activating.."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: classes/class-cartflows-admin.php:
|
66 |
msgid "There was an error with the installation of plugin."
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: classes/class-cartflows-admin.php:
|
70 |
msgid "Flows Library"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: classes/class-cartflows-admin.php:
|
74 |
#: modules/flow/view/meta-flow-steps.php:156
|
75 |
msgid "Ready Templates"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: classes/class-cartflows-admin.php:
|
79 |
#: modules/flow/view/meta-flow-steps.php:159
|
80 |
msgid "Create Your Own"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: classes/class-cartflows-admin.php:
|
84 |
#: modules/flow/view/meta-flow-steps.php:171
|
85 |
msgid "Search Sites"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: classes/class-cartflows-admin.php:
|
89 |
#: modules/flow/view/meta-flow-steps.php:172
|
90 |
msgid "Search Flow..."
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: classes/class-cartflows-admin.php:
|
94 |
msgid "Design Your Flow"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: classes/class-cartflows-admin.php:
|
98 |
#: classes/class-cartflows-importer.php:636
|
99 |
#: classes/class-cartflows-importer.php:735
|
100 |
#: modules/flow/view/meta-flow-steps.php:202
|
@@ -325,25 +325,25 @@ msgstr ""
|
|
325 |
msgid "Select CartFlows Template for this Course"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: classes/class-cartflows-loader.php:
|
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:
|
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:
|
343 |
msgid "Activate WooCommerce"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: classes/class-cartflows-loader.php:
|
347 |
msgid "Install WooCommerce"
|
348 |
msgstr ""
|
349 |
|
@@ -510,7 +510,7 @@ msgid "Select Page Builder"
|
|
510 |
msgstr ""
|
511 |
|
512 |
#: classes/class-cartflows-wizard.php:334
|
513 |
-
#: includes/admin/cartflows-general.php:
|
514 |
msgid "Elementor"
|
515 |
msgstr ""
|
516 |
|
@@ -519,12 +519,12 @@ msgid "Beaver Builder Plugin (Lite Version)"
|
|
519 |
msgstr ""
|
520 |
|
521 |
#: classes/class-cartflows-wizard.php:354
|
522 |
-
#: includes/admin/cartflows-general.php:
|
523 |
msgid "Divi"
|
524 |
msgstr ""
|
525 |
|
526 |
#: classes/class-cartflows-wizard.php:364
|
527 |
-
#: includes/admin/cartflows-general.php:
|
528 |
msgid "Other"
|
529 |
msgstr ""
|
530 |
|
@@ -638,7 +638,7 @@ msgid "%1$s was called with an invalid level \"%2$s\"."
|
|
638 |
msgstr ""
|
639 |
|
640 |
#: includes/admin/cartflows-admin.php:19
|
641 |
-
#: includes/admin/cartflows-general.php:
|
642 |
msgid "Modernizing WordPress eCommerce!"
|
643 |
msgstr ""
|
644 |
|
@@ -672,29 +672,29 @@ msgstr ""
|
|
672 |
msgid "General"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: includes/admin/cartflows-general.php:
|
676 |
-
#: includes/admin/cartflows-general.php:
|
677 |
msgid "General Settings"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: includes/admin/cartflows-general.php:
|
681 |
msgid "Getting Started"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: includes/admin/cartflows-general.php:
|
685 |
msgid "Disallow search engines from indexing flows"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: includes/admin/cartflows-general.php:
|
689 |
#: modules/flow/view/meta-flow-steps.php:93
|
690 |
msgid "Global Checkout"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: includes/admin/cartflows-general.php:
|
694 |
msgid "Show Templates designed with"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/cartflows-general.php:
|
698 |
msgid ""
|
699 |
"CartFlows offers flow templates that can be imported in one click. These "
|
700 |
"templates are available in few different page builders. Please choose your "
|
@@ -702,135 +702,184 @@ msgid ""
|
|
702 |
"are made using that page builder.."
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/cartflows-general.php:
|
706 |
msgid "Beaver Builder"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/cartflows-general.php:
|
710 |
-
#: includes/admin/cartflows-general.php:
|
711 |
-
#: includes/admin/cartflows-general.php:
|
|
|
712 |
msgid "Save Changes"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: includes/admin/cartflows-general.php:
|
716 |
msgid "Permalink Settings"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: includes/admin/cartflows-general.php:
|
720 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:603
|
721 |
#: modules/optin/classes/class-cartflows-optin-meta.php:380
|
722 |
msgid "Default"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/admin/cartflows-general.php:
|
726 |
msgid "Flow and Step Slug"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/admin/cartflows-general.php:
|
730 |
msgid "Flow Slug"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/admin/cartflows-general.php:
|
734 |
msgid "Step Slug"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: includes/admin/cartflows-general.php:
|
738 |
msgid "Post Type Permalink Base"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: includes/admin/cartflows-general.php:
|
742 |
msgid "Step Base"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: includes/admin/cartflows-general.php:
|
746 |
msgid "Flow Base"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: includes/admin/cartflows-general.php:
|
750 |
msgid "Set Default"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: includes/admin/cartflows-general.php:
|
754 |
msgid "Facebook Pixel Settings"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: includes/admin/cartflows-general.php:
|
758 |
msgid "Enable Facebook Pixel Tracking"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/admin/cartflows-general.php:
|
762 |
msgid "Enter Facebook pixel ID"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/admin/cartflows-general.php:
|
|
|
766 |
msgid "Enable Events:"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/admin/cartflows-general.php:
|
770 |
msgid "Initiate Checkout"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/admin/cartflows-general.php:
|
|
|
774 |
msgid "Add Payment Info"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: includes/admin/cartflows-general.php:
|
778 |
msgid "Purchase Complete"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/admin/cartflows-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
msgid "Knowledge Base"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: includes/admin/cartflows-general.php:
|
786 |
msgid "Not sure how something works? Take a peek at the knowledge base and learn."
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: includes/admin/cartflows-general.php:
|
790 |
msgid "Visit Knowledge Base »"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: includes/admin/cartflows-general.php:
|
794 |
msgid "Community"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: includes/admin/cartflows-general.php:
|
798 |
msgid ""
|
799 |
"Join the community of super helpful CartFlows users. Say hello, ask "
|
800 |
"questions, give feedback and help each other!"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: includes/admin/cartflows-general.php:
|
804 |
msgid "Join Our Facebook Group »"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: includes/admin/cartflows-general.php:
|
808 |
msgid "Five Star Support"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/admin/cartflows-general.php:
|
812 |
msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: includes/admin/cartflows-general.php:
|
816 |
msgid "Submit a Ticket »"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: includes/admin/cartflows-general.php:
|
820 |
msgid "Load Minified CSS"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/admin/cartflows-general.php:
|
824 |
msgid ""
|
825 |
"Load the Minified CSS from here. Just Enable it by checking the below given "
|
826 |
"checkbox."
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: includes/admin/cartflows-general.php:
|
830 |
msgid "Load minified CSS & JS Files"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/admin/cartflows-general.php:
|
834 |
msgid "Save"
|
835 |
msgstr ""
|
836 |
|
2 |
# This file is distributed under the same license as the CartFlows package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: CartFlows 1.5.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
+
"POT-Creation-Date: 2020-03-04 07:11:39+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
58 |
msgid "Settings"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: classes/class-cartflows-admin.php:436
|
62 |
msgid "Installing and activating.."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: classes/class-cartflows-admin.php:437
|
66 |
msgid "There was an error with the installation of plugin."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: classes/class-cartflows-admin.php:491
|
70 |
msgid "Flows Library"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: classes/class-cartflows-admin.php:498
|
74 |
#: modules/flow/view/meta-flow-steps.php:156
|
75 |
msgid "Ready Templates"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: classes/class-cartflows-admin.php:501
|
79 |
#: modules/flow/view/meta-flow-steps.php:159
|
80 |
msgid "Create Your Own"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: classes/class-cartflows-admin.php:512
|
84 |
#: modules/flow/view/meta-flow-steps.php:171
|
85 |
msgid "Search Sites"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: classes/class-cartflows-admin.php:513
|
89 |
#: modules/flow/view/meta-flow-steps.php:172
|
90 |
msgid "Search Flow..."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: classes/class-cartflows-admin.php:530
|
94 |
msgid "Design Your Flow"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: classes/class-cartflows-admin.php:531
|
98 |
#: classes/class-cartflows-importer.php:636
|
99 |
#: classes/class-cartflows-importer.php:735
|
100 |
#: modules/flow/view/meta-flow-steps.php:202
|
325 |
msgid "Select CartFlows Template for this Course"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: classes/class-cartflows-loader.php:222
|
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:462
|
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:472
|
343 |
msgid "Activate WooCommerce"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: classes/class-cartflows-loader.php:480
|
347 |
msgid "Install WooCommerce"
|
348 |
msgstr ""
|
349 |
|
510 |
msgstr ""
|
511 |
|
512 |
#: classes/class-cartflows-wizard.php:334
|
513 |
+
#: includes/admin/cartflows-general.php:94
|
514 |
msgid "Elementor"
|
515 |
msgstr ""
|
516 |
|
519 |
msgstr ""
|
520 |
|
521 |
#: classes/class-cartflows-wizard.php:354
|
522 |
+
#: includes/admin/cartflows-general.php:96
|
523 |
msgid "Divi"
|
524 |
msgstr ""
|
525 |
|
526 |
#: classes/class-cartflows-wizard.php:364
|
527 |
+
#: includes/admin/cartflows-general.php:97
|
528 |
msgid "Other"
|
529 |
msgstr ""
|
530 |
|
638 |
msgstr ""
|
639 |
|
640 |
#: includes/admin/cartflows-admin.php:19
|
641 |
+
#: includes/admin/cartflows-general.php:48
|
642 |
msgid "Modernizing WordPress eCommerce!"
|
643 |
msgstr ""
|
644 |
|
672 |
msgid "General"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: includes/admin/cartflows-general.php:31
|
676 |
+
#: includes/admin/cartflows-general.php:58
|
677 |
msgid "General Settings"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: includes/admin/cartflows-general.php:40
|
681 |
msgid "Getting Started"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: includes/admin/cartflows-general.php:71
|
685 |
msgid "Disallow search engines from indexing flows"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: includes/admin/cartflows-general.php:81
|
689 |
#: modules/flow/view/meta-flow-steps.php:93
|
690 |
msgid "Global Checkout"
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: includes/admin/cartflows-general.php:90
|
694 |
msgid "Show Templates designed with"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: includes/admin/cartflows-general.php:91
|
698 |
msgid ""
|
699 |
"CartFlows offers flow templates that can be imported in one click. These "
|
700 |
"templates are available in few different page builders. Please choose your "
|
702 |
"are made using that page builder.."
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/cartflows-general.php:95
|
706 |
msgid "Beaver Builder"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/cartflows-general.php:106
|
710 |
+
#: includes/admin/cartflows-general.php:190
|
711 |
+
#: includes/admin/cartflows-general.php:276
|
712 |
+
#: includes/admin/cartflows-general.php:393
|
713 |
msgid "Save Changes"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: includes/admin/cartflows-general.php:116
|
717 |
msgid "Permalink Settings"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: includes/admin/cartflows-general.php:131
|
721 |
#: modules/checkout/classes/class-cartflows-checkout-meta.php:603
|
722 |
#: modules/optin/classes/class-cartflows-optin-meta.php:380
|
723 |
msgid "Default"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: includes/admin/cartflows-general.php:137
|
727 |
msgid "Flow and Step Slug"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: includes/admin/cartflows-general.php:143
|
731 |
msgid "Flow Slug"
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: includes/admin/cartflows-general.php:149
|
735 |
msgid "Step Slug"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: includes/admin/cartflows-general.php:161
|
739 |
msgid "Post Type Permalink Base"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: includes/admin/cartflows-general.php:169
|
743 |
msgid "Step Base"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: includes/admin/cartflows-general.php:179
|
747 |
msgid "Flow Base"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: includes/admin/cartflows-general.php:191
|
751 |
msgid "Set Default"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: includes/admin/cartflows-general.php:205
|
755 |
msgid "Facebook Pixel Settings"
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: includes/admin/cartflows-general.php:220
|
759 |
msgid "Enable Facebook Pixel Tracking"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: includes/admin/cartflows-general.php:231
|
763 |
msgid "Enter Facebook pixel ID"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: includes/admin/cartflows-general.php:239
|
767 |
+
#: includes/admin/cartflows-general.php:338
|
768 |
msgid "Enable Events:"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: includes/admin/cartflows-general.php:248
|
772 |
msgid "Initiate Checkout"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: includes/admin/cartflows-general.php:257
|
776 |
+
#: includes/admin/cartflows-general.php:364
|
777 |
msgid "Add Payment Info"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/admin/cartflows-general.php:266
|
781 |
msgid "Purchase Complete"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/admin/cartflows-general.php:288
|
785 |
+
msgid "Google Analytics Tracking"
|
786 |
+
msgstr ""
|
787 |
+
|
788 |
+
#: includes/admin/cartflows-general.php:299
|
789 |
+
msgid "Enable Google Analytics Tracking"
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: includes/admin/cartflows-general.php:312
|
793 |
+
msgid "Enable for the whole website"
|
794 |
+
msgstr ""
|
795 |
+
|
796 |
+
#: includes/admin/cartflows-general.php:320
|
797 |
+
msgid "If this option is unchecked, it will only apply to CartFlows steps."
|
798 |
+
msgstr ""
|
799 |
+
|
800 |
+
#: includes/admin/cartflows-general.php:330
|
801 |
+
msgid "Google Analytics ID"
|
802 |
+
msgstr ""
|
803 |
+
|
804 |
+
#: includes/admin/cartflows-general.php:332
|
805 |
+
msgid ""
|
806 |
+
"Log into your <a href=\"https://analytics.google.com/\" "
|
807 |
+
"target=\"_blank\">google analytics account</a> to find your ID. eg: "
|
808 |
+
"UA-XXXXXX-X."
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: includes/admin/cartflows-general.php:346
|
812 |
+
msgid "Begin Checkout"
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: includes/admin/cartflows-general.php:355
|
816 |
+
msgid "Add To Cart"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: includes/admin/cartflows-general.php:373
|
820 |
+
msgid "Purchase"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/admin/cartflows-general.php:381
|
824 |
+
msgid ""
|
825 |
+
"Google Analytics not working correctly? <a "
|
826 |
+
"href=\"https://cartflows.com/docs/troubleshooting-google-analytics-tracking-"
|
827 |
+
"issues/\" > Click here </a> to know more. "
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: includes/admin/cartflows-general.php:412
|
831 |
msgid "Knowledge Base"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: includes/admin/cartflows-general.php:416
|
835 |
msgid "Not sure how something works? Take a peek at the knowledge base and learn."
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: includes/admin/cartflows-general.php:419
|
839 |
msgid "Visit Knowledge Base »"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/admin/cartflows-general.php:427
|
843 |
msgid "Community"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/admin/cartflows-general.php:431
|
847 |
msgid ""
|
848 |
"Join the community of super helpful CartFlows users. Say hello, ask "
|
849 |
"questions, give feedback and help each other!"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/admin/cartflows-general.php:434
|
853 |
msgid "Join Our Facebook Group »"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: includes/admin/cartflows-general.php:442
|
857 |
msgid "Five Star Support"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: includes/admin/cartflows-general.php:446
|
861 |
msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: includes/admin/cartflows-general.php:449
|
865 |
msgid "Submit a Ticket »"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/admin/cartflows-general.php:459
|
869 |
msgid "Load Minified CSS"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: includes/admin/cartflows-general.php:464
|
873 |
msgid ""
|
874 |
"Load the Minified CSS from here. Just Enable it by checking the below given "
|
875 |
"checkbox."
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: includes/admin/cartflows-general.php:471
|
879 |
msgid "Load minified CSS & JS Files"
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: includes/admin/cartflows-general.php:476
|
883 |
msgid "Save"
|
884 |
msgstr ""
|
885 |
|
modules/flow/view/meta-flow-steps.php
CHANGED
@@ -1,210 +1,210 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* View Flow steps
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
9 |
-
|
10 |
-
$steps = array(
|
11 |
-
'landing' => __( 'Landing', 'cartflows' ),
|
12 |
-
'checkout' => __( 'Checkout (Woo)', 'cartflows' ),
|
13 |
-
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
-
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
-
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
16 |
-
'optin' => __( 'Optin (Woo)', 'cartflows' ),
|
17 |
-
);
|
18 |
-
|
19 |
-
?>
|
20 |
-
<div class="wcf-flow-steps-meta-box">
|
21 |
-
<div class="wcf-flow-settings">
|
22 |
-
<?php do_action( 'cartflows_above_flow_steps' ); ?>
|
23 |
-
<div class="wcf-flow-steps-wrap">
|
24 |
-
<div class="wcf-flow-steps-container">
|
25 |
-
<?php if ( is_array( $options['steps'] ) ) { ?>
|
26 |
-
<?php foreach ( $options['steps'] as $index => $data ) { ?>
|
27 |
-
<?php
|
28 |
-
$term_slug = '';
|
29 |
-
$term_name = '';
|
30 |
-
$step_wrap_class = '';
|
31 |
-
$has_product_assigned = true;
|
32 |
-
$is_global_checkout = '';
|
33 |
-
$common = '';
|
34 |
-
$data_step_id = intval( $data['id'] );
|
35 |
-
|
36 |
-
if ( isset( $data['type'] ) ) {
|
37 |
-
$term_slug = $data['type'];
|
38 |
-
$term_name = $steps[ $data['type'] ];
|
39 |
-
}
|
40 |
-
|
41 |
-
if ( ! _is_cartflows_pro() && ( 'upsell' === $term_slug || 'downsell' === $term_slug ) ) {
|
42 |
-
$step_wrap_class .= ' invalid-step';
|
43 |
-
}
|
44 |
-
|
45 |
-
if ( isset( $_GET['highlight-step-id'] ) ) { //phpcs:ignore
|
46 |
-
|
47 |
-
$highlight_step_id = intval( $_GET['highlight-step-id'] ); //phpcs:ignore
|
48 |
-
|
49 |
-
if ( $highlight_step_id === $data_step_id ) {
|
50 |
-
$step_wrap_class .= ' wcf-new-step-highlight';
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
if ( 'checkout' === $term_slug ) {
|
55 |
-
|
56 |
-
$common = Cartflows_Helper::get_common_settings();
|
57 |
-
|
58 |
-
$is_global_checkout = (int) $common['global_checkout'];
|
59 |
-
|
60 |
-
if ( $data['id'] === $is_global_checkout ) {
|
61 |
-
$step_wrap_class .= ' wcf-global-checkout';
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( 'upsell' === $term_slug || 'downsell' === $term_slug || 'checkout' === $term_slug ) {
|
66 |
-
|
67 |
-
$has_product_assigned = Cartflows_Helper::has_product_assigned( $data['id'] );
|
68 |
-
|
69 |
-
if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
|
70 |
-
$step_wrap_class .= ' wcf-no-product-step';
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
?>
|
75 |
-
<div class="wcf-step-wrap <?php echo $step_wrap_class; ?>" data-id="<?php echo $data['id']; ?>" data-term-slug="<?php echo esc_attr( $term_slug ); ?>">
|
76 |
-
<div class="wcf-step">
|
77 |
-
<div class="wcf-step-left-content">
|
78 |
-
<span class="dashicons dashicons-menu"></span>
|
79 |
-
<span><?php echo wp_trim_words( get_the_title( $data['id'] ), 3 ); ?></span>
|
80 |
-
<span class="wcf-flow-badge"><?php echo esc_attr( $term_name ); ?></span>
|
81 |
-
|
82 |
-
<?php
|
83 |
-
if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
|
84 |
-
?>
|
85 |
-
<span class="wcf-no-product-badge"><?php esc_html_e( 'No Product Assigned', 'cartflows' ); ?></span>
|
86 |
-
<?php
|
87 |
-
} elseif ( ( $has_product_assigned ) && ( $data['id'] === $is_global_checkout ) ) {
|
88 |
-
?>
|
89 |
-
<span class="wcf-global-checkout-badge"><?php esc_html_e( 'Global Checkout - Remove selected checkout product', 'cartflows' ); ?></span>
|
90 |
-
<?php
|
91 |
-
} elseif ( ( ! $has_product_assigned ) && $data['id'] === $is_global_checkout ) {
|
92 |
-
?>
|
93 |
-
<span class="wcf-global-checkout-badge"><?php esc_html_e( 'Global Checkout', 'cartflows' ); ?></span>
|
94 |
-
<?php
|
95 |
-
}
|
96 |
-
?>
|
97 |
-
|
98 |
-
<input type="hidden" class="wcf-steps-hidden" name="wcf-steps[]" value="<?php echo $data['id']; ?>">
|
99 |
-
<?php do_action( 'cartflows_step_left_content', $data['id'], $term_slug ); ?>
|
100 |
-
</div>
|
101 |
-
<div class="wcf-steps-action-buttons">
|
102 |
-
<a href="<?php echo get_permalink( $data['id'] ); ?>" target="_blank" class="wcf-step-view wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'View Step', 'cartflows' ); ?>" >
|
103 |
-
<span class="dashicons dashicons-visibility"></span>
|
104 |
-
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'View', 'cartflows' ); ?></span>
|
105 |
-
</a>
|
106 |
-
<a href="<?php echo get_edit_post_link( $data['id'] ); ?>" class="wcf-step-edit wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Edit Step', 'cartflows' ); ?>" >
|
107 |
-
<span class="dashicons dashicons-edit"></span>
|
108 |
-
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Edit', 'cartflows' ); ?></span>
|
109 |
-
</a>
|
110 |
-
<?php
|
111 |
-
if ( _is_cartflows_pro() ) {
|
112 |
-
?>
|
113 |
-
<a href="<?php echo wp_nonce_url( 'admin.php?action=cartflows_clone_step&post=' . $data['id'], 'step_clone', 'step_clone_nonce' ); ?>" class="wcf-step-clone wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Clone Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
|
114 |
-
<span class="dashicons dashicons-admin-page"></span>
|
115 |
-
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Clone', 'cartflows' ); ?></span>
|
116 |
-
</a>
|
117 |
-
<?php } ?>
|
118 |
-
<a href="#" class="wcf-step-delete wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Delete Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
|
119 |
-
<span class="dashicons dashicons-trash"></span>
|
120 |
-
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Delete', 'cartflows' ); ?></span>
|
121 |
-
</a>
|
122 |
-
</div>
|
123 |
-
</div>
|
124 |
-
</div><!-- .wcf-step-wrap -->
|
125 |
-
<?php } ?>
|
126 |
-
<?php } ?>
|
127 |
-
</div><!-- .wcf-flow-steps-container -->
|
128 |
-
</div> <!-- .wcf-flow-steps-wrap -->
|
129 |
-
<div class="wcf-flow-buttons-wrap"> <!-- .wcf-flow-buttons-wrap -->
|
130 |
-
<?php do_action( 'cartflows_bellow_flow_steps' ); ?>
|
131 |
-
<div class='wcf-add-new-step-btn-wrap'>
|
132 |
-
<button class='wcf-trigger-popup button button-primary'>
|
133 |
-
<?php echo esc_html__( 'Add New Step', 'cartflows' ); ?>
|
134 |
-
</button>
|
135 |
-
</div>
|
136 |
-
</div><!-- .wcf-flow-buttons-wrap -->
|
137 |
-
</div><!-- .wcf-flow-settings -->
|
138 |
-
|
139 |
-
<div id="wcf-remote-step-importer" class="wcf-templates-popup-overlay">
|
140 |
-
<div class="wcf-templates-popup-content">
|
141 |
-
<div class="spinner"></div>
|
142 |
-
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
143 |
-
|
144 |
-
<div id="wcf-remote-step-actions" class="wcf-template-header">
|
145 |
-
<div class="wcf-template-logo-wrap">
|
146 |
-
<span class="wcf-cartflows-logo-img">
|
147 |
-
<span class="cartflows-logo-icon"></span>
|
148 |
-
</span>
|
149 |
-
<span class="wcf-cartflows-title"><?php esc_html_e( 'Steps Library', 'cartflows' ); ?></span>
|
150 |
-
</div>
|
151 |
-
<div class="wcf-tab-wrapper">
|
152 |
-
<?php if ( 'other' !== $default_page_builder ) { ?>
|
153 |
-
<div id="wcf-get-started-steps">
|
154 |
-
<ul class="filter-links ">
|
155 |
-
<li>
|
156 |
-
<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>
|
157 |
-
</li>
|
158 |
-
<li>
|
159 |
-
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
160 |
-
</li>
|
161 |
-
</ul>
|
162 |
-
</div>
|
163 |
-
<?php } ?>
|
164 |
-
</div>
|
165 |
-
<div class="wcf-popup-close-wrap">
|
166 |
-
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
167 |
-
</div>
|
168 |
-
</div>
|
169 |
-
|
170 |
-
<!--<div class="wcf-search-form">
|
171 |
-
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
172 |
-
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
173 |
-
</div>-->
|
174 |
-
|
175 |
-
<div id="wcf-remote-content">
|
176 |
-
<?php if ( 'other' !== $default_page_builder ) { ?>
|
177 |
-
<div id="wcf-ready-templates">
|
178 |
-
<div id="wcf-remote-filters">
|
179 |
-
<div id="wcf-page-builders"></div>
|
180 |
-
<div id="wcf-categories"></div>
|
181 |
-
</div>
|
182 |
-
<div class="wcf-page-builder-notice"></div>
|
183 |
-
<div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
184 |
-
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
185 |
-
</div>
|
186 |
-
<?php } ?>
|
187 |
-
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
188 |
-
<div class="inner">
|
189 |
-
<div id="wcf-scratch-steps-categories">
|
190 |
-
<select class="step-type-filter-links filter-links">
|
191 |
-
<option value="" class="current"> Select Step Type </option>
|
192 |
-
|
193 |
-
<?php foreach ( $steps as $key => $value ) { ?>
|
194 |
-
<option class="<?php echo $key; ?>" data-slug="<?php echo $key; ?>" data-title="<?php echo $key; ?>"><?php echo $value; ?></option>
|
195 |
-
<?php } ?>
|
196 |
-
</select>
|
197 |
-
</div>
|
198 |
-
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create Step', 'cartflows' ); ?></a>
|
199 |
-
<?php if ( ! _is_cartflows_pro() ) { ?>
|
200 |
-
<div class="wcf-template-notice"><p><?php echo esc_html__( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
|
201 |
-
<?php } ?>
|
202 |
-
<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>
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
</div>
|
206 |
-
</div>
|
207 |
-
</div>
|
208 |
-
</div><!-- .wcf-templates-popup-overlay -->
|
209 |
-
</div>
|
210 |
-
<?php
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View Flow steps
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
9 |
+
|
10 |
+
$steps = array(
|
11 |
+
'landing' => __( 'Landing', 'cartflows' ),
|
12 |
+
'checkout' => __( 'Checkout (Woo)', 'cartflows' ),
|
13 |
+
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
+
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
+
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
16 |
+
'optin' => __( 'Optin (Woo)', 'cartflows' ),
|
17 |
+
);
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="wcf-flow-steps-meta-box">
|
21 |
+
<div class="wcf-flow-settings">
|
22 |
+
<?php do_action( 'cartflows_above_flow_steps' ); ?>
|
23 |
+
<div class="wcf-flow-steps-wrap">
|
24 |
+
<div class="wcf-flow-steps-container">
|
25 |
+
<?php if ( is_array( $options['steps'] ) ) { ?>
|
26 |
+
<?php foreach ( $options['steps'] as $index => $data ) { ?>
|
27 |
+
<?php
|
28 |
+
$term_slug = '';
|
29 |
+
$term_name = '';
|
30 |
+
$step_wrap_class = '';
|
31 |
+
$has_product_assigned = true;
|
32 |
+
$is_global_checkout = '';
|
33 |
+
$common = '';
|
34 |
+
$data_step_id = intval( $data['id'] );
|
35 |
+
|
36 |
+
if ( isset( $data['type'] ) ) {
|
37 |
+
$term_slug = $data['type'];
|
38 |
+
$term_name = $steps[ $data['type'] ];
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( ! _is_cartflows_pro() && ( 'upsell' === $term_slug || 'downsell' === $term_slug ) ) {
|
42 |
+
$step_wrap_class .= ' invalid-step';
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( isset( $_GET['highlight-step-id'] ) ) { //phpcs:ignore
|
46 |
+
|
47 |
+
$highlight_step_id = intval( $_GET['highlight-step-id'] ); //phpcs:ignore
|
48 |
+
|
49 |
+
if ( $highlight_step_id === $data_step_id ) {
|
50 |
+
$step_wrap_class .= ' wcf-new-step-highlight';
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( 'checkout' === $term_slug ) {
|
55 |
+
|
56 |
+
$common = Cartflows_Helper::get_common_settings();
|
57 |
+
|
58 |
+
$is_global_checkout = (int) $common['global_checkout'];
|
59 |
+
|
60 |
+
if ( $data['id'] === $is_global_checkout ) {
|
61 |
+
$step_wrap_class .= ' wcf-global-checkout';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( 'upsell' === $term_slug || 'downsell' === $term_slug || 'checkout' === $term_slug ) {
|
66 |
+
|
67 |
+
$has_product_assigned = Cartflows_Helper::has_product_assigned( $data['id'] );
|
68 |
+
|
69 |
+
if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
|
70 |
+
$step_wrap_class .= ' wcf-no-product-step';
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
?>
|
75 |
+
<div class="wcf-step-wrap <?php echo $step_wrap_class; ?>" data-id="<?php echo $data['id']; ?>" data-term-slug="<?php echo esc_attr( $term_slug ); ?>">
|
76 |
+
<div class="wcf-step">
|
77 |
+
<div class="wcf-step-left-content">
|
78 |
+
<span class="dashicons dashicons-menu"></span>
|
79 |
+
<span><?php echo wp_trim_words( get_the_title( $data['id'] ), 3 ); ?></span>
|
80 |
+
<span class="wcf-flow-badge"><?php echo esc_attr( $term_name ); ?></span>
|
81 |
+
|
82 |
+
<?php
|
83 |
+
if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
|
84 |
+
?>
|
85 |
+
<span class="wcf-no-product-badge"><?php esc_html_e( 'No Product Assigned', 'cartflows' ); ?></span>
|
86 |
+
<?php
|
87 |
+
} elseif ( ( $has_product_assigned ) && ( $data['id'] === $is_global_checkout ) ) {
|
88 |
+
?>
|
89 |
+
<span class="wcf-global-checkout-badge wcf-error-badge"><?php esc_html_e( 'Global Checkout - Remove selected checkout product', 'cartflows' ); ?></span>
|
90 |
+
<?php
|
91 |
+
} elseif ( ( ! $has_product_assigned ) && $data['id'] === $is_global_checkout ) {
|
92 |
+
?>
|
93 |
+
<span class="wcf-global-checkout-badge"><?php esc_html_e( 'Global Checkout', 'cartflows' ); ?></span>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
?>
|
97 |
+
|
98 |
+
<input type="hidden" class="wcf-steps-hidden" name="wcf-steps[]" value="<?php echo $data['id']; ?>">
|
99 |
+
<?php do_action( 'cartflows_step_left_content', $data['id'], $term_slug ); ?>
|
100 |
+
</div>
|
101 |
+
<div class="wcf-steps-action-buttons">
|
102 |
+
<a href="<?php echo get_permalink( $data['id'] ); ?>" target="_blank" class="wcf-step-view wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'View Step', 'cartflows' ); ?>" >
|
103 |
+
<span class="dashicons dashicons-visibility"></span>
|
104 |
+
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'View', 'cartflows' ); ?></span>
|
105 |
+
</a>
|
106 |
+
<a href="<?php echo get_edit_post_link( $data['id'] ); ?>" class="wcf-step-edit wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Edit Step', 'cartflows' ); ?>" >
|
107 |
+
<span class="dashicons dashicons-edit"></span>
|
108 |
+
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Edit', 'cartflows' ); ?></span>
|
109 |
+
</a>
|
110 |
+
<?php
|
111 |
+
if ( _is_cartflows_pro() ) {
|
112 |
+
?>
|
113 |
+
<a href="<?php echo wp_nonce_url( 'admin.php?action=cartflows_clone_step&post=' . $data['id'], 'step_clone', 'step_clone_nonce' ); ?>" class="wcf-step-clone wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Clone Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
|
114 |
+
<span class="dashicons dashicons-admin-page"></span>
|
115 |
+
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Clone', 'cartflows' ); ?></span>
|
116 |
+
</a>
|
117 |
+
<?php } ?>
|
118 |
+
<a href="#" class="wcf-step-delete wcf-action-button wp-ui-text-highlight" title="<?php echo esc_html__( 'Delete Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
|
119 |
+
<span class="dashicons dashicons-trash"></span>
|
120 |
+
<span class="wcf-step-act-btn-text"><?php echo esc_html__( 'Delete', 'cartflows' ); ?></span>
|
121 |
+
</a>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
</div><!-- .wcf-step-wrap -->
|
125 |
+
<?php } ?>
|
126 |
+
<?php } ?>
|
127 |
+
</div><!-- .wcf-flow-steps-container -->
|
128 |
+
</div> <!-- .wcf-flow-steps-wrap -->
|
129 |
+
<div class="wcf-flow-buttons-wrap"> <!-- .wcf-flow-buttons-wrap -->
|
130 |
+
<?php do_action( 'cartflows_bellow_flow_steps' ); ?>
|
131 |
+
<div class='wcf-add-new-step-btn-wrap'>
|
132 |
+
<button class='wcf-trigger-popup button button-primary'>
|
133 |
+
<?php echo esc_html__( 'Add New Step', 'cartflows' ); ?>
|
134 |
+
</button>
|
135 |
+
</div>
|
136 |
+
</div><!-- .wcf-flow-buttons-wrap -->
|
137 |
+
</div><!-- .wcf-flow-settings -->
|
138 |
+
|
139 |
+
<div id="wcf-remote-step-importer" class="wcf-templates-popup-overlay">
|
140 |
+
<div class="wcf-templates-popup-content">
|
141 |
+
<div class="spinner"></div>
|
142 |
+
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
143 |
+
|
144 |
+
<div id="wcf-remote-step-actions" class="wcf-template-header">
|
145 |
+
<div class="wcf-template-logo-wrap">
|
146 |
+
<span class="wcf-cartflows-logo-img">
|
147 |
+
<span class="cartflows-logo-icon"></span>
|
148 |
+
</span>
|
149 |
+
<span class="wcf-cartflows-title"><?php esc_html_e( 'Steps Library', 'cartflows' ); ?></span>
|
150 |
+
</div>
|
151 |
+
<div class="wcf-tab-wrapper">
|
152 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
153 |
+
<div id="wcf-get-started-steps">
|
154 |
+
<ul class="filter-links ">
|
155 |
+
<li>
|
156 |
+
<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>
|
157 |
+
</li>
|
158 |
+
<li>
|
159 |
+
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
160 |
+
</li>
|
161 |
+
</ul>
|
162 |
+
</div>
|
163 |
+
<?php } ?>
|
164 |
+
</div>
|
165 |
+
<div class="wcf-popup-close-wrap">
|
166 |
+
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<!--<div class="wcf-search-form">
|
171 |
+
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
172 |
+
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
173 |
+
</div>-->
|
174 |
+
|
175 |
+
<div id="wcf-remote-content">
|
176 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
177 |
+
<div id="wcf-ready-templates">
|
178 |
+
<div id="wcf-remote-filters">
|
179 |
+
<div id="wcf-page-builders"></div>
|
180 |
+
<div id="wcf-categories"></div>
|
181 |
+
</div>
|
182 |
+
<div class="wcf-page-builder-notice"></div>
|
183 |
+
<div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
184 |
+
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
185 |
+
</div>
|
186 |
+
<?php } ?>
|
187 |
+
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
188 |
+
<div class="inner">
|
189 |
+
<div id="wcf-scratch-steps-categories">
|
190 |
+
<select class="step-type-filter-links filter-links">
|
191 |
+
<option value="" class="current"> Select Step Type </option>
|
192 |
+
|
193 |
+
<?php foreach ( $steps as $key => $value ) { ?>
|
194 |
+
<option class="<?php echo $key; ?>" data-slug="<?php echo $key; ?>" data-title="<?php echo $key; ?>"><?php echo $value; ?></option>
|
195 |
+
<?php } ?>
|
196 |
+
</select>
|
197 |
+
</div>
|
198 |
+
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create Step', 'cartflows' ); ?></a>
|
199 |
+
<?php if ( ! _is_cartflows_pro() ) { ?>
|
200 |
+
<div class="wcf-template-notice"><p><?php echo esc_html__( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
|
201 |
+
<?php } ?>
|
202 |
+
<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>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
</div><!-- .wcf-templates-popup-overlay -->
|
209 |
+
</div>
|
210 |
+
<?php
|
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,10 @@ Glad you asked! CartFlows Pro is an optional add-on to CartFlows that adds addit
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
128 |
= Version 1.4.2 - Wednesday, 19th February 2020 =
|
129 |
* New: Added option to change default order confirmations text on thank you page.
|
130 |
* New: Added ability to set optin step type as a home page.
|
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.5.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.5.0 - Wednesday, 4th March 2020 =
|
129 |
+
* New: Native Google Analytics support added.
|
130 |
+
* Fix: PHP error in Elementor preview if WooCommerce was not installed and the Facebook Pixel setting was enabled.
|
131 |
+
|
132 |
= Version 1.4.2 - Wednesday, 19th February 2020 =
|
133 |
* New: Added option to change default order confirmations text on thank you page.
|
134 |
* New: Added ability to set optin step type as a home page.
|