Version Description
Download this release
Release Info
Developer | Hasinur Rahman |
Plugin | WooCommerce Conversion Tracking |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.0.1
assets/js/admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){a("#wcct-submit").on("click",function(b){return b.preventDefault(),a("#wcct-submit").addClass("updating-message"),wp.ajax.send("wcct_save_settings",{data:a("#integration-form").serialize(),success:function(b){a("#ajax-message").html("<p><strong>"+b.message+"</strong></p>").show().delay(3e3).slideUp("fast"),a("html, body").animate({scrollTop:0},"fast"),a("#wcct-submit").removeClass("updating-message")},error:function(a){alert("something wrong happend")}}),!1}),a(".slider").on("click",function(){var b=a(this).attr("data-id");a("#setting-"+b).stop().toggle("fast")}),a(".toogle-seller:checked").each(function(b,c){var d=a(c).attr("data-id"),e=a("#setting-"+d);a(e).css("display","block")}),a(".event").on("change",function(){var b=a(this).next(".event-label-box");b.addClass("event-label-space"),b.stop().toggle()}),a(".event:checked").each(function(b,c){a(c).next(".event-label-box").addClass("event-label-space"),a(c).next(".event-label-box").css("display","block")}),a(".disabled-class").on("click",function(){var b=a(this).text();swal({title:b+" is available in Pro version",text:"Please upgrade to the Pro version to get all the awesome feature",buttons:{confirm:"Get the Pro Version",cancel:"Close"}}).then(function(a){a&&window.open("https://wedevs.com/woocommerce-conversion-tracking/upgrade-to-pro/?utm_source=wp-admin&utm_medium=pro-upgrade&utm_campaign=wcct_upgrade&utm_content=Pro_Alert","_blank")},function(){})}),a(".toogle-seller").on("change",function(){var b=a(this).parents(".switch").find(".integration-tooltip"),c=a(b).text().trim(),d="";"Activate"==c?d="Deactivate":"Deactivate"==c&&(d="Activate"),a(b).text(d)})}(jQuery);
|
conversion-tracking.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: WooCommerce Conversion Tracking
|
4 |
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
|
5 |
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
|
6 |
-
Version: 2.0
|
7 |
Author: Tareq Hasan
|
8 |
Author URI: https://tareq.co/
|
9 |
License: GPL2
|
10 |
WC requires at least: 2.3
|
11 |
-
WC tested up to: 3.
|
12 |
*/
|
13 |
|
14 |
/**
|
@@ -54,7 +54,7 @@ class WeDevs_WC_Conversion_Tracking {
|
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
-
public $version = '2.0';
|
58 |
|
59 |
/**
|
60 |
* Holds various class instances
|
@@ -76,7 +76,6 @@ class WeDevs_WC_Conversion_Tracking {
|
|
76 |
$this->init_classes();
|
77 |
|
78 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
79 |
-
|
80 |
do_action( 'wcct_loaded' );
|
81 |
}
|
82 |
|
@@ -180,7 +179,7 @@ class WeDevs_WC_Conversion_Tracking {
|
|
180 |
add_action( 'plugins_loaded', array( $this, 'plugin_upgrades' ) );
|
181 |
add_action( 'init', array( $this, 'localization_setup' ) );
|
182 |
add_action( 'init', array( $this, 'init_tracker' ) );
|
183 |
-
|
184 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
|
185 |
}
|
186 |
|
@@ -273,6 +272,20 @@ class WeDevs_WC_Conversion_Tracking {
|
|
273 |
|
274 |
return $links;
|
275 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
|
278 |
function wcct_init() {
|
3 |
Plugin Name: WooCommerce Conversion Tracking
|
4 |
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
|
5 |
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
|
6 |
+
Version: 2.0.1
|
7 |
Author: Tareq Hasan
|
8 |
Author URI: https://tareq.co/
|
9 |
License: GPL2
|
10 |
WC requires at least: 2.3
|
11 |
+
WC tested up to: 3.5.7
|
12 |
*/
|
13 |
|
14 |
/**
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
+
public $version = '2.0.1';
|
58 |
|
59 |
/**
|
60 |
* Holds various class instances
|
76 |
$this->init_classes();
|
77 |
|
78 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
|
|
79 |
do_action( 'wcct_loaded' );
|
80 |
}
|
81 |
|
179 |
add_action( 'plugins_loaded', array( $this, 'plugin_upgrades' ) );
|
180 |
add_action( 'init', array( $this, 'localization_setup' ) );
|
181 |
add_action( 'init', array( $this, 'init_tracker' ) );
|
182 |
+
add_action( 'admin_notices', array( $this, 'check_woocommerce_exist' ) );
|
183 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
|
184 |
}
|
185 |
|
272 |
|
273 |
return $links;
|
274 |
}
|
275 |
+
/**
|
276 |
+
* Check Woocommerce exist
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
+
*/
|
280 |
+
public function check_woocommerce_exist() {
|
281 |
+
if ( ! function_exists( 'WC' ) ) {
|
282 |
+
?>
|
283 |
+
<div class="error notice is-dismissible">
|
284 |
+
<p><?php _e( '<b>Woocommerce conversion tracking</b> requires <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>', 'woocommerce-conversion-tracking' );?></p>
|
285 |
+
</div>
|
286 |
+
<?php
|
287 |
+
}
|
288 |
+
}
|
289 |
}
|
290 |
|
291 |
function wcct_init() {
|
includes/class-event-dispatcher.php
CHANGED
@@ -185,10 +185,10 @@ class WCCT_Event_Dispatcher {
|
|
185 |
*/
|
186 |
public function enqueue_scripts() {
|
187 |
|
188 |
-
echo '
|
189 |
foreach ( $this->integrations as $integration ) {
|
190 |
$integration->enqueue_script();
|
191 |
}
|
192 |
-
echo '
|
193 |
}
|
194 |
}
|
185 |
*/
|
186 |
public function enqueue_scripts() {
|
187 |
|
188 |
+
echo '<!-- Starting: WooCommerce Conversion Tracking (https://wordpress.org/plugins/woocommerce-conversion-tracking/) -->' . PHP_EOL;
|
189 |
foreach ( $this->integrations as $integration ) {
|
190 |
$integration->enqueue_script();
|
191 |
}
|
192 |
+
echo '<!-- End: WooCommerce Conversion Tracking Codes -->' . PHP_EOL;
|
193 |
}
|
194 |
}
|
includes/integrations/class-integration-custom.php
CHANGED
@@ -32,7 +32,7 @@ class WCCT_Integration_Custom extends WCCT_Integration {
|
|
32 |
'value' => '',
|
33 |
'help' => sprintf( /* translators: %s: dynamic values */
|
34 |
__( 'Put your JavaScript tracking scripts here. You can use dynamic values: %s', 'woocommerce-conversion-tracking' ),
|
35 |
-
'<code>{customer_id}</code>, <code>{customer_email}</code>, <code>{customer_first_name}</code>, <code>{customer_last_name}</code>, <code>{order_number}</code>, <code>{order_total}</code>, <code>{order_subtotal}</code>, <code>{currency}</code>, <code>{payment_method}</code>'
|
36 |
),
|
37 |
),
|
38 |
array(
|
@@ -123,6 +123,9 @@ class WCCT_Integration_Custom extends WCCT_Integration {
|
|
123 |
$order_total = $order->get_total();
|
124 |
$order_number = $order->get_order_number();
|
125 |
$order_subtotal = $order->get_subtotal();
|
|
|
|
|
|
|
126 |
|
127 |
// customer details
|
128 |
if ( $customer ) {
|
@@ -139,6 +142,8 @@ class WCCT_Integration_Custom extends WCCT_Integration {
|
|
139 |
$code = str_replace( '{order_total}', $order_total, $code );
|
140 |
$code = str_replace( '{order_number}', $order_number, $code );
|
141 |
$code = str_replace( '{order_subtotal}', $order_subtotal, $code );
|
|
|
|
|
142 |
|
143 |
return $code;
|
144 |
}
|
32 |
'value' => '',
|
33 |
'help' => sprintf( /* translators: %s: dynamic values */
|
34 |
__( 'Put your JavaScript tracking scripts here. You can use dynamic values: %s', 'woocommerce-conversion-tracking' ),
|
35 |
+
'<code>{customer_id}</code>, <code>{customer_email}</code>, <code>{customer_first_name}</code>, <code>{customer_last_name}</code>, <code>{order_number}</code>, <code>{order_total}</code>, <code>{order_subtotal}</code>, <code>{order_discount}</code>, <code>{order_shipping}</code>, <code>{currency}</code>, <code>{payment_method}</code>'
|
36 |
),
|
37 |
),
|
38 |
array(
|
123 |
$order_total = $order->get_total();
|
124 |
$order_number = $order->get_order_number();
|
125 |
$order_subtotal = $order->get_subtotal();
|
126 |
+
$order_discount = $order->get_total_discount();
|
127 |
+
$order_shipping = $order->get_total_shipping();
|
128 |
+
|
129 |
|
130 |
// customer details
|
131 |
if ( $customer ) {
|
142 |
$code = str_replace( '{order_total}', $order_total, $code );
|
143 |
$code = str_replace( '{order_number}', $order_number, $code );
|
144 |
$code = str_replace( '{order_subtotal}', $order_subtotal, $code );
|
145 |
+
$code = str_replace( '{order_discount}', $order_discount, $code );
|
146 |
+
$code = str_replace( '{order_shipping}', $order_shipping, $code );
|
147 |
|
148 |
return $code;
|
149 |
}
|
languages/woocommerce-conversion-tracking.pot
CHANGED
@@ -1,30 +1,36 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Conversion Tracking 2.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://example.com\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
|
16 |
-
#: conversion-tracking.php:
|
17 |
msgid "Get PRO"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: conversion-tracking.php:
|
21 |
msgid "Docs"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: conversion-tracking.php:
|
25 |
msgid "Settings"
|
26 |
msgstr ""
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
#: includes/class-admin.php:49
|
29 |
msgid "Conversion Tracking"
|
30 |
msgstr ""
|
1 |
+
# Copyright (C) 2019 Tareq Hasan
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Conversion Tracking 2.0.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://example.com\n"
|
7 |
+
"POT-Creation-Date: 2019-04-04 08:46:10+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
|
16 |
+
#: conversion-tracking.php:267
|
17 |
msgid "Get PRO"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: conversion-tracking.php:270
|
21 |
msgid "Docs"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: conversion-tracking.php:271
|
25 |
msgid "Settings"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: conversion-tracking.php:284
|
29 |
+
msgid ""
|
30 |
+
"<b>Woocommerce conversion tracking</b> requires <a target=\"_blank\" "
|
31 |
+
"href=\"https://wordpress.org/plugins/woocommerce/\">Woocommerce</a>"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
#: includes/class-admin.php:49
|
35 |
msgid "Conversion Tracking"
|
36 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: tareq1988
|
|
3 |
Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google, adwords, tracking-pixel
|
4 |
Donate link: https://tareq.co/donate/
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.0
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -88,6 +88,11 @@ We put the JavaScript scripts provided by you in the page and it fires a convers
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
91 |
= Version 2.0 (22-February-2018) =
|
92 |
|
93 |
* Major version released
|
3 |
Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google, adwords, tracking-pixel
|
4 |
Donate link: https://tareq.co/donate/
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.1.1
|
7 |
+
Stable tag: 2.0.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= Version 2.0.1 (04-April-2019) =
|
92 |
+
|
93 |
+
* [fix] Added plugin require notice
|
94 |
+
|
95 |
+
|
96 |
= Version 2.0 (22-February-2018) =
|
97 |
|
98 |
* Major version released
|