Version Description
- 2020-03-29 =
- Fix - Change wc_goole_analytics_send_pageview fiter name to wc_google_analytics_send_pageview.
Download this release
Release Info
| Developer | bartoszbudzanowski |
| Plugin | |
| Version | 1.4.20 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.19 to 1.4.20
changelog.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
*** Changelog ***
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
= 1.4.19 - 2020-03-09 =
|
| 4 |
* Tweak - WordPress 5.4 compatibility.
|
| 5 |
|
| 1 |
*** Changelog ***
|
| 2 |
|
| 3 |
+
= 1.4.20 - 2020-03-29 =
|
| 4 |
+
* Fix - Change wc_goole_analytics_send_pageview fiter name to wc_google_analytics_send_pageview.
|
| 5 |
+
|
| 6 |
= 1.4.19 - 2020-03-09 =
|
| 7 |
* Tweak - WordPress 5.4 compatibility.
|
| 8 |
|
includes/class-wc-google-analytics-js.php
CHANGED
|
@@ -71,6 +71,7 @@ class WC_Google_Analytics_JS {
|
|
| 71 |
*/
|
| 72 |
public static function load_analytics( $order = false ) {
|
| 73 |
$logged_in = is_user_logged_in() ? 'yes' : 'no';
|
|
|
|
| 74 |
if ( 'yes' === self::get( 'ga_use_universal_analytics' ) ) {
|
| 75 |
add_action( 'wp_footer', array( 'WC_Google_Analytics_JS', 'universal_analytics_footer' ) );
|
| 76 |
return self::load_analytics_universal( $logged_in );
|
|
@@ -197,11 +198,19 @@ class WC_Google_Analytics_JS {
|
|
| 197 |
* Sends the pageview last thing (needed for things like addImpression)
|
| 198 |
*/
|
| 199 |
public static function universal_analytics_footer() {
|
| 200 |
-
if ( apply_filters( '
|
| 201 |
wc_enqueue_js( "" . self::tracker_var() . "( 'send', 'pageview' ); " );
|
| 202 |
}
|
| 203 |
}
|
| 204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
/**
|
| 206 |
* Loads the universal analytics code
|
| 207 |
* @param string $logged_in 'yes' if the user is logged in, no if not (this is a string so we can pass it to GA)
|
| 71 |
*/
|
| 72 |
public static function load_analytics( $order = false ) {
|
| 73 |
$logged_in = is_user_logged_in() ? 'yes' : 'no';
|
| 74 |
+
add_filter( 'wc_google_analytics_send_pageview', array( 'WC_Google_Analytics_JS', 'universal_analytics_footer_filter' ), 10, 1 );
|
| 75 |
if ( 'yes' === self::get( 'ga_use_universal_analytics' ) ) {
|
| 76 |
add_action( 'wp_footer', array( 'WC_Google_Analytics_JS', 'universal_analytics_footer' ) );
|
| 77 |
return self::load_analytics_universal( $logged_in );
|
| 198 |
* Sends the pageview last thing (needed for things like addImpression)
|
| 199 |
*/
|
| 200 |
public static function universal_analytics_footer() {
|
| 201 |
+
if ( apply_filters( 'wc_google_analytics_send_pageview', true ) ) {
|
| 202 |
wc_enqueue_js( "" . self::tracker_var() . "( 'send', 'pageview' ); " );
|
| 203 |
}
|
| 204 |
}
|
| 205 |
|
| 206 |
+
/**
|
| 207 |
+
* This was created to fix public facing api typo in a filter name
|
| 208 |
+
* and inform about the deprecation.
|
| 209 |
+
*/
|
| 210 |
+
public static function universal_analytics_footer_filter( $send_pageview ) {
|
| 211 |
+
return apply_filters_deprecated( 'wc_goole_analytics_send_pageview', array( $send_pageview ), '1.4.20', 'wc_google_analytics_send_pageview' );
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
/**
|
| 215 |
* Loads the universal analytics code
|
| 216 |
* @param string $logged_in 'yes' if the user is logged in, no if not (this is a string so we can pass it to GA)
|
languages/woocommerce-google-analytics-integration.pot
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
# This file is distributed under the GPLv2 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: WooCommerce Google Analytics Integration 1.4.
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-google-analytics-"
|
| 8 |
"integration\n"
|
| 9 |
-
"POT-Creation-Date: 2020-03-
|
| 10 |
"MIME-Version: 1.0\n"
|
| 11 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 12 |
"Content-Transfer-Encoding: 8bit\n"
|
| 2 |
# This file is distributed under the GPLv2 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce Google Analytics Integration 1.4.20\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-google-analytics-"
|
| 8 |
"integration\n"
|
| 9 |
+
"POT-Creation-Date: 2020-03-29 10:00:56+00:00\n"
|
| 10 |
"MIME-Version: 1.0\n"
|
| 11 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 12 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: woocommerce, claudiosanches, bor0, royho, laurendavissmith001, c-s
|
|
| 3 |
Tags: woocommerce, google analytics
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 5.4
|
| 6 |
-
Stable tag: 1.4.
|
| 7 |
License: GPLv3
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
|
@@ -68,6 +68,9 @@ Exact wording depends on the national data privacy laws and should be adjusted.
|
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
|
|
|
|
|
|
|
|
|
| 71 |
= 1.4.19 - 2020-03-09 =
|
| 72 |
* Tweak - WordPress 5.4 compatibility.
|
| 73 |
|
| 3 |
Tags: woocommerce, google analytics
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 5.4
|
| 6 |
+
Stable tag: 1.4.20
|
| 7 |
License: GPLv3
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
| 71 |
+
= 1.4.20 - 2020-03-29 =
|
| 72 |
+
* Fix - Change wc_goole_analytics_send_pageview fiter name to wc_google_analytics_send_pageview.
|
| 73 |
+
|
| 74 |
= 1.4.19 - 2020-03-09 =
|
| 75 |
* Tweak - WordPress 5.4 compatibility.
|
| 76 |
|
woocommerce-google-analytics-integration.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
|
| 6 |
* Author: WooCommerce
|
| 7 |
* Author URI: https://woocommerce.com
|
| 8 |
-
* Version: 1.4.
|
| 9 |
* WC requires at least: 2.1
|
| 10 |
* WC tested up to: 4.0
|
| 11 |
* Tested up to: 5.4
|
|
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 20 |
|
| 21 |
if ( ! class_exists( 'WC_Google_Analytics_Integration' ) ) {
|
| 22 |
|
| 23 |
-
define( 'WC_GOOGLE_ANALYTICS_INTEGRATION_VERSION', '1.4.
|
| 24 |
|
| 25 |
/**
|
| 26 |
* WooCommerce Google Analytics Integration main class.
|
| 5 |
* Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
|
| 6 |
* Author: WooCommerce
|
| 7 |
* Author URI: https://woocommerce.com
|
| 8 |
+
* Version: 1.4.20
|
| 9 |
* WC requires at least: 2.1
|
| 10 |
* WC tested up to: 4.0
|
| 11 |
* Tested up to: 5.4
|
| 20 |
|
| 21 |
if ( ! class_exists( 'WC_Google_Analytics_Integration' ) ) {
|
| 22 |
|
| 23 |
+
define( 'WC_GOOGLE_ANALYTICS_INTEGRATION_VERSION', '1.4.20' ); // WRCS: DEFINED_VERSION.
|
| 24 |
|
| 25 |
/**
|
| 26 |
* WooCommerce Google Analytics Integration main class.
|
