Plugin Directory

Changeset 3807496


Ignore:
Timestamp:
11/17/2026 01:34:05 PM (less than one hour ago)
Author:
tpaksu
Message:

Tagging version 5.4.2

Location:
woocommerce-shipstation-integration
Files:
2 added
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woocommerce-shipstation-integration/tags/5.4.2/changelog.txt

    r3795802 r3807496  
    11*** ShipStation for WooCommerce ***
     2
     3= 5.4.2 - 2026-11-17 =
     4* Fix   - Security update.
     5* Tweak - Plugin-generated API keys now belong to a new ShipStation API user with limited permissions. Existing plugin keys move to it and keep working with ShipStation, but no longer reach orders, products or customers on other WooCommerce REST API routes.
    26
    37= 5.4.1 - 2026-11-11 =
  • woocommerce-shipstation-integration/tags/5.4.2/includes/api/rest/class-api-controller.php

    r3795802 r3807496  
    1212}
    1313
     14use WooCommerce\Shipping\ShipStation\API_User;
    1415use WooCommerce\Shipping\ShipStation\Auth_Controller;
    1516use WooCommerce\Shipping\ShipStation\Connection_Log;
    … …  
    235236                        $proxied_row = $row;
    236237                }
     238
     239                // A key owned by the ShipStation API user must keep working after that
     240                // user lost its role on this site.
     241                API_User::repair_current_user();
    237242
    238243                // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Public hook name retained for backward compatibility.
  • woocommerce-shipstation-integration/tags/5.4.2/includes/class-auth-controller.php

    r3723614 r3807496  
    5050         * Plaintext prefix prepended to every plugin-generated consumer_secret.
    5151         *
    52          * Stored verbatim in `consumer_secret char(43)`, so this prefix is the
    53          * single source of truth for "did this plugin create this row?", used by
    54          * the inline credentials section, the settings-tab key list, and the per-row
    55          * delete ({@see delete_plugin_key_row()}) to identify our rows without
    56          * false-positive risk against merchant-created keys.
     52         * Stored verbatim in `consumer_secret char(43)`, so this prefix tells which
     53         * rows this plugin minted, without false-positive risk against
     54         * merchant-created keys. The inline credentials section, the settings-tab
     55         * key list and the per-row delete ({@see delete_plugin_key_row()}) use it.
     56         * The key list and the delete also accept unprefixed rows from before 5.0.8
     57         * that the ShipStation API user key sync moved or left alone
     58         * ({@see API_User::get_moved_key_ids()}, {@see API_User::get_skipped_key_ids()}).
    5759         *
    5860         * Length budget: prefix (8) + `wc_rand_hash()` tail (35) = 43, exactly
    … …  
    319321
    320322        /**
    321          * Return the first admin user ID to assign as the API key owner.
    322          *
    323          * WooCommerce REST auth runs every request under the key owner's capabilities.
    324          * Tying the key to the triggering user is unsafe: that user may later lose their
    325          * role or be deleted, causing every REST endpoint to return rest_forbidden.
    326          * Using the first administrator keeps the key stable.
    327          *
    328          * @return int
    329          */
    330         private function get_admin_user_id(): int {
    331                 // Try site-level administrators first (works on single site and multisite).
    332                 $admins = get_users(
    333                         array(
    334                                 'role'        => 'administrator',
    335                                 'number'      => 1,
    336                                 'orderby'     => 'ID',
    337                                 'order'       => 'ASC',
    338                                 'fields'      => 'ID',
    339                                 'count_total' => false,
    340                         )
    341                 );
    342 
    343                 if ( ! empty( $admins ) ) {
    344                         return (int) $admins[0];
    345                 }
    346 
    347                 // On multisite, fall back to the first network super admin.
    348                 // get_users() only queries site-level roles, so super admins who haven't
    349                 // been explicitly added to this site won't appear in the query above.
    350                 if ( is_multisite() ) {
    351                         $super_admins = get_super_admins();
    352                         $user         = ! empty( $super_admins ) ? get_user_by( 'login', $super_admins[0] ) : false;
    353 
    354                         if ( $user ) {
    355                                 return $user->ID;
    356                         }
    357                 }
    358 
    359                 return get_current_user_id();
    360         }
    361 
    362         /**
    363323         * Generate new WooCommerce REST API credentials for the direct key set.
    364324         *
    … …  
    396356                global $wpdb;
    397357
     358                // The key belongs to the ShipStation API user, never to an administrator
     359                // or to the person generating it. No user, no key.
     360                $owner_id = API_User::ensure();
     361                if ( is_wp_error( $owner_id ) ) {
     362                        Logger::error( 'Failed to create the ShipStation API user, so no API key was generated: ' . $owner_id->get_error_message() );
     363                        return array();
     364                }
     365
    398366                // 8-char prefix + 35-char random tail = 43 chars total, exactly
    399367                // matching WC's default key shape and fitting `consumer_secret char(43)`.
    … …  
    403371
    404372                $data = array(
    405                         'user_id'         => $this->get_admin_user_id(),
     373                        'user_id'         => $owner_id,
    406374                        'description'     => $description,
    407375                        'permissions'     => 'read_write',
    … …  
    698666         *
    699667         * Rows are identified by the set prefixes on the plaintext
    700          * `consumer_secret`; merchant-created keys never appear here. Powers the
    701          * settings-tab key list from which the merchant retires old pairs.
    702          *
    703          * @since 5.2.0
    704          *
    705          * @return array[] Each: ['key_id' => int, 'transports' => string[], 'transport_last_seen' => array<string,string>, 'description' => string, 'truncated_key' => string, 'last_access' => string|null].
     668         * `consumer_secret`, plus the keys from before 5.0.8 that were moved to the
     669         * ShipStation API user or left alone because their owner could not use
     670         * them, which have no prefix. Other merchant-created keys never appear here.
     671         * A hand-made key described "ShipStation Integration" can be among the
     672         * moved or skipped rows, because the one-time move cannot tell it apart.
     673         * Powers the settings-tab key list from which the merchant retires old pairs.
     674         *
     675         * @since 5.2.0
     676         *
     677         * @return array[] Each: ['key_id' => int, 'user_id' => int, 'transports' => string[], 'transport_last_seen' => array<string,string>, 'description' => string, 'truncated_key' => string, 'last_access' => string|null, 'is_prefixed' => bool].
    706678         */
    707679        public static function get_plugin_key_rows(): array {
    708680                global $wpdb;
    709681
    710                 $rows = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    711                         $wpdb->prepare(
    712                                 "SELECT key_id, description, truncated_key, last_access FROM {$wpdb->prefix}woocommerce_api_keys WHERE consumer_secret LIKE %s OR consumer_secret LIKE %s ORDER BY key_id DESC",
    713                                 $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
    714                                 $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%'
     682                // Keys from before 5.0.8 the key sync moved or left alone. A store manager
     683                // cannot revoke a moved one on WooCommerce's REST API screen once the API
     684                // user owns it, and a key left alone is listed so it can be marked refused.
     685                $synced_ids = array_values( array_unique( array_merge( API_User::get_moved_key_ids(), API_User::get_skipped_key_ids() ) ) );
     686                $synced_sql = '';
     687                if ( array() !== $synced_ids ) {
     688                        $synced_sql = ' OR key_id IN (' . implode( ',', array_fill( 0, count( $synced_ids ), '%d' ) ) . ')';
     689                }
     690
     691                // phpcs:ignore WordPress.DB.DirectDatabaseQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter -- $synced_sql is a generated list of %d tokens consumed by prepare(); every id is bound.
     692                $rows = $wpdb->get_results(
     693                        $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber -- Two prefixes, then one id per %d in $synced_sql.
     694                                "SELECT key_id, user_id, description, truncated_key, last_access, consumer_secret FROM {$wpdb->prefix}woocommerce_api_keys WHERE consumer_secret LIKE %s OR consumer_secret LIKE %s{$synced_sql} ORDER BY key_id DESC", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $synced_sql holds only %d placeholders.
     695                                array_merge(
     696                                        array(
     697                                                $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
     698                                                $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%',
     699                                        ),
     700                                        $synced_ids
     701                                )
    715702                        ),
    716703                        ARRAY_A
    … …  
    720707                        return array();
    721708                }
     709
     710                // A recorded id on another key is a new key that got a deleted key's id.
     711                $rows = array_values(
     712                        array_filter(
     713                                $rows,
     714                                static function ( $row ) {
     715                                        return self::is_plugin_secret( (string) ( $row['consumer_secret'] ?? '' ) )
     716                                                || API_User::is_recorded_key( (int) $row['key_id'], (string) ( $row['truncated_key'] ?? '' ) );
     717                                }
     718                        )
     719                );
    722720
    723721                $key_ids = array();
    … …  
    735733                        $result[] = array(
    736734                                'key_id'              => $key_id,
     735                                'user_id'             => (int) ( $row['user_id'] ?? 0 ),
    737736                                // Observed transports the key has actually authenticated over —
    738737                                // the honest basis for the "Type" column ('wpcom'/'direct'/both).
    … …  
    744743                                'truncated_key'       => isset( $row['truncated_key'] ) ? (string) $row['truncated_key'] : '',
    745744                                'last_access'         => isset( $row['last_access'] ) ? $row['last_access'] : null,
     745                                // The secret itself is not passed on.
     746                                'is_prefixed'         => self::is_plugin_secret( (string) ( $row['consumer_secret'] ?? '' ) ),
    746747                        );
    747748                }
    … …  
    751752
    752753        /**
     754         * Whether the current user may delete a key row through the plugin's key list.
     755         *
     756         * A prefixed row is the plugin's. A row from before 5.0.8 is deletable while
     757         * the ShipStation API user owns it after the move. A row the key sync left
     758         * alone may still work on other routes as its owner, so it follows
     759         * WooCommerce's revoke rule: the current user can edit the owner, which
     760         * includes the owner itself. A key whose owner was deleted works nowhere, so
     761         * anyone who manages the key list may delete it.
     762         *
     763         * @internal The row values must come from the database, as in {@see delete_plugin_key_row()}.
     764         *
     765         * @since 5.4.2
     766         *
     767         * @param int  $key_id      Row id.
     768         * @param int  $owner_id    Row owner.
     769         * @param bool $is_prefixed Whether the row's consumer secret has a plugin prefix.
     770         *
     771         * @return bool
     772         */
     773        public static function current_user_may_delete_key_row( int $key_id, int $owner_id, bool $is_prefixed ): bool {
     774                if ( $is_prefixed ) {
     775                        return true;
     776                }
     777
     778                $api_user_id = API_User::get_user_id();
     779                if ( $api_user_id > 0 && $owner_id === $api_user_id && in_array( $key_id, API_User::get_moved_key_ids(), true ) ) {
     780                        return true;
     781                }
     782
     783                if ( in_array( $key_id, API_User::get_skipped_key_ids(), true ) ) {
     784                        return ! get_userdata( $owner_id ) || current_user_can( 'edit_user', $owner_id );
     785                }
     786
     787                return false;
     788        }
     789
     790        /**
    753791         * Delete one plugin-generated key row by id.
    754792         *
    755          * The WHERE clause re-checks the set prefixes, so a merchant-created row
    756          * can never be deleted through this path no matter what id is posted.
     793         * Checks {@see current_user_may_delete_key_row()} first, so a row that is
     794         * neither prefixed nor recorded by the API user key sync can never be
     795         * deleted through this path no matter what id is posted, and the delete is
     796         * bound to the owner that was checked.
    757797         *
    758798         * @since 5.2.0
    … …  
    765805                global $wpdb;
    766806
     807                $row = $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     808                        $wpdb->prepare( "SELECT user_id, consumer_secret, truncated_key FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d", $key_id )
     809                );
     810                if ( '' !== $wpdb->last_error ) {
     811                        Logger::error( 'Failed to delete ShipStation API key row. DB error: ' . $wpdb->last_error );
     812                        return false;
     813                }
     814                if ( ! $row ) {
     815                        return false;
     816                }
     817
     818                // An unprefixed row is the plugin's only while the key sync recorded this very key.
     819                $is_prefixed = self::is_plugin_secret( (string) $row->consumer_secret );
     820                if ( ! $is_prefixed && ! API_User::is_recorded_key( $key_id, (string) $row->truncated_key ) ) {
     821                        return false;
     822                }
     823                if ( ! self::current_user_may_delete_key_row( $key_id, (int) $row->user_id, $is_prefixed ) ) {
     824                        return false;
     825                }
     826
    767827                $result = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    768828                        $wpdb->prepare(
    769                                 "DELETE FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d AND ( consumer_secret LIKE %s OR consumer_secret LIKE %s )",
     829                                "DELETE FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d AND user_id = %d",
    770830                                $key_id,
    771                                 $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
    772                                 $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%'
     831                                (int) $row->user_id
    773832                        )
    774833                );
    … …  
    781840                if ( $result > 0 ) {
    782841                        self::forget_key_meta( $key_id );
     842                        API_User::forget_key( $key_id );
    783843                }
    784844
    … …  
    891951                if ( ! current_user_can( 'manage_woocommerce' ) ) {
    892952                        wp_die( esc_html__( 'You do not have sufficient permissions.', 'woocommerce-shipstation-integration' ) );
     953                }
     954
     955                // The key acts with the API user's capabilities, so its creator must hold
     956                // each of them. A custom role can reach this screen with only the first.
     957                foreach ( API_User::CAPABILITIES as $capability ) {
     958                        // phpcs:ignore WordPress.WP.Capabilities.Undetermined -- WooCommerce core capabilities, listed in API_User::CAPABILITIES.
     959                        if ( ! current_user_can( $capability ) ) {
     960                                Logger::info( sprintf( 'ShipStation API keys were not generated for user ID %d, who lacks the %s capability.', get_current_user_id(), $capability ) );
     961                                wp_send_json_error(
     962                                        array(
     963                                                'message' => __( 'Your account cannot generate ShipStation API keys. It needs permission to manage WooCommerce and to manage product categories, tags and attributes. Ask an administrator to generate them.', 'woocommerce-shipstation-integration' ),
     964                                        )
     965                                );
     966                                return;
     967                        }
     968                }
     969
     970                // Checked here, before the key insert, so the merchant is told that the
     971                // user, not the database, is the problem.
     972                $api_user = API_User::ensure();
     973                if ( is_wp_error( $api_user ) ) {
     974                        Logger::error( 'Failed to set up the ShipStation API user, so no API key was generated: ' . $api_user->get_error_message() );
     975
     976                        switch ( $api_user->get_error_code() ) {
     977                                case 'shipstation_api_user_busy':
     978                                        $message = __( 'Another request is setting up the ShipStation API user. Wait a moment, then try again.', 'woocommerce-shipstation-integration' );
     979                                        break;
     980                                case 'shipstation_api_user_role':
     981                                        $message = __( 'The ShipStation API user could not get the permissions it needs, so no keys were generated. A role editor plugin may be removing them. See the ShipStation log under WooCommerce > Status > Logs.', 'woocommerce-shipstation-integration' );
     982                                        break;
     983                                default:
     984                                        $message = __( 'The ShipStation API user could not be created, so no keys were generated. Another plugin may be blocking new user accounts. See the ShipStation log under WooCommerce > Status > Logs for the reason.', 'woocommerce-shipstation-integration' );
     985                        }
     986
     987                        wp_send_json_error( array( 'message' => $message ) );
     988                        return;
    893989                }
    894990
    … …  
    9611057
    9621058                if ( $key_id <= 0 || ! self::delete_plugin_key_row( $key_id ) ) {
    963                         wp_send_json_error(
    964                                 array( 'message' => __( 'This key could not be deleted. It may have been removed already.', 'woocommerce-shipstation-integration' ) )
    965                         );
     1059                        global $wpdb;
     1060
     1061                        // The row is still there, so the delete was refused or failed, not too late.
     1062                        $row         = $key_id > 0 ? $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     1063                                $wpdb->prepare( "SELECT truncated_key, consumer_secret FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d", $key_id )
     1064                        ) : null;
     1065                        $still_there = null !== $row;
     1066
     1067                        // A refused row the key list shows belongs to an owner the current user cannot edit.
     1068                        $is_listed = $still_there && API_User::is_recorded_key( $key_id, (string) $row->truncated_key );
     1069
     1070                        if ( ! $still_there ) {
     1071                                $message = __( 'This key could not be deleted. It may have been removed already.', 'woocommerce-shipstation-integration' );
     1072                        } elseif ( self::is_plugin_secret( (string) $row->consumer_secret ) ) {
     1073                                // A prefixed row is never refused, so the delete itself failed.
     1074                                $message = __( 'This key could not be deleted. Try again, and see the ShipStation log under WooCommerce > Status > Logs if it keeps failing.', 'woocommerce-shipstation-integration' );
     1075                        } elseif ( $is_listed ) {
     1076                                $message = __( 'You cannot delete this key here. Someone who can edit its owner can revoke it under WooCommerce > Settings > Advanced > REST API.', 'woocommerce-shipstation-integration' );
     1077                        } else {
     1078                                $message = __( 'You cannot delete this key here. It is not in the ShipStation key list.', 'woocommerce-shipstation-integration' );
     1079                        }
     1080
     1081                        wp_send_json_error( array( 'message' => $message ) );
    9661082                        return;
    9671083                }
    … …  
    11421258                global $wpdb;
    11431259
     1260                // A store nobody signs in to gets its keys moved here. After that, put
     1261                // the role back and reclaim keys whose API user was deleted.
     1262                API_User::maybe_sync();
     1263                $synced = API_User::sync_keys();
     1264                if ( is_wp_error( $synced ) ) {
     1265                        Logger::error( 'Could not repair the ShipStation API user: ' . $synced->get_error_message() );
     1266                }
     1267
    11441268                // Give any untracked plugin key a mint baseline so legacy never-used keys
    11451269                // become prunable rather than lingering forever.
  • woocommerce-shipstation-integration/tags/5.4.2/includes/class-main.php

    r3795802 r3807496  
    7979        public function __construct() {
    8080                add_action( 'plugins_loaded', array( $this, 'init' ) );
     81
     82                // Registered here, not in init(), so the ShipStation API user stays
     83                // protected while WooCommerce is inactive.
     84                require_once WC_SHIPSTATION_ABSPATH . 'includes/class-api-user.php';
     85                API_User::register_protection();
    8186                add_filter( 'woocommerce_integrations', array( $this, 'load_integration' ) );
    8287                add_action( 'woocommerce_api_wc_shipstation', array( $this, 'load_api' ) );
    … …  
    137142                // schedules the recurring action on `init`.
    138143                Auth_Controller::register_orphan_prune();
     144
     145                // Move this site's existing API keys to the ShipStation API user, once,
     146                // on an admin request or in the daily key job.
     147                API_User::register();
    139148
    140149                add_action( 'before_woocommerce_init', array( $this, 'before_woocommerce_init' ) );
  • woocommerce-shipstation-integration/tags/5.4.2/includes/class-wc-shipstation-integration.php

    r3795802 r3807496  
    1313use WooCommerce\Shipping\ShipStation\Enum_Helper;
    1414use WooCommerce\Shipping\ShipStation\Logger;
     15use WooCommerce\Shipping\ShipStation\API_User;
    1516use WooCommerce\Shipping\ShipStation\Auth_Controller;
    1617use WooCommerce\Shipping\ShipStation\Connection_Log;
    … …  
    16781679                // protects and the most likely live credential, so it alone is flagged
    16791680                // "(newest)" and never carries an auto-remove countdown.
    1680                 $newest_key_id = isset( $rows[0]['key_id'] ) ? (int) $rows[0]['key_id'] : 0;
     1681                // The list also holds unprefixed keys from before 5.0.8, which the prune
     1682                // never looks at, so the newest is the newest prefixed row.
     1683                $newest_key_id = 0;
     1684                foreach ( $rows as $row ) {
     1685                        if ( ! empty( $row['is_prefixed'] ) ) {
     1686                                $newest_key_id = (int) $row['key_id'];
     1687                                break;
     1688                        }
     1689                }
    16811690
    16821691                // Order by "Last seen": the freshly-generated New key is always pinned to
    … …  
    17241733                ob_start();
    17251734
     1735                // Repair the API user before listing its keys: put its role back, and on
     1736                // multisite, or after a delete made without WooCommerce active, give the
     1737                // keys of a deleted API user to its replacement.
     1738                $synced = API_User::sync_keys();
     1739                if ( is_wp_error( $synced ) ) {
     1740                        Logger::error( 'Could not repair the ShipStation API user: ' . $synced->get_error_message() );
     1741                }
     1742                $api_user_id = API_User::get_user_id();
     1743                $api_user    = $api_user_id > 0 ? get_userdata( $api_user_id ) : false;
     1744
    17261745                list( $key_rows, $newest_key_id ) = self::get_sorted_plugin_key_rows();
    17271746
    … …  
    17441763                        $rows_for_key                        = isset( $connections_by_key[ (int) $key_row['key_id'] ] ) ? $connections_by_key[ (int) $key_row['key_id'] ] : array();
    17451764                        $key_rows[ $index ]['rollup_status'] = Connection_Log::key_rollup_status( $rows_for_key, $active_window, $transport_enabled, $current_host, $is_wpcom_connected );
     1765                        $key_rows[ $index ]['can_delete']    = Auth_Controller::current_user_may_delete_key_row( (int) $key_row['key_id'], (int) $key_row['user_id'], ! empty( $key_row['is_prefixed'] ) );
     1766                }
     1767
     1768                // Refused keys among the listed rows, matched by fingerprint, so a new key
     1769                // that got a skipped key's id is not marked refused.
     1770                // Among them, a key whose owner still holds manage_product_terms passes
     1771                // the order and inventory routes, so ShipStation still imports with it.
     1772                $skipped_key_ids        = array();
     1773                $usable_skipped_key_ids = array();
     1774                foreach ( $key_rows as $key_row ) {
     1775                        if ( in_array( (int) $key_row['key_id'], API_User::get_skipped_key_ids(), true ) && API_User::is_recorded_key( (int) $key_row['key_id'], (string) $key_row['truncated_key'] ) ) {
     1776                                $skipped_key_ids[] = (int) $key_row['key_id'];
     1777
     1778                                // phpcs:ignore WordPress.WP.Capabilities.Unknown -- WooCommerce core capability.
     1779                                if ( get_userdata( (int) $key_row['user_id'] ) && user_can( (int) $key_row['user_id'], 'manage_product_terms' ) ) {
     1780                                        $usable_skipped_key_ids[] = (int) $key_row['key_id'];
     1781                                }
     1782                        }
    17461783                }
    17471784
    … …  
    17491786                        'api-key-list.php',
    17501787                        array(
    1751                                 'rows'              => $key_rows,
    1752                                 'active_window'     => $active_window,
    1753                                 'transport_enabled' => $transport_enabled,
    1754                                 'date_format'       => get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
    1755                                 'newest_key_id'     => $newest_key_id,
     1788                                'rows'                   => $key_rows,
     1789                                'active_window'          => $active_window,
     1790                                'transport_enabled'      => $transport_enabled,
     1791                                'date_format'            => get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
     1792                                'newest_key_id'          => $newest_key_id,
     1793                                'api_user_login'         => $api_user ? $api_user->user_login : '',
     1794                                'api_user_id'            => $api_user ? $api_user_id : 0,
     1795                                'api_user_errors'        => API_User::get_errors(),
     1796                                'skipped_key_ids'        => $skipped_key_ids,
     1797                                'usable_skipped_key_ids' => $usable_skipped_key_ids,
    17561798                        ),
    17571799                        '',
  • woocommerce-shipstation-integration/tags/5.4.2/languages/woocommerce-shipstation.pot

    r3795802 r3807496  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 5.4.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 5.4.2\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2026-11-11 07:27:21+00:00\n"
     8"POT-Creation-Date: 2026-11-17 13:33:20+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
    … …  
    144144msgstr ""
    145145
    146 #: includes/api/rest/class-api-controller.php:287
     146#: includes/api/rest/class-api-controller.php:292
    147147msgid "Invalid ShipStation credentials."
    148148msgstr ""
    … …  
    375375
    376376#: includes/checkout/class-checkout-rates-options.php:637
    377 #: includes/class-wc-shipstation-integration.php:1458
     377#: includes/class-wc-shipstation-integration.php:1459
    378378#: vendor/automattic/jetpack-connection/src/class-users-connection-admin.php:90
    379379msgid "Connected"
    … …  
    416416
    417417#: includes/checkout/class-checkout-rates-options.php:678
    418 #: includes/class-wc-shipstation-integration.php:1628
     418#: includes/class-wc-shipstation-integration.php:1629
    419419msgid "Active"
    420420msgstr ""
    … …  
    463463msgstr ""
    464464
    465 #: includes/class-auth-controller.php:270
     465#: includes/class-api-user.php:606
     466msgid "This account is used by the ShipStation connection and cannot sign in."
     467msgstr ""
     468
     469#: includes/class-api-user.php:802
     470msgid ""
     471"The ShipStation API user was left out. It cannot be deleted, removed from a "
     472"site or given another role, because ShipStation connects through it."
     473msgstr ""
     474
     475#: includes/class-api-user.php:1199 includes/class-api-user.php:1204
     476#: includes/class-auth-controller.php:331
     477msgid "ShipStation Integration"
     478msgstr ""
     479
     480#: includes/class-auth-controller.php:272
    466481msgid "Copied!"
    467482msgstr ""
    468483
    469 #: includes/class-auth-controller.php:271
     484#: includes/class-auth-controller.php:273
    470485#: templates/partials/credential-field.php:43
    471486msgid "Show"
    472487msgstr ""
    473488
    474 #: includes/class-auth-controller.php:272
     489#: includes/class-auth-controller.php:274
    475490msgid "Hide"
    476491msgstr ""
    477492
    478 #: includes/class-auth-controller.php:273
     493#: includes/class-auth-controller.php:275
    479494msgid "Could not generate new keys. Please try again."
    480495msgstr ""
    481496
    482 #: includes/class-auth-controller.php:274
     497#: includes/class-auth-controller.php:276
    483498msgid ""
    484499"Generate a new set of REST API keys? Existing keys stay valid until you "
    … …  
    487502msgstr ""
    488503
    489 #: includes/class-auth-controller.php:276
     504#: includes/class-auth-controller.php:278
    490505msgid ""
    491506"Dangerously disconnect from WordPress.com? No direct ShipStation connection "
    … …  
    494509msgstr ""
    495510
    496 #: includes/class-auth-controller.php:371
    497 msgid "ShipStation Integration"
    498 msgstr ""
    499 
    500 #: includes/class-auth-controller.php:887
    501 #: includes/class-auth-controller.php:952
     511#: includes/class-auth-controller.php:947
     512#: includes/class-auth-controller.php:1048
    502513#: includes/class-global-connection-banner.php:139
    503514msgid "Security check failed"
    504515msgstr ""
    505516
    506 #: includes/class-auth-controller.php:892
    507 #: includes/class-auth-controller.php:957
     517#: includes/class-auth-controller.php:952
     518#: includes/class-auth-controller.php:1053
    508519#: includes/class-global-connection-banner.php:144
    509520#: includes/class-wpcom-connection.php:1278
    … …  
    511522msgstr ""
    512523
    513 #: includes/class-auth-controller.php:898
     524#: includes/class-auth-controller.php:963
     525msgid ""
     526"Your account cannot generate ShipStation API keys. It needs permission to "
     527"manage WooCommerce and to manage product categories, tags and attributes. "
     528"Ask an administrator to generate them."
     529msgstr ""
     530
     531#: includes/class-auth-controller.php:978
     532msgid ""
     533"Another request is setting up the ShipStation API user. Wait a moment, then "
     534"try again."
     535msgstr ""
     536
     537#: includes/class-auth-controller.php:981
     538msgid ""
     539"The ShipStation API user could not get the permissions it needs, so no keys "
     540"were generated. A role editor plugin may be removing them. See the "
     541"ShipStation log under WooCommerce > Status > Logs."
     542msgstr ""
     543
     544#: includes/class-auth-controller.php:984
     545msgid ""
     546"The ShipStation API user could not be created, so no keys were generated. "
     547"Another plugin may be blocking new user accounts. See the ShipStation log "
     548"under WooCommerce > Status > Logs for the reason."
     549msgstr ""
     550
     551#: includes/class-auth-controller.php:994
    514552msgid ""
    515553"Another request is currently generating REST API keys. Please refresh the "
    … …  
    517555msgstr ""
    518556
    519 #: includes/class-auth-controller.php:916
     557#: includes/class-auth-controller.php:1012
    520558msgid ""
    521559"Failed to generate API credentials. Please try again or contact your "
    … …  
    523561msgstr ""
    524562
    525 #: includes/class-auth-controller.php:964
     563#: includes/class-auth-controller.php:1071
    526564msgid "This key could not be deleted. It may have been removed already."
    527565msgstr ""
    528566
    529 #: includes/class-auth-controller.php:1210
     567#: includes/class-auth-controller.php:1074
     568msgid ""
     569"This key could not be deleted. Try again, and see the ShipStation log under "
     570"WooCommerce > Status > Logs if it keeps failing."
     571msgstr ""
     572
     573#: includes/class-auth-controller.php:1076
     574msgid ""
     575"You cannot delete this key here. Someone who can edit its owner can revoke "
     576"it under WooCommerce > Settings > Advanced > REST API."
     577msgstr ""
     578
     579#: includes/class-auth-controller.php:1078
     580msgid "You cannot delete this key here. It is not in the ShipStation key list."
     581msgstr ""
     582
     583#: includes/class-auth-controller.php:1334
    530584msgid "View ShipStation connection details"
    531585msgstr ""
    … …  
    610664msgstr ""
    611665
    612 #: includes/class-main.php:97
     666#: includes/class-main.php:102
    613667#. translators: %s WC download URL link.
    614668msgid ""
    … …  
    617671msgstr ""
    618672
    619 #: includes/class-main.php:599
     673#: includes/class-main.php:608
    620674msgid "Settings"
    621675msgstr ""
    622676
    623 #: includes/class-main.php:600
     677#: includes/class-main.php:609
    624678msgid "Support"
    625679msgstr ""
    626680
    627 #: includes/class-main.php:601
     681#: includes/class-main.php:610
    628682msgid "Docs"
    629683msgstr ""
    … …  
    730784msgstr ""
    731785
    732 #: includes/class-wc-shipstation-integration.php:232
     786#: includes/class-wc-shipstation-integration.php:233
    733787#: includes/class-wc-shipstation-privacy.php:24
    734788#: includes/data/data-settings.php:55 includes/data/data-settings.php:61
    … …  
    739793msgstr ""
    740794
    741 #: includes/class-wc-shipstation-integration.php:233
     795#: includes/class-wc-shipstation-integration.php:234
    742796msgid ""
    743797"ShipStation allows you to retrieve &amp; manage orders, then print labels "
    … …  
    745799msgstr ""
    746800
    747 #: includes/class-wc-shipstation-integration.php:361
     801#: includes/class-wc-shipstation-integration.php:362
    748802msgid "Choose which order statuses to export to ShipStation."
    749803msgstr ""
    750804
    751 #: includes/class-wc-shipstation-integration.php:362
     805#: includes/class-wc-shipstation-integration.php:363
    752806msgid "Each selected status must also be mapped to a ShipStation status."
    753807msgstr ""
    754808
    755 #: includes/class-wc-shipstation-integration.php:363
     809#: includes/class-wc-shipstation-integration.php:364
    756810msgid ""
    757811"Mappings are managed below or in your ShipStation account (depending on "
    … …  
    759813msgstr ""
    760814
    761 #: includes/class-wc-shipstation-integration.php:366
     815#: includes/class-wc-shipstation-integration.php:367
     816#: includes/class-wc-shipstation-integration.php:967
     817msgid "All statuses are selected for export."
     818msgstr ""
     819
     820#: includes/class-wc-shipstation-integration.php:369
    762821#: includes/class-wc-shipstation-integration.php:966
    763 msgid "All statuses are selected for export."
    764 msgstr ""
    765 
    766 #: includes/class-wc-shipstation-integration.php:368
    767 #: includes/class-wc-shipstation-integration.php:965
    768822msgid "Excluded from export:"
    769823msgstr ""
    770824
    771 #: includes/class-wc-shipstation-integration.php:380
     825#: includes/class-wc-shipstation-integration.php:381
    772826#. translators: %s: comma-separated list of WC order status names
    773827msgid ""
    … …  
    776830msgstr ""
    777831
    778 #: includes/class-wc-shipstation-integration.php:471
     832#: includes/class-wc-shipstation-integration.php:472
    779833msgid ""
    780834"Settings saved, but some selected export statuses are not mapped to a "
    … …  
    782836msgstr ""
    783837
    784 #: includes/class-wc-shipstation-integration.php:967
     838#: includes/class-wc-shipstation-integration.php:968
    785839msgid "Selected for export but not mapped to a ShipStation status:"
    786840msgstr ""
    787841
    788 #: includes/class-wc-shipstation-integration.php:968
     842#: includes/class-wc-shipstation-integration.php:969
    789843msgid "Map them below so their orders are exported correctly."
    790844msgstr ""
    791845
    792 #: includes/class-wc-shipstation-integration.php:971
     846#: includes/class-wc-shipstation-integration.php:972
    793847msgid ""
    794848"Delete this API key pair? Any ShipStation connection still using it will "
    … …  
    796850msgstr ""
    797851
    798 #: includes/class-wc-shipstation-integration.php:972
     852#: includes/class-wc-shipstation-integration.php:973
    799853#: vendor/automattic/jetpack-connection/src/class-connection-notice.php:236
    800854msgid "Something went wrong. Please try again."
    801855msgstr ""
    802856
    803 #: includes/class-wc-shipstation-integration.php:1007
     857#: includes/class-wc-shipstation-integration.php:1008
    804858msgid "This feature requires WooCommerce 9.7.0 or higher."
    805859msgstr ""
    806860
    807 #: includes/class-wc-shipstation-integration.php:1076
     861#: includes/class-wc-shipstation-integration.php:1077
    808862#: includes/data/data-settings.php:169
    809863msgid "Enable WordPress.com Transport"
    810864msgstr ""
    811865
    812 #: includes/class-wc-shipstation-integration.php:1119
     866#: includes/class-wc-shipstation-integration.php:1120
    813867msgid ""
    814868"Routes ShipStation traffic to your store through WordPress.com, providing a "
    … …  
    817871msgstr ""
    818872
    819 #: includes/class-wc-shipstation-integration.php:1131
     873#: includes/class-wc-shipstation-integration.php:1132
    820874#. translators: %s: the constant or filter name (wrapped in a <code> tag) that
    821875#. is forcing the setting on.
    … …  
    825879msgstr ""
    826880
    827 #: includes/class-wc-shipstation-integration.php:1357
     881#: includes/class-wc-shipstation-integration.php:1358
    828882msgid ""
    829883"You're turning on WordPress.com Transport. After you save, update your "
    … …  
    833887msgstr ""
    834888
    835 #: includes/class-wc-shipstation-integration.php:1359
     889#: includes/class-wc-shipstation-integration.php:1360
    836890msgid ""
    837891"You're turning off WordPress.com Transport. ShipStation has a recent direct "
    … …  
    843897msgstr ""
    844898
    845 #: includes/class-wc-shipstation-integration.php:1360
     899#: includes/class-wc-shipstation-integration.php:1361
    846900msgid ""
    847901"You're turning off WordPress.com Transport. After you save, update your "
    … …  
    851905msgstr ""
    852906
    853 #: includes/class-wc-shipstation-integration.php:1374
     907#: includes/class-wc-shipstation-integration.php:1375
    854908msgid "Credentials"
    855909msgstr ""
    856910
    857 #: includes/class-wc-shipstation-integration.php:1388
     911#: includes/class-wc-shipstation-integration.php:1389
    858912msgid "Connections"
    859913msgstr ""
    860914
    861 #: includes/class-wc-shipstation-integration.php:1409
     915#: includes/class-wc-shipstation-integration.php:1410
    862916msgid "API Keys"
    863917msgstr ""
    864918
    865 #: includes/class-wc-shipstation-integration.php:1461
     919#: includes/class-wc-shipstation-integration.php:1462
    866920msgid "Action needed"
    867921msgstr ""
    868922
    869 #: includes/class-wc-shipstation-integration.php:1464
     923#: includes/class-wc-shipstation-integration.php:1465
    870924msgid "Not connected yet"
    871925msgstr ""
    872926
    873 #: includes/class-wc-shipstation-integration.php:1493
     927#: includes/class-wc-shipstation-integration.php:1494
    874928msgid ""
    875929"ShipStation hasn't connected yet. Copy the values below into ShipStation to "
    … …  
    877931msgstr ""
    878932
    879 #: includes/class-wc-shipstation-integration.php:1498
     933#: includes/class-wc-shipstation-integration.php:1499
    880934msgid ""
    881935"ShipStation hasn't synced in over a day, so new orders may not be "
    … …  
    885939msgstr ""
    886940
    887 #: includes/class-wc-shipstation-integration.php:1503
     941#: includes/class-wc-shipstation-integration.php:1504
    888942msgid ""
    889943"Your store's web address changed, so the route ShipStation saved no longer "
    … …  
    892946msgstr ""
    893947
    894 #: includes/class-wc-shipstation-integration.php:1504
     948#: includes/class-wc-shipstation-integration.php:1505
    895949msgid "Show the Store URL"
    896950msgstr ""
    897951
    898 #: includes/class-wc-shipstation-integration.php:1508
     952#: includes/class-wc-shipstation-integration.php:1509
    899953msgid ""
    900954"WordPress.com is disconnected, so ShipStation can't reach your store "
    … …  
    903957msgstr ""
    904958
    905 #: includes/class-wc-shipstation-integration.php:1509
     959#: includes/class-wc-shipstation-integration.php:1510
    906960msgid "Reconnect WordPress.com"
    907961msgstr ""
    908962
    909 #: includes/class-wc-shipstation-integration.php:1513
     963#: includes/class-wc-shipstation-integration.php:1514
    910964msgid ""
    911965"WordPress.com transport is off, so your store is turning away the proxied "
    … …  
    914968msgstr ""
    915969
    916 #: includes/class-wc-shipstation-integration.php:1514
     970#: includes/class-wc-shipstation-integration.php:1515
    917971msgid "Review transport setting"
    918972msgstr ""
    919973
    920 #: includes/class-wc-shipstation-integration.php:1561
     974#: includes/class-wc-shipstation-integration.php:1562
    921975msgid ""
    922976"The WordPress.com connection package is unavailable. Reinstall plugin "
    … …  
    924978msgstr ""
    925979
    926 #: includes/class-wc-shipstation-integration.php:1629
     980#: includes/class-wc-shipstation-integration.php:1630
    927981msgid "Inactive"
    928982msgstr ""
    929983
    930 #: includes/class-wc-shipstation-integration.php:1630
     984#: includes/class-wc-shipstation-integration.php:1631
    931985msgid "Rejected"
    932986msgstr ""
    933987
    934 #: includes/class-wc-shipstation-integration.php:1631
     988#: includes/class-wc-shipstation-integration.php:1632
    935989msgid "Disconnected"
    936990msgstr ""
    937991
    938 #: includes/class-wc-shipstation-integration.php:1632
     992#: includes/class-wc-shipstation-integration.php:1633
    939993msgid "Mismatch"
    940994msgstr ""
    941995
    942 #: includes/class-wc-shipstation-integration.php:1633
     996#: includes/class-wc-shipstation-integration.php:1634
    943997msgid "Deleted"
    944998msgstr ""
    945999
    946 #: includes/class-wc-shipstation-integration.php:1634
     1000#: includes/class-wc-shipstation-integration.php:1635
    9471001msgid "New"
    9481002msgstr ""
    9491003
    950 #: includes/class-wc-shipstation-integration.php:1635
     1004#: includes/class-wc-shipstation-integration.php:1636
    9511005msgid "Unused"
    9521006msgstr ""
    9531007
    954 #: includes/class-wc-shipstation-integration.php:1833
     1008#: includes/class-wc-shipstation-integration.php:1875
    9551009msgid "Action failed. Please refresh the page and retry."
    9561010msgstr ""
    9571011
    958 #: includes/class-wc-shipstation-integration.php:1838
     1012#: includes/class-wc-shipstation-integration.php:1880
    9591013msgid "Cheatin&#8217; huh?"
    9601014msgstr ""
    9611015
    962 #: includes/class-wc-shipstation-integration.php:1860
     1016#: includes/class-wc-shipstation-integration.php:1902
    9631017msgid "ShipStation logo"
    9641018msgstr ""
    9651019
    966 #: includes/class-wc-shipstation-integration.php:1870
     1020#: includes/class-wc-shipstation-integration.php:1912
    9671021#. translators: %s: ShipStation URL
    9681022msgid ""
    … …  
    9721026msgstr ""
    9731027
    974 #: includes/class-wc-shipstation-integration.php:1885
     1028#: includes/class-wc-shipstation-integration.php:1927
    9751029msgid ""
    9761030"After logging in, add WooCommerce as a selling channel in ShipStation. Use "
    … …  
    9791033msgstr ""
    9801034
    981 #: includes/class-wc-shipstation-integration.php:1902
     1035#: includes/class-wc-shipstation-integration.php:1944
    9821036#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
    9831037#. documentation URL
    … …  
    12401294msgstr ""
    12411295
    1242 #: templates/api-key-list.php:31
     1296#: templates/api-key-list.php:56
     1297msgid ""
     1298"ShipStation requests are refused until the ShipStation API user has its "
     1299"permissions back. A role editor plugin may be removing them."
     1300msgstr ""
     1301
     1302#: templates/api-key-list.php:58
     1303msgid ""
     1304"Some ShipStation API keys could not be moved to the ShipStation API user. "
     1305"They still belong to their previous owner and keep working. The plugin "
     1306"tries again in about an hour."
     1307msgstr ""
     1308
     1309#: templates/api-key-list.php:60
     1310msgid ""
     1311"Some ShipStation API keys could not be moved to the ShipStation API user. "
     1312"The plugin tries again later."
     1313msgstr ""
     1314
     1315#: templates/api-key-list.php:71
     1316msgid "See the ShipStation log under WooCommerce > Status > Logs for details."
     1317msgstr ""
     1318
     1319#: templates/api-key-list.php:76
    12431320msgid "No plugin-generated API keys yet."
    12441321msgstr ""
    12451322
    1246 #: templates/api-key-list.php:36 templates/observed-connections.php:113
     1323#: templates/api-key-list.php:81 templates/observed-connections.php:113
    12471324msgid "Key"
    12481325msgstr ""
    12491326
    1250 #: templates/api-key-list.php:37 templates/observed-connections.php:112
     1327#: templates/api-key-list.php:82 templates/observed-connections.php:112
    12511328msgid "Transport"
    12521329msgstr ""
    12531330
    1254 #: templates/api-key-list.php:38 templates/observed-connections.php:115
     1331#: templates/api-key-list.php:83 templates/observed-connections.php:115
    12551332msgid "Last sync"
    12561333msgstr ""
    12571334
    1258 #: templates/api-key-list.php:147
     1335#: templates/api-key-list.php:171
     1336msgid ""
     1337"ShipStation refuses this key: its owner was deleted or lacks a permission "
     1338"ShipStation needs. Delete this key."
     1339msgstr ""
     1340
     1341#: templates/api-key-list.php:173
     1342msgid ""
     1343"ShipStation refuses this key: its owner was deleted or lacks a permission "
     1344"ShipStation needs. You cannot delete it here. Someone who can edit its "
     1345"owner can revoke it under WooCommerce > Settings > Advanced > REST API."
     1346msgstr ""
     1347
     1348#: templates/api-key-list.php:175
     1349msgid ""
     1350"Not moved to the ShipStation API user: its owner lacks a permission "
     1351"ShipStation needs, so ShipStation refuses some requests with this key."
     1352msgstr ""
     1353
     1354#: templates/api-key-list.php:177
     1355msgid "Not moved to the ShipStation API user yet."
     1356msgstr ""
     1357
     1358#: templates/api-key-list.php:223
    12591359msgid "Both"
    12601360msgstr ""
    12611361
    1262 #: templates/api-key-list.php:149 templates/observed-connections.php:148
     1362#: templates/api-key-list.php:225 templates/observed-connections.php:148
    12631363#: templates/observed-connections.php:271
    12641364msgid "WordPress.com"
    12651365msgstr ""
    12661366
    1267 #: templates/api-key-list.php:151 templates/observed-connections.php:149
     1367#: templates/api-key-list.php:227 templates/observed-connections.php:149
    12681368msgid "Direct"
    12691369msgstr ""
    12701370
    1271 #: templates/api-key-list.php:158
     1371#: templates/api-key-list.php:234
    12721372msgid "Not detected yet — shown once ShipStation connects through this key."
    12731373msgstr ""
    12741374
    1275 #: templates/api-key-list.php:175
     1375#: templates/api-key-list.php:251
    12761376msgid "Not connecting lately — delete if unused in ShipStation."
    12771377msgstr ""
    12781378
    1279 #: templates/api-key-list.php:178
     1379#: templates/api-key-list.php:254
    12801380msgid "Never"
    12811381msgstr ""
    12821382
    1283 #: templates/api-key-list.php:185
     1383#: templates/api-key-list.php:261
    12841384msgid "auto-deletes in"
    12851385msgstr ""
    12861386
    1287 #: templates/api-key-list.php:190
     1387#: templates/api-key-list.php:266
    12881388#. translators: %s: absolute date/time the key auto-deletes.
    12891389msgid "auto-deletes on %s"
    12901390msgstr ""
    12911391
    1292 #: templates/api-key-list.php:196
     1392#: templates/api-key-list.php:272
    12931393msgid "auto-deletes on the next cleanup."
    12941394msgstr ""
    12951395
    1296 #: templates/api-key-list.php:202
     1396#: templates/api-key-list.php:279
    12971397msgid "Delete"
    12981398msgstr ""
    12991399
    1300 #: templates/api-key-list.php:202
     1400#: templates/api-key-list.php:279
    13011401msgid "Delete this API key pair"
    13021402msgstr ""
    13031403
    1304 #: templates/api-key-list.php:211
     1404#: templates/api-key-list.php:289
    13051405msgid ""
    13061406"Delete keys you no longer use in ShipStation — fewer keys, less risk. A "
    13071407"deleted key stops working immediately."
     1408msgstr ""
     1409
     1410#: templates/api-key-list.php:296
     1411#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1412msgid ""
     1413"None of these keys belong to the ShipStation API user %s. It is a system "
     1414"account for this connection and cannot sign in. Do not delete it: "
     1415"ShipStation cannot connect without it."
     1416msgstr ""
     1417
     1418#: templates/api-key-list.php:299
     1419#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1420msgid ""
     1421"These keys belong to the ShipStation API user %s, except where noted. It is "
     1422"a system account for this connection and cannot sign in. Do not delete it: "
     1423"ShipStation cannot connect without it."
     1424msgstr ""
     1425
     1426#: templates/api-key-list.php:302
     1427#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1428msgid ""
     1429"These keys belong to the ShipStation API user %s. It is a system account "
     1430"for this connection and cannot sign in. Do not delete it: ShipStation "
     1431"cannot connect without it."
    13081432msgstr ""
    13091433
  • woocommerce-shipstation-integration/tags/5.4.2/readme.txt

    r3795802 r3807496  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 5.4.1
     10Stable tag: 5.4.2
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    7474
    7575== Changelog ==
     76
     77= 5.4.2 - 2026-11-17 =
     78* Fix   - Security update.
     79* Tweak - Plugin-generated API keys now belong to a new ShipStation API user with limited permissions. Existing plugin keys move to it and keep working with ShipStation, but no longer reach orders, products or customers on other WooCommerce REST API routes.
    7680
    7781= 5.4.1 - 2026-11-11 =
  • woocommerce-shipstation-integration/tags/5.4.2/templates/api-key-list.php

    r3586059 r3807496  
    1717 * @var string $date_format       Combined WP date+time format for absolute fallbacks.
    1818 * @var int    $newest_key_id     Key id of the prune-protected newest row.
     19 * @var string $api_user_login    Login of the ShipStation API user that owns the keys, or '' when there is none.
     20 * @var int    $api_user_id       Id of the ShipStation API user, or 0 when there is none.
     21 * @var array{move:string,repair:string} $api_user_errors Error codes of the last failed one-time key move ('move') and repair ('repair'), '' where it worked.
     22 * @var int[]  $skipped_key_ids   Keys left alone because their owner could not use them.
     23 * @var int[]  $usable_skipped_key_ids Keys among them whose owner still passes the order and inventory routes.
    1924 */
    2025
    … …  
    2833// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
    2934?>
     35<?php
     36$move_error      = (string) ( $api_user_errors['move'] ?? '' );
     37$repair_error    = (string) ( $api_user_errors['repair'] ?? '' );
     38$api_user_id     = (int) $api_user_id;
     39$skipped_key_ids = array_map( 'intval', (array) $skipped_key_ids );
     40
     41// A key left alone whose owner still holds manage_product_terms keeps
     42// importing orders: only the routes that check manage_woocommerce refuse it.
     43$usable_skipped_key_ids = array_map( 'intval', (array) $usable_skipped_key_ids );
     44
     45// Without its permissions the API user's keys are refused. The keys it does
     46// not own yet still work as their previous owner.
     47$api_user_owns_a_key = false;
     48foreach ( $rows as $row ) {
     49        if ( $api_user_id > 0 && isset( $row['user_id'] ) && (int) $row['user_id'] === $api_user_id ) {
     50                $api_user_owns_a_key = true;
     51                break;
     52        }
     53}
     54
     55if ( $api_user_owns_a_key && ( 'shipstation_api_user_role' === $move_error || 'shipstation_api_user_role' === $repair_error ) ) {
     56        $api_user_notice = __( 'ShipStation requests are refused until the ShipStation API user has its permissions back. A role editor plugin may be removing them.', 'woocommerce-shipstation-integration' );
     57} elseif ( '' !== $move_error ) {
     58        $api_user_notice = __( 'Some ShipStation API keys could not be moved to the ShipStation API user. They still belong to their previous owner and keep working. The plugin tries again in about an hour.', 'woocommerce-shipstation-integration' );
     59} elseif ( '' !== $repair_error ) {
     60        $api_user_notice = __( 'Some ShipStation API keys could not be moved to the ShipStation API user. The plugin tries again later.', 'woocommerce-shipstation-integration' );
     61} else {
     62        $api_user_notice = '';
     63}
     64
     65$has_key_notes = false;
     66?>
     67<?php if ( '' !== $api_user_notice ) : ?>
     68        <div class="notice notice-error inline">
     69                <p>
     70                        <?php echo esc_html( $api_user_notice ); ?>
     71                        <?php esc_html_e( 'See the ShipStation log under WooCommerce > Status > Logs for details.', 'woocommerce-shipstation-integration' ); ?>
     72                </p>
     73        </div>
     74<?php endif; ?>
    3075<?php if ( array() === $rows ) : ?>
    3176        <p><?php esc_html_e( 'No plugin-generated API keys yet.', 'woocommerce-shipstation-integration' ); ?></p>
    … …  
    81126                                        }
    82127                                }
     128                                // ShipStation refuses a key the sync left alone, even when its owner
     129                                // still uses it elsewhere, so it never reads as working or just made.
     130                                // The exception is a key whose owner still passes the order routes.
     131                                $is_skipped = in_array( (int) $row['key_id'], $skipped_key_ids, true );
     132                                $is_refused = $is_skipped && ! in_array( (int) $row['key_id'], $usable_skipped_key_ids, true );
     133                                if ( $is_refused && in_array( $pill_modifier, array( 'active', 'new' ), true ) ) {
     134                                        $pill_modifier = 'rejected';
     135                                        $is_active     = false;
     136                                        $is_new        = false;
     137                                }
    83138                                $pill_label = $pill_labels[ $pill_modifier ];
     139                                $can_delete = (bool) ( $row['can_delete'] ?? true );
    84140
    85141                                // Provisional (dimmed) treatment for everything not active. The
    … …  
    103159                                                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- key_pill() escapes internally.
    104160                                                echo WC_ShipStation_Integration::key_pill( $pill_modifier, $pill_label );
    105                                                 ?>
     161
     162                                                // A key the ShipStation API user does not own: refused, or not moved yet.
     163                                                // A refused key is marked even when no API user exists yet.
     164                                                $is_not_moved = $api_user_id > 0 && isset( $row['user_id'] ) && (int) $row['user_id'] !== $api_user_id;
     165                                                if ( $is_skipped || $is_not_moved ) :
     166                                                        $has_key_notes = true;
     167                                                        ?>
     168                                                        <p class="description">
     169                                                                <?php
     170                                                                if ( $is_refused && $can_delete ) {
     171                                                                        esc_html_e( 'ShipStation refuses this key: its owner was deleted or lacks a permission ShipStation needs. Delete this key.', 'woocommerce-shipstation-integration' );
     172                                                                } elseif ( $is_refused ) {
     173                                                                        esc_html_e( 'ShipStation refuses this key: its owner was deleted or lacks a permission ShipStation needs. You cannot delete it here. Someone who can edit its owner can revoke it under WooCommerce > Settings > Advanced > REST API.', 'woocommerce-shipstation-integration' );
     174                                                                } elseif ( $is_skipped ) {
     175                                                                        esc_html_e( 'Not moved to the ShipStation API user: its owner lacks a permission ShipStation needs, so ShipStation refuses some requests with this key.', 'woocommerce-shipstation-integration' );
     176                                                                } else {
     177                                                                        esc_html_e( 'Not moved to the ShipStation API user yet.', 'woocommerce-shipstation-integration' );
     178                                                                }
     179                                                                ?>
     180                                                        </p>
     181                                                <?php endif; ?>
    106182                                        </td>
    107183                                        <?php
    … …  
    200276                                        </td>
    201277                                        <td class="shipstation-api-key-actions shipstation-api-key-col">
     278                                                <?php if ( $can_delete ) : ?>
    202279                                                <button type="button" class="shipstation-delete-api-key" data-key-id="<?php echo esc_attr( (string) $row['key_id'] ); ?>" title="<?php esc_attr_e( 'Delete', 'woocommerce-shipstation-integration' ); ?>" aria-label="<?php esc_attr_e( 'Delete this API key pair', 'woocommerce-shipstation-integration' ); ?>">
    203280                                                        <span class="dashicons dashicons-trash"></span>
    204281                                                </button>
     282                                                <?php endif; ?>
    205283                                        </td>
    206284                                </tr>
    … …  
    211289                <?php esc_html_e( 'Delete keys you no longer use in ShipStation — fewer keys, less risk. A deleted key stops working immediately.', 'woocommerce-shipstation-integration' ); ?>
    212290        </p>
     291        <?php if ( '' !== $api_user_login ) : ?>
     292                <p class="description">
     293                        <?php
     294                        if ( ! $api_user_owns_a_key ) {
     295                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     296                                $owner_line = esc_html__( 'None of these keys belong to the ShipStation API user %s. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     297                        } elseif ( $has_key_notes ) {
     298                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     299                                $owner_line = esc_html__( 'These keys belong to the ShipStation API user %s, except where noted. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     300                        } else {
     301                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     302                                $owner_line = esc_html__( 'These keys belong to the ShipStation API user %s. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     303                        }
     304                        // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above; the login is escaped here.
     305                        printf( $owner_line, '<code>' . esc_html( $api_user_login ) . '</code>' );
     306                        ?>
     307                </p>
     308        <?php endif; ?>
    213309<?php endif; ?>
  • woocommerce-shipstation-integration/tags/5.4.2/uninstall.php

    r3723614 r3807496  
    88 * authenticate with), nor the pre-SHIPSTN-142 plugin options (auth key,
    99 * settings, activation-notice flag), which historically were left in place on
    10  * uninstall.
     10 * uninstall. The ShipStation API user that owns those keys is left too, with
     11 * its role, its cached id (network option woocommerce_shipstation_api_user_id),
     12 * the ids of deleted API users (network option
     13 * woocommerce_shipstation_api_user_former_ids) and the record of each moved
     14 * key's previous owner (woocommerce_shipstation_api_user_state), so a
     15 * reinstall, of this version or an older one, keeps the connection and the
     16 * move can be reversed by hand. Without the plugin the user is no longer
     17 * locked: an administrator can sign it in, change its role or delete it.
    1118 *
    1219 * @package WC_ShipStation
    … …  
    2734 *  - Auth_Controller::KEY_META_OPTION / GEN_LOCK_OPTION
    2835 *  - WPCOM_Connection::DISCONNECT_INTENT_OPTION / CONNECTED_URL_OPTION
     36 *  - API_User::SYNCED_OPTION
    2937 *
    3038 * @return void
    … …  
    4654                'woocommerce_shipstation_last_success_ts',
    4755                'woocommerce_shipstation_global_banner_dismissed_at',
     56                'woocommerce_shipstation_api_user_synced',
    4857        );
    4958
  • woocommerce-shipstation-integration/tags/5.4.2/vendor/composer/installed.php

    r3795802 r3807496  
    44        'pretty_version' => 'dev-trunk',
    55        'version' => 'dev-trunk',
    6         'reference' => 'f3cb6ebbd57a6d4dad8eaf57333228e929d5f967',
     6        'reference' => 'bef3afc1f34762ac8aff3f144942ecb305e6ec2e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    113113            'pretty_version' => 'dev-trunk',
    114114            'version' => 'dev-trunk',
    115             'reference' => 'f3cb6ebbd57a6d4dad8eaf57333228e929d5f967',
     115            'reference' => 'bef3afc1f34762ac8aff3f144942ecb305e6ec2e',
    116116            'type' => 'wordpress-plugin',
    117117            'install_path' => __DIR__ . '/../../',
  • woocommerce-shipstation-integration/tags/5.4.2/vendor/composer/jetpack_autoload_classmap.php

    r3795802 r3807496  
    403403                'path'    => $baseDir . '/tests/bootstrap.php'
    404404        ),
     405        'WooCommerce\\Shipping\\ShipStation\\Tests\\Unit\\API_User_Test' => array(
     406                'version' => 'dev-trunk',
     407                'path'    => $baseDir . '/tests/Unit/API_User_Test.php'
     408        ),
    405409        'WooCommerce\\Shipping\\ShipStation\\Tests\\Unit\\Ajax_Die_Rig_Trait' => array(
    406410                'version' => 'dev-trunk',
  • woocommerce-shipstation-integration/tags/5.4.2/woocommerce-shipstation.php

    r3795802 r3807496  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 5.4.1
     5 * Version: 5.4.2
    66 * Description: Power your entire shipping operation from one platform.
    77 * Author: WooCommerce
    … …  
    3939}
    4040
    41 define( 'WC_SHIPSTATION_VERSION', '5.4.1' ); // WRCS: DEFINED_VERSION.
     41define( 'WC_SHIPSTATION_VERSION', '5.4.2' ); // WRCS: DEFINED_VERSION.
    4242
    4343// Composer + Jetpack autoloader. Ships with the production zip; may be absent in
  • woocommerce-shipstation-integration/trunk/changelog.txt

    r3795802 r3807496  
    11*** ShipStation for WooCommerce ***
     2
     3= 5.4.2 - 2026-11-17 =
     4* Fix   - Security update.
     5* Tweak - Plugin-generated API keys now belong to a new ShipStation API user with limited permissions. Existing plugin keys move to it and keep working with ShipStation, but no longer reach orders, products or customers on other WooCommerce REST API routes.
    26
    37= 5.4.1 - 2026-11-11 =
  • woocommerce-shipstation-integration/trunk/includes/api/rest/class-api-controller.php

    r3795802 r3807496  
    1212}
    1313
     14use WooCommerce\Shipping\ShipStation\API_User;
    1415use WooCommerce\Shipping\ShipStation\Auth_Controller;
    1516use WooCommerce\Shipping\ShipStation\Connection_Log;
    … …  
    235236                        $proxied_row = $row;
    236237                }
     238
     239                // A key owned by the ShipStation API user must keep working after that
     240                // user lost its role on this site.
     241                API_User::repair_current_user();
    237242
    238243                // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Public hook name retained for backward compatibility.
  • woocommerce-shipstation-integration/trunk/includes/class-auth-controller.php

    r3723614 r3807496  
    5050         * Plaintext prefix prepended to every plugin-generated consumer_secret.
    5151         *
    52          * Stored verbatim in `consumer_secret char(43)`, so this prefix is the
    53          * single source of truth for "did this plugin create this row?", used by
    54          * the inline credentials section, the settings-tab key list, and the per-row
    55          * delete ({@see delete_plugin_key_row()}) to identify our rows without
    56          * false-positive risk against merchant-created keys.
     52         * Stored verbatim in `consumer_secret char(43)`, so this prefix tells which
     53         * rows this plugin minted, without false-positive risk against
     54         * merchant-created keys. The inline credentials section, the settings-tab
     55         * key list and the per-row delete ({@see delete_plugin_key_row()}) use it.
     56         * The key list and the delete also accept unprefixed rows from before 5.0.8
     57         * that the ShipStation API user key sync moved or left alone
     58         * ({@see API_User::get_moved_key_ids()}, {@see API_User::get_skipped_key_ids()}).
    5759         *
    5860         * Length budget: prefix (8) + `wc_rand_hash()` tail (35) = 43, exactly
    … …  
    319321
    320322        /**
    321          * Return the first admin user ID to assign as the API key owner.
    322          *
    323          * WooCommerce REST auth runs every request under the key owner's capabilities.
    324          * Tying the key to the triggering user is unsafe: that user may later lose their
    325          * role or be deleted, causing every REST endpoint to return rest_forbidden.
    326          * Using the first administrator keeps the key stable.
    327          *
    328          * @return int
    329          */
    330         private function get_admin_user_id(): int {
    331                 // Try site-level administrators first (works on single site and multisite).
    332                 $admins = get_users(
    333                         array(
    334                                 'role'        => 'administrator',
    335                                 'number'      => 1,
    336                                 'orderby'     => 'ID',
    337                                 'order'       => 'ASC',
    338                                 'fields'      => 'ID',
    339                                 'count_total' => false,
    340                         )
    341                 );
    342 
    343                 if ( ! empty( $admins ) ) {
    344                         return (int) $admins[0];
    345                 }
    346 
    347                 // On multisite, fall back to the first network super admin.
    348                 // get_users() only queries site-level roles, so super admins who haven't
    349                 // been explicitly added to this site won't appear in the query above.
    350                 if ( is_multisite() ) {
    351                         $super_admins = get_super_admins();
    352                         $user         = ! empty( $super_admins ) ? get_user_by( 'login', $super_admins[0] ) : false;
    353 
    354                         if ( $user ) {
    355                                 return $user->ID;
    356                         }
    357                 }
    358 
    359                 return get_current_user_id();
    360         }
    361 
    362         /**
    363323         * Generate new WooCommerce REST API credentials for the direct key set.
    364324         *
    … …  
    396356                global $wpdb;
    397357
     358                // The key belongs to the ShipStation API user, never to an administrator
     359                // or to the person generating it. No user, no key.
     360                $owner_id = API_User::ensure();
     361                if ( is_wp_error( $owner_id ) ) {
     362                        Logger::error( 'Failed to create the ShipStation API user, so no API key was generated: ' . $owner_id->get_error_message() );
     363                        return array();
     364                }
     365
    398366                // 8-char prefix + 35-char random tail = 43 chars total, exactly
    399367                // matching WC's default key shape and fitting `consumer_secret char(43)`.
    … …  
    403371
    404372                $data = array(
    405                         'user_id'         => $this->get_admin_user_id(),
     373                        'user_id'         => $owner_id,
    406374                        'description'     => $description,
    407375                        'permissions'     => 'read_write',
    … …  
    698666         *
    699667         * Rows are identified by the set prefixes on the plaintext
    700          * `consumer_secret`; merchant-created keys never appear here. Powers the
    701          * settings-tab key list from which the merchant retires old pairs.
    702          *
    703          * @since 5.2.0
    704          *
    705          * @return array[] Each: ['key_id' => int, 'transports' => string[], 'transport_last_seen' => array<string,string>, 'description' => string, 'truncated_key' => string, 'last_access' => string|null].
     668         * `consumer_secret`, plus the keys from before 5.0.8 that were moved to the
     669         * ShipStation API user or left alone because their owner could not use
     670         * them, which have no prefix. Other merchant-created keys never appear here.
     671         * A hand-made key described "ShipStation Integration" can be among the
     672         * moved or skipped rows, because the one-time move cannot tell it apart.
     673         * Powers the settings-tab key list from which the merchant retires old pairs.
     674         *
     675         * @since 5.2.0
     676         *
     677         * @return array[] Each: ['key_id' => int, 'user_id' => int, 'transports' => string[], 'transport_last_seen' => array<string,string>, 'description' => string, 'truncated_key' => string, 'last_access' => string|null, 'is_prefixed' => bool].
    706678         */
    707679        public static function get_plugin_key_rows(): array {
    708680                global $wpdb;
    709681
    710                 $rows = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    711                         $wpdb->prepare(
    712                                 "SELECT key_id, description, truncated_key, last_access FROM {$wpdb->prefix}woocommerce_api_keys WHERE consumer_secret LIKE %s OR consumer_secret LIKE %s ORDER BY key_id DESC",
    713                                 $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
    714                                 $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%'
     682                // Keys from before 5.0.8 the key sync moved or left alone. A store manager
     683                // cannot revoke a moved one on WooCommerce's REST API screen once the API
     684                // user owns it, and a key left alone is listed so it can be marked refused.
     685                $synced_ids = array_values( array_unique( array_merge( API_User::get_moved_key_ids(), API_User::get_skipped_key_ids() ) ) );
     686                $synced_sql = '';
     687                if ( array() !== $synced_ids ) {
     688                        $synced_sql = ' OR key_id IN (' . implode( ',', array_fill( 0, count( $synced_ids ), '%d' ) ) . ')';
     689                }
     690
     691                // phpcs:ignore WordPress.DB.DirectDatabaseQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter -- $synced_sql is a generated list of %d tokens consumed by prepare(); every id is bound.
     692                $rows = $wpdb->get_results(
     693                        $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber -- Two prefixes, then one id per %d in $synced_sql.
     694                                "SELECT key_id, user_id, description, truncated_key, last_access, consumer_secret FROM {$wpdb->prefix}woocommerce_api_keys WHERE consumer_secret LIKE %s OR consumer_secret LIKE %s{$synced_sql} ORDER BY key_id DESC", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $synced_sql holds only %d placeholders.
     695                                array_merge(
     696                                        array(
     697                                                $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
     698                                                $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%',
     699                                        ),
     700                                        $synced_ids
     701                                )
    715702                        ),
    716703                        ARRAY_A
    … …  
    720707                        return array();
    721708                }
     709
     710                // A recorded id on another key is a new key that got a deleted key's id.
     711                $rows = array_values(
     712                        array_filter(
     713                                $rows,
     714                                static function ( $row ) {
     715                                        return self::is_plugin_secret( (string) ( $row['consumer_secret'] ?? '' ) )
     716                                                || API_User::is_recorded_key( (int) $row['key_id'], (string) ( $row['truncated_key'] ?? '' ) );
     717                                }
     718                        )
     719                );
    722720
    723721                $key_ids = array();
    … …  
    735733                        $result[] = array(
    736734                                'key_id'              => $key_id,
     735                                'user_id'             => (int) ( $row['user_id'] ?? 0 ),
    737736                                // Observed transports the key has actually authenticated over —
    738737                                // the honest basis for the "Type" column ('wpcom'/'direct'/both).
    … …  
    744743                                'truncated_key'       => isset( $row['truncated_key'] ) ? (string) $row['truncated_key'] : '',
    745744                                'last_access'         => isset( $row['last_access'] ) ? $row['last_access'] : null,
     745                                // The secret itself is not passed on.
     746                                'is_prefixed'         => self::is_plugin_secret( (string) ( $row['consumer_secret'] ?? '' ) ),
    746747                        );
    747748                }
    … …  
    751752
    752753        /**
     754         * Whether the current user may delete a key row through the plugin's key list.
     755         *
     756         * A prefixed row is the plugin's. A row from before 5.0.8 is deletable while
     757         * the ShipStation API user owns it after the move. A row the key sync left
     758         * alone may still work on other routes as its owner, so it follows
     759         * WooCommerce's revoke rule: the current user can edit the owner, which
     760         * includes the owner itself. A key whose owner was deleted works nowhere, so
     761         * anyone who manages the key list may delete it.
     762         *
     763         * @internal The row values must come from the database, as in {@see delete_plugin_key_row()}.
     764         *
     765         * @since 5.4.2
     766         *
     767         * @param int  $key_id      Row id.
     768         * @param int  $owner_id    Row owner.
     769         * @param bool $is_prefixed Whether the row's consumer secret has a plugin prefix.
     770         *
     771         * @return bool
     772         */
     773        public static function current_user_may_delete_key_row( int $key_id, int $owner_id, bool $is_prefixed ): bool {
     774                if ( $is_prefixed ) {
     775                        return true;
     776                }
     777
     778                $api_user_id = API_User::get_user_id();
     779                if ( $api_user_id > 0 && $owner_id === $api_user_id && in_array( $key_id, API_User::get_moved_key_ids(), true ) ) {
     780                        return true;
     781                }
     782
     783                if ( in_array( $key_id, API_User::get_skipped_key_ids(), true ) ) {
     784                        return ! get_userdata( $owner_id ) || current_user_can( 'edit_user', $owner_id );
     785                }
     786
     787                return false;
     788        }
     789
     790        /**
    753791         * Delete one plugin-generated key row by id.
    754792         *
    755          * The WHERE clause re-checks the set prefixes, so a merchant-created row
    756          * can never be deleted through this path no matter what id is posted.
     793         * Checks {@see current_user_may_delete_key_row()} first, so a row that is
     794         * neither prefixed nor recorded by the API user key sync can never be
     795         * deleted through this path no matter what id is posted, and the delete is
     796         * bound to the owner that was checked.
    757797         *
    758798         * @since 5.2.0
    … …  
    765805                global $wpdb;
    766806
     807                $row = $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     808                        $wpdb->prepare( "SELECT user_id, consumer_secret, truncated_key FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d", $key_id )
     809                );
     810                if ( '' !== $wpdb->last_error ) {
     811                        Logger::error( 'Failed to delete ShipStation API key row. DB error: ' . $wpdb->last_error );
     812                        return false;
     813                }
     814                if ( ! $row ) {
     815                        return false;
     816                }
     817
     818                // An unprefixed row is the plugin's only while the key sync recorded this very key.
     819                $is_prefixed = self::is_plugin_secret( (string) $row->consumer_secret );
     820                if ( ! $is_prefixed && ! API_User::is_recorded_key( $key_id, (string) $row->truncated_key ) ) {
     821                        return false;
     822                }
     823                if ( ! self::current_user_may_delete_key_row( $key_id, (int) $row->user_id, $is_prefixed ) ) {
     824                        return false;
     825                }
     826
    767827                $result = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    768828                        $wpdb->prepare(
    769                                 "DELETE FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d AND ( consumer_secret LIKE %s OR consumer_secret LIKE %s )",
     829                                "DELETE FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d AND user_id = %d",
    770830                                $key_id,
    771                                 $wpdb->esc_like( self::API_SECRET_PREFIX ) . '%',
    772                                 $wpdb->esc_like( self::WPCOM_API_SECRET_PREFIX ) . '%'
     831                                (int) $row->user_id
    773832                        )
    774833                );
    … …  
    781840                if ( $result > 0 ) {
    782841                        self::forget_key_meta( $key_id );
     842                        API_User::forget_key( $key_id );
    783843                }
    784844
    … …  
    891951                if ( ! current_user_can( 'manage_woocommerce' ) ) {
    892952                        wp_die( esc_html__( 'You do not have sufficient permissions.', 'woocommerce-shipstation-integration' ) );
     953                }
     954
     955                // The key acts with the API user's capabilities, so its creator must hold
     956                // each of them. A custom role can reach this screen with only the first.
     957                foreach ( API_User::CAPABILITIES as $capability ) {
     958                        // phpcs:ignore WordPress.WP.Capabilities.Undetermined -- WooCommerce core capabilities, listed in API_User::CAPABILITIES.
     959                        if ( ! current_user_can( $capability ) ) {
     960                                Logger::info( sprintf( 'ShipStation API keys were not generated for user ID %d, who lacks the %s capability.', get_current_user_id(), $capability ) );
     961                                wp_send_json_error(
     962                                        array(
     963                                                'message' => __( 'Your account cannot generate ShipStation API keys. It needs permission to manage WooCommerce and to manage product categories, tags and attributes. Ask an administrator to generate them.', 'woocommerce-shipstation-integration' ),
     964                                        )
     965                                );
     966                                return;
     967                        }
     968                }
     969
     970                // Checked here, before the key insert, so the merchant is told that the
     971                // user, not the database, is the problem.
     972                $api_user = API_User::ensure();
     973                if ( is_wp_error( $api_user ) ) {
     974                        Logger::error( 'Failed to set up the ShipStation API user, so no API key was generated: ' . $api_user->get_error_message() );
     975
     976                        switch ( $api_user->get_error_code() ) {
     977                                case 'shipstation_api_user_busy':
     978                                        $message = __( 'Another request is setting up the ShipStation API user. Wait a moment, then try again.', 'woocommerce-shipstation-integration' );
     979                                        break;
     980                                case 'shipstation_api_user_role':
     981                                        $message = __( 'The ShipStation API user could not get the permissions it needs, so no keys were generated. A role editor plugin may be removing them. See the ShipStation log under WooCommerce > Status > Logs.', 'woocommerce-shipstation-integration' );
     982                                        break;
     983                                default:
     984                                        $message = __( 'The ShipStation API user could not be created, so no keys were generated. Another plugin may be blocking new user accounts. See the ShipStation log under WooCommerce > Status > Logs for the reason.', 'woocommerce-shipstation-integration' );
     985                        }
     986
     987                        wp_send_json_error( array( 'message' => $message ) );
     988                        return;
    893989                }
    894990
    … …  
    9611057
    9621058                if ( $key_id <= 0 || ! self::delete_plugin_key_row( $key_id ) ) {
    963                         wp_send_json_error(
    964                                 array( 'message' => __( 'This key could not be deleted. It may have been removed already.', 'woocommerce-shipstation-integration' ) )
    965                         );
     1059                        global $wpdb;
     1060
     1061                        // The row is still there, so the delete was refused or failed, not too late.
     1062                        $row         = $key_id > 0 ? $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     1063                                $wpdb->prepare( "SELECT truncated_key, consumer_secret FROM {$wpdb->prefix}woocommerce_api_keys WHERE key_id = %d", $key_id )
     1064                        ) : null;
     1065                        $still_there = null !== $row;
     1066
     1067                        // A refused row the key list shows belongs to an owner the current user cannot edit.
     1068                        $is_listed = $still_there && API_User::is_recorded_key( $key_id, (string) $row->truncated_key );
     1069
     1070                        if ( ! $still_there ) {
     1071                                $message = __( 'This key could not be deleted. It may have been removed already.', 'woocommerce-shipstation-integration' );
     1072                        } elseif ( self::is_plugin_secret( (string) $row->consumer_secret ) ) {
     1073                                // A prefixed row is never refused, so the delete itself failed.
     1074                                $message = __( 'This key could not be deleted. Try again, and see the ShipStation log under WooCommerce > Status > Logs if it keeps failing.', 'woocommerce-shipstation-integration' );
     1075                        } elseif ( $is_listed ) {
     1076                                $message = __( 'You cannot delete this key here. Someone who can edit its owner can revoke it under WooCommerce > Settings > Advanced > REST API.', 'woocommerce-shipstation-integration' );
     1077                        } else {
     1078                                $message = __( 'You cannot delete this key here. It is not in the ShipStation key list.', 'woocommerce-shipstation-integration' );
     1079                        }
     1080
     1081                        wp_send_json_error( array( 'message' => $message ) );
    9661082                        return;
    9671083                }
    … …  
    11421258                global $wpdb;
    11431259
     1260                // A store nobody signs in to gets its keys moved here. After that, put
     1261                // the role back and reclaim keys whose API user was deleted.
     1262                API_User::maybe_sync();
     1263                $synced = API_User::sync_keys();
     1264                if ( is_wp_error( $synced ) ) {
     1265                        Logger::error( 'Could not repair the ShipStation API user: ' . $synced->get_error_message() );
     1266                }
     1267
    11441268                // Give any untracked plugin key a mint baseline so legacy never-used keys
    11451269                // become prunable rather than lingering forever.
  • woocommerce-shipstation-integration/trunk/includes/class-main.php

    r3795802 r3807496  
    7979        public function __construct() {
    8080                add_action( 'plugins_loaded', array( $this, 'init' ) );
     81
     82                // Registered here, not in init(), so the ShipStation API user stays
     83                // protected while WooCommerce is inactive.
     84                require_once WC_SHIPSTATION_ABSPATH . 'includes/class-api-user.php';
     85                API_User::register_protection();
    8186                add_filter( 'woocommerce_integrations', array( $this, 'load_integration' ) );
    8287                add_action( 'woocommerce_api_wc_shipstation', array( $this, 'load_api' ) );
    … …  
    137142                // schedules the recurring action on `init`.
    138143                Auth_Controller::register_orphan_prune();
     144
     145                // Move this site's existing API keys to the ShipStation API user, once,
     146                // on an admin request or in the daily key job.
     147                API_User::register();
    139148
    140149                add_action( 'before_woocommerce_init', array( $this, 'before_woocommerce_init' ) );
  • woocommerce-shipstation-integration/trunk/includes/class-wc-shipstation-integration.php

    r3795802 r3807496  
    1313use WooCommerce\Shipping\ShipStation\Enum_Helper;
    1414use WooCommerce\Shipping\ShipStation\Logger;
     15use WooCommerce\Shipping\ShipStation\API_User;
    1516use WooCommerce\Shipping\ShipStation\Auth_Controller;
    1617use WooCommerce\Shipping\ShipStation\Connection_Log;
    … …  
    16781679                // protects and the most likely live credential, so it alone is flagged
    16791680                // "(newest)" and never carries an auto-remove countdown.
    1680                 $newest_key_id = isset( $rows[0]['key_id'] ) ? (int) $rows[0]['key_id'] : 0;
     1681                // The list also holds unprefixed keys from before 5.0.8, which the prune
     1682                // never looks at, so the newest is the newest prefixed row.
     1683                $newest_key_id = 0;
     1684                foreach ( $rows as $row ) {
     1685                        if ( ! empty( $row['is_prefixed'] ) ) {
     1686                                $newest_key_id = (int) $row['key_id'];
     1687                                break;
     1688                        }
     1689                }
    16811690
    16821691                // Order by "Last seen": the freshly-generated New key is always pinned to
    … …  
    17241733                ob_start();
    17251734
     1735                // Repair the API user before listing its keys: put its role back, and on
     1736                // multisite, or after a delete made without WooCommerce active, give the
     1737                // keys of a deleted API user to its replacement.
     1738                $synced = API_User::sync_keys();
     1739                if ( is_wp_error( $synced ) ) {
     1740                        Logger::error( 'Could not repair the ShipStation API user: ' . $synced->get_error_message() );
     1741                }
     1742                $api_user_id = API_User::get_user_id();
     1743                $api_user    = $api_user_id > 0 ? get_userdata( $api_user_id ) : false;
     1744
    17261745                list( $key_rows, $newest_key_id ) = self::get_sorted_plugin_key_rows();
    17271746
    … …  
    17441763                        $rows_for_key                        = isset( $connections_by_key[ (int) $key_row['key_id'] ] ) ? $connections_by_key[ (int) $key_row['key_id'] ] : array();
    17451764                        $key_rows[ $index ]['rollup_status'] = Connection_Log::key_rollup_status( $rows_for_key, $active_window, $transport_enabled, $current_host, $is_wpcom_connected );
     1765                        $key_rows[ $index ]['can_delete']    = Auth_Controller::current_user_may_delete_key_row( (int) $key_row['key_id'], (int) $key_row['user_id'], ! empty( $key_row['is_prefixed'] ) );
     1766                }
     1767
     1768                // Refused keys among the listed rows, matched by fingerprint, so a new key
     1769                // that got a skipped key's id is not marked refused.
     1770                // Among them, a key whose owner still holds manage_product_terms passes
     1771                // the order and inventory routes, so ShipStation still imports with it.
     1772                $skipped_key_ids        = array();
     1773                $usable_skipped_key_ids = array();
     1774                foreach ( $key_rows as $key_row ) {
     1775                        if ( in_array( (int) $key_row['key_id'], API_User::get_skipped_key_ids(), true ) && API_User::is_recorded_key( (int) $key_row['key_id'], (string) $key_row['truncated_key'] ) ) {
     1776                                $skipped_key_ids[] = (int) $key_row['key_id'];
     1777
     1778                                // phpcs:ignore WordPress.WP.Capabilities.Unknown -- WooCommerce core capability.
     1779                                if ( get_userdata( (int) $key_row['user_id'] ) && user_can( (int) $key_row['user_id'], 'manage_product_terms' ) ) {
     1780                                        $usable_skipped_key_ids[] = (int) $key_row['key_id'];
     1781                                }
     1782                        }
    17461783                }
    17471784
    … …  
    17491786                        'api-key-list.php',
    17501787                        array(
    1751                                 'rows'              => $key_rows,
    1752                                 'active_window'     => $active_window,
    1753                                 'transport_enabled' => $transport_enabled,
    1754                                 'date_format'       => get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
    1755                                 'newest_key_id'     => $newest_key_id,
     1788                                'rows'                   => $key_rows,
     1789                                'active_window'          => $active_window,
     1790                                'transport_enabled'      => $transport_enabled,
     1791                                'date_format'            => get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
     1792                                'newest_key_id'          => $newest_key_id,
     1793                                'api_user_login'         => $api_user ? $api_user->user_login : '',
     1794                                'api_user_id'            => $api_user ? $api_user_id : 0,
     1795                                'api_user_errors'        => API_User::get_errors(),
     1796                                'skipped_key_ids'        => $skipped_key_ids,
     1797                                'usable_skipped_key_ids' => $usable_skipped_key_ids,
    17561798                        ),
    17571799                        '',
  • woocommerce-shipstation-integration/trunk/languages/woocommerce-shipstation.pot

    r3795802 r3807496  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 5.4.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 5.4.2\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2026-11-11 07:27:21+00:00\n"
     8"POT-Creation-Date: 2026-11-17 13:33:20+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
    … …  
    144144msgstr ""
    145145
    146 #: includes/api/rest/class-api-controller.php:287
     146#: includes/api/rest/class-api-controller.php:292
    147147msgid "Invalid ShipStation credentials."
    148148msgstr ""
    … …  
    375375
    376376#: includes/checkout/class-checkout-rates-options.php:637
    377 #: includes/class-wc-shipstation-integration.php:1458
     377#: includes/class-wc-shipstation-integration.php:1459
    378378#: vendor/automattic/jetpack-connection/src/class-users-connection-admin.php:90
    379379msgid "Connected"
    … …  
    416416
    417417#: includes/checkout/class-checkout-rates-options.php:678
    418 #: includes/class-wc-shipstation-integration.php:1628
     418#: includes/class-wc-shipstation-integration.php:1629
    419419msgid "Active"
    420420msgstr ""
    … …  
    463463msgstr ""
    464464
    465 #: includes/class-auth-controller.php:270
     465#: includes/class-api-user.php:606
     466msgid "This account is used by the ShipStation connection and cannot sign in."
     467msgstr ""
     468
     469#: includes/class-api-user.php:802
     470msgid ""
     471"The ShipStation API user was left out. It cannot be deleted, removed from a "
     472"site or given another role, because ShipStation connects through it."
     473msgstr ""
     474
     475#: includes/class-api-user.php:1199 includes/class-api-user.php:1204
     476#: includes/class-auth-controller.php:331
     477msgid "ShipStation Integration"
     478msgstr ""
     479
     480#: includes/class-auth-controller.php:272
    466481msgid "Copied!"
    467482msgstr ""
    468483
    469 #: includes/class-auth-controller.php:271
     484#: includes/class-auth-controller.php:273
    470485#: templates/partials/credential-field.php:43
    471486msgid "Show"
    472487msgstr ""
    473488
    474 #: includes/class-auth-controller.php:272
     489#: includes/class-auth-controller.php:274
    475490msgid "Hide"
    476491msgstr ""
    477492
    478 #: includes/class-auth-controller.php:273
     493#: includes/class-auth-controller.php:275
    479494msgid "Could not generate new keys. Please try again."
    480495msgstr ""
    481496
    482 #: includes/class-auth-controller.php:274
     497#: includes/class-auth-controller.php:276
    483498msgid ""
    484499"Generate a new set of REST API keys? Existing keys stay valid until you "
    … …  
    487502msgstr ""
    488503
    489 #: includes/class-auth-controller.php:276
     504#: includes/class-auth-controller.php:278
    490505msgid ""
    491506"Dangerously disconnect from WordPress.com? No direct ShipStation connection "
    … …  
    494509msgstr ""
    495510
    496 #: includes/class-auth-controller.php:371
    497 msgid "ShipStation Integration"
    498 msgstr ""
    499 
    500 #: includes/class-auth-controller.php:887
    501 #: includes/class-auth-controller.php:952
     511#: includes/class-auth-controller.php:947
     512#: includes/class-auth-controller.php:1048
    502513#: includes/class-global-connection-banner.php:139
    503514msgid "Security check failed"
    504515msgstr ""
    505516
    506 #: includes/class-auth-controller.php:892
    507 #: includes/class-auth-controller.php:957
     517#: includes/class-auth-controller.php:952
     518#: includes/class-auth-controller.php:1053
    508519#: includes/class-global-connection-banner.php:144
    509520#: includes/class-wpcom-connection.php:1278
    … …  
    511522msgstr ""
    512523
    513 #: includes/class-auth-controller.php:898
     524#: includes/class-auth-controller.php:963
     525msgid ""
     526"Your account cannot generate ShipStation API keys. It needs permission to "
     527"manage WooCommerce and to manage product categories, tags and attributes. "
     528"Ask an administrator to generate them."
     529msgstr ""
     530
     531#: includes/class-auth-controller.php:978
     532msgid ""
     533"Another request is setting up the ShipStation API user. Wait a moment, then "
     534"try again."
     535msgstr ""
     536
     537#: includes/class-auth-controller.php:981
     538msgid ""
     539"The ShipStation API user could not get the permissions it needs, so no keys "
     540"were generated. A role editor plugin may be removing them. See the "
     541"ShipStation log under WooCommerce > Status > Logs."
     542msgstr ""
     543
     544#: includes/class-auth-controller.php:984
     545msgid ""
     546"The ShipStation API user could not be created, so no keys were generated. "
     547"Another plugin may be blocking new user accounts. See the ShipStation log "
     548"under WooCommerce > Status > Logs for the reason."
     549msgstr ""
     550
     551#: includes/class-auth-controller.php:994
    514552msgid ""
    515553"Another request is currently generating REST API keys. Please refresh the "
    … …  
    517555msgstr ""
    518556
    519 #: includes/class-auth-controller.php:916
     557#: includes/class-auth-controller.php:1012
    520558msgid ""
    521559"Failed to generate API credentials. Please try again or contact your "
    … …  
    523561msgstr ""
    524562
    525 #: includes/class-auth-controller.php:964
     563#: includes/class-auth-controller.php:1071
    526564msgid "This key could not be deleted. It may have been removed already."
    527565msgstr ""
    528566
    529 #: includes/class-auth-controller.php:1210
     567#: includes/class-auth-controller.php:1074
     568msgid ""
     569"This key could not be deleted. Try again, and see the ShipStation log under "
     570"WooCommerce > Status > Logs if it keeps failing."
     571msgstr ""
     572
     573#: includes/class-auth-controller.php:1076
     574msgid ""
     575"You cannot delete this key here. Someone who can edit its owner can revoke "
     576"it under WooCommerce > Settings > Advanced > REST API."
     577msgstr ""
     578
     579#: includes/class-auth-controller.php:1078
     580msgid "You cannot delete this key here. It is not in the ShipStation key list."
     581msgstr ""
     582
     583#: includes/class-auth-controller.php:1334
    530584msgid "View ShipStation connection details"
    531585msgstr ""
    … …  
    610664msgstr ""
    611665
    612 #: includes/class-main.php:97
     666#: includes/class-main.php:102
    613667#. translators: %s WC download URL link.
    614668msgid ""
    … …  
    617671msgstr ""
    618672
    619 #: includes/class-main.php:599
     673#: includes/class-main.php:608
    620674msgid "Settings"
    621675msgstr ""
    622676
    623 #: includes/class-main.php:600
     677#: includes/class-main.php:609
    624678msgid "Support"
    625679msgstr ""
    626680
    627 #: includes/class-main.php:601
     681#: includes/class-main.php:610
    628682msgid "Docs"
    629683msgstr ""
    … …  
    730784msgstr ""
    731785
    732 #: includes/class-wc-shipstation-integration.php:232
     786#: includes/class-wc-shipstation-integration.php:233
    733787#: includes/class-wc-shipstation-privacy.php:24
    734788#: includes/data/data-settings.php:55 includes/data/data-settings.php:61
    … …  
    739793msgstr ""
    740794
    741 #: includes/class-wc-shipstation-integration.php:233
     795#: includes/class-wc-shipstation-integration.php:234
    742796msgid ""
    743797"ShipStation allows you to retrieve &amp; manage orders, then print labels "
    … …  
    745799msgstr ""
    746800
    747 #: includes/class-wc-shipstation-integration.php:361
     801#: includes/class-wc-shipstation-integration.php:362
    748802msgid "Choose which order statuses to export to ShipStation."
    749803msgstr ""
    750804
    751 #: includes/class-wc-shipstation-integration.php:362
     805#: includes/class-wc-shipstation-integration.php:363
    752806msgid "Each selected status must also be mapped to a ShipStation status."
    753807msgstr ""
    754808
    755 #: includes/class-wc-shipstation-integration.php:363
     809#: includes/class-wc-shipstation-integration.php:364
    756810msgid ""
    757811"Mappings are managed below or in your ShipStation account (depending on "
    … …  
    759813msgstr ""
    760814
    761 #: includes/class-wc-shipstation-integration.php:366
     815#: includes/class-wc-shipstation-integration.php:367
     816#: includes/class-wc-shipstation-integration.php:967
     817msgid "All statuses are selected for export."
     818msgstr ""
     819
     820#: includes/class-wc-shipstation-integration.php:369
    762821#: includes/class-wc-shipstation-integration.php:966
    763 msgid "All statuses are selected for export."
    764 msgstr ""
    765 
    766 #: includes/class-wc-shipstation-integration.php:368
    767 #: includes/class-wc-shipstation-integration.php:965
    768822msgid "Excluded from export:"
    769823msgstr ""
    770824
    771 #: includes/class-wc-shipstation-integration.php:380
     825#: includes/class-wc-shipstation-integration.php:381
    772826#. translators: %s: comma-separated list of WC order status names
    773827msgid ""
    … …  
    776830msgstr ""
    777831
    778 #: includes/class-wc-shipstation-integration.php:471
     832#: includes/class-wc-shipstation-integration.php:472
    779833msgid ""
    780834"Settings saved, but some selected export statuses are not mapped to a "
    … …  
    782836msgstr ""
    783837
    784 #: includes/class-wc-shipstation-integration.php:967
     838#: includes/class-wc-shipstation-integration.php:968
    785839msgid "Selected for export but not mapped to a ShipStation status:"
    786840msgstr ""
    787841
    788 #: includes/class-wc-shipstation-integration.php:968
     842#: includes/class-wc-shipstation-integration.php:969
    789843msgid "Map them below so their orders are exported correctly."
    790844msgstr ""
    791845
    792 #: includes/class-wc-shipstation-integration.php:971
     846#: includes/class-wc-shipstation-integration.php:972
    793847msgid ""
    794848"Delete this API key pair? Any ShipStation connection still using it will "
    … …  
    796850msgstr ""
    797851
    798 #: includes/class-wc-shipstation-integration.php:972
     852#: includes/class-wc-shipstation-integration.php:973
    799853#: vendor/automattic/jetpack-connection/src/class-connection-notice.php:236
    800854msgid "Something went wrong. Please try again."
    801855msgstr ""
    802856
    803 #: includes/class-wc-shipstation-integration.php:1007
     857#: includes/class-wc-shipstation-integration.php:1008
    804858msgid "This feature requires WooCommerce 9.7.0 or higher."
    805859msgstr ""
    806860
    807 #: includes/class-wc-shipstation-integration.php:1076
     861#: includes/class-wc-shipstation-integration.php:1077
    808862#: includes/data/data-settings.php:169
    809863msgid "Enable WordPress.com Transport"
    810864msgstr ""
    811865
    812 #: includes/class-wc-shipstation-integration.php:1119
     866#: includes/class-wc-shipstation-integration.php:1120
    813867msgid ""
    814868"Routes ShipStation traffic to your store through WordPress.com, providing a "
    … …  
    817871msgstr ""
    818872
    819 #: includes/class-wc-shipstation-integration.php:1131
     873#: includes/class-wc-shipstation-integration.php:1132
    820874#. translators: %s: the constant or filter name (wrapped in a <code> tag) that
    821875#. is forcing the setting on.
    … …  
    825879msgstr ""
    826880
    827 #: includes/class-wc-shipstation-integration.php:1357
     881#: includes/class-wc-shipstation-integration.php:1358
    828882msgid ""
    829883"You're turning on WordPress.com Transport. After you save, update your "
    … …  
    833887msgstr ""
    834888
    835 #: includes/class-wc-shipstation-integration.php:1359
     889#: includes/class-wc-shipstation-integration.php:1360
    836890msgid ""
    837891"You're turning off WordPress.com Transport. ShipStation has a recent direct "
    … …  
    843897msgstr ""
    844898
    845 #: includes/class-wc-shipstation-integration.php:1360
     899#: includes/class-wc-shipstation-integration.php:1361
    846900msgid ""
    847901"You're turning off WordPress.com Transport. After you save, update your "
    … …  
    851905msgstr ""
    852906
    853 #: includes/class-wc-shipstation-integration.php:1374
     907#: includes/class-wc-shipstation-integration.php:1375
    854908msgid "Credentials"
    855909msgstr ""
    856910
    857 #: includes/class-wc-shipstation-integration.php:1388
     911#: includes/class-wc-shipstation-integration.php:1389
    858912msgid "Connections"
    859913msgstr ""
    860914
    861 #: includes/class-wc-shipstation-integration.php:1409
     915#: includes/class-wc-shipstation-integration.php:1410
    862916msgid "API Keys"
    863917msgstr ""
    864918
    865 #: includes/class-wc-shipstation-integration.php:1461
     919#: includes/class-wc-shipstation-integration.php:1462
    866920msgid "Action needed"
    867921msgstr ""
    868922
    869 #: includes/class-wc-shipstation-integration.php:1464
     923#: includes/class-wc-shipstation-integration.php:1465
    870924msgid "Not connected yet"
    871925msgstr ""
    872926
    873 #: includes/class-wc-shipstation-integration.php:1493
     927#: includes/class-wc-shipstation-integration.php:1494
    874928msgid ""
    875929"ShipStation hasn't connected yet. Copy the values below into ShipStation to "
    … …  
    877931msgstr ""
    878932
    879 #: includes/class-wc-shipstation-integration.php:1498
     933#: includes/class-wc-shipstation-integration.php:1499
    880934msgid ""
    881935"ShipStation hasn't synced in over a day, so new orders may not be "
    … …  
    885939msgstr ""
    886940
    887 #: includes/class-wc-shipstation-integration.php:1503
     941#: includes/class-wc-shipstation-integration.php:1504
    888942msgid ""
    889943"Your store's web address changed, so the route ShipStation saved no longer "
    … …  
    892946msgstr ""
    893947
    894 #: includes/class-wc-shipstation-integration.php:1504
     948#: includes/class-wc-shipstation-integration.php:1505
    895949msgid "Show the Store URL"
    896950msgstr ""
    897951
    898 #: includes/class-wc-shipstation-integration.php:1508
     952#: includes/class-wc-shipstation-integration.php:1509
    899953msgid ""
    900954"WordPress.com is disconnected, so ShipStation can't reach your store "
    … …  
    903957msgstr ""
    904958
    905 #: includes/class-wc-shipstation-integration.php:1509
     959#: includes/class-wc-shipstation-integration.php:1510
    906960msgid "Reconnect WordPress.com"
    907961msgstr ""
    908962
    909 #: includes/class-wc-shipstation-integration.php:1513
     963#: includes/class-wc-shipstation-integration.php:1514
    910964msgid ""
    911965"WordPress.com transport is off, so your store is turning away the proxied "
    … …  
    914968msgstr ""
    915969
    916 #: includes/class-wc-shipstation-integration.php:1514
     970#: includes/class-wc-shipstation-integration.php:1515
    917971msgid "Review transport setting"
    918972msgstr ""
    919973
    920 #: includes/class-wc-shipstation-integration.php:1561
     974#: includes/class-wc-shipstation-integration.php:1562
    921975msgid ""
    922976"The WordPress.com connection package is unavailable. Reinstall plugin "
    … …  
    924978msgstr ""
    925979
    926 #: includes/class-wc-shipstation-integration.php:1629
     980#: includes/class-wc-shipstation-integration.php:1630
    927981msgid "Inactive"
    928982msgstr ""
    929983
    930 #: includes/class-wc-shipstation-integration.php:1630
     984#: includes/class-wc-shipstation-integration.php:1631
    931985msgid "Rejected"
    932986msgstr ""
    933987
    934 #: includes/class-wc-shipstation-integration.php:1631
     988#: includes/class-wc-shipstation-integration.php:1632
    935989msgid "Disconnected"
    936990msgstr ""
    937991
    938 #: includes/class-wc-shipstation-integration.php:1632
     992#: includes/class-wc-shipstation-integration.php:1633
    939993msgid "Mismatch"
    940994msgstr ""
    941995
    942 #: includes/class-wc-shipstation-integration.php:1633
     996#: includes/class-wc-shipstation-integration.php:1634
    943997msgid "Deleted"
    944998msgstr ""
    945999
    946 #: includes/class-wc-shipstation-integration.php:1634
     1000#: includes/class-wc-shipstation-integration.php:1635
    9471001msgid "New"
    9481002msgstr ""
    9491003
    950 #: includes/class-wc-shipstation-integration.php:1635
     1004#: includes/class-wc-shipstation-integration.php:1636
    9511005msgid "Unused"
    9521006msgstr ""
    9531007
    954 #: includes/class-wc-shipstation-integration.php:1833
     1008#: includes/class-wc-shipstation-integration.php:1875
    9551009msgid "Action failed. Please refresh the page and retry."
    9561010msgstr ""
    9571011
    958 #: includes/class-wc-shipstation-integration.php:1838
     1012#: includes/class-wc-shipstation-integration.php:1880
    9591013msgid "Cheatin&#8217; huh?"
    9601014msgstr ""
    9611015
    962 #: includes/class-wc-shipstation-integration.php:1860
     1016#: includes/class-wc-shipstation-integration.php:1902
    9631017msgid "ShipStation logo"
    9641018msgstr ""
    9651019
    966 #: includes/class-wc-shipstation-integration.php:1870
     1020#: includes/class-wc-shipstation-integration.php:1912
    9671021#. translators: %s: ShipStation URL
    9681022msgid ""
    … …  
    9721026msgstr ""
    9731027
    974 #: includes/class-wc-shipstation-integration.php:1885
     1028#: includes/class-wc-shipstation-integration.php:1927
    9751029msgid ""
    9761030"After logging in, add WooCommerce as a selling channel in ShipStation. Use "
    … …  
    9791033msgstr ""
    9801034
    981 #: includes/class-wc-shipstation-integration.php:1902
     1035#: includes/class-wc-shipstation-integration.php:1944
    9821036#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
    9831037#. documentation URL
    … …  
    12401294msgstr ""
    12411295
    1242 #: templates/api-key-list.php:31
     1296#: templates/api-key-list.php:56
     1297msgid ""
     1298"ShipStation requests are refused until the ShipStation API user has its "
     1299"permissions back. A role editor plugin may be removing them."
     1300msgstr ""
     1301
     1302#: templates/api-key-list.php:58
     1303msgid ""
     1304"Some ShipStation API keys could not be moved to the ShipStation API user. "
     1305"They still belong to their previous owner and keep working. The plugin "
     1306"tries again in about an hour."
     1307msgstr ""
     1308
     1309#: templates/api-key-list.php:60
     1310msgid ""
     1311"Some ShipStation API keys could not be moved to the ShipStation API user. "
     1312"The plugin tries again later."
     1313msgstr ""
     1314
     1315#: templates/api-key-list.php:71
     1316msgid "See the ShipStation log under WooCommerce > Status > Logs for details."
     1317msgstr ""
     1318
     1319#: templates/api-key-list.php:76
    12431320msgid "No plugin-generated API keys yet."
    12441321msgstr ""
    12451322
    1246 #: templates/api-key-list.php:36 templates/observed-connections.php:113
     1323#: templates/api-key-list.php:81 templates/observed-connections.php:113
    12471324msgid "Key"
    12481325msgstr ""
    12491326
    1250 #: templates/api-key-list.php:37 templates/observed-connections.php:112
     1327#: templates/api-key-list.php:82 templates/observed-connections.php:112
    12511328msgid "Transport"
    12521329msgstr ""
    12531330
    1254 #: templates/api-key-list.php:38 templates/observed-connections.php:115
     1331#: templates/api-key-list.php:83 templates/observed-connections.php:115
    12551332msgid "Last sync"
    12561333msgstr ""
    12571334
    1258 #: templates/api-key-list.php:147
     1335#: templates/api-key-list.php:171
     1336msgid ""
     1337"ShipStation refuses this key: its owner was deleted or lacks a permission "
     1338"ShipStation needs. Delete this key."
     1339msgstr ""
     1340
     1341#: templates/api-key-list.php:173
     1342msgid ""
     1343"ShipStation refuses this key: its owner was deleted or lacks a permission "
     1344"ShipStation needs. You cannot delete it here. Someone who can edit its "
     1345"owner can revoke it under WooCommerce > Settings > Advanced > REST API."
     1346msgstr ""
     1347
     1348#: templates/api-key-list.php:175
     1349msgid ""
     1350"Not moved to the ShipStation API user: its owner lacks a permission "
     1351"ShipStation needs, so ShipStation refuses some requests with this key."
     1352msgstr ""
     1353
     1354#: templates/api-key-list.php:177
     1355msgid "Not moved to the ShipStation API user yet."
     1356msgstr ""
     1357
     1358#: templates/api-key-list.php:223
    12591359msgid "Both"
    12601360msgstr ""
    12611361
    1262 #: templates/api-key-list.php:149 templates/observed-connections.php:148
     1362#: templates/api-key-list.php:225 templates/observed-connections.php:148
    12631363#: templates/observed-connections.php:271
    12641364msgid "WordPress.com"
    12651365msgstr ""
    12661366
    1267 #: templates/api-key-list.php:151 templates/observed-connections.php:149
     1367#: templates/api-key-list.php:227 templates/observed-connections.php:149
    12681368msgid "Direct"
    12691369msgstr ""
    12701370
    1271 #: templates/api-key-list.php:158
     1371#: templates/api-key-list.php:234
    12721372msgid "Not detected yet — shown once ShipStation connects through this key."
    12731373msgstr ""
    12741374
    1275 #: templates/api-key-list.php:175
     1375#: templates/api-key-list.php:251
    12761376msgid "Not connecting lately — delete if unused in ShipStation."
    12771377msgstr ""
    12781378
    1279 #: templates/api-key-list.php:178
     1379#: templates/api-key-list.php:254
    12801380msgid "Never"
    12811381msgstr ""
    12821382
    1283 #: templates/api-key-list.php:185
     1383#: templates/api-key-list.php:261
    12841384msgid "auto-deletes in"
    12851385msgstr ""
    12861386
    1287 #: templates/api-key-list.php:190
     1387#: templates/api-key-list.php:266
    12881388#. translators: %s: absolute date/time the key auto-deletes.
    12891389msgid "auto-deletes on %s"
    12901390msgstr ""
    12911391
    1292 #: templates/api-key-list.php:196
     1392#: templates/api-key-list.php:272
    12931393msgid "auto-deletes on the next cleanup."
    12941394msgstr ""
    12951395
    1296 #: templates/api-key-list.php:202
     1396#: templates/api-key-list.php:279
    12971397msgid "Delete"
    12981398msgstr ""
    12991399
    1300 #: templates/api-key-list.php:202
     1400#: templates/api-key-list.php:279
    13011401msgid "Delete this API key pair"
    13021402msgstr ""
    13031403
    1304 #: templates/api-key-list.php:211
     1404#: templates/api-key-list.php:289
    13051405msgid ""
    13061406"Delete keys you no longer use in ShipStation — fewer keys, less risk. A "
    13071407"deleted key stops working immediately."
     1408msgstr ""
     1409
     1410#: templates/api-key-list.php:296
     1411#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1412msgid ""
     1413"None of these keys belong to the ShipStation API user %s. It is a system "
     1414"account for this connection and cannot sign in. Do not delete it: "
     1415"ShipStation cannot connect without it."
     1416msgstr ""
     1417
     1418#: templates/api-key-list.php:299
     1419#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1420msgid ""
     1421"These keys belong to the ShipStation API user %s, except where noted. It is "
     1422"a system account for this connection and cannot sign in. Do not delete it: "
     1423"ShipStation cannot connect without it."
     1424msgstr ""
     1425
     1426#: templates/api-key-list.php:302
     1427#. translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6.
     1428msgid ""
     1429"These keys belong to the ShipStation API user %s. It is a system account "
     1430"for this connection and cannot sign in. Do not delete it: ShipStation "
     1431"cannot connect without it."
    13081432msgstr ""
    13091433
  • woocommerce-shipstation-integration/trunk/readme.txt

    r3795802 r3807496  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 5.4.1
     10Stable tag: 5.4.2
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    7474
    7575== Changelog ==
     76
     77= 5.4.2 - 2026-11-17 =
     78* Fix   - Security update.
     79* Tweak - Plugin-generated API keys now belong to a new ShipStation API user with limited permissions. Existing plugin keys move to it and keep working with ShipStation, but no longer reach orders, products or customers on other WooCommerce REST API routes.
    7680
    7781= 5.4.1 - 2026-11-11 =
  • woocommerce-shipstation-integration/trunk/templates/api-key-list.php

    r3586059 r3807496  
    1717 * @var string $date_format       Combined WP date+time format for absolute fallbacks.
    1818 * @var int    $newest_key_id     Key id of the prune-protected newest row.
     19 * @var string $api_user_login    Login of the ShipStation API user that owns the keys, or '' when there is none.
     20 * @var int    $api_user_id       Id of the ShipStation API user, or 0 when there is none.
     21 * @var array{move:string,repair:string} $api_user_errors Error codes of the last failed one-time key move ('move') and repair ('repair'), '' where it worked.
     22 * @var int[]  $skipped_key_ids   Keys left alone because their owner could not use them.
     23 * @var int[]  $usable_skipped_key_ids Keys among them whose owner still passes the order and inventory routes.
    1924 */
    2025
    … …  
    2833// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
    2934?>
     35<?php
     36$move_error      = (string) ( $api_user_errors['move'] ?? '' );
     37$repair_error    = (string) ( $api_user_errors['repair'] ?? '' );
     38$api_user_id     = (int) $api_user_id;
     39$skipped_key_ids = array_map( 'intval', (array) $skipped_key_ids );
     40
     41// A key left alone whose owner still holds manage_product_terms keeps
     42// importing orders: only the routes that check manage_woocommerce refuse it.
     43$usable_skipped_key_ids = array_map( 'intval', (array) $usable_skipped_key_ids );
     44
     45// Without its permissions the API user's keys are refused. The keys it does
     46// not own yet still work as their previous owner.
     47$api_user_owns_a_key = false;
     48foreach ( $rows as $row ) {
     49        if ( $api_user_id > 0 && isset( $row['user_id'] ) && (int) $row['user_id'] === $api_user_id ) {
     50                $api_user_owns_a_key = true;
     51                break;
     52        }
     53}
     54
     55if ( $api_user_owns_a_key && ( 'shipstation_api_user_role' === $move_error || 'shipstation_api_user_role' === $repair_error ) ) {
     56        $api_user_notice = __( 'ShipStation requests are refused until the ShipStation API user has its permissions back. A role editor plugin may be removing them.', 'woocommerce-shipstation-integration' );
     57} elseif ( '' !== $move_error ) {
     58        $api_user_notice = __( 'Some ShipStation API keys could not be moved to the ShipStation API user. They still belong to their previous owner and keep working. The plugin tries again in about an hour.', 'woocommerce-shipstation-integration' );
     59} elseif ( '' !== $repair_error ) {
     60        $api_user_notice = __( 'Some ShipStation API keys could not be moved to the ShipStation API user. The plugin tries again later.', 'woocommerce-shipstation-integration' );
     61} else {
     62        $api_user_notice = '';
     63}
     64
     65$has_key_notes = false;
     66?>
     67<?php if ( '' !== $api_user_notice ) : ?>
     68        <div class="notice notice-error inline">
     69                <p>
     70                        <?php echo esc_html( $api_user_notice ); ?>
     71                        <?php esc_html_e( 'See the ShipStation log under WooCommerce > Status > Logs for details.', 'woocommerce-shipstation-integration' ); ?>
     72                </p>
     73        </div>
     74<?php endif; ?>
    3075<?php if ( array() === $rows ) : ?>
    3176        <p><?php esc_html_e( 'No plugin-generated API keys yet.', 'woocommerce-shipstation-integration' ); ?></p>
    … …  
    81126                                        }
    82127                                }
     128                                // ShipStation refuses a key the sync left alone, even when its owner
     129                                // still uses it elsewhere, so it never reads as working or just made.
     130                                // The exception is a key whose owner still passes the order routes.
     131                                $is_skipped = in_array( (int) $row['key_id'], $skipped_key_ids, true );
     132                                $is_refused = $is_skipped && ! in_array( (int) $row['key_id'], $usable_skipped_key_ids, true );
     133                                if ( $is_refused && in_array( $pill_modifier, array( 'active', 'new' ), true ) ) {
     134                                        $pill_modifier = 'rejected';
     135                                        $is_active     = false;
     136                                        $is_new        = false;
     137                                }
    83138                                $pill_label = $pill_labels[ $pill_modifier ];
     139                                $can_delete = (bool) ( $row['can_delete'] ?? true );
    84140
    85141                                // Provisional (dimmed) treatment for everything not active. The
    … …  
    103159                                                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- key_pill() escapes internally.
    104160                                                echo WC_ShipStation_Integration::key_pill( $pill_modifier, $pill_label );
    105                                                 ?>
     161
     162                                                // A key the ShipStation API user does not own: refused, or not moved yet.
     163                                                // A refused key is marked even when no API user exists yet.
     164                                                $is_not_moved = $api_user_id > 0 && isset( $row['user_id'] ) && (int) $row['user_id'] !== $api_user_id;
     165                                                if ( $is_skipped || $is_not_moved ) :
     166                                                        $has_key_notes = true;
     167                                                        ?>
     168                                                        <p class="description">
     169                                                                <?php
     170                                                                if ( $is_refused && $can_delete ) {
     171                                                                        esc_html_e( 'ShipStation refuses this key: its owner was deleted or lacks a permission ShipStation needs. Delete this key.', 'woocommerce-shipstation-integration' );
     172                                                                } elseif ( $is_refused ) {
     173                                                                        esc_html_e( 'ShipStation refuses this key: its owner was deleted or lacks a permission ShipStation needs. You cannot delete it here. Someone who can edit its owner can revoke it under WooCommerce > Settings > Advanced > REST API.', 'woocommerce-shipstation-integration' );
     174                                                                } elseif ( $is_skipped ) {
     175                                                                        esc_html_e( 'Not moved to the ShipStation API user: its owner lacks a permission ShipStation needs, so ShipStation refuses some requests with this key.', 'woocommerce-shipstation-integration' );
     176                                                                } else {
     177                                                                        esc_html_e( 'Not moved to the ShipStation API user yet.', 'woocommerce-shipstation-integration' );
     178                                                                }
     179                                                                ?>
     180                                                        </p>
     181                                                <?php endif; ?>
    106182                                        </td>
    107183                                        <?php
    … …  
    200276                                        </td>
    201277                                        <td class="shipstation-api-key-actions shipstation-api-key-col">
     278                                                <?php if ( $can_delete ) : ?>
    202279                                                <button type="button" class="shipstation-delete-api-key" data-key-id="<?php echo esc_attr( (string) $row['key_id'] ); ?>" title="<?php esc_attr_e( 'Delete', 'woocommerce-shipstation-integration' ); ?>" aria-label="<?php esc_attr_e( 'Delete this API key pair', 'woocommerce-shipstation-integration' ); ?>">
    203280                                                        <span class="dashicons dashicons-trash"></span>
    204281                                                </button>
     282                                                <?php endif; ?>
    205283                                        </td>
    206284                                </tr>
    … …  
    211289                <?php esc_html_e( 'Delete keys you no longer use in ShipStation — fewer keys, less risk. A deleted key stops working immediately.', 'woocommerce-shipstation-integration' ); ?>
    212290        </p>
     291        <?php if ( '' !== $api_user_login ) : ?>
     292                <p class="description">
     293                        <?php
     294                        if ( ! $api_user_owns_a_key ) {
     295                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     296                                $owner_line = esc_html__( 'None of these keys belong to the ShipStation API user %s. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     297                        } elseif ( $has_key_notes ) {
     298                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     299                                $owner_line = esc_html__( 'These keys belong to the ShipStation API user %s, except where noted. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     300                        } else {
     301                                /* translators: %s: user login, e.g. shipstation-a1b2c3d4e5f6. */
     302                                $owner_line = esc_html__( 'These keys belong to the ShipStation API user %s. It is a system account for this connection and cannot sign in. Do not delete it: ShipStation cannot connect without it.', 'woocommerce-shipstation-integration' );
     303                        }
     304                        // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above; the login is escaped here.
     305                        printf( $owner_line, '<code>' . esc_html( $api_user_login ) . '</code>' );
     306                        ?>
     307                </p>
     308        <?php endif; ?>
    213309<?php endif; ?>
  • woocommerce-shipstation-integration/trunk/uninstall.php

    r3723614 r3807496  
    88 * authenticate with), nor the pre-SHIPSTN-142 plugin options (auth key,
    99 * settings, activation-notice flag), which historically were left in place on
    10  * uninstall.
     10 * uninstall. The ShipStation API user that owns those keys is left too, with
     11 * its role, its cached id (network option woocommerce_shipstation_api_user_id),
     12 * the ids of deleted API users (network option
     13 * woocommerce_shipstation_api_user_former_ids) and the record of each moved
     14 * key's previous owner (woocommerce_shipstation_api_user_state), so a
     15 * reinstall, of this version or an older one, keeps the connection and the
     16 * move can be reversed by hand. Without the plugin the user is no longer
     17 * locked: an administrator can sign it in, change its role or delete it.
    1118 *
    1219 * @package WC_ShipStation
    … …  
    2734 *  - Auth_Controller::KEY_META_OPTION / GEN_LOCK_OPTION
    2835 *  - WPCOM_Connection::DISCONNECT_INTENT_OPTION / CONNECTED_URL_OPTION
     36 *  - API_User::SYNCED_OPTION
    2937 *
    3038 * @return void
    … …  
    4654                'woocommerce_shipstation_last_success_ts',
    4755                'woocommerce_shipstation_global_banner_dismissed_at',
     56                'woocommerce_shipstation_api_user_synced',
    4857        );
    4958
  • woocommerce-shipstation-integration/trunk/vendor/composer/installed.php

    r3795802 r3807496  
    44        'pretty_version' => 'dev-trunk',
    55        'version' => 'dev-trunk',
    6         'reference' => 'f3cb6ebbd57a6d4dad8eaf57333228e929d5f967',
     6        'reference' => 'bef3afc1f34762ac8aff3f144942ecb305e6ec2e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    113113            'pretty_version' => 'dev-trunk',
    114114            'version' => 'dev-trunk',
    115             'reference' => 'f3cb6ebbd57a6d4dad8eaf57333228e929d5f967',
     115            'reference' => 'bef3afc1f34762ac8aff3f144942ecb305e6ec2e',
    116116            'type' => 'wordpress-plugin',
    117117            'install_path' => __DIR__ . '/../../',
  • woocommerce-shipstation-integration/trunk/vendor/composer/jetpack_autoload_classmap.php

    r3795802 r3807496  
    403403                'path'    => $baseDir . '/tests/bootstrap.php'
    404404        ),
     405        'WooCommerce\\Shipping\\ShipStation\\Tests\\Unit\\API_User_Test' => array(
     406                'version' => 'dev-trunk',
     407                'path'    => $baseDir . '/tests/Unit/API_User_Test.php'
     408        ),
    405409        'WooCommerce\\Shipping\\ShipStation\\Tests\\Unit\\Ajax_Die_Rig_Trait' => array(
    406410                'version' => 'dev-trunk',
  • woocommerce-shipstation-integration/trunk/woocommerce-shipstation.php

    r3795802 r3807496  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 5.4.1
     5 * Version: 5.4.2
    66 * Description: Power your entire shipping operation from one platform.
    77 * Author: WooCommerce
    … …  
    3939}
    4040
    41 define( 'WC_SHIPSTATION_VERSION', '5.4.1' ); // WRCS: DEFINED_VERSION.
     41define( 'WC_SHIPSTATION_VERSION', '5.4.2' ); // WRCS: DEFINED_VERSION.
    4242
    4343// Composer + Jetpack autoloader. Ships with the production zip; may be absent in
Note: See TracChangeset for help on using the changeset viewer.