Skip to content

Commit 5f59323

Browse files
committed
Merge branch 'release/2.0.2'
2 parents 626f166 + fa56340 commit 5f59323

File tree

10 files changed

+22
-15
lines changed

10 files changed

+22
-15
lines changed

assets/images/bing_ads.png

2.68 KB
Loading

conversion-tracking.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Plugin Name: WooCommerce Conversion Tracking
44
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
55
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
6-
Version: 2.0.1
6+
Version: 2.0.2
77
Author: Tareq Hasan
88
Author URI: https://tareq.co/
99
License: GPL2
1010
WC requires at least: 2.3
11-
WC tested up to: 3.5.7
11+
WC tested up to: 3.6.2
1212
*/
1313

1414
/**
@@ -54,7 +54,7 @@ class WeDevs_WC_Conversion_Tracking {
5454
*
5555
* @var string
5656
*/
57-
public $version = '2.0.1';
57+
public $version = '2.0.2';
5858

5959
/**
6060
* Holds various class instances

includes/class-integration-pro-features.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function profeature_ad() {
132132
<li>Advanced Google Adwords Events</li>
133133
<li>Advanced Twitter Events</li>
134134
<li>Perfect Audience Integration</li>
135+
<li>Bing Ads</li>
135136
</ul>
136137

137138
<a href="https://wedevs.com/woocommerce-conversion-tracking/upgrade-to-pro/?utm_source=wp-admin&utm_medium=pro-upgrade&utm_campaign=wcct_upgrade&utm_content=Get_Premium" target="_blank" class="button button-primary"><?php _e( 'Get Premium', 'woocommerce-conversion-tracking' ) ?></a>

includes/integrations/class-integration-custom.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ function process_order_markdown( $code, $order_id ) {
120120
$customer = $order->get_user();
121121
$used_coupons = $order->get_used_coupons() ? implode( ',', $order->get_used_coupons() ) : '';
122122
$order_currency = $order_currency;
123-
$order_total = $order->get_total();
123+
$order_total = $order->get_total() ? $order->get_total() : 0;
124124
$order_number = $order->get_order_number();
125125
$order_subtotal = $order->get_subtotal();
126-
$order_discount = $order->get_total_discount();
127-
$order_shipping = $order->get_total_shipping();
126+
$order_discount = $order->get_total_discount();
127+
$order_shipping = $order->get_total_shipping();
128128

129129

130130
// customer details
@@ -142,8 +142,8 @@ function process_order_markdown( $code, $order_id ) {
142142
$code = str_replace( '{order_total}', $order_total, $code );
143143
$code = str_replace( '{order_number}', $order_number, $code );
144144
$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 );
145+
$code = str_replace( '{order_discount}', $order_discount, $code );
146+
$code = str_replace( '{order_shipping}', $order_shipping, $code );
147147

148148
return $code;
149149
}

includes/integrations/class-integration-facebook.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function add_to_cart() {
123123
$code = $this->build_event( 'AddToCart', array(
124124
'content_ids' => json_encode( $product_ids ),
125125
'content_type' => 'product',
126-
'value' => WC()->cart->total,
126+
'value' => WC()->cart->total ? WC()->cart->total : 0,
127127
'currency' => get_woocommerce_currency()
128128
) );
129129

@@ -169,7 +169,7 @@ public function initiate_checkout() {
169169
'num_items' => WC()->cart->get_cart_contents_count(),
170170
'content_ids' => json_encode( $product_ids ),
171171
'content_type' => 'product',
172-
'value' => WC()->cart->total,
172+
'value' => WC()->cart->total ? WC()->cart->total : 0,
173173
'currency' => get_woocommerce_currency()
174174
) );
175175

@@ -205,7 +205,7 @@ public function checkout( $order_id ) {
205205
$code = $this->build_event( 'Purchase', array(
206206
'content_ids' => json_encode($product_ids),
207207
'content_type' => $content_type,
208-
'value' => $order->get_total(),
208+
'value' => $order->get_total() ? $order->get_total() : 0,
209209
'currency' => get_woocommerce_currency()
210210
) );
211211

includes/integrations/class-integration-google.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function checkout( $order_id ) {
115115
$code = $this->build_event( 'conversion', array(
116116
'send_to' => sprintf( "%s/%s", $account_id, $label ),
117117
'transaction_id' => $order_id,
118-
'value' => $order->get_total(),
118+
'value' => $order->get_total() ? $order->get_total() : 0,
119119
'currency' => get_woocommerce_currency()
120120
) );
121121

includes/integrations/class-integration-twitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function checkout( $order_id ) {
114114
$code = $this->build_event( 'Purchase', array(
115115
'content_ids' => json_encode($product_ids),
116116
'content_type' => $content_type,
117-
'value' => $order->get_total(),
117+
'value' => $order->get_total() ? $order->get_total() : 0,
118118
'currency' => get_woocommerce_currency()
119119
) );
120120

includes/views/settings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/twitter/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Twitter" target="_blank"><img src="<?php echo plugins_url( 'assets/images/twitter.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Twitter', 'woocommerce-conversion-tracking' ) ?></span></a></li>
152152
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/google-adwords/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Adwords" target="_blank"><img src="<?php echo plugins_url( 'assets/images/adwords.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Google Adwords', 'woocommerce-conversion-tracking' ) ?></span></a></li>
153153
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/perfect-audience/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Perfect_Audience" target="_blank"><img src="<?php echo plugins_url( 'assets/images/perfect_audience.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Perfect Audience', 'woocommerce-conversion-tracking' ) ?></span></a></li>
154+
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/bing-ads" target="_blank"><img src="<?php echo plugins_url( 'assets/images/bing_ads.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Bing Ads', 'woocommerce-conversion-tracking' ) ?></span></a></li>
154155
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/custom/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Custom" target="_blank"><img src="<?php echo plugins_url( 'assets/images/custom.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Custom', 'woocommerce-conversion-tracking' ) ?></span></a></li>
155156
</ul>
156157
</div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Woocommerce-Conversion-Tracking",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Conversion tracking plugin for WooCommerce",
55
"author": "Tareq Hasan",
66
"license": "GPL",

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google,
44
Donate link: https://tareq.co/donate/
55
Requires at least: 4.0
66
Tested up to: 5.1.1
7-
Stable tag: 2.0.1
7+
Stable tag: 2.0.2
88
License: GPLv3
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -29,6 +29,7 @@ This plugin inserts those codes on WooCommerce cart page, checkout success page
2929
* Multiple Facebook Pixels
3030
* [Facebook Product Catalog](https://wedevs.com/docs/woocommerce-conversion-tracking/facebook/facebook-product-catalog/?utm_source=wporg&utm_medium=Readme&utm_campaign=wcct-lite&utm_content=product_catalog)
3131
* [Perfect Audience](https://wedevs.com/docs/woocommerce-conversion-tracking/perfect-audience/?utm_source=wporg&utm_medium=Readme&utm_campaign=wcct-lite&utm_content=perfect_audience)
32+
* [Bing Ads](https://wedevs.com/docs/woocommerce-conversion-tracking/bing-ads)
3233
* More Twitter and Google Adwords Events
3334

3435
[**Get Pro Version**](https://wedevs.com/woocommerce-conversion-tracking/pricing/?utm_source=wporg&utm_medium=Readme&utm_campaign=wcct-lite&utm_content=pricing)
@@ -88,6 +89,10 @@ We put the JavaScript scripts provided by you in the page and it fires a convers
8889

8990
== Changelog ==
9091

92+
= Version 2.0.2 (29-April-2019)
93+
94+
* [fix] Missing value of product price
95+
9196
= Version 2.0.1 (04-April-2019) =
9297

9398
* [fix] Added plugin require notice

0 commit comments

Comments
 (0)