Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasinur1997 committed Apr 29, 2019
2 parents 626f166 + fa56340 commit 5f59323
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 15 deletions.
Binary file added assets/images/bing_ads.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions conversion-tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions includes/class-integration-pro-features.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public function profeature_ad() {
<li>Advanced Google Adwords Events</li>
<li>Advanced Twitter Events</li>
<li>Perfect Audience Integration</li>
<li>Bing Ads</li>
</ul>

<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>
Expand Down
10 changes: 5 additions & 5 deletions includes/integrations/class-integration-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions includes/integrations/class-integration-facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
) );

Expand Down Expand Up @@ -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()
) );

Expand Down Expand Up @@ -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()
) );

Expand Down
2 changes: 1 addition & 1 deletion includes/integrations/class-integration-google.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
) );

Expand Down
2 changes: 1 addition & 1 deletion includes/integrations/class-integration-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
) );

Expand Down
1 change: 1 addition & 0 deletions includes/views/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
<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>
<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>
<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>
<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>
<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>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5f59323

Please sign in to comment.