Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasinur1997 committed Aug 21, 2019
2 parents 54eb91f + b3b60a6 commit 2a99031
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
11 changes: 10 additions & 1 deletion assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,13 @@
} );
} );

})( jQuery );
// Dismiss notice
$('.wcct-notice-wrap').on( 'click', function() {
wp.ajax.send( 'wcct_dismissable_notice', {
success: function( response ) {
console.log( 'Success' );
}
} );
} );

})( jQuery );
13 changes: 9 additions & 4 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.3
Version: 2.0.4
Author: Tareq Hasan
Author URI: https://tareq.co/
License: GPL2
WC requires at least: 2.3
WC tested up to: 3.6.2
WC tested up to: 3.7.0
*/

/**
Expand Down Expand Up @@ -54,7 +54,7 @@ class WeDevs_WC_Conversion_Tracking {
*
* @var string
*/
public $version = '2.0.3';
public $version = '2.0.4';

/**
* Holds various class instances
Expand Down Expand Up @@ -301,11 +301,16 @@ public function happy_addons_ads_banner() {
if ( class_exists( '\Happy_Addons\Elementor\Base' ) ) {
return;
}
$dismissable = get_option( 'wcct_dismissable_notice' );

if ( $dismissable == 'closed' ) {
return;
}

?>
<div id="wcct_remote_notice" class="notice notice-success">
</div>
<div class="notice wcct-notice-wrap">
<div class="notice is-dismissible wcct-notice-wrap">
<div class="wcct-message-icon">
<img src="<?php echo WCCT_ASSETS . '/images/happy-addons.png'?>" alt="">
</div>
Expand Down
15 changes: 15 additions & 0 deletions includes/class-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class WCCT_Ajax {
public function __construct() {
add_action( 'wp_ajax_wcct_save_settings', array( $this, 'wcct_save_settings' ) );
add_action( 'wp_ajax_activate_happy_addons', array( $this, 'wcct_install_happy_addons' ) );
add_action( 'wp_ajax_wcct_dismissable_notice', array( $this, 'wcct_dismissable_notice' ) );
}

/**
Expand Down Expand Up @@ -89,4 +90,18 @@ public function wcct_install_happy_addons() {
]);
}

/**
* Dismissable notice
*
* @return object
*/
public function wcct_dismissable_notice() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}

update_option( 'wcct_dismissable_notice', 'closed' );

wp_send_json_success();
}
}
4 changes: 2 additions & 2 deletions includes/integrations/class-integration-google.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class WCCT_Integration_Google extends WCCT_Integration {
*/
function __construct() {
$this->id = 'adwords';
$this->name = __( 'Google Adwords', 'woocommerce-conversion-tracking' );
$this->name = __( 'Google Ads', 'woocommerce-conversion-tracking' );
$this->enabled = true;
$this->supports = array(
'checkout',
Expand All @@ -30,7 +30,7 @@ public function get_settings() {
'label' => __( 'Account ID', 'woocommerce-conversion-tracking' ),
'value' => '',
'placeholder' => 'AW-123456789',
'help' => sprintf( __( 'Provide the AdWords Account ID. Usually it\'s something like <code>AW-123456789</code>, <a href="%s" target="_blank">learn more</a>.', 'woocommerce-conversion-tracking' ), 'https://wedevs.com/docs/woocommerce-conversion-tracking/google-adwords/account-id/?utm_source=wp-admin&utm_medium=inline-help&utm_campaign=wcct_docs&utm_content=adwords_learn_more' )
'help' => sprintf( __( 'Provide the Google Ads Account ID. Usually it\'s something like <code>AW-123456789</code>, <a href="%s" target="_blank">learn more</a>.', 'woocommerce-conversion-tracking' ), 'https://wedevs.com/docs/woocommerce-conversion-tracking/google-adwords/account-id/?utm_source=wp-admin&utm_medium=inline-help&utm_campaign=wcct_docs&utm_content=adwords_learn_more' )
),
'events' => array(
'type' => 'multicheck',
Expand Down
6 changes: 3 additions & 3 deletions includes/views/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@
<h3 class="wcct-doc-title"><?php _e( 'Documentation', 'woocommerce-conversion-tracking' )?></h3>

<ul class="wcct-doc-list">
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/get-started/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Get_Started" target="_blank"><img src="<?php echo plugins_url( 'assets/images/getting_started.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Getting Started', 'woocommerce-conversion-tracking' ) ?></span></a></li>
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/getting-started/installation/" target="_blank"><img src="<?php echo plugins_url( 'assets/images/getting_started.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Getting Started', 'woocommerce-conversion-tracking' ) ?></span></a></li>
<li><a href="https://wedevs.com/docs/woocommerce-conversion-tracking/facebook/?utm_source=wp-admin&utm_medium=docs-link&utm_campaign=wcct_docs&utm_content=Facebook" target="_blank"><img src="<?php echo plugins_url( 'assets/images/facebook.png', WCCT_FILE ); ?>" alt="" class="doc-list-icon"><span><?php _e( 'Facebook', 'woocommerce-conversion-tracking' ) ?></span></a></li>
<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/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 Ads', '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/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( 'Microsoft Advertising', '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.3",
"version": "2.0.4",
"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.2
Stable tag: 2.0.4
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -88,6 +88,11 @@ We put the JavaScript scripts provided by you in the page and it fires a convers
5. Custom Codes

== Changelog ==
= Version 2.0.4 (21-August-2019) =
* [fix] Happyaddons dismissable banner
* [fix] Getting started link doesn't work
* [tweak] Change from Google Adwords to Google Ads

= Version 2.0.3 (05-August-2019) =
* [fix] AddToCart Event doesn't work for ajax
* [new] Add happy addons banner
Expand Down

0 comments on commit 2a99031

Please sign in to comment.