AfterShip – WooCommerce Tracking - Version 1.13.7

Version Description

  • Fix known issue
Download this release

Release Info

Developer aftership
Plugin Icon 128x128 AfterShip – WooCommerce Tracking
Version 1.13.7
Comparing to
See all releases

Code changes from version 1.13.6 to 1.13.7

.huskyrc ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ "hooks": {
3
+ "pre-commit": "./vendor/bin/phpcbf ./"
4
+ }
5
+ }
aftership-woocommerce-tracking.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)
4
  * Plugin URI: http://aftership.com/
5
  * Description: Track orders in one place. shipment tracking, automated notifications, order lookup, branded tracking page, delivery day prediction
6
- * Version: 1.13.6
7
  * Author: AfterShip
8
  * Author URI: http://aftership.com
9
  *
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
20
 
21
  require_once( 'woo-includes/woo-functions.php' );
22
 
23
- define( 'AFTERSHIP_VERSION', '1.13.6' );
24
  define( 'AFTERSHIP_PATH', dirname( __FILE__ ) );
25
  define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) );
26
 
@@ -184,9 +184,9 @@ if ( is_woocommerce_active() ) {
184
  add_filter( 'woocommerce_rest_product_object_query', array( $this->actions, 'add_query' ), 10, 2 );
185
  add_filter( 'woocommerce_rest_shop_coupon_object_query', array( $this->actions, 'add_query' ), 10, 2 );
186
 
187
- register_activation_hook( __FILE__, array( $this, 'install' ) );
188
- register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
189
- register_uninstall_hook( __FILE__, array( $this, 'deactivation' ) );
190
  set_transient( 'wc-aftership-plugin' . AFTERSHIP_VERSION, 'alive', 7 * 24 * 3600 );
191
  }
192
 
@@ -289,12 +289,13 @@ if ( is_woocommerce_active() ) {
289
  /**
290
  * Remove settings when plugin deactivation.
291
  **/
292
- function deactivation() {
293
- $this->options['connected'] = false;
294
- update_option( 'aftership_option_name', $this->options );
 
295
 
296
  // Revoke AfterShip plugin REST oauth key when user Deactivation | Delete plugin
297
- call_user_func( array( $this->actions, 'revoke_aftership_key' ) );
298
 
299
  delete_option( 'automizely_aftership_plugin_actived' );
300
  }
@@ -314,7 +315,7 @@ if ( is_woocommerce_active() ) {
314
  * Add manage_aftership cap for administrator
315
  * Add this to allow customers to more finely configure the permissions of the aftership plugin.
316
  */
317
- public function install() {
318
  global $wp_roles;
319
 
320
  if ( class_exists( 'WP_Roles' ) ) {
3
  * Plugin Name: AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)
4
  * Plugin URI: http://aftership.com/
5
  * Description: Track orders in one place. shipment tracking, automated notifications, order lookup, branded tracking page, delivery day prediction
6
+ * Version: 1.13.7
7
  * Author: AfterShip
8
  * Author URI: http://aftership.com
9
  *
20
 
21
  require_once( 'woo-includes/woo-functions.php' );
22
 
23
+ define( 'AFTERSHIP_VERSION', '1.13.7' );
24
  define( 'AFTERSHIP_PATH', dirname( __FILE__ ) );
25
  define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) );
26
 
184
  add_filter( 'woocommerce_rest_product_object_query', array( $this->actions, 'add_query' ), 10, 2 );
185
  add_filter( 'woocommerce_rest_shop_coupon_object_query', array( $this->actions, 'add_query' ), 10, 2 );
186
 
187
+ register_activation_hook( __FILE__, array( 'AfterShip', 'install' ) );
188
+ register_deactivation_hook( __FILE__, array( 'AfterShip', 'deactivation' ) );
189
+ register_uninstall_hook( __FILE__, array( 'AfterShip', 'deactivation' ) );
190
  set_transient( 'wc-aftership-plugin' . AFTERSHIP_VERSION, 'alive', 7 * 24 * 3600 );
191
  }
192
 
289
  /**
290
  * Remove settings when plugin deactivation.
291
  **/
292
+ public static function deactivation() {
293
+ $legacy_options = get_option( 'aftership_option_name' ) ? get_option( 'aftership_option_name' ) : array();
294
+ $legacy_options['connected'] = false;
295
+ update_option( 'aftership_option_name', $legacy_options );
296
 
297
  // Revoke AfterShip plugin REST oauth key when user Deactivation | Delete plugin
298
+ call_user_func( array( 'AfterShip_Actions', 'revoke_aftership_key' ) );
299
 
300
  delete_option( 'automizely_aftership_plugin_actived' );
301
  }
315
  * Add manage_aftership cap for administrator
316
  * Add this to allow customers to more finely configure the permissions of the aftership plugin.
317
  */
318
+ public static function install() {
319
  global $wp_roles;
320
 
321
  if ( class_exists( 'WP_Roles' ) ) {
includes/class-aftership-actions.php CHANGED
@@ -932,7 +932,7 @@ class AfterShip_Actions {
932
  /**
933
  * Revoke AfterShip plugin REST oauth key when user Deactivation | Delete plugin
934
  */
935
- public function revoke_aftership_key() {
936
  try {
937
  global $wpdb;
938
  // AfterShip Oauth key
932
  /**
933
  * Revoke AfterShip plugin REST oauth key when user Deactivation | Delete plugin
934
  */
935
+ public static function revoke_aftership_key() {
936
  try {
937
  global $wpdb;
938
  // AfterShip Oauth key
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.aftership.com/
4
  Tags: woocommerce shipping,woocommerce tracking,shipment tracking,order tracking, woocommerce,track order,dhl,ups,usps,fedex,shipping,tracking,order
5
  Requires at least: 2.9
6
  Tested up to: 5.7
7
- Stable tag: 1.13.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -136,6 +136,9 @@ Tailor a dynamic branded tracking page. Upload promotional banner, logo, and fav
136
 
137
  == Changelog ==
138
 
 
 
 
139
  = 1.13.6 =
140
  * Fix known issue
141
 
4
  Tags: woocommerce shipping,woocommerce tracking,shipment tracking,order tracking, woocommerce,track order,dhl,ups,usps,fedex,shipping,tracking,order
5
  Requires at least: 2.9
6
  Tested up to: 5.7
7
+ Stable tag: 1.13.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
136
 
137
  == Changelog ==
138
 
139
+ = 1.13.7 =
140
+ * Fix known issue
141
+
142
  = 1.13.6 =
143
  * Fix known issue
144