Version Description
- Update WooCommerce compatibility to 3.7
- Support namespaced Jetpack methods
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce Services |
Version | 1.21.1 |
Comparing to | |
See all releases |
Code changes from version 1.21.0 to 1.21.1
classes/class-wc-connect-jetpack.php
CHANGED
@@ -86,5 +86,23 @@ if ( ! class_exists( 'WC_Connect_Jetpack' ) ) {
|
|
86 |
'woocommerce-services-auto-authorize'
|
87 |
);
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
}
|
86 |
'woocommerce-services-auto-authorize'
|
87 |
);
|
88 |
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Records a Tracks event
|
92 |
+
* @param $user
|
93 |
+
* @param $event_type
|
94 |
+
* @param
|
95 |
+
*/
|
96 |
+
public static function tracks_record_event( $user, $event_type, $data ) {
|
97 |
+
if ( version_compare( JETPACK__VERSION, '7.5', '<' ) ) {
|
98 |
+
if ( function_exists( 'jetpack_tracks_record_event' ) ) {
|
99 |
+
return jetpack_tracks_record_event( $user, $event_type, $data );
|
100 |
+
}
|
101 |
+
} elseif ( class_exists( 'Automattic\\Jetpack\\Tracking' ) ) {
|
102 |
+
$tracking = new Automattic\Jetpack\Tracking();
|
103 |
+
return $tracking->tracks_record_event( $user, $event_type, $data );
|
104 |
+
}
|
105 |
+
return false;
|
106 |
+
}
|
107 |
}
|
108 |
}
|
classes/class-wc-connect-settings-pages.php
CHANGED
@@ -13,7 +13,7 @@ if ( ! class_exists( 'WC_Connect_Settings_Pages' ) ) {
|
|
13 |
$this->label = _x( 'WooCommerce Services', 'The WooCommerce Services brandname', 'woocommerce-services' );
|
14 |
|
15 |
add_filter( 'woocommerce_get_sections_shipping', array( $this, 'get_sections' ), 30 );
|
16 |
-
add_action( 'woocommerce_settings_shipping', array( $this, 'output_settings_screen' ) );
|
17 |
}
|
18 |
|
19 |
/**
|
13 |
$this->label = _x( 'WooCommerce Services', 'The WooCommerce Services brandname', 'woocommerce-services' );
|
14 |
|
15 |
add_filter( 'woocommerce_get_sections_shipping', array( $this, 'get_sections' ), 30 );
|
16 |
+
add_action( 'woocommerce_settings_shipping', array( $this, 'output_settings_screen' ), 5 );
|
17 |
}
|
18 |
|
19 |
/**
|
classes/class-wc-connect-tracks.php
CHANGED
@@ -66,11 +66,10 @@ if ( ! class_exists( 'WC_Connect_Tracks' ) ) {
|
|
66 |
}
|
67 |
|
68 |
public function record_user_event( $event_type, $data = array() ) {
|
69 |
-
if ( ! function_exists( 'jetpack_tracks_record_event' ) ) {
|
70 |
$this->debug( 'Error. jetpack_tracks_record_event is not defined.' );
|
71 |
return;
|
72 |
}
|
73 |
-
|
74 |
$user = wp_get_current_user();
|
75 |
$site_url = get_option( 'siteurl' );
|
76 |
|
@@ -112,7 +111,7 @@ if ( ! class_exists( 'WC_Connect_Tracks' ) ) {
|
|
112 |
$event_type = self::$product_name . '_' . $event_type;
|
113 |
|
114 |
$this->debug( 'Tracked the following event: ' . $event_type );
|
115 |
-
|
116 |
}
|
117 |
|
118 |
protected function debug( $message ) {
|
66 |
}
|
67 |
|
68 |
public function record_user_event( $event_type, $data = array() ) {
|
69 |
+
if ( ! function_exists( 'jetpack_tracks_record_event' ) && ! class_exists( 'Automattic\\Jetpack\\Tracking' ) ) {
|
70 |
$this->debug( 'Error. jetpack_tracks_record_event is not defined.' );
|
71 |
return;
|
72 |
}
|
|
|
73 |
$user = wp_get_current_user();
|
74 |
$site_url = get_option( 'siteurl' );
|
75 |
|
111 |
$event_type = self::$product_name . '_' . $event_type;
|
112 |
|
113 |
$this->debug( 'Tracked the following event: ' . $event_type );
|
114 |
+
WC_Connect_Jetpack::tracks_record_event( $user, $event_type, $data );
|
115 |
}
|
116 |
|
117 |
protected function debug( $message ) {
|
readme.txt
CHANGED
@@ -2,8 +2,9 @@
|
|
2 |
Contributors: automattic, woothemes, allendav, kellychoffman, jkudish, jeffstieler, nabsul, robobot3000, danreylop, mikeyarce, shaunkuschel, orangesareorange, pauldechov, dappermountain, radogeorgiev
|
3 |
Tags: shipping, stamps, usps, woocommerce, taxes, payment, stripe
|
4 |
Requires at least: 4.6
|
|
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.21.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -82,6 +83,11 @@ As of the WooCommerce 3.5 release, WooCommerce Services no longer provides shipp
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
= 1.21.0 =
|
86 |
|
87 |
* Update WordPress compatibility to 5.2
|
2 |
Contributors: automattic, woothemes, allendav, kellychoffman, jkudish, jeffstieler, nabsul, robobot3000, danreylop, mikeyarce, shaunkuschel, orangesareorange, pauldechov, dappermountain, radogeorgiev
|
3 |
Tags: shipping, stamps, usps, woocommerce, taxes, payment, stripe
|
4 |
Requires at least: 4.6
|
5 |
+
Requires PHP: 5.3
|
6 |
Tested up to: 5.2
|
7 |
+
Stable tag: 1.21.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 1.21.1 =
|
87 |
+
|
88 |
+
* Update WooCommerce compatibility to 3.7
|
89 |
+
* Support namespaced Jetpack methods
|
90 |
+
|
91 |
= 1.21.0 =
|
92 |
|
93 |
* Update WordPress compatibility to 5.2
|
woocommerce-services.php
CHANGED
@@ -7,11 +7,11 @@
|
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
* Text Domain: woocommerce-services
|
9 |
* Domain Path: /i18n/languages/
|
10 |
-
* Version: 1.21.
|
11 |
* WC requires at least: 3.0.0
|
12 |
-
* WC tested up to: 3.
|
13 |
*
|
14 |
-
* Copyright (c) 2017 Automattic
|
15 |
*
|
16 |
* This program is free software: you can redistribute it and/or modify
|
17 |
* it under the terms of the GNU General Public License as published by
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
* Text Domain: woocommerce-services
|
9 |
* Domain Path: /i18n/languages/
|
10 |
+
* Version: 1.21.1
|
11 |
* WC requires at least: 3.0.0
|
12 |
+
* WC tested up to: 3.7
|
13 |
*
|
14 |
+
* Copyright (c) 2017-2019 Automattic
|
15 |
*
|
16 |
* This program is free software: you can redistribute it and/or modify
|
17 |
* it under the terms of the GNU General Public License as published by
|