Version Description
Download this release
Release Info
Developer | cartflowswp |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.8.0 to 1.8.1
- admin-core/ajax/flows-stats.php +6 -14
- admin-core/ajax/flows.php +6 -17
- admin-core/ajax/steps.php +3 -8
- cartflows.php +2 -2
- changelog.txt +4 -0
- classes/class-cartflows-admin.php +26 -0
- classes/class-cartflows-cloning.php +0 -473
- classes/class-cartflows-flow-frontend.php +3 -5
- classes/class-cartflows-loader.php +1 -3
- classes/class-cartflows-tracking.php +4 -72
- classes/importer/batch-process/helpers/class-cartflows-importer-image.php +0 -2
- classes/importer/class-cartflows-api.php +0 -4
- languages/cartflows.pot +29 -36
- modules/checkout/classes/class-cartflows-checkout-markup.php +3 -2
- modules/woo-dynamic-flow/classes/class-cartflows-wd-flow-shortcodes.php +3 -6
- readme.txt +6 -2
admin-core/ajax/flows-stats.php
CHANGED
@@ -162,13 +162,10 @@ class FlowsStats extends AjaxBase {
|
|
162 |
|
163 |
$query = 'SELECT tb1.ID, DATE( tb1.post_date ) date, tb2.meta_value FROM ' . $wpdb->prefix . 'posts tb1
|
164 |
INNER JOIN ' . $wpdb->prefix . 'postmeta tb2
|
165 |
-
ON tb1.ID = tb2.post_id
|
166 |
-
|
167 |
-
|
168 |
-
// @codingStandardsIgnoreStart.
|
169 |
-
return $wpdb->get_results( $query );
|
170 |
-
// @codingStandardsIgnoreEnd.
|
171 |
|
|
|
172 |
}
|
173 |
|
174 |
|
@@ -183,23 +180,18 @@ class FlowsStats extends AjaxBase {
|
|
183 |
global $wpdb;
|
184 |
|
185 |
$where_conditions = array();
|
186 |
-
$where_values = array();
|
187 |
|
188 |
foreach ( $conditions as $key => $condition ) {
|
189 |
|
190 |
if ( false !== stripos( $key, 'IN' ) ) {
|
191 |
-
$where_conditions[] = $key . '( %s )';
|
192 |
} else {
|
193 |
-
$where_conditions[] = $key . '= %s';
|
194 |
}
|
195 |
-
|
196 |
-
$where_values[] = $condition;
|
197 |
}
|
198 |
|
199 |
if ( ! empty( $where_conditions ) ) {
|
200 |
-
|
201 |
-
return $wpdb->prepare( 'WHERE 1 = 1 AND ' . implode( ' AND ', $where_conditions ), $where_values );
|
202 |
-
// @codingStandardsIgnoreEnd
|
203 |
} else {
|
204 |
return '';
|
205 |
}
|
162 |
|
163 |
$query = 'SELECT tb1.ID, DATE( tb1.post_date ) date, tb2.meta_value FROM ' . $wpdb->prefix . 'posts tb1
|
164 |
INNER JOIN ' . $wpdb->prefix . 'postmeta tb2
|
165 |
+
ON tb1.ID = tb2.post_id '
|
166 |
+
. $where;
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
return $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
169 |
}
|
170 |
|
171 |
|
180 |
global $wpdb;
|
181 |
|
182 |
$where_conditions = array();
|
|
|
183 |
|
184 |
foreach ( $conditions as $key => $condition ) {
|
185 |
|
186 |
if ( false !== stripos( $key, 'IN' ) ) {
|
187 |
+
$where_conditions[] = $key . $wpdb->prepare( '( %s )', $condition );
|
188 |
} else {
|
189 |
+
$where_conditions[] = $key . $wpdb->prepare( '= %s', $condition );
|
190 |
}
|
|
|
|
|
191 |
}
|
192 |
|
193 |
if ( ! empty( $where_conditions ) ) {
|
194 |
+
return 'WHERE 1 = 1 AND ' . implode( ' AND ', $where_conditions );
|
|
|
|
|
195 |
} else {
|
196 |
return '';
|
197 |
}
|
admin-core/ajax/flows.php
CHANGED
@@ -511,11 +511,9 @@ class Flows extends AjaxBase {
|
|
511 |
/**
|
512 |
* Duplicate all post meta just in two SQL queries
|
513 |
*/
|
514 |
-
// @codingStandardsIgnoreStart
|
515 |
$post_meta_infos = $wpdb->get_results(
|
516 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id
|
517 |
);
|
518 |
-
// @codingStandardsIgnoreEnd
|
519 |
|
520 |
if ( ! empty( $post_meta_infos ) ) {
|
521 |
|
@@ -531,16 +529,13 @@ class Flows extends AjaxBase {
|
|
531 |
continue;
|
532 |
}
|
533 |
|
534 |
-
$
|
535 |
|
536 |
-
$sql_query_sel[] = "($new_flow_id, '$meta_key', '$meta_value')";
|
537 |
}
|
538 |
|
539 |
$sql_query .= implode( ',', $sql_query_sel );
|
540 |
|
541 |
-
//
|
542 |
-
$wpdb->query( $sql_query );
|
543 |
-
// @codingStandardsIgnoreEnd
|
544 |
}
|
545 |
|
546 |
/* Steps Cloning */
|
@@ -586,11 +581,9 @@ class Flows extends AjaxBase {
|
|
586 |
/**
|
587 |
* Duplicate all step meta
|
588 |
*/
|
589 |
-
// @codingStandardsIgnoreStart
|
590 |
$post_meta_infos = $wpdb->get_results(
|
591 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id
|
592 |
);
|
593 |
-
// @codingStandardsIgnoreEnd
|
594 |
|
595 |
if ( ! empty( $post_meta_infos ) ) {
|
596 |
|
@@ -606,16 +599,12 @@ class Flows extends AjaxBase {
|
|
606 |
continue;
|
607 |
}
|
608 |
|
609 |
-
$
|
610 |
-
|
611 |
-
$sql_query_sel[] = "($new_step_id, '$meta_key', '$meta_value')";
|
612 |
}
|
613 |
|
614 |
$sql_query .= implode( ',', $sql_query_sel );
|
615 |
|
616 |
-
//
|
617 |
-
$wpdb->query( $sql_query );
|
618 |
-
// @codingStandardsIgnoreEnd
|
619 |
}
|
620 |
|
621 |
// insert post meta.
|
511 |
/**
|
512 |
* Duplicate all post meta just in two SQL queries
|
513 |
*/
|
|
|
514 |
$post_meta_infos = $wpdb->get_results(
|
515 |
+
$wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=%d", $post_id )
|
516 |
);
|
|
|
517 |
|
518 |
if ( ! empty( $post_meta_infos ) ) {
|
519 |
|
529 |
continue;
|
530 |
}
|
531 |
|
532 |
+
$sql_query_sel[] = $wpdb->prepare( '( %d, %s, %s )', $new_flow_id, $meta_key, $meta_info->meta_value );
|
533 |
|
|
|
534 |
}
|
535 |
|
536 |
$sql_query .= implode( ',', $sql_query_sel );
|
537 |
|
538 |
+
$wpdb->query( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
|
|
|
|
539 |
}
|
540 |
|
541 |
/* Steps Cloning */
|
581 |
/**
|
582 |
* Duplicate all step meta
|
583 |
*/
|
|
|
584 |
$post_meta_infos = $wpdb->get_results(
|
585 |
+
$wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=%d", $step_id )
|
586 |
);
|
|
|
587 |
|
588 |
if ( ! empty( $post_meta_infos ) ) {
|
589 |
|
599 |
continue;
|
600 |
}
|
601 |
|
602 |
+
$sql_query_sel[] = $wpdb->prepare( '( %d, %s, %s )', $new_step_id, $meta_key, $meta_info->meta_value );
|
|
|
|
|
603 |
}
|
604 |
|
605 |
$sql_query .= implode( ',', $sql_query_sel );
|
606 |
|
607 |
+
$wpdb->query( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
|
|
|
|
608 |
}
|
609 |
|
610 |
// insert post meta.
|
admin-core/ajax/steps.php
CHANGED
@@ -205,11 +205,9 @@ class Steps extends AjaxBase {
|
|
205 |
/**
|
206 |
* Duplicate all post meta just in two SQL queries
|
207 |
*/
|
208 |
-
// @codingStandardsIgnoreStart
|
209 |
$post_meta_infos = $wpdb->get_results(
|
210 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id
|
211 |
);
|
212 |
-
// @codingStandardsIgnoreEnd
|
213 |
|
214 |
if ( ! empty( $post_meta_infos ) ) {
|
215 |
|
@@ -225,16 +223,13 @@ class Steps extends AjaxBase {
|
|
225 |
continue;
|
226 |
}
|
227 |
|
228 |
-
$
|
229 |
|
230 |
-
$sql_query_sel[] = "($new_step_id, '$meta_key', '$meta_value')";
|
231 |
}
|
232 |
|
233 |
$sql_query .= implode( ',', $sql_query_sel );
|
234 |
|
235 |
-
//
|
236 |
-
$wpdb->query( $sql_query );
|
237 |
-
// @codingStandardsIgnoreEnd
|
238 |
}
|
239 |
|
240 |
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
205 |
/**
|
206 |
* Duplicate all post meta just in two SQL queries
|
207 |
*/
|
|
|
208 |
$post_meta_infos = $wpdb->get_results(
|
209 |
+
$wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=%d", $step_id )
|
210 |
);
|
|
|
211 |
|
212 |
if ( ! empty( $post_meta_infos ) ) {
|
213 |
|
223 |
continue;
|
224 |
}
|
225 |
|
226 |
+
$sql_query_sel[] = $wpdb->prepare( '( %d, %s, %s )', $new_step_id, $meta_key, $meta_info->meta_value );
|
227 |
|
|
|
228 |
}
|
229 |
|
230 |
$sql_query .= implode( ',', $sql_query_sel );
|
231 |
|
232 |
+
$wpdb->query( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
|
|
|
|
233 |
}
|
234 |
|
235 |
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
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.8.
|
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: 6.
|
12 |
* Elementor tested up to: 3.5.0
|
13 |
*
|
14 |
* @package CartFlows
|
3 |
* Plugin Name: CartFlows
|
4 |
* Plugin URI: https://cartflows.com/
|
5 |
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
+
* Version: 1.8.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: 6.1.1
|
12 |
* Elementor tested up to: 3.5.0
|
13 |
*
|
14 |
* @package CartFlows
|
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
Version 1.8.0 - Tuesday, 28th December 2021
|
2 |
- New: Introduced Canvas 1.0 for a better overview of the flow.
|
3 |
- New: Introduced a new option to override the global checkout page.
|
1 |
+
Version 1.8.1 - Tuesday, 25th January 2022
|
2 |
+
- Security Fix: Hardened the security of the plugin as suggested by Wordfence.
|
3 |
+
- Fix: Showing incorrect product price in GA event in some cases.
|
4 |
+
|
5 |
Version 1.8.0 - Tuesday, 28th December 2021
|
6 |
- New: Introduced Canvas 1.0 for a better overview of the flow.
|
7 |
- New: Introduced a new option to override the global checkout page.
|
classes/class-cartflows-admin.php
CHANGED
@@ -64,6 +64,32 @@ class Cartflows_Admin {
|
|
64 |
add_action( 'in_admin_header', array( $this, 'embed_page_header' ) );
|
65 |
|
66 |
add_action( 'admin_init', array( $this, 'flush_rules_after_save_permalinks' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
64 |
add_action( 'in_admin_header', array( $this, 'embed_page_header' ) );
|
65 |
|
66 |
add_action( 'admin_init', array( $this, 'flush_rules_after_save_permalinks' ) );
|
67 |
+
|
68 |
+
add_filter( 'post_row_actions', array( $this, 'remove_flow_actions' ), 99, 2 );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Add the clone link to action list for flows row actions
|
73 |
+
*
|
74 |
+
* @param array $actions Actions array.
|
75 |
+
* @param object $post Post object.
|
76 |
+
*
|
77 |
+
* @return array
|
78 |
+
*/
|
79 |
+
public function remove_flow_actions( $actions, $post ) {
|
80 |
+
|
81 |
+
if ( current_user_can( 'edit_posts' ) && isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
82 |
+
|
83 |
+
if ( isset( $actions['duplicate'] ) ) { // Duplicate page plugin remove.
|
84 |
+
unset( $actions['duplicate'] );
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( isset( $actions['edit_as_new_draft'] ) ) { // Duplicate post plugin remove.
|
88 |
+
unset( $actions['edit_as_new_draft'] );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
return $actions;
|
93 |
}
|
94 |
|
95 |
/**
|
classes/class-cartflows-cloning.php
DELETED
@@ -1,473 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cloning.
|
4 |
-
*
|
5 |
-
* @package cartflows-pro
|
6 |
-
*/
|
7 |
-
|
8 |
-
// Exit if accessed directly.
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
/**
|
13 |
-
* Initialization
|
14 |
-
*
|
15 |
-
* @since 1.0.0
|
16 |
-
*/
|
17 |
-
class Cartflows_Cloning {
|
18 |
-
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Member Variable
|
22 |
-
*
|
23 |
-
* @var instance
|
24 |
-
*/
|
25 |
-
private static $instance;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Initiator
|
29 |
-
*/
|
30 |
-
public static function get_instance() {
|
31 |
-
if ( ! isset( self::$instance ) ) {
|
32 |
-
self::$instance = new self();
|
33 |
-
}
|
34 |
-
return self::$instance;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Constructor
|
39 |
-
*/
|
40 |
-
public function __construct() {
|
41 |
-
|
42 |
-
add_filter( 'post_row_actions', array( $this, 'clone_link' ), 99, 2 );
|
43 |
-
add_action( 'admin_action_cartflows_clone_flow', array( $this, 'clone_flow' ) );
|
44 |
-
add_action( 'wp_ajax_cartflows_clone_flow_step', array( $this, 'clone_step' ) );
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Clone flow with steps and its meta.
|
49 |
-
*/
|
50 |
-
public function clone_flow() {
|
51 |
-
|
52 |
-
global $wpdb;
|
53 |
-
|
54 |
-
if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'cartflows_clone_flow' === $_REQUEST['action'] ) ) ) {
|
55 |
-
wp_die( 'No post to duplicate has been supplied!' );
|
56 |
-
}
|
57 |
-
|
58 |
-
/*
|
59 |
-
* Nonce verification
|
60 |
-
*/
|
61 |
-
if ( ! isset( $_GET['flow_clone_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['flow_clone_nonce'] ) ), basename( __FILE__ ) ) ) {
|
62 |
-
return;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Get the original post id
|
67 |
-
*/
|
68 |
-
$post_id = ( isset( $_GET['post'] ) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
|
69 |
-
|
70 |
-
/**
|
71 |
-
* And all the original post data then
|
72 |
-
*/
|
73 |
-
$post = get_post( $post_id );
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Assign current user to be the new post author
|
77 |
-
*/
|
78 |
-
$current_user = wp_get_current_user();
|
79 |
-
$new_post_author = $current_user->ID;
|
80 |
-
|
81 |
-
/**
|
82 |
-
* If post data exists, create the post duplicate
|
83 |
-
*/
|
84 |
-
if ( isset( $post ) && null !== $post ) {
|
85 |
-
|
86 |
-
/**
|
87 |
-
* New post data array
|
88 |
-
*/
|
89 |
-
|
90 |
-
$args = array(
|
91 |
-
'comment_status' => $post->comment_status,
|
92 |
-
'ping_status' => $post->ping_status,
|
93 |
-
'post_author' => $new_post_author,
|
94 |
-
'post_content' => $post->post_content,
|
95 |
-
'post_excerpt' => $post->post_excerpt,
|
96 |
-
'post_name' => $post->post_name,
|
97 |
-
'post_parent' => $post->post_parent,
|
98 |
-
'post_password' => $post->post_password,
|
99 |
-
'post_status' => $post->post_status,
|
100 |
-
'post_title' => $post->post_title . ' Clone',
|
101 |
-
'post_type' => $post->post_type,
|
102 |
-
'to_ping' => $post->to_ping,
|
103 |
-
'menu_order' => $post->menu_order,
|
104 |
-
);
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Insert the post
|
108 |
-
*/
|
109 |
-
$new_flow_id = wp_insert_post( $args );
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Get all current post terms ad set them to the new post
|
113 |
-
*/
|
114 |
-
// returns array of taxonomy names for post type, ex array("category", "post_tag");.
|
115 |
-
$taxonomies = get_object_taxonomies( $post->post_type );
|
116 |
-
|
117 |
-
foreach ( $taxonomies as $taxonomy ) {
|
118 |
-
|
119 |
-
$post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) );
|
120 |
-
|
121 |
-
wp_set_object_terms( $new_flow_id, $post_terms, $taxonomy, false );
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Duplicate all post meta just in two SQL queries
|
126 |
-
*/
|
127 |
-
// @codingStandardsIgnoreStart
|
128 |
-
$post_meta_infos = $wpdb->get_results(
|
129 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id"
|
130 |
-
);
|
131 |
-
// @codingStandardsIgnoreEnd
|
132 |
-
|
133 |
-
if ( ! empty( $post_meta_infos ) ) {
|
134 |
-
|
135 |
-
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) VALUES ";
|
136 |
-
|
137 |
-
$sql_query_sel = array();
|
138 |
-
|
139 |
-
foreach ( $post_meta_infos as $meta_info ) {
|
140 |
-
|
141 |
-
$meta_key = $meta_info->meta_key;
|
142 |
-
|
143 |
-
if ( '_wp_old_slug' === $meta_key ) {
|
144 |
-
continue;
|
145 |
-
}
|
146 |
-
|
147 |
-
$meta_value = addslashes( $meta_info->meta_value );
|
148 |
-
|
149 |
-
$sql_query_sel[] = "($new_flow_id, '$meta_key', '$meta_value')";
|
150 |
-
}
|
151 |
-
|
152 |
-
$sql_query .= implode( ',', $sql_query_sel );
|
153 |
-
|
154 |
-
// @codingStandardsIgnoreStart
|
155 |
-
$wpdb->query( $sql_query );
|
156 |
-
// @codingStandardsIgnoreEnd
|
157 |
-
}
|
158 |
-
|
159 |
-
/* Steps Cloning */
|
160 |
-
$flow_steps = get_post_meta( $post_id, 'wcf-steps', true );
|
161 |
-
$new_flow_steps = array();
|
162 |
-
|
163 |
-
/* Set Steps Empty */
|
164 |
-
update_post_meta( $new_flow_id, 'wcf-steps', $new_flow_steps );
|
165 |
-
|
166 |
-
if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) {
|
167 |
-
|
168 |
-
foreach ( $flow_steps as $index => $step_data ) {
|
169 |
-
|
170 |
-
$step_id = $step_data['id'];
|
171 |
-
$step_type = get_post_meta( $step_id, 'wcf-step-type', true );
|
172 |
-
|
173 |
-
$step_object = get_post( $step_id );
|
174 |
-
|
175 |
-
/**
|
176 |
-
* New step post data array
|
177 |
-
*/
|
178 |
-
$step_args = array(
|
179 |
-
'comment_status' => $step_object->comment_status,
|
180 |
-
'ping_status' => $step_object->ping_status,
|
181 |
-
'post_author' => $new_post_author,
|
182 |
-
'post_content' => $step_object->post_content,
|
183 |
-
'post_excerpt' => $step_object->post_excerpt,
|
184 |
-
'post_name' => $step_object->post_name,
|
185 |
-
'post_parent' => $step_object->post_parent,
|
186 |
-
'post_password' => $step_object->post_password,
|
187 |
-
'post_status' => $step_object->post_status,
|
188 |
-
'post_title' => $step_object->post_title,
|
189 |
-
'post_type' => $step_object->post_type,
|
190 |
-
'to_ping' => $step_object->to_ping,
|
191 |
-
'menu_order' => $step_object->menu_order,
|
192 |
-
);
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Insert the post
|
196 |
-
*/
|
197 |
-
$new_step_id = wp_insert_post( $step_args );
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Duplicate all step meta
|
201 |
-
*/
|
202 |
-
// @codingStandardsIgnoreStart
|
203 |
-
$post_meta_infos = $wpdb->get_results(
|
204 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$step_id"
|
205 |
-
);
|
206 |
-
// @codingStandardsIgnoreEnd
|
207 |
-
|
208 |
-
if ( ! empty( $post_meta_infos ) ) {
|
209 |
-
|
210 |
-
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) VALUES ";
|
211 |
-
|
212 |
-
$sql_query_sel = array();
|
213 |
-
|
214 |
-
foreach ( $post_meta_infos as $meta_info ) {
|
215 |
-
|
216 |
-
$meta_key = $meta_info->meta_key;
|
217 |
-
|
218 |
-
if ( '_wp_old_slug' === $meta_key ) {
|
219 |
-
continue;
|
220 |
-
}
|
221 |
-
|
222 |
-
$meta_value = addslashes( $meta_info->meta_value );
|
223 |
-
|
224 |
-
$sql_query_sel[] = "($new_step_id, '$meta_key', '$meta_value')";
|
225 |
-
}
|
226 |
-
|
227 |
-
$sql_query .= implode( ',', $sql_query_sel );
|
228 |
-
|
229 |
-
// @codingStandardsIgnoreStart
|
230 |
-
$wpdb->query( $sql_query );
|
231 |
-
// @codingStandardsIgnoreEnd
|
232 |
-
}
|
233 |
-
|
234 |
-
// insert post meta.
|
235 |
-
update_post_meta( $new_step_id, 'wcf-flow-id', $new_flow_id );
|
236 |
-
update_post_meta( $new_step_id, 'wcf-step-type', $step_type );
|
237 |
-
|
238 |
-
wp_set_object_terms( $new_step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
239 |
-
wp_set_object_terms( $new_step_id, 'flow-' . $new_flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
240 |
-
|
241 |
-
/* Add New Flow Steps */
|
242 |
-
$new_flow_steps[] = array(
|
243 |
-
'id' => $new_step_id,
|
244 |
-
'title' => $step_object->post_title,
|
245 |
-
'type' => $step_type,
|
246 |
-
);
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
/* Update New Flow Step Post Meta */
|
251 |
-
update_post_meta( $new_flow_id, 'wcf-steps', $new_flow_steps );
|
252 |
-
|
253 |
-
/* Clear Page Builder Cache */
|
254 |
-
$this->clear_cache();
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Redirect to the new flow edit screen
|
258 |
-
*/
|
259 |
-
wp_safe_redirect( admin_url( 'post.php?action=edit&post=' . $new_flow_id ) );
|
260 |
-
exit;
|
261 |
-
} else {
|
262 |
-
wp_die( 'Post creation failed, could not find original post: ' . $post_id );
|
263 |
-
}
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Clone step with its meta.
|
268 |
-
*/
|
269 |
-
public function clone_step() {
|
270 |
-
|
271 |
-
global $wpdb;
|
272 |
-
|
273 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
274 |
-
return;
|
275 |
-
}
|
276 |
-
|
277 |
-
check_ajax_referer( 'wcf-clone-flow-step', 'security' );
|
278 |
-
|
279 |
-
if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) ) {
|
280 |
-
$flow_id = intval( $_POST['post_id'] );
|
281 |
-
$step_id = intval( $_POST['step_id'] );
|
282 |
-
}
|
283 |
-
|
284 |
-
$result = array(
|
285 |
-
'status' => false,
|
286 |
-
'reload' => true,
|
287 |
-
/* translators: %s flow id */
|
288 |
-
'text' => sprintf( __( 'Can\'t clone this step - %1$s. Flow - %2$s', 'cartflows' ), $step_id, $flow_id ),
|
289 |
-
);
|
290 |
-
|
291 |
-
if ( ! $flow_id || ! $step_id ) {
|
292 |
-
wp_send_json( $result );
|
293 |
-
}
|
294 |
-
|
295 |
-
/**
|
296 |
-
* And all the original post data then
|
297 |
-
*/
|
298 |
-
$post = get_post( $step_id );
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Assign current user to be the new post author
|
302 |
-
*/
|
303 |
-
$current_user = wp_get_current_user();
|
304 |
-
$new_post_author = $current_user->ID;
|
305 |
-
|
306 |
-
/**
|
307 |
-
* If post data exists, create the post duplicate
|
308 |
-
*/
|
309 |
-
if ( isset( $post ) && null !== $post ) {
|
310 |
-
|
311 |
-
/**
|
312 |
-
* New post data array
|
313 |
-
*/
|
314 |
-
$args = array(
|
315 |
-
'comment_status' => $post->comment_status,
|
316 |
-
'ping_status' => $post->ping_status,
|
317 |
-
'post_author' => $new_post_author,
|
318 |
-
'post_content' => $post->post_content,
|
319 |
-
'post_excerpt' => $post->post_excerpt,
|
320 |
-
'post_name' => $post->post_name,
|
321 |
-
'post_parent' => $post->post_parent,
|
322 |
-
'post_password' => $post->post_password,
|
323 |
-
'post_status' => $post->post_status,
|
324 |
-
'post_title' => $post->post_title . ' Clone',
|
325 |
-
'post_type' => $post->post_type,
|
326 |
-
'to_ping' => $post->to_ping,
|
327 |
-
'menu_order' => $post->menu_order,
|
328 |
-
);
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Insert the post
|
332 |
-
*/
|
333 |
-
$new_step_id = wp_insert_post( $args );
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Get all current post terms ad set them to the new post
|
337 |
-
*/
|
338 |
-
// returns array of taxonomy names for post type, ex array("category", "post_tag");.
|
339 |
-
$taxonomies = get_object_taxonomies( $post->post_type );
|
340 |
-
|
341 |
-
foreach ( $taxonomies as $taxonomy ) {
|
342 |
-
|
343 |
-
$post_terms = wp_get_object_terms( $step_id, $taxonomy, array( 'fields' => 'slugs' ) );
|
344 |
-
|
345 |
-
wp_set_object_terms( $new_step_id, $post_terms, $taxonomy, false );
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Duplicate all post meta just in two SQL queries
|
350 |
-
*/
|
351 |
-
// @codingStandardsIgnoreStart
|
352 |
-
$post_meta_infos = $wpdb->get_results(
|
353 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$step_id"
|
354 |
-
);
|
355 |
-
// @codingStandardsIgnoreEnd
|
356 |
-
|
357 |
-
if ( ! empty( $post_meta_infos ) ) {
|
358 |
-
|
359 |
-
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) VALUES ";
|
360 |
-
|
361 |
-
$sql_query_sel = array();
|
362 |
-
|
363 |
-
foreach ( $post_meta_infos as $meta_info ) {
|
364 |
-
|
365 |
-
$meta_key = $meta_info->meta_key;
|
366 |
-
|
367 |
-
if ( '_wp_old_slug' === $meta_key ) {
|
368 |
-
continue;
|
369 |
-
}
|
370 |
-
|
371 |
-
$meta_value = addslashes( $meta_info->meta_value );
|
372 |
-
|
373 |
-
$sql_query_sel[] = "($new_step_id, '$meta_key', '$meta_value')";
|
374 |
-
}
|
375 |
-
|
376 |
-
$sql_query .= implode( ',', $sql_query_sel );
|
377 |
-
|
378 |
-
// @codingStandardsIgnoreStart
|
379 |
-
$wpdb->query( $sql_query );
|
380 |
-
// @codingStandardsIgnoreEnd
|
381 |
-
}
|
382 |
-
|
383 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
384 |
-
$step_type = get_post_meta( $step_id, 'wcf-step-type', true );
|
385 |
-
|
386 |
-
if ( ! is_array( $flow_steps ) ) {
|
387 |
-
$flow_steps = array();
|
388 |
-
}
|
389 |
-
|
390 |
-
$flow_steps[] = array(
|
391 |
-
'id' => $new_step_id,
|
392 |
-
'title' => $post->post_title,
|
393 |
-
'type' => $step_type,
|
394 |
-
);
|
395 |
-
|
396 |
-
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
397 |
-
|
398 |
-
/* Clear Page Builder Cache */
|
399 |
-
$this->clear_cache();
|
400 |
-
|
401 |
-
$result = array(
|
402 |
-
'status' => true,
|
403 |
-
'reload' => true,
|
404 |
-
/* translators: %s flow id */
|
405 |
-
'text' => sprintf( __( 'Step - %1$s cloned. Flow - %2$s', 'cartflows' ), $step_id, $flow_id ),
|
406 |
-
);
|
407 |
-
}
|
408 |
-
|
409 |
-
wp_send_json( $result );
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Add the clone link to action list for flows row actions
|
414 |
-
*
|
415 |
-
* @param array $actions Actions array.
|
416 |
-
* @param object $post Post object.
|
417 |
-
*
|
418 |
-
* @return array
|
419 |
-
*/
|
420 |
-
public function clone_link( $actions, $post ) {
|
421 |
-
|
422 |
-
if ( current_user_can( 'edit_posts' ) && isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
423 |
-
|
424 |
-
if ( isset( $actions['duplicate'] ) ) { // Duplicate page plugin remove.
|
425 |
-
unset( $actions['duplicate'] );
|
426 |
-
}
|
427 |
-
if ( isset( $actions['edit_as_new_draft'] ) ) { // Duplicate post plugin remove.
|
428 |
-
unset( $actions['edit_as_new_draft'] );
|
429 |
-
}
|
430 |
-
|
431 |
-
$actions['clone'] = '<a href="' . wp_nonce_url( 'admin.php?action=cartflows_clone_flow&post=' . $post->ID, basename( __FILE__ ), 'flow_clone_nonce' ) . '" title="' . __( 'Clone this flow', 'cartflows' ) . '" rel="permalink">' . __( 'Clone', 'cartflows' ) . '</a>';
|
432 |
-
|
433 |
-
if ( ! _is_cartflows_pro() ) {
|
434 |
-
|
435 |
-
$flow_posts = get_posts(
|
436 |
-
array(
|
437 |
-
'posts_per_page' => 4,
|
438 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
439 |
-
'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private' ),
|
440 |
-
)
|
441 |
-
);
|
442 |
-
|
443 |
-
if ( is_array( $flow_posts ) ) {
|
444 |
-
|
445 |
-
$flow_count = count( $flow_posts );
|
446 |
-
|
447 |
-
if ( $flow_count > 3 || 3 === $flow_count ) {
|
448 |
-
unset( $actions['clone'] );
|
449 |
-
}
|
450 |
-
}
|
451 |
-
}
|
452 |
-
}
|
453 |
-
|
454 |
-
return $actions;
|
455 |
-
}
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Clear Page Builder Cache
|
459 |
-
*/
|
460 |
-
public function clear_cache() {
|
461 |
-
|
462 |
-
// Clear 'Elementor' file cache.
|
463 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
464 |
-
Elementor\Plugin::$instance->files_manager->clear_cache();
|
465 |
-
}
|
466 |
-
}
|
467 |
-
|
468 |
-
}
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Kicking this off by calling 'get_instance()' method
|
472 |
-
*/
|
473 |
-
Cartflows_Cloning::get_instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class-cartflows-flow-frontend.php
CHANGED
@@ -49,22 +49,20 @@ class Cartflows_Flow_Frontend {
|
|
49 |
public function footer_markup() {
|
50 |
|
51 |
if ( wcf()->utils->is_step_post_type() ) {
|
52 |
-
// @codingStandardsIgnoreStart
|
53 |
$flow_id = wcf()->utils->get_flow_id();
|
54 |
?>
|
55 |
-
<?php if( $this->is_flow_testmode( $flow_id ) ) { ?>
|
56 |
<div class="wcf-preview-mode">
|
57 |
-
<span><?php
|
58 |
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
59 |
<?php
|
60 |
$flow_edit_link = admin_url( 'admin.php?page=cartflows&action=wcf-edit-flow&flow_id=' . $flow_id . '&tab=settings#sandbox' );
|
61 |
?>
|
62 |
-
<a href="<?php echo $flow_edit_link; ?>"><?php
|
63 |
<?php } ?>
|
64 |
</div>
|
65 |
<?php } ?>
|
66 |
<?php
|
67 |
-
// @codingStandardsIgnoreEnd
|
68 |
}
|
69 |
}
|
70 |
|
49 |
public function footer_markup() {
|
50 |
|
51 |
if ( wcf()->utils->is_step_post_type() ) {
|
|
|
52 |
$flow_id = wcf()->utils->get_flow_id();
|
53 |
?>
|
54 |
+
<?php if ( $this->is_flow_testmode( $flow_id ) ) { ?>
|
55 |
<div class="wcf-preview-mode">
|
56 |
+
<span><?php esc_html_e( 'Test mode is active. It can be deactivated from the flow settings in the admin dashboard.', 'cartflows' ); ?></span>
|
57 |
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
58 |
<?php
|
59 |
$flow_edit_link = admin_url( 'admin.php?page=cartflows&action=wcf-edit-flow&flow_id=' . $flow_id . '&tab=settings#sandbox' );
|
60 |
?>
|
61 |
+
<a href="<?php echo $flow_edit_link; ?>"><?php esc_html_e( 'Click here to disable it', 'cartflows' ); ?></a>
|
62 |
<?php } ?>
|
63 |
</div>
|
64 |
<?php } ?>
|
65 |
<?php
|
|
|
66 |
}
|
67 |
}
|
68 |
|
classes/class-cartflows-loader.php
CHANGED
@@ -140,7 +140,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
140 |
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
141 |
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
142 |
|
143 |
-
define( 'CARTFLOWS_VER', '1.8.
|
144 |
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
145 |
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
146 |
define( 'CARTFLOWS_NAME', 'CartFlows' );
|
@@ -357,8 +357,6 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
|
357 |
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
358 |
|
359 |
if ( is_admin() ) {
|
360 |
-
/* Cloning */
|
361 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
|
362 |
|
363 |
/* Admin helper */
|
364 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
140 |
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
141 |
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
142 |
|
143 |
+
define( 'CARTFLOWS_VER', '1.8.1' );
|
144 |
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
145 |
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
146 |
define( 'CARTFLOWS_NAME', 'CartFlows' );
|
357 |
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
358 |
|
359 |
if ( is_admin() ) {
|
|
|
|
|
360 |
|
361 |
/* Admin helper */
|
362 |
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
classes/class-cartflows-tracking.php
CHANGED
@@ -234,7 +234,7 @@ class Cartflows_Tracking {
|
|
234 |
return $params;
|
235 |
}
|
236 |
|
237 |
-
$cart_total = self::format_number( WC()->cart->
|
238 |
$cart_items_count = WC()->cart->get_cart_contents_count();
|
239 |
$items = WC()->cart->get_cart();
|
240 |
|
@@ -395,74 +395,6 @@ class Cartflows_Tracking {
|
|
395 |
echo $event_script;
|
396 |
}
|
397 |
|
398 |
-
/**
|
399 |
-
* Set cookies to send ga data.
|
400 |
-
*
|
401 |
-
* @todo Need to remove this function in CartFlows 1.6.18 update.
|
402 |
-
* @param int $order_id order id.
|
403 |
-
* @param array $offer_data offer product data.
|
404 |
-
*/
|
405 |
-
public static function send_ga_data_if_enabled( $order_id, $offer_data = array() ) {
|
406 |
-
|
407 |
-
_deprecated_function( __METHOD__, '1.6.15' );
|
408 |
-
|
409 |
-
// For backword compatibility we are sending the offer purchase detailsarray, so no error occur at frontend & purchase event called one time only.
|
410 |
-
// Need to delete this function in update 1.6.18.
|
411 |
-
|
412 |
-
if ( 'enable' === self::$ga_settings['enable_google_analytics'] && 'enable' === self::$ga_settings['enable_purchase_event'] ) {
|
413 |
-
|
414 |
-
setcookie( 'wcf_ga_trans_data', wp_json_encode( self::get_ga_offer_purchase_transactions_data( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
|
415 |
-
}
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Prepare the offer purchase event data for the facebook pixel.
|
420 |
-
*
|
421 |
-
* @todo Remove this function after 3 update. Added for backword compatibility.
|
422 |
-
* @since 1.6.15
|
423 |
-
* @param integer $order_id order id.
|
424 |
-
* @param array $offer_data offer data.
|
425 |
-
*/
|
426 |
-
public static function get_ga_offer_purchase_transactions_data( $order_id, $offer_data ) {
|
427 |
-
|
428 |
-
$purchase_data = array();
|
429 |
-
|
430 |
-
if ( empty( $offer_data ) ) {
|
431 |
-
return $purchase_data;
|
432 |
-
}
|
433 |
-
|
434 |
-
$order = wc_get_order( $order_id );
|
435 |
-
|
436 |
-
if ( ! $order ) {
|
437 |
-
return $purchase_data;
|
438 |
-
}
|
439 |
-
|
440 |
-
$ga_tracking_id = esc_attr( self::$ga_settings['google_analytics_id'] );
|
441 |
-
|
442 |
-
$purchase_data = array(
|
443 |
-
'send_to' => $ga_tracking_id,
|
444 |
-
'event_category' => 'Enhanced-Ecommerce',
|
445 |
-
'transaction_id' => $order_id,
|
446 |
-
'affiliation' => get_bloginfo( 'name' ),
|
447 |
-
'value' => self::format_number( $offer_data['total'] ),
|
448 |
-
'currency' => wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ),
|
449 |
-
'shipping' => $offer_data['shipping_fee_tax'],
|
450 |
-
'tax' => self::format_number( ( $offer_data['shipping_fee_tax'] - $offer_data['shipping_fee'] ) + ( $offer_data['qty'] * ( $offer_data['unit_price_tax'] - intval( $offer_data['unit_price'] ) ) ) ),
|
451 |
-
'items' => array(
|
452 |
-
array(
|
453 |
-
'id' => $offer_data['id'],
|
454 |
-
'name' => $offer_data['name'],
|
455 |
-
'quantity' => $offer_data['qty'],
|
456 |
-
'price' => self::format_number( $offer_data['unit_price_tax'] ),
|
457 |
-
),
|
458 |
-
),
|
459 |
-
'non_interaction' => true,
|
460 |
-
);
|
461 |
-
|
462 |
-
return $purchase_data;
|
463 |
-
}
|
464 |
-
|
465 |
-
|
466 |
/**
|
467 |
* Prepare cart data for GA response.
|
468 |
*
|
@@ -523,7 +455,7 @@ class Cartflows_Tracking {
|
|
523 |
return $cart_data;
|
524 |
}
|
525 |
|
526 |
-
$items = WC()->cart->
|
527 |
|
528 |
$items_data = $this->get_required_product_data_for_ga( $items );
|
529 |
|
@@ -532,7 +464,7 @@ class Cartflows_Tracking {
|
|
532 |
'event_category' => 'Enhanced-Ecommerce',
|
533 |
'currency' => get_woocommerce_currency(),
|
534 |
'coupon' => WC()->cart->get_applied_coupons(),
|
535 |
-
'value' => self::format_number( WC()->cart->
|
536 |
'items' => $items_data,
|
537 |
'non_interaction' => true,
|
538 |
);
|
@@ -568,7 +500,7 @@ class Cartflows_Tracking {
|
|
568 |
'name' => $product_obj->get_name(),
|
569 |
'sku' => $product_obj->get_sku(),
|
570 |
'category' => wp_strip_all_tags( wc_get_product_category_list( $product_obj->get_id() ) ),
|
571 |
-
'price' =>
|
572 |
'quantity' => $value['quantity'],
|
573 |
);
|
574 |
|
234 |
return $params;
|
235 |
}
|
236 |
|
237 |
+
$cart_total = self::format_number( WC()->cart->subtotal );
|
238 |
$cart_items_count = WC()->cart->get_cart_contents_count();
|
239 |
$items = WC()->cart->get_cart();
|
240 |
|
395 |
echo $event_script;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
/**
|
399 |
* Prepare cart data for GA response.
|
400 |
*
|
455 |
return $cart_data;
|
456 |
}
|
457 |
|
458 |
+
$items = WC()->cart->get_cart_contents();
|
459 |
|
460 |
$items_data = $this->get_required_product_data_for_ga( $items );
|
461 |
|
464 |
'event_category' => 'Enhanced-Ecommerce',
|
465 |
'currency' => get_woocommerce_currency(),
|
466 |
'coupon' => WC()->cart->get_applied_coupons(),
|
467 |
+
'value' => self::format_number( WC()->cart->subtotal ),
|
468 |
'items' => $items_data,
|
469 |
'non_interaction' => true,
|
470 |
);
|
500 |
'name' => $product_obj->get_name(),
|
501 |
'sku' => $product_obj->get_sku(),
|
502 |
'category' => wp_strip_all_tags( wc_get_product_category_list( $product_obj->get_id() ) ),
|
503 |
+
'price' => ! is_null( $value['data'] ) ? (float) wc_get_price_to_display( $value['data'], array( 'qty' => 1 ) ) : 0,
|
504 |
'quantity' => $value['quantity'],
|
505 |
);
|
506 |
|
classes/importer/batch-process/helpers/class-cartflows-importer-image.php
CHANGED
@@ -207,13 +207,11 @@ if ( ! class_exists( 'CartFlows_Import_Image' ) ) :
|
|
207 |
// Extract the file name and extension from the URL.
|
208 |
$filename = basename( $attachment['url'] );
|
209 |
|
210 |
-
// @codingStandardsIgnoreStart
|
211 |
$upload = wp_upload_bits(
|
212 |
$filename,
|
213 |
null,
|
214 |
$file_content
|
215 |
);
|
216 |
-
// @codingStandardsIgnoreEnd
|
217 |
|
218 |
wcf()->logger->import_log( $filename );
|
219 |
wcf()->logger->import_log( wp_json_encode( $upload ) );
|
207 |
// Extract the file name and extension from the URL.
|
208 |
$filename = basename( $attachment['url'] );
|
209 |
|
|
|
210 |
$upload = wp_upload_bits(
|
211 |
$filename,
|
212 |
null,
|
213 |
$file_content
|
214 |
);
|
|
|
215 |
|
216 |
wcf()->logger->import_log( $filename );
|
217 |
wcf()->logger->import_log( wp_json_encode( $upload ) );
|
classes/importer/class-cartflows-api.php
CHANGED
@@ -121,12 +121,10 @@ if ( ! class_exists( 'CartFlows_API' ) ) :
|
|
121 |
* @return array License arguments.
|
122 |
*/
|
123 |
public static function get_flow( $site_id ) {
|
124 |
-
// @codingStandardsIgnoreStart
|
125 |
$request_params = array(
|
126 |
'licence_args' => self::get_licence_args(),
|
127 |
'_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_flow_page_builder,cartflows_flow_type,cartflows_flow_flow,featured_image_url,licence_status,flow_type,flow_type,page_builder,divi_content,post_meta,content',
|
128 |
);
|
129 |
-
// @codingStandardsIgnoreEnd
|
130 |
|
131 |
$url = add_query_arg( $request_params, self::get_flow_endpoint_url() . $site_id );
|
132 |
wcf()->logger->import_log( $url );
|
@@ -169,12 +167,10 @@ if ( ! class_exists( 'CartFlows_API' ) ) :
|
|
169 |
* @return array Template data.
|
170 |
*/
|
171 |
public static function get_template( $site_id ) {
|
172 |
-
// @codingStandardsIgnoreStart
|
173 |
$request_params = array(
|
174 |
'licence_args' => self::get_licence_args(),
|
175 |
'_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_step_page_builder,cartflows_step_type,cartflows_step_flow,featured_image_url,licence_status,flow_type,step_type,page_builder,divi_content,post_meta,content',
|
176 |
);
|
177 |
-
// @codingStandardsIgnoreEnd
|
178 |
|
179 |
$url = add_query_arg( $request_params, self::get_step_endpoint_url() . $site_id );
|
180 |
wcf()->logger->import_log( $url );
|
121 |
* @return array License arguments.
|
122 |
*/
|
123 |
public static function get_flow( $site_id ) {
|
|
|
124 |
$request_params = array(
|
125 |
'licence_args' => self::get_licence_args(),
|
126 |
'_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_flow_page_builder,cartflows_flow_type,cartflows_flow_flow,featured_image_url,licence_status,flow_type,flow_type,page_builder,divi_content,post_meta,content',
|
127 |
);
|
|
|
128 |
|
129 |
$url = add_query_arg( $request_params, self::get_flow_endpoint_url() . $site_id );
|
130 |
wcf()->logger->import_log( $url );
|
167 |
* @return array Template data.
|
168 |
*/
|
169 |
public static function get_template( $site_id ) {
|
|
|
170 |
$request_params = array(
|
171 |
'licence_args' => self::get_licence_args(),
|
172 |
'_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_step_page_builder,cartflows_step_type,cartflows_step_flow,featured_image_url,licence_status,flow_type,step_type,page_builder,divi_content,post_meta,content',
|
173 |
);
|
|
|
174 |
|
175 |
$url = add_query_arg( $request_params, self::get_step_endpoint_url() . $site_id );
|
176 |
wcf()->logger->import_log( $url );
|
languages/cartflows.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the CartFlows plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: CartFlows 1.8.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date:
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: cartflows\n"
|
@@ -102,7 +102,7 @@ msgid "Can't update the flow data"
|
|
102 |
msgstr ""
|
103 |
|
104 |
#: admin-core/ajax/flows.php:153
|
105 |
-
#: admin-core/ajax/steps.php:
|
106 |
#: admin-core/assets/build/settings-app.js:3
|
107 |
msgid "(no title)"
|
108 |
msgstr ""
|
@@ -117,7 +117,7 @@ msgstr ""
|
|
117 |
|
118 |
#: admin-core/ajax/flows.php:255
|
119 |
#: admin-core/ajax/flows.php:327
|
120 |
-
#: admin-core/ajax/flows.php:
|
121 |
msgid "No Flow IDs has been supplied to delete!"
|
122 |
msgstr ""
|
123 |
|
@@ -144,39 +144,39 @@ msgstr ""
|
|
144 |
msgid "Invalid Flow ID has been supplied to clone!"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: admin-core/ajax/flows.php:
|
148 |
msgid "Successfully cloned the Flow!"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: admin-core/ajax/flows.php:
|
152 |
-
#: admin-core/ajax/flows.php:
|
153 |
-
#: admin-core/ajax/flows.php:
|
154 |
msgid "No Flow ID has been supplied to delete!"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: admin-core/ajax/flows.php:
|
158 |
msgid "Successfully restored the Flow!"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: admin-core/ajax/flows.php:
|
162 |
msgid "Successfully trashed the Flow!"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: admin-core/ajax/flows.php:
|
166 |
msgid "Successfully deleted the Flow!"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: admin-core/ajax/flows.php:
|
170 |
msgid "Successfully updated the Flow status!"
|
171 |
msgstr ""
|
172 |
|
173 |
#. translators: %s flow id
|
174 |
-
#: admin-core/ajax/flows.php:
|
175 |
msgid "Steps not sorted for flow - %s"
|
176 |
msgstr ""
|
177 |
|
178 |
#. translators: %s flow id
|
179 |
-
#: admin-core/ajax/flows.php:
|
180 |
msgid "Steps sorted for flow - %s"
|
181 |
msgstr ""
|
182 |
|
@@ -306,38 +306,36 @@ msgstr ""
|
|
306 |
|
307 |
#. translators: %s flow id
|
308 |
#: admin-core/ajax/steps.php:145
|
309 |
-
#: classes/class-cartflows-cloning.php:288
|
310 |
msgid "Can't clone this step - %1$s. Flow - %2$s"
|
311 |
msgstr ""
|
312 |
|
313 |
#. translators: %s flow id
|
314 |
-
#: admin-core/ajax/steps.php:
|
315 |
-
#: classes/class-cartflows-cloning.php:405
|
316 |
msgid "Step - %1$s cloned. Flow - %2$s"
|
317 |
msgstr ""
|
318 |
|
319 |
#. translators: %s flow id
|
320 |
-
#: admin-core/ajax/steps.php:
|
321 |
msgid "Step not deleted for flow - %s"
|
322 |
msgstr ""
|
323 |
|
324 |
#. translators: %s flow id
|
325 |
-
#: admin-core/ajax/steps.php:
|
326 |
msgid "Step deleted for flow - %s"
|
327 |
msgstr ""
|
328 |
|
329 |
#. translators: %s flow id
|
330 |
-
#: admin-core/ajax/steps.php:
|
331 |
msgid "This step can not be deleted."
|
332 |
msgstr ""
|
333 |
|
334 |
#. translators: %s flow id
|
335 |
-
#: admin-core/ajax/steps.php:
|
336 |
msgid "No data is saved"
|
337 |
msgstr ""
|
338 |
|
339 |
#. translators: %s flow id
|
340 |
-
#: admin-core/ajax/steps.php:
|
341 |
msgid "Data saved succesfully for step id %s"
|
342 |
msgstr ""
|
343 |
|
@@ -374,7 +372,6 @@ msgstr ""
|
|
374 |
#: admin-core/api/flows.php:165
|
375 |
#: admin-core/inc/admin-helper.php:581
|
376 |
#: admin-core/inc/admin-helper.php:655
|
377 |
-
#: classes/class-cartflows-cloning.php:431
|
378 |
#: admin-core/assets/build/settings-app.js:3
|
379 |
msgid "Clone"
|
380 |
msgstr ""
|
@@ -473,7 +470,7 @@ msgstr ""
|
|
473 |
|
474 |
#: admin-core/inc/admin-menu.php:255
|
475 |
#: admin-core/inc/admin-menu.php:256
|
476 |
-
#: classes/class-cartflows-admin.php:
|
477 |
#: modules/checkout/classes/class-cartflows-checkout-meta-data.php:127
|
478 |
#: modules/landing/classes/class-cartflows-landing-meta-data.php:58
|
479 |
#: modules/optin/classes/class-cartflows-optin-meta-data.php:95
|
@@ -878,25 +875,21 @@ msgstr ""
|
|
878 |
msgid "License API Response:"
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: classes/class-cartflows-admin.php:
|
882 |
msgid "Docs"
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: classes/class-cartflows-cloning.php:431
|
886 |
-
msgid "Clone this flow"
|
887 |
-
msgstr ""
|
888 |
-
|
889 |
#: classes/class-cartflows-default-meta.php:635
|
890 |
#: modules/optin/classes/class-cartflows-optin-meta-data.php:488
|
891 |
#: modules/gutenberg/dist/blocks.build.js:1
|
892 |
msgid "Submit"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: classes/class-cartflows-flow-frontend.php:
|
896 |
msgid "Test mode is active. It can be deactivated from the flow settings in the admin dashboard."
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: classes/class-cartflows-flow-frontend.php:
|
900 |
msgid "Click here to disable it"
|
901 |
msgstr ""
|
902 |
|
@@ -935,15 +928,15 @@ msgid "You are using an older version of %1$sCartFlows Pro%2$s. Please update %1
|
|
935 |
msgstr ""
|
936 |
|
937 |
#. translators: %s: html tags
|
938 |
-
#: classes/class-cartflows-loader.php:
|
939 |
msgid "This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated."
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: classes/class-cartflows-loader.php:
|
943 |
msgid "Activate WooCommerce"
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: classes/class-cartflows-loader.php:
|
947 |
msgid "Install WooCommerce"
|
948 |
msgstr ""
|
949 |
|
@@ -1165,7 +1158,7 @@ msgstr ""
|
|
1165 |
msgid "Every %d Minutes"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
-
#: classes/importer/class-cartflows-api.php:
|
1169 |
msgid "Request successfully processed!"
|
1170 |
msgstr ""
|
1171 |
|
1 |
+
# Copyright (C) 2022 CartFlows Inc
|
2 |
# This file is distributed under the same license as the CartFlows plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: CartFlows 1.8.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-01-25T07:02:51+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: cartflows\n"
|
102 |
msgstr ""
|
103 |
|
104 |
#: admin-core/ajax/flows.php:153
|
105 |
+
#: admin-core/ajax/steps.php:398
|
106 |
#: admin-core/assets/build/settings-app.js:3
|
107 |
msgid "(no title)"
|
108 |
msgstr ""
|
117 |
|
118 |
#: admin-core/ajax/flows.php:255
|
119 |
#: admin-core/ajax/flows.php:327
|
120 |
+
#: admin-core/ajax/flows.php:850
|
121 |
msgid "No Flow IDs has been supplied to delete!"
|
122 |
msgstr ""
|
123 |
|
144 |
msgid "Invalid Flow ID has been supplied to clone!"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: admin-core/ajax/flows.php:641
|
148 |
msgid "Successfully cloned the Flow!"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: admin-core/ajax/flows.php:670
|
152 |
+
#: admin-core/ajax/flows.php:730
|
153 |
+
#: admin-core/ajax/flows.php:790
|
154 |
msgid "No Flow ID has been supplied to delete!"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: admin-core/ajax/flows.php:702
|
158 |
msgid "Successfully restored the Flow!"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: admin-core/ajax/flows.php:762
|
162 |
msgid "Successfully trashed the Flow!"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: admin-core/ajax/flows.php:822
|
166 |
msgid "Successfully deleted the Flow!"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: admin-core/ajax/flows.php:892
|
170 |
msgid "Successfully updated the Flow status!"
|
171 |
msgstr ""
|
172 |
|
173 |
#. translators: %s flow id
|
174 |
+
#: admin-core/ajax/flows.php:928
|
175 |
msgid "Steps not sorted for flow - %s"
|
176 |
msgstr ""
|
177 |
|
178 |
#. translators: %s flow id
|
179 |
+
#: admin-core/ajax/flows.php:968
|
180 |
msgid "Steps sorted for flow - %s"
|
181 |
msgstr ""
|
182 |
|
306 |
|
307 |
#. translators: %s flow id
|
308 |
#: admin-core/ajax/steps.php:145
|
|
|
309 |
msgid "Can't clone this step - %1$s. Flow - %2$s"
|
310 |
msgstr ""
|
311 |
|
312 |
#. translators: %s flow id
|
313 |
+
#: admin-core/ajax/steps.php:257
|
|
|
314 |
msgid "Step - %1$s cloned. Flow - %2$s"
|
315 |
msgstr ""
|
316 |
|
317 |
#. translators: %s flow id
|
318 |
+
#: admin-core/ajax/steps.php:307
|
319 |
msgid "Step not deleted for flow - %s"
|
320 |
msgstr ""
|
321 |
|
322 |
#. translators: %s flow id
|
323 |
+
#: admin-core/ajax/steps.php:345
|
324 |
msgid "Step deleted for flow - %s"
|
325 |
msgstr ""
|
326 |
|
327 |
#. translators: %s flow id
|
328 |
+
#: admin-core/ajax/steps.php:354
|
329 |
msgid "This step can not be deleted."
|
330 |
msgstr ""
|
331 |
|
332 |
#. translators: %s flow id
|
333 |
+
#: admin-core/ajax/steps.php:387
|
334 |
msgid "No data is saved"
|
335 |
msgstr ""
|
336 |
|
337 |
#. translators: %s flow id
|
338 |
+
#: admin-core/ajax/steps.php:434
|
339 |
msgid "Data saved succesfully for step id %s"
|
340 |
msgstr ""
|
341 |
|
372 |
#: admin-core/api/flows.php:165
|
373 |
#: admin-core/inc/admin-helper.php:581
|
374 |
#: admin-core/inc/admin-helper.php:655
|
|
|
375 |
#: admin-core/assets/build/settings-app.js:3
|
376 |
msgid "Clone"
|
377 |
msgstr ""
|
470 |
|
471 |
#: admin-core/inc/admin-menu.php:255
|
472 |
#: admin-core/inc/admin-menu.php:256
|
473 |
+
#: classes/class-cartflows-admin.php:124
|
474 |
#: modules/checkout/classes/class-cartflows-checkout-meta-data.php:127
|
475 |
#: modules/landing/classes/class-cartflows-landing-meta-data.php:58
|
476 |
#: modules/optin/classes/class-cartflows-optin-meta-data.php:95
|
875 |
msgid "License API Response:"
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: classes/class-cartflows-admin.php:125
|
879 |
msgid "Docs"
|
880 |
msgstr ""
|
881 |
|
|
|
|
|
|
|
|
|
882 |
#: classes/class-cartflows-default-meta.php:635
|
883 |
#: modules/optin/classes/class-cartflows-optin-meta-data.php:488
|
884 |
#: modules/gutenberg/dist/blocks.build.js:1
|
885 |
msgid "Submit"
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: classes/class-cartflows-flow-frontend.php:56
|
889 |
msgid "Test mode is active. It can be deactivated from the flow settings in the admin dashboard."
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: classes/class-cartflows-flow-frontend.php:61
|
893 |
msgid "Click here to disable it"
|
894 |
msgstr ""
|
895 |
|
928 |
msgstr ""
|
929 |
|
930 |
#. translators: %s: html tags
|
931 |
+
#: classes/class-cartflows-loader.php:539
|
932 |
msgid "This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated."
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: classes/class-cartflows-loader.php:549
|
936 |
msgid "Activate WooCommerce"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: classes/class-cartflows-loader.php:556
|
940 |
msgid "Install WooCommerce"
|
941 |
msgstr ""
|
942 |
|
1158 |
msgid "Every %d Minutes"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
+
#: classes/importer/class-cartflows-api.php:427
|
1162 |
msgid "Request successfully processed!"
|
1163 |
msgstr ""
|
1164 |
|
modules/checkout/classes/class-cartflows-checkout-markup.php
CHANGED
@@ -1400,11 +1400,12 @@ class Cartflows_Checkout_Markup {
|
|
1400 |
/**
|
1401 |
* Preserve the custom item price added by Variations & Quantity feature
|
1402 |
*
|
1403 |
-
* @param
|
1404 |
* @since 1.0.0
|
1405 |
*/
|
1406 |
public function custom_price_to_cart_item( $cart_object ) {
|
1407 |
-
|
|
|
1408 |
|
1409 |
foreach ( $cart_object->cart_contents as $key => $value ) {
|
1410 |
|
1400 |
/**
|
1401 |
* Preserve the custom item price added by Variations & Quantity feature
|
1402 |
*
|
1403 |
+
* @param object $cart_object cart object.
|
1404 |
* @since 1.0.0
|
1405 |
*/
|
1406 |
public function custom_price_to_cart_item( $cart_object ) {
|
1407 |
+
|
1408 |
+
if ( ! empty( $cart_object ) && ! empty( $cart_object->cart_contents ) ) {
|
1409 |
|
1410 |
foreach ( $cart_object->cart_contents as $key => $value ) {
|
1411 |
|
modules/woo-dynamic-flow/classes/class-cartflows-wd-flow-shortcodes.php
CHANGED
@@ -145,9 +145,7 @@ class Cartflows_Wd_Flow_Shortcodes {
|
|
145 |
|
146 |
// Backup query object so following loops think this is a product page.
|
147 |
$previous_wp_query = $wp_query;
|
148 |
-
//
|
149 |
-
$wp_query = $single_product;
|
150 |
-
// @codingStandardsIgnoreEnd
|
151 |
|
152 |
wp_enqueue_script( 'wc-single-product' );
|
153 |
|
@@ -167,9 +165,8 @@ class Cartflows_Wd_Flow_Shortcodes {
|
|
167 |
}
|
168 |
|
169 |
// Restore $previous_wp_query and reset post data.
|
170 |
-
//
|
171 |
-
|
172 |
-
// @codingStandardsIgnoreEnd
|
173 |
wp_reset_postdata();
|
174 |
|
175 |
// Remove text change action.
|
145 |
|
146 |
// Backup query object so following loops think this is a product page.
|
147 |
$previous_wp_query = $wp_query;
|
148 |
+
$wp_query = $single_product; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
|
|
|
149 |
|
150 |
wp_enqueue_script( 'wc-single-product' );
|
151 |
|
165 |
}
|
166 |
|
167 |
// Restore $previous_wp_query and reset post data.
|
168 |
+
$wp_query = $previous_wp_query; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
169 |
+
|
|
|
170 |
wp_reset_postdata();
|
171 |
|
172 |
// Remove text change action.
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: sujaypawar, wpcrafter
|
3 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
4 |
Requires at least: 5.4
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 1.8.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -126,6 +126,10 @@ Glad you asked! Most normal users have less than 3 funnels on a single website,
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
|
|
|
|
|
|
129 |
= Version 1.8.0 - Tuesday, 28th December 2021 =
|
130 |
* New: Introduced Canvas 1.0 for a better overview of the flow.
|
131 |
* New: Introduced a new option to override the global checkout page.
|
2 |
Contributors: sujaypawar, wpcrafter
|
3 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
4 |
Requires at least: 5.4
|
5 |
+
Tested up to: 5.9
|
6 |
+
Stable tag: 1.8.1
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= Version 1.8.1 - Tuesday, 25th January 2022 =
|
130 |
+
* Security Fix: Hardened the security of the plugin. Props: Wordfence.
|
131 |
+
* Fix: Showing incorrect product price in GA event in some cases.
|
132 |
+
|
133 |
= Version 1.8.0 - Tuesday, 28th December 2021 =
|
134 |
* New: Introduced Canvas 1.0 for a better overview of the flow.
|
135 |
* New: Introduced a new option to override the global checkout page.
|