Version Description
- 2020-11-25 =
- Tweak - WC 4.7 compatibility.
- Tweak - WordPress 5.6 compatibility.
Download this release
Release Info
| Developer | automattic |
| Plugin | |
| Version | 1.4.25 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.24 to 1.4.25
changelog.txt
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
*** Changelog ***
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
= 1.4.24 - 2020-10-12 =
|
| 4 |
* Tweak - WC 4.5 compatibility.
|
| 5 |
|
| 1 |
*** Changelog ***
|
| 2 |
|
| 3 |
+
= 1.4.25 - 2020-11-25 =
|
| 4 |
+
* Tweak - WC 4.7 compatibility.
|
| 5 |
+
* Tweak - WordPress 5.6 compatibility.
|
| 6 |
+
|
| 7 |
= 1.4.24 - 2020-10-12 =
|
| 8 |
* Tweak - WC 4.5 compatibility.
|
| 9 |
|
includes/class-wc-google-analytics-js.php
CHANGED
|
@@ -18,6 +18,9 @@ class WC_Google_Analytics_JS {
|
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Get the class instance
|
|
|
|
|
|
|
|
|
|
| 21 |
*/
|
| 22 |
public static function get_instance( $options = array() ) {
|
| 23 |
return null === self::$instance ? ( self::$instance = new self( $options ) ) : self::$instance;
|
|
@@ -26,6 +29,8 @@ class WC_Google_Analytics_JS {
|
|
| 26 |
/**
|
| 27 |
* Constructor
|
| 28 |
* Takes our options from the parent class so we can later use them in the JS snippets
|
|
|
|
|
|
|
| 29 |
*/
|
| 30 |
public function __construct( $options = array() ) {
|
| 31 |
self::$options = $options;
|
|
@@ -176,7 +181,7 @@ class WC_Google_Analytics_JS {
|
|
| 176 |
}
|
| 177 |
|
| 178 |
/**
|
| 179 |
-
*
|
| 180 |
* Loads in the footer
|
| 181 |
* @see wp_footer
|
| 182 |
*/
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Get the class instance
|
| 21 |
+
* @param array $options
|
| 22 |
+
*
|
| 23 |
+
* @return WC_Google_Analytics_JS
|
| 24 |
*/
|
| 25 |
public static function get_instance( $options = array() ) {
|
| 26 |
return null === self::$instance ? ( self::$instance = new self( $options ) ) : self::$instance;
|
| 29 |
/**
|
| 30 |
* Constructor
|
| 31 |
* Takes our options from the parent class so we can later use them in the JS snippets
|
| 32 |
+
*
|
| 33 |
+
* @param array $options
|
| 34 |
*/
|
| 35 |
public function __construct( $options = array() ) {
|
| 36 |
self::$options = $options;
|
| 181 |
}
|
| 182 |
|
| 183 |
/**
|
| 184 |
+
* Asynchronously loads the classic Google Analytics code, and does so after all of our properties are loaded
|
| 185 |
* Loads in the footer
|
| 186 |
* @see wp_footer
|
| 187 |
*/
|
includes/class-wc-google-analytics.php
CHANGED
|
@@ -238,6 +238,10 @@ class WC_Google_Analytics extends WC_Integration {
|
|
| 238 |
* Hooks into woocommerce_tracker_data and tracks some of the analytic settings (just enabled|disabled status)
|
| 239 |
* only if you have opted into WooCommerce tracking
|
| 240 |
* http://www.woothemes.com/woocommerce/usage-tracking/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
*/
|
| 242 |
function track_options( $data ) {
|
| 243 |
$data['wc-google-analytics'] = array(
|
|
@@ -318,6 +322,7 @@ class WC_Google_Analytics extends WC_Integration {
|
|
| 318 |
* eCommerce tracking
|
| 319 |
*
|
| 320 |
* @param int $order_id
|
|
|
|
| 321 |
*/
|
| 322 |
protected function get_ecommerce_tracking_code( $order_id ) {
|
| 323 |
// Get the order and output tracking code.
|
|
@@ -409,6 +414,11 @@ class WC_Google_Analytics extends WC_Integration {
|
|
| 409 |
|
| 410 |
/**
|
| 411 |
* Adds the product ID and SKU to the remove product link if not present
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
*/
|
| 413 |
public function remove_from_cart_attributes( $url, $key ) {
|
| 414 |
if ( strpos( $url,'data-product_id' ) !== false ) {
|
|
@@ -519,6 +529,8 @@ class WC_Google_Analytics extends WC_Integration {
|
|
| 519 |
|
| 520 |
/**
|
| 521 |
* Tracks when the checkout form is loaded
|
|
|
|
|
|
|
| 522 |
*/
|
| 523 |
public function checkout_process( $checkout ) {
|
| 524 |
if ( $this->disable_tracking( $this->ga_use_universal_analytics ) ) {
|
| 238 |
* Hooks into woocommerce_tracker_data and tracks some of the analytic settings (just enabled|disabled status)
|
| 239 |
* only if you have opted into WooCommerce tracking
|
| 240 |
* http://www.woothemes.com/woocommerce/usage-tracking/
|
| 241 |
+
*
|
| 242 |
+
* @param array $data Current WC tracker data.
|
| 243 |
+
*
|
| 244 |
+
* @return array Updated WC Tracker data.
|
| 245 |
*/
|
| 246 |
function track_options( $data ) {
|
| 247 |
$data['wc-google-analytics'] = array(
|
| 322 |
* eCommerce tracking
|
| 323 |
*
|
| 324 |
* @param int $order_id
|
| 325 |
+
* @return string
|
| 326 |
*/
|
| 327 |
protected function get_ecommerce_tracking_code( $order_id ) {
|
| 328 |
// Get the order and output tracking code.
|
| 414 |
|
| 415 |
/**
|
| 416 |
* Adds the product ID and SKU to the remove product link if not present
|
| 417 |
+
*
|
| 418 |
+
* @param string $url
|
| 419 |
+
* @param string $key
|
| 420 |
+
*
|
| 421 |
+
* @return string|string[]
|
| 422 |
*/
|
| 423 |
public function remove_from_cart_attributes( $url, $key ) {
|
| 424 |
if ( strpos( $url,'data-product_id' ) !== false ) {
|
| 529 |
|
| 530 |
/**
|
| 531 |
* Tracks when the checkout form is loaded
|
| 532 |
+
*
|
| 533 |
+
* @param $checkout
|
| 534 |
*/
|
| 535 |
public function checkout_process( $checkout ) {
|
| 536 |
if ( $this->disable_tracking( $this->ga_use_universal_analytics ) ) {
|
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-
|
| 10 |
"MIME-Version: 1.0\n"
|
| 11 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 12 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -198,17 +198,17 @@ msgid ""
|
|
| 198 |
"order received/thank you page."
|
| 199 |
msgstr ""
|
| 200 |
|
| 201 |
-
#: includes/class-wc-google-analytics.php:
|
| 202 |
-
#: includes/class-wc-google-analytics.php:
|
| 203 |
msgid "Products"
|
| 204 |
msgstr ""
|
| 205 |
|
| 206 |
-
#: includes/class-wc-google-analytics.php:
|
| 207 |
-
#: includes/class-wc-google-analytics.php:
|
| 208 |
msgid "Add to Cart"
|
| 209 |
msgstr ""
|
| 210 |
|
| 211 |
-
#: includes/class-wc-google-analytics.php:
|
| 212 |
msgid "ID:"
|
| 213 |
msgstr ""
|
| 214 |
|
|
@@ -220,7 +220,7 @@ msgstr ""
|
|
| 220 |
msgid "Support"
|
| 221 |
msgstr ""
|
| 222 |
|
| 223 |
-
#: woocommerce-google-analytics-integration.php:
|
| 224 |
msgid "WooCommerce Google Analytics depends on the last version of %s to work!"
|
| 225 |
msgstr ""
|
| 226 |
|
|
@@ -228,11 +228,11 @@ msgstr ""
|
|
| 228 |
msgid "WooCommerce"
|
| 229 |
msgstr ""
|
| 230 |
|
| 231 |
-
#: woocommerce-google-analytics-integration.php:
|
| 232 |
msgid "Get detailed insights into your sales with Google Analytics Pro"
|
| 233 |
msgstr ""
|
| 234 |
|
| 235 |
-
#: woocommerce-google-analytics-integration.php:
|
| 236 |
#. translators: 1: href link to GA pro
|
| 237 |
msgid ""
|
| 238 |
"Add advanced tracking for your sales funnel, coupons and more. [<a "
|
| 2 |
# This file is distributed under the GPLv2 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce Google Analytics Integration 1.4.25\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-google-analytics-"
|
| 8 |
"integration\n"
|
| 9 |
+
"POT-Creation-Date: 2020-11-25 04:45:18+00:00\n"
|
| 10 |
"MIME-Version: 1.0\n"
|
| 11 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 12 |
"Content-Transfer-Encoding: 8bit\n"
|
| 198 |
"order received/thank you page."
|
| 199 |
msgstr ""
|
| 200 |
|
| 201 |
+
#: includes/class-wc-google-analytics.php:380
|
| 202 |
+
#: includes/class-wc-google-analytics.php:455
|
| 203 |
msgid "Products"
|
| 204 |
msgstr ""
|
| 205 |
|
| 206 |
+
#: includes/class-wc-google-analytics.php:381
|
| 207 |
+
#: includes/class-wc-google-analytics.php:456
|
| 208 |
msgid "Add to Cart"
|
| 209 |
msgstr ""
|
| 210 |
|
| 211 |
+
#: includes/class-wc-google-analytics.php:382
|
| 212 |
msgid "ID:"
|
| 213 |
msgstr ""
|
| 214 |
|
| 220 |
msgid "Support"
|
| 221 |
msgstr ""
|
| 222 |
|
| 223 |
+
#: woocommerce-google-analytics-integration.php:109
|
| 224 |
msgid "WooCommerce Google Analytics depends on the last version of %s to work!"
|
| 225 |
msgstr ""
|
| 226 |
|
| 228 |
msgid "WooCommerce"
|
| 229 |
msgstr ""
|
| 230 |
|
| 231 |
+
#: woocommerce-google-analytics-integration.php:141
|
| 232 |
msgid "Get detailed insights into your sales with Google Analytics Pro"
|
| 233 |
msgstr ""
|
| 234 |
|
| 235 |
+
#: woocommerce-google-analytics-integration.php:144
|
| 236 |
#. translators: 1: href link to GA pro
|
| 237 |
msgid ""
|
| 238 |
"Add advanced tracking for your sales funnel, coupons and more. [<a "
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: woocommerce, automattic, claudiosanches, bor0, royho, laurendaviss
|
|
| 3 |
Tags: woocommerce, google analytics
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 5.5
|
| 6 |
-
Stable tag: 1.4.
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
|
@@ -68,6 +68,10 @@ Exact wording depends on the national data privacy laws and should be adjusted.
|
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
= 1.4.24 - 2020-10-12 =
|
| 72 |
* Tweak - WC 4.5 compatibility.
|
| 73 |
|
| 3 |
Tags: woocommerce, google analytics
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 5.5
|
| 6 |
+
Stable tag: 1.4.25
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
| 71 |
+
= 1.4.25 - 2020-11-25 =
|
| 72 |
+
* Tweak - WC 4.7 compatibility.
|
| 73 |
+
* Tweak - WordPress 5.6 compatibility.
|
| 74 |
+
|
| 75 |
= 1.4.24 - 2020-10-12 =
|
| 76 |
* Tweak - WC 4.5 compatibility.
|
| 77 |
|
woocommerce-google-analytics-integration.php
CHANGED
|
@@ -5,10 +5,10 @@
|
|
| 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.
|
| 11 |
-
* Tested up to: 5.
|
| 12 |
* License: GPLv2 or later
|
| 13 |
* Text Domain: woocommerce-google-analytics-integration
|
| 14 |
* Domain Path: languages/
|
|
@@ -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.
|
|
@@ -104,8 +104,6 @@ if ( ! class_exists( 'WC_Google_Analytics_Integration' ) ) {
|
|
| 104 |
|
| 105 |
/**
|
| 106 |
* WooCommerce fallback notice.
|
| 107 |
-
*
|
| 108 |
-
* @return string
|
| 109 |
*/
|
| 110 |
public function woocommerce_missing_notice() {
|
| 111 |
echo '<div class="error"><p>' . sprintf( __( 'WooCommerce Google Analytics depends on the last version of %s to work!', 'woocommerce-google-analytics-integration' ), '<a href="http://www.woothemes.com/woocommerce/" target="_blank">' . __( 'WooCommerce', 'woocommerce-google-analytics-integration' ) . '</a>' ) . '</p></div>';
|
| 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.25
|
| 9 |
* WC requires at least: 2.1
|
| 10 |
+
* WC tested up to: 4.7
|
| 11 |
+
* Tested up to: 5.6
|
| 12 |
* License: GPLv2 or later
|
| 13 |
* Text Domain: woocommerce-google-analytics-integration
|
| 14 |
* Domain Path: languages/
|
| 20 |
|
| 21 |
if ( ! class_exists( 'WC_Google_Analytics_Integration' ) ) {
|
| 22 |
|
| 23 |
+
define( 'WC_GOOGLE_ANALYTICS_INTEGRATION_VERSION', '1.4.25' ); // WRCS: DEFINED_VERSION.
|
| 24 |
|
| 25 |
/**
|
| 26 |
* WooCommerce Google Analytics Integration main class.
|
| 104 |
|
| 105 |
/**
|
| 106 |
* WooCommerce fallback notice.
|
|
|
|
|
|
|
| 107 |
*/
|
| 108 |
public function woocommerce_missing_notice() {
|
| 109 |
echo '<div class="error"><p>' . sprintf( __( 'WooCommerce Google Analytics depends on the last version of %s to work!', 'woocommerce-google-analytics-integration' ), '<a href="http://www.woothemes.com/woocommerce/" target="_blank">' . __( 'WooCommerce', 'woocommerce-google-analytics-integration' ) . '</a>' ) . '</p></div>';
|
