Version Description
- Add some fields for settings API
Download this release
Release Info
Developer | aftership |
Plugin | AfterShip – WooCommerce Tracking |
Version | 1.13.9 |
Comparing to | |
See all releases |
Code changes from version 1.13.8 to 1.13.9
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.
|
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.
|
24 |
define( 'AFTERSHIP_PATH', dirname( __FILE__ ) );
|
25 |
define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) );
|
26 |
|
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.9
|
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.9' );
|
24 |
define( 'AFTERSHIP_PATH', dirname( __FILE__ ) );
|
25 |
define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) );
|
26 |
|
includes/api/aftership/v1/class-am-rest-settings-controller.php
CHANGED
@@ -38,12 +38,14 @@ if ( ! class_exists( 'AM_REST_Settings_Controller' ) ) {
|
|
38 |
/**
|
39 |
* GET AfterShip Settings
|
40 |
*
|
41 |
-
* @param WP_REST_Request $request Request object.
|
42 |
* @return array
|
43 |
*/
|
44 |
-
public function get_settings(
|
45 |
-
$settings
|
46 |
-
$settings['
|
|
|
|
|
|
|
47 |
'wordpress' => get_bloginfo( 'version' ),
|
48 |
'woocommerce' => WC()->version,
|
49 |
'aftership' => AFTERSHIP_VERSION,
|
@@ -84,8 +86,7 @@ if ( ! class_exists( 'AM_REST_Settings_Controller' ) ) {
|
|
84 |
* @return array
|
85 |
*/
|
86 |
public function create_or_update_settings( WP_REST_Request $data ) {
|
87 |
-
$options
|
88 |
-
$options['version'] = AFTERSHIP_VERSION;
|
89 |
|
90 |
if ( isset( $data['custom_domain'] ) && $data['custom_domain'] ) {
|
91 |
if ( 'track.aftership.com' === $this->seek_option_value( $options, 'custom_domain' ) || '' === $this->seek_option_value( $options, 'custom_domain' ) ) {
|
@@ -108,7 +109,7 @@ if ( ! class_exists( 'AM_REST_Settings_Controller' ) ) {
|
|
108 |
}
|
109 |
}
|
110 |
update_option( $this->option_name, $options );
|
111 |
-
return
|
112 |
}
|
113 |
|
114 |
/**
|
38 |
/**
|
39 |
* GET AfterShip Settings
|
40 |
*
|
|
|
41 |
* @return array
|
42 |
*/
|
43 |
+
public function get_settings() {
|
44 |
+
$settings = get_option( $this->option_name );
|
45 |
+
$settings['currency'] = get_woocommerce_currency();
|
46 |
+
$settings['weight_unit'] = get_option( 'woocommerce_weight_unit' );
|
47 |
+
$settings['locale'] = get_locale();
|
48 |
+
$settings['version'] = array(
|
49 |
'wordpress' => get_bloginfo( 'version' ),
|
50 |
'woocommerce' => WC()->version,
|
51 |
'aftership' => AFTERSHIP_VERSION,
|
86 |
* @return array
|
87 |
*/
|
88 |
public function create_or_update_settings( WP_REST_Request $data ) {
|
89 |
+
$options = get_option( $this->option_name );
|
|
|
90 |
|
91 |
if ( isset( $data['custom_domain'] ) && $data['custom_domain'] ) {
|
92 |
if ( 'track.aftership.com' === $this->seek_option_value( $options, 'custom_domain' ) || '' === $this->seek_option_value( $options, 'custom_domain' ) ) {
|
109 |
}
|
110 |
}
|
111 |
update_option( $this->option_name, $options );
|
112 |
+
return $this->get_settings();
|
113 |
}
|
114 |
|
115 |
/**
|
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.
|
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.8 =
|
140 |
* Update courier list
|
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.9
|
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.9 =
|
140 |
+
* Add some fields for settings API
|
141 |
+
|
142 |
= 1.13.8 =
|
143 |
* Update courier list
|
144 |
|