diff --git a/assets/images/bing_ads.png b/assets/images/bing_ads.png
new file mode 100644
index 0000000..0eb0e7e
Binary files /dev/null and b/assets/images/bing_ads.png differ
diff --git a/conversion-tracking.php b/conversion-tracking.php
index 5eff89d..00c86e7 100644
--- a/conversion-tracking.php
+++ b/conversion-tracking.php
@@ -3,12 +3,12 @@
Plugin Name: WooCommerce Conversion Tracking
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
-Version: 2.0.1
+Version: 2.0.2
Author: Tareq Hasan
Author URI: https://tareq.co/
License: GPL2
WC requires at least: 2.3
-WC tested up to: 3.5.7
+WC tested up to: 3.6.2
*/
/**
@@ -54,7 +54,7 @@ class WeDevs_WC_Conversion_Tracking {
*
* @var string
*/
- public $version = '2.0.1';
+ public $version = '2.0.2';
/**
* Holds various class instances
diff --git a/includes/class-integration-pro-features.php b/includes/class-integration-pro-features.php
index 8288150..e06ecac 100644
--- a/includes/class-integration-pro-features.php
+++ b/includes/class-integration-pro-features.php
@@ -132,6 +132,7 @@ public function profeature_ad() {
Advanced Google Adwords Events
Advanced Twitter Events
Perfect Audience Integration
+ Bing Ads
diff --git a/includes/integrations/class-integration-custom.php b/includes/integrations/class-integration-custom.php
index f070eb3..4bacd09 100644
--- a/includes/integrations/class-integration-custom.php
+++ b/includes/integrations/class-integration-custom.php
@@ -120,11 +120,11 @@ function process_order_markdown( $code, $order_id ) {
$customer = $order->get_user();
$used_coupons = $order->get_used_coupons() ? implode( ',', $order->get_used_coupons() ) : '';
$order_currency = $order_currency;
- $order_total = $order->get_total();
+ $order_total = $order->get_total() ? $order->get_total() : 0;
$order_number = $order->get_order_number();
$order_subtotal = $order->get_subtotal();
- $order_discount = $order->get_total_discount();
- $order_shipping = $order->get_total_shipping();
+ $order_discount = $order->get_total_discount();
+ $order_shipping = $order->get_total_shipping();
// customer details
@@ -142,8 +142,8 @@ function process_order_markdown( $code, $order_id ) {
$code = str_replace( '{order_total}', $order_total, $code );
$code = str_replace( '{order_number}', $order_number, $code );
$code = str_replace( '{order_subtotal}', $order_subtotal, $code );
- $code = str_replace( '{order_discount}', $order_discount, $code );
- $code = str_replace( '{order_shipping}', $order_shipping, $code );
+ $code = str_replace( '{order_discount}', $order_discount, $code );
+ $code = str_replace( '{order_shipping}', $order_shipping, $code );
return $code;
}
diff --git a/includes/integrations/class-integration-facebook.php b/includes/integrations/class-integration-facebook.php
index db012a9..0e35fe6 100644
--- a/includes/integrations/class-integration-facebook.php
+++ b/includes/integrations/class-integration-facebook.php
@@ -123,7 +123,7 @@ public function add_to_cart() {
$code = $this->build_event( 'AddToCart', array(
'content_ids' => json_encode( $product_ids ),
'content_type' => 'product',
- 'value' => WC()->cart->total,
+ 'value' => WC()->cart->total ? WC()->cart->total : 0,
'currency' => get_woocommerce_currency()
) );
@@ -169,7 +169,7 @@ public function initiate_checkout() {
'num_items' => WC()->cart->get_cart_contents_count(),
'content_ids' => json_encode( $product_ids ),
'content_type' => 'product',
- 'value' => WC()->cart->total,
+ 'value' => WC()->cart->total ? WC()->cart->total : 0,
'currency' => get_woocommerce_currency()
) );
@@ -205,7 +205,7 @@ public function checkout( $order_id ) {
$code = $this->build_event( 'Purchase', array(
'content_ids' => json_encode($product_ids),
'content_type' => $content_type,
- 'value' => $order->get_total(),
+ 'value' => $order->get_total() ? $order->get_total() : 0,
'currency' => get_woocommerce_currency()
) );
diff --git a/includes/integrations/class-integration-google.php b/includes/integrations/class-integration-google.php
index 79ef788..7850ccb 100644
--- a/includes/integrations/class-integration-google.php
+++ b/includes/integrations/class-integration-google.php
@@ -115,7 +115,7 @@ public function checkout( $order_id ) {
$code = $this->build_event( 'conversion', array(
'send_to' => sprintf( "%s/%s", $account_id, $label ),
'transaction_id' => $order_id,
- 'value' => $order->get_total(),
+ 'value' => $order->get_total() ? $order->get_total() : 0,
'currency' => get_woocommerce_currency()
) );
diff --git a/includes/integrations/class-integration-twitter.php b/includes/integrations/class-integration-twitter.php
index a95fc95..15ad93e 100644
--- a/includes/integrations/class-integration-twitter.php
+++ b/includes/integrations/class-integration-twitter.php
@@ -114,7 +114,7 @@ public function checkout( $order_id ) {
$code = $this->build_event( 'Purchase', array(
'content_ids' => json_encode($product_ids),
'content_type' => $content_type,
- 'value' => $order->get_total(),
+ 'value' => $order->get_total() ? $order->get_total() : 0,
'currency' => get_woocommerce_currency()
) );
diff --git a/includes/views/settings.php b/includes/views/settings.php
index 4806a9c..21265e2 100644
--- a/includes/views/settings.php
+++ b/includes/views/settings.php
@@ -151,6 +151,7 @@
+
diff --git a/package.json b/package.json
index eacb3f2..94511b5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "Woocommerce-Conversion-Tracking",
- "version": "2.0.1",
+ "version": "2.0.2",
"description": "Conversion tracking plugin for WooCommerce",
"author": "Tareq Hasan",
"license": "GPL",
diff --git a/readme.txt b/readme.txt
index fa826c6..1485288 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google,
Donate link: https://tareq.co/donate/
Requires at least: 4.0
Tested up to: 5.1.1
-Stable tag: 2.0.1
+Stable tag: 2.0.2
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -29,6 +29,7 @@ This plugin inserts those codes on WooCommerce cart page, checkout success page
* Multiple Facebook Pixels
* [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)
* [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)
+ * [Bing Ads](https://wedevs.com/docs/woocommerce-conversion-tracking/bing-ads)
* More Twitter and Google Adwords Events
[**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
== Changelog ==
+= Version 2.0.2 (29-April-2019)
+
+* [fix] Missing value of product price
+
= Version 2.0.1 (04-April-2019) =
* [fix] Added plugin require notice