Version Description
- 2020-06-05 =
- Tweak - Dismiss activation notice independent of user.
See changelog for all versions.
Download this release
Release Info
| Developer | bartoszbudzanowski |
| Plugin | |
| Version | 4.1.37 |
| Comparing to | |
| See all releases | |
Code changes from version 4.1.36 to 4.1.37
- assets/css/admin.css +8 -1
- changelog.txt +3 -0
- includes/class-wc-shipstation-integration.php +29 -5
- languages/woocommerce-shipstation.pot +14 -10
- readme.txt +3 -3
- woocommerce-shipstation.php +3 -3
assets/css/admin.css
CHANGED
|
@@ -8,4 +8,11 @@
|
|
| 8 |
content: "\f504";
|
| 9 |
display: inline-block;
|
| 10 |
vertical-align: bottom;
|
| 11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
content: "\f504";
|
| 9 |
display: inline-block;
|
| 10 |
vertical-align: bottom;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
.woocommerce-shipstation-activation-notice-dismiss {
|
| 14 |
+
position: relative;
|
| 15 |
+
float: right;
|
| 16 |
+
padding: 9px 0px 9px 9px 9px;
|
| 17 |
+
text-decoration: none;
|
| 18 |
+
}
|
changelog.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
*** ShipStation for WooCommerce ***
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
= 4.1.36 - 2020-04-29 =
|
| 4 |
* Tweak - WC 4.1 compatibility.
|
| 5 |
|
| 1 |
*** ShipStation for WooCommerce ***
|
| 2 |
|
| 3 |
+
= 4.1.37 - 2020-06-05 =
|
| 4 |
+
* Tweak - Dismiss activation notice independent of user.
|
| 5 |
+
|
| 6 |
= 4.1.36 - 2020-04-29 =
|
| 7 |
* Tweak - WC 4.1 compatibility.
|
| 8 |
|
includes/class-wc-shipstation-integration.php
CHANGED
|
@@ -43,12 +43,16 @@ class WC_ShipStation_Integration extends WC_Integration {
|
|
| 43 |
// Hooks
|
| 44 |
add_action( 'woocommerce_update_options_integration_shipstation', array( $this, 'process_admin_options' ) );
|
| 45 |
add_filter( 'woocommerce_subscriptions_renewal_order_meta_query', array( $this, 'subscriptions_renewal_order_meta_query' ), 10, 4 );
|
|
|
|
| 46 |
|
|
|
|
| 47 |
$settings_notice_dismissed = get_user_meta( get_current_user_id(), 'dismissed_shipstation-setup_notice' );
|
| 48 |
|
| 49 |
-
if ( ! $settings_notice_dismissed ) {
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
}
|
| 54 |
|
|
@@ -97,6 +101,26 @@ class WC_ShipStation_Integration extends WC_Integration {
|
|
| 97 |
return $order_meta_query;
|
| 98 |
}
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
/**
|
| 101 |
* Settings prompt
|
| 102 |
*/
|
|
@@ -107,9 +131,9 @@ class WC_ShipStation_Integration extends WC_Integration {
|
|
| 107 |
|
| 108 |
$logo_title = __( 'ShipStation logo', 'woocommerce-shipstation' );
|
| 109 |
?>
|
| 110 |
-
<div
|
| 111 |
<img class="shipstation-logo" alt="<?php echo esc_attr( $logo_title ); ?>" title="<?php echo esc_attr( $logo_title ); ?>" src="<?php echo plugins_url( 'assets/images/shipstation-logo-blue.png', dirname( __FILE__ ) ); ?>" />
|
| 112 |
-
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', '
|
| 113 |
<p>
|
| 114 |
<?php
|
| 115 |
printf(
|
| 43 |
// Hooks
|
| 44 |
add_action( 'woocommerce_update_options_integration_shipstation', array( $this, 'process_admin_options' ) );
|
| 45 |
add_filter( 'woocommerce_subscriptions_renewal_order_meta_query', array( $this, 'subscriptions_renewal_order_meta_query' ), 10, 4 );
|
| 46 |
+
add_action( 'wp_loaded', array( $this, 'hide_notices' ) );
|
| 47 |
|
| 48 |
+
$hide_notice = get_option( 'wc_shipstation_hide_activate_notice', '' );
|
| 49 |
$settings_notice_dismissed = get_user_meta( get_current_user_id(), 'dismissed_shipstation-setup_notice' );
|
| 50 |
|
| 51 |
+
if ( current_user_can( 'manage_woocommerce' ) && ( 'yes' !== $hide_notice && ! $settings_notice_dismissed ) ) {
|
| 52 |
+
if ( ! isset( $_GET['wc-shipstation-hide-notice'] ) ) {
|
| 53 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
| 54 |
+
add_action( 'admin_notices', array( $this, 'settings_notice' ) );
|
| 55 |
+
}
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
| 101 |
return $order_meta_query;
|
| 102 |
}
|
| 103 |
|
| 104 |
+
/**
|
| 105 |
+
* Hides any admin notices.
|
| 106 |
+
*
|
| 107 |
+
* @since 4.1.37
|
| 108 |
+
* @return void
|
| 109 |
+
*/
|
| 110 |
+
public function hide_notices() {
|
| 111 |
+
if ( isset( $_GET['wc-shipstation-hide-notice'] ) && isset( $_GET['_wc_shipstation_notice_nonce'] ) ) {
|
| 112 |
+
if ( ! wp_verify_nonce( $_GET['_wc_shipstation_notice_nonce'], 'wc_shipstation_hide_notices_nonce' ) ) {
|
| 113 |
+
wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce-shipstation' ) );
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
| 117 |
+
wp_die( __( 'Cheatin’ huh?', 'woocommerce-shipstation' ) );
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
update_option( 'wc_shipstation_hide_activate_notice', 'yes' );
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
/**
|
| 125 |
* Settings prompt
|
| 126 |
*/
|
| 131 |
|
| 132 |
$logo_title = __( 'ShipStation logo', 'woocommerce-shipstation' );
|
| 133 |
?>
|
| 134 |
+
<div class="notice notice-warning">
|
| 135 |
<img class="shipstation-logo" alt="<?php echo esc_attr( $logo_title ); ?>" title="<?php echo esc_attr( $logo_title ); ?>" src="<?php echo plugins_url( 'assets/images/shipstation-logo-blue.png', dirname( __FILE__ ) ); ?>" />
|
| 136 |
+
<a class="woocommerce-message-close notice-dismiss woocommerce-shipstation-activation-notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-shipstation-hide-notice', '' ), 'wc_shipstation_hide_notices_nonce', '_wc_shipstation_notice_nonce' ) ); ?>"></a>
|
| 137 |
<p>
|
| 138 |
<?php
|
| 139 |
printf(
|
languages/woocommerce-shipstation.pot
CHANGED
|
@@ -2,10 +2,10 @@
|
|
| 2 |
# This file is distributed under the same license as the WooCommerce - ShipStation Integration package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: WooCommerce - ShipStation Integration 4.1.
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
|
| 8 |
-
"POT-Creation-Date: 2020-
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -122,15 +122,19 @@ msgid ""
|
|
| 122 |
"& packing slips with ease."
|
| 123 |
msgstr ""
|
| 124 |
|
| 125 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 126 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
msgstr ""
|
| 128 |
|
| 129 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 130 |
-
msgid "
|
| 131 |
msgstr ""
|
| 132 |
|
| 133 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 134 |
#. translators: %s: ShipStation URL
|
| 135 |
msgid ""
|
| 136 |
"To begin printing shipping labels with ShipStation head over to <a "
|
|
@@ -138,18 +142,18 @@ msgid ""
|
|
| 138 |
"target=\"_blank\">ShipStation.com</a> and log in or create a new account."
|
| 139 |
msgstr ""
|
| 140 |
|
| 141 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 142 |
#. translators: %s: ShipStation Auth Key
|
| 143 |
msgid ""
|
| 144 |
"After logging in, add a selling channel for WooCommerce and use your Auth "
|
| 145 |
"Key (<code>%s</code>) to connect your store."
|
| 146 |
msgstr ""
|
| 147 |
|
| 148 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 149 |
msgid "Once connected you're good to go!"
|
| 150 |
msgstr ""
|
| 151 |
|
| 152 |
-
#: includes/class-wc-shipstation-integration.php:
|
| 153 |
#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
|
| 154 |
#. documentation URL
|
| 155 |
msgid ""
|
| 2 |
# This file is distributed under the same license as the WooCommerce - ShipStation Integration package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce - ShipStation Integration 4.1.37\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
|
| 8 |
+
"POT-Creation-Date: 2020-06-05 22:49:06+00:00\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 122 |
"& packing slips with ease."
|
| 123 |
msgstr ""
|
| 124 |
|
| 125 |
+
#: includes/class-wc-shipstation-integration.php:113
|
| 126 |
+
msgid "Action failed. Please refresh the page and retry."
|
| 127 |
+
msgstr ""
|
| 128 |
+
|
| 129 |
+
#: includes/class-wc-shipstation-integration.php:117
|
| 130 |
+
msgid "Cheatin’ huh?"
|
| 131 |
msgstr ""
|
| 132 |
|
| 133 |
+
#: includes/class-wc-shipstation-integration.php:132
|
| 134 |
+
msgid "ShipStation logo"
|
| 135 |
msgstr ""
|
| 136 |
|
| 137 |
+
#: includes/class-wc-shipstation-integration.php:142
|
| 138 |
#. translators: %s: ShipStation URL
|
| 139 |
msgid ""
|
| 140 |
"To begin printing shipping labels with ShipStation head over to <a "
|
| 142 |
"target=\"_blank\">ShipStation.com</a> and log in or create a new account."
|
| 143 |
msgstr ""
|
| 144 |
|
| 145 |
+
#: includes/class-wc-shipstation-integration.php:160
|
| 146 |
#. translators: %s: ShipStation Auth Key
|
| 147 |
msgid ""
|
| 148 |
"After logging in, add a selling channel for WooCommerce and use your Auth "
|
| 149 |
"Key (<code>%s</code>) to connect your store."
|
| 150 |
msgstr ""
|
| 151 |
|
| 152 |
+
#: includes/class-wc-shipstation-integration.php:167
|
| 153 |
msgid "Once connected you're good to go!"
|
| 154 |
msgstr ""
|
| 155 |
|
| 156 |
+
#: includes/class-wc-shipstation-integration.php:174
|
| 157 |
#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
|
| 158 |
#. documentation URL
|
| 159 |
msgid ""
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: shipping, woocommerce, automattic
|
|
| 4 |
Requires at least: 4.4
|
| 5 |
Tested up to: 5.4
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 4.1.
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -46,7 +46,7 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
| 49 |
-
= 4.1.
|
| 50 |
-
* Tweak -
|
| 51 |
|
| 52 |
[See changelog for all versions](https://github.com/woocommerce/woocommerce-shipstation/raw/master/changelog.txt).
|
| 4 |
Requires at least: 4.4
|
| 5 |
Tested up to: 5.4
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 4.1.37
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
| 49 |
+
= 4.1.37 - 2020-06-05 =
|
| 50 |
+
* Tweak - Dismiss activation notice independent of user.
|
| 51 |
|
| 52 |
[See changelog for all versions](https://github.com/woocommerce/woocommerce-shipstation/raw/master/changelog.txt).
|
woocommerce-shipstation.php
CHANGED
|
@@ -2,14 +2,14 @@
|
|
| 2 |
/**
|
| 3 |
* Plugin Name: WooCommerce - ShipStation Integration
|
| 4 |
* Plugin URI: https://woocommerce.com/products/shipstation-integration/
|
| 5 |
-
* Version: 4.1.
|
| 6 |
* Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
|
| 7 |
* Author: WooCommerce
|
| 8 |
* Author URI: https://woocommerce.com/
|
| 9 |
* Text Domain: woocommerce-shipstation
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Tested up to: 5.4
|
| 12 |
-
* WC tested up to: 4.
|
| 13 |
* WC requires at least: 2.6
|
| 14 |
*/
|
| 15 |
|
|
@@ -41,7 +41,7 @@ function woocommerce_shipstation_init() {
|
|
| 41 |
return;
|
| 42 |
}
|
| 43 |
|
| 44 |
-
define( 'WC_SHIPSTATION_VERSION', '4.1.
|
| 45 |
define( 'WC_SHIPSTATION_FILE', __FILE__ );
|
| 46 |
|
| 47 |
if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
|
| 2 |
/**
|
| 3 |
* Plugin Name: WooCommerce - ShipStation Integration
|
| 4 |
* Plugin URI: https://woocommerce.com/products/shipstation-integration/
|
| 5 |
+
* Version: 4.1.37
|
| 6 |
* Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
|
| 7 |
* Author: WooCommerce
|
| 8 |
* Author URI: https://woocommerce.com/
|
| 9 |
* Text Domain: woocommerce-shipstation
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Tested up to: 5.4
|
| 12 |
+
* WC tested up to: 4.2
|
| 13 |
* WC requires at least: 2.6
|
| 14 |
*/
|
| 15 |
|
| 41 |
return;
|
| 42 |
}
|
| 43 |
|
| 44 |
+
define( 'WC_SHIPSTATION_VERSION', '4.1.37' ); // WRCS: DEFINED_VERSION.
|
| 45 |
define( 'WC_SHIPSTATION_FILE', __FILE__ );
|
| 46 |
|
| 47 |
if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
|
