Plugin Directory

Changeset 3313351


Ignore:
Timestamp:
06/17/2025 03:24:32 PM (9 months ago)
Author:
SamNajian
Message:

Tagging version 4.7.0

Location:
woocommerce-shipstation-integration
Files:
42 added
2 deleted
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woocommerce-shipstation-integration/tags/4.7.0/assets/css/admin.css

    r3300481 r3313351  
    1 .shipstation-logo {
    2     width: 150px;
    3     margin: 16px 0 0 0;
    4 }
    5 
    6 .shipstation-external-link:after {
    7     font-family: "dashicons";
    8     content: "\f504";
    9     display: inline-block;
    10     vertical-align: bottom;
    11 }
    12 
    13 .woocommerce-shipstation-activation-notice-dismiss {
    14     position: relative;
    15     float: right;
    16     padding: 9px 0 9px 9px;
    17     text-decoration: none;
    18 }
     1.shipstation-logo{width:150px;margin:16px 0 0 0}.shipstation-external-link:after{font-family:dashicons;content:"";display:inline-block;vertical-align:bottom}.woocommerce-shipstation-activation-notice-dismiss{position:relative;float:right;padding:9px 0 9px 9px;text-decoration:none}
  • woocommerce-shipstation-integration/tags/4.7.0/changelog.txt

    r3308688 r3313351  
    11*** ShipStation for WooCommerce ***
     2
     3= 4.7.0 - 2025-06-17 =
     4* Add   - REST API endpoints to update and retrieve product inventory data.
     5* Add   - Gift feature.
    26
    37= 4.6.1 - 2025-06-09 =
     
    610= 4.6.0 - 2025-06-02 =
    711* Add   - New hook `woocommerce_shipstation_shipnotify_status_updated` that will be called after the order status is changed.
     12* Add   - REST API endpoints to update and retrieve product inventory data.
    813
    914= 4.5.2 - 2025-05-26 =
  • woocommerce-shipstation-integration/tags/4.7.0/includes/class-wc-shipstation-api.php

    r3111282 r3313351  
    1010}
    1111
    12 require_once WC_SHIPSTATION_ABSPATH . 'includes/api-requests/class-wc-shipstation-api-request.php';
     12require_once WC_SHIPSTATION_ABSPATH . 'includes/api/requests/class-wc-shipstation-api-request.php';
    1313
    1414/**
     
    9595            /* translators: 1: query string */
    9696            $this->log( sprintf( esc_html__( 'Input params: %s', 'woocommerce-shipstation-integration' ), http_build_query( $obfuscated_request ) ) );
    97             $request_class = include WC_SHIPSTATION_ABSPATH . 'includes/api-requests/class-wc-shipstation-api-' . $this->request['action'] . '.php';
     97            $request_class = include WC_SHIPSTATION_ABSPATH . 'includes/api/requests/class-wc-shipstation-api-' . $this->request['action'] . '.php';
    9898            $request_class->request();
    9999        } else {
  • woocommerce-shipstation-integration/tags/4.7.0/includes/class-wc-shipstation-integration.php

    r3300481 r3313351  
    4848
    4949    /**
     50     * Gift enable flag.
     51     *
     52     * @var boolean
     53     */
     54    public static $gift_enabled = false;
     55
     56    /**
     57     * Order meta keys.
     58     *
     59     * @var array
     60     */
     61    public static array $order_meta_keys = array(
     62        'is_gift'      => 'shipstation_is_gift',
     63        'gift_message' => 'shipstation_gift_message',
     64    );
     65
     66    /**
    5067     * Constructor
    5168     */
     
    6986        self::$logging_enabled = 'yes' === $this->get_option( 'logging_enabled', 'yes' );
    7087        self::$shipped_status  = $this->get_option( 'shipped_status', 'wc-completed' );
     88        self::$gift_enabled    = 'yes' === $this->get_option( 'gift_enabled', 'no' );
    7189
    7290        // Force saved .
  • woocommerce-shipstation-integration/tags/4.7.0/includes/data/data-settings.php

    r3054381 r3313351  
    6767        'default'     => 'wc-completed',
    6868    ),
     69    'gift_enabled'    => array(
     70        'title'       => __( 'Gift', 'woocommerce-shipstation-integration' ),
     71        'label'       => __( 'Enable Gift options at checkout page', 'woocommerce-shipstation-integration' ),
     72        'type'        => 'checkbox',
     73        'description' => __( 'Allow customer to mark their order as a gift and include a personalized message.', 'woocommerce-shipstation-integration' ),
     74        'desc_tip'    => __( 'Enable gift fields on the checkout page.', 'woocommerce-shipstation-integration' ),
     75        'default'     => 'no',
     76    ),
    6977    'logging_enabled' => array(
    7078        'title'       => __( 'Logging', 'woocommerce-shipstation-integration' ),
     
    7280        'type'        => 'checkbox',
    7381        'description' => __( 'Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'woocommerce-shipstation-integration' ),
    74         'desc_tip'    => 'Log all API interactions.',
     82        'desc_tip'    => __( 'Log all API interactions.', 'woocommerce-shipstation-integration' ),
    7583        'default'     => 'yes',
    7684    ),
  • woocommerce-shipstation-integration/tags/4.7.0/languages/woocommerce-shipstation.pot

    r3308688 r3313351  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 4.6.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 4.7.0\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2025-06-09 19:53:14+00:00\n"
     8"POT-Creation-Date: 2025-06-17 15:22:22+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    1515"X-Generator: node-wp-i18n 1.2.7\n"
    1616
    17 #: includes/api-requests/class-wc-shipstation-api-export.php:145
     17#: includes/api/requests/class-wc-shipstation-api-export.php:146
    1818#. translators: 1: order id
    1919msgid "Order %s can not be found."
    2020msgstr ""
    2121
    22 #: includes/api-requests/class-wc-shipstation-api-export.php:441
     22#: includes/api/requests/class-wc-shipstation-api-export.php:453
    2323msgid "Total Discount"
    2424msgstr ""
    2525
    26 #: includes/api-requests/class-wc-shipstation-api-export.php:470
     26#: includes/api/requests/class-wc-shipstation-api-export.php:482
    2727msgid "Order has been exported to Shipstation"
    2828msgstr ""
    2929
    30 #: includes/api-requests/class-wc-shipstation-api-export.php:482
     30#: includes/api/requests/class-wc-shipstation-api-export.php:494
    3131#. translators: 1: total count
    3232msgid "Exported %s orders"
    3333msgstr ""
    3434
    35 #: includes/api-requests/class-wc-shipstation-api-request.php:54
     35#: includes/api/requests/class-wc-shipstation-api-request.php:54
    3636#. translators: 1: field name
    3737msgid "Missing required param: %s"
    3838msgstr ""
    3939
    40 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:177
     40#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:177
    4141msgid "Missing ShipNotify XML input."
    4242msgstr ""
    4343
    44 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:197
     44#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:197
    4545msgid "Missing SimpleXML extension for parsing ShipStation XML."
    4646msgstr ""
    4747
    48 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:204
     48#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:204
    4949msgid "ShipNotify XML: "
    5050msgstr ""
    5151
    52 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:210
     52#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:210
    5353#. translators: %s is an error message.
    5454msgid "Cannot parse XML : %s"
    5555msgstr ""
    5656
    57 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:231
     57#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:231
    5858#. translators: %1$s is order number, %2$d is order id
    5959msgid "Order number: %1$s or Order ID: %2$d can not be found."
    6060msgstr ""
    6161
    62 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:239
     62#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:239
    6363#. translators: 1: order id
    6464msgid "Invalid order ID: %s"
    6565msgstr ""
    6666
    67 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:248
     67#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:248
    6868msgid "ShipNotify Item: "
    6969msgstr ""
    7070
    71 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:261
     71#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:261
    7272#. translators: 1: item name
    7373msgid "Item %s is not shippable product. Skipping."
    7474msgstr ""
    7575
    76 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:279
     76#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:279
    7777#. translators: 1) shipped items 2) carrier's name 3) shipped date, 4) tracking
    7878#. number
     
    8080msgstr ""
    8181
    82 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:295
     82#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:295
    8383#. translators: 1) number of shipped items 2) total shipped items 3) order ID
    8484msgid "Shipped %1$d out of %2$d items in order %3$s"
    8585msgstr ""
    8686
    87 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:311
     87#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:311
    8888#. translators: 1) carrier's name 2) shipped date, 3) tracking number
    8989msgid "Items shipped via %1$s on %2$s with tracking number %3$s (Shipstation)."
    9090msgstr ""
    9191
    92 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:318
     92#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:318
    9393#. translators: 1: order id
    9494msgid "No items found - shipping entire order %d."
    9595msgstr ""
    9696
    97 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:420
     97#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:420
    9898#. translators: 1) order ID 2) shipment status
    9999msgid "Updated order %1$s to status %2$s"
     100msgstr ""
     101
     102#: includes/api/rest/class-inventory-controller.php:54
     103msgid "Current page of the collection."
     104msgstr ""
     105
     106#: includes/api/rest/class-inventory-controller.php:65
     107msgid "Maximum number of items to be returned in result set."
     108msgstr ""
     109
     110#: includes/api/rest/class-inventory-controller.php:89
     111msgid "ID of the product to retrieve stock data for."
     112msgstr ""
     113
     114#: includes/api/rest/class-inventory-controller.php:111
     115msgid "SKU of the product to retrieve stock data for."
     116msgstr ""
     117
     118#: includes/api/rest/class-inventory-controller.php:224
     119msgid "Product not found."
     120msgstr ""
     121
     122#: includes/api/rest/class-inventory-controller.php:285
     123msgid "Error retrieving products."
     124msgstr ""
     125
     126#: includes/api/rest/class-inventory-controller.php:339
     127msgid "Invalid item"
     128msgstr ""
     129
     130#: includes/api/rest/class-inventory-controller.php:347
     131msgid "Product ID is not numeric"
     132msgstr ""
     133
     134#: includes/api/rest/class-inventory-controller.php:355
     135msgid "Stock quantity is not set or not numeric"
     136msgstr ""
     137
     138#: includes/api/rest/class-inventory-controller.php:369
     139msgid "Product not found"
     140msgstr ""
     141
     142#: includes/api/rest/class-inventory-controller.php:388
     143msgid "Inventory updated successfully."
     144msgstr ""
     145
     146#: includes/api/rest/class-inventory-controller.php:392
     147msgid "No inventory updated due to errors."
     148msgstr ""
     149
     150#: includes/api/rest/class-inventory-controller.php:397
     151msgid "Inventory updated with some errors."
     152msgstr ""
     153
     154#: includes/api/rest/class-inventory-controller.php:402
     155msgid "No inventory changes made."
     156msgstr ""
     157
     158#: includes/class-checkout.php:125
     159msgid "Send as gift"
     160msgstr ""
     161
     162#: includes/class-checkout.php:126
     163msgid "Mark order as a gift"
     164msgstr ""
     165
     166#: includes/class-checkout.php:127
     167msgid "Gift orders include an optional personal message on the packing slip."
     168msgstr ""
     169
     170#: includes/class-checkout.php:133
     171#. translators: Aria-label for the gift message checkbox.
     172msgid ""
     173"Mark order as a gift. When enabled order will include an optional personal "
     174"message on the packing slip."
     175msgstr ""
     176
     177#: includes/class-checkout.php:140
     178msgid "Gift message"
     179msgstr ""
     180
     181#: includes/class-checkout.php:141
     182msgid "Add gift message"
     183msgstr ""
     184
     185#: includes/class-checkout.php:143
     186#. translators: %1$d is the maximum length of the gift message.
     187msgid "Use the space above to enter your gift message. Approx., %1$d characters."
     188msgstr ""
     189
     190#: includes/class-checkout.php:145
     191msgid "Message for the gift."
     192msgstr ""
     193
     194#: includes/class-checkout.php:149
     195#. translators: %1$d is the maximum length of the gift message.
     196msgid ""
     197"Gift message, optional. Use this field to enter your gift message. "
     198"Approximately %1$d characters."
     199msgstr ""
     200
     201#: includes/class-checkout.php:221
     202msgid "optional"
     203msgstr ""
     204
     205#: includes/class-checkout.php:357
     206#. translators: %1$d is the maximum length of the gift message.
     207msgid "Please ensure the gift message does not exceed %d characters."
     208msgstr ""
     209
     210#: includes/class-checkout.php:514
     211msgid "Yes"
     212msgstr ""
     213
     214#: includes/class-checkout.php:514
     215msgid "No"
     216msgstr ""
     217
     218#: includes/class-checkout.php:577 includes/class-checkout.php:877
     219#: includes/class-checkout.php:882
     220msgid "Additional information"
    100221msgstr ""
    101222
     
    118239msgstr ""
    119240
    120 #: includes/class-wc-shipstation-integration.php:54
     241#: includes/class-wc-shipstation-integration.php:71
    121242#: includes/class-wc-shipstation-privacy.php:22
    122243msgid "ShipStation"
    123244msgstr ""
    124245
    125 #: includes/class-wc-shipstation-integration.php:55
     246#: includes/class-wc-shipstation-integration.php:72
    126247msgid ""
    127248"ShipStation allows you to retrieve & manage orders, then print labels "
     
    129250msgstr ""
    130251
    131 #: includes/class-wc-shipstation-integration.php:203
     252#: includes/class-wc-shipstation-integration.php:221
    132253msgid "Action failed. Please refresh the page and retry."
    133254msgstr ""
    134255
    135 #: includes/class-wc-shipstation-integration.php:208
     256#: includes/class-wc-shipstation-integration.php:226
    136257msgid "Cheatin’ huh?"
    137258msgstr ""
    138259
    139 #: includes/class-wc-shipstation-integration.php:224
     260#: includes/class-wc-shipstation-integration.php:242
    140261msgid "ShipStation logo"
    141262msgstr ""
    142263
    143 #: includes/class-wc-shipstation-integration.php:234
     264#: includes/class-wc-shipstation-integration.php:252
    144265#. translators: %s: ShipStation URL
    145266msgid ""
     
    149270msgstr ""
    150271
    151 #: includes/class-wc-shipstation-integration.php:252
     272#: includes/class-wc-shipstation-integration.php:270
    152273#. translators: %s: ShipStation Auth Key
    153274msgid ""
     
    156277msgstr ""
    157278
    158 #: includes/class-wc-shipstation-integration.php:259
     279#: includes/class-wc-shipstation-integration.php:277
    159280msgid "Once connected you're good to go!"
    160281msgstr ""
    161282
    162 #: includes/class-wc-shipstation-integration.php:266
     283#: includes/class-wc-shipstation-integration.php:284
    163284#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
    164285#. documentation URL
     
    242363
    243364#: includes/data/data-settings.php:70
     365msgid "Gift"
     366msgstr ""
     367
     368#: includes/data/data-settings.php:71
     369msgid "Enable Gift options at checkout page"
     370msgstr ""
     371
     372#: includes/data/data-settings.php:73
     373msgid ""
     374"Allow customer to mark their order as a gift and include a personalized "
     375"message."
     376msgstr ""
     377
     378#: includes/data/data-settings.php:74
     379msgid "Enable gift fields on the checkout page."
     380msgstr ""
     381
     382#: includes/data/data-settings.php:78
    244383msgid "Logging"
    245384msgstr ""
    246385
    247 #: includes/data/data-settings.php:71
     386#: includes/data/data-settings.php:79
    248387msgid "Enable Logging"
    249388msgstr ""
    250389
    251 #: includes/data/data-settings.php:73
     390#: includes/data/data-settings.php:81
    252391msgid ""
    253392"Note: this may log personal information. We recommend using this for "
     
    255394msgstr ""
    256395
    257 #: woocommerce-shipstation.php:37
     396#: includes/data/data-settings.php:82
     397msgid "Log all API interactions."
     398msgstr ""
     399
     400#: woocommerce-shipstation.php:47
    258401#. translators: %s WC download URL link.
    259402msgid ""
     
    262405msgstr ""
    263406
    264 #: woocommerce-shipstation.php:137
     407#: woocommerce-shipstation.php:163
    265408msgid "Settings"
    266409msgstr ""
    267410
    268 #: woocommerce-shipstation.php:138
     411#: woocommerce-shipstation.php:164
    269412msgid "Support"
    270413msgstr ""
    271414
    272 #: woocommerce-shipstation.php:139
     415#: woocommerce-shipstation.php:165
    273416msgid "Docs"
    274417msgstr ""
  • woocommerce-shipstation-integration/tags/4.7.0/readme.txt

    r3308688 r3313351  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 4.6.1
     10Stable tag: 4.7.0
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7171== Changelog ==
    7272
     73= 4.7.0 - 2025-06-17 =
     74* Add   - REST API endpoints to update and retrieve product inventory data.
     75* Add   - Gift feature.
     76
    7377= 4.6.1 - 2025-06-09 =
    7478* Tweak - WooCommerce 9.9 compatibility.
     
    7680= 4.6.0 - 2025-06-02 =
    7781* Add   - New hook `woocommerce_shipstation_shipnotify_status_updated` that will be called after the order status is changed.
     82* Add   - REST API endpoints to update and retrieve product inventory data.
    7883
    7984= 4.5.2 - 2025-05-26 =
  • woocommerce-shipstation-integration/tags/4.7.0/woocommerce-shipstation.php

    r3308688 r3313351  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 4.6.1
     5 * Version: 4.7.0
    66 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation.
    77 * Author: WooCommerce
     
    2323}
    2424
     25use WooCommerce\Shipping\ShipStation\REST_API_Loader;
     26
    2527define( 'WC_SHIPSTATION_FILE', __FILE__ );
    2628define( 'WC_SHIPSTATION_ABSPATH', trailingslashit( __DIR__ ) );
     29
     30if ( ! defined( 'WC_SHIPSTATION_PLUGIN_DIR' ) ) {
     31    define( 'WC_SHIPSTATION_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     32}
     33
     34if ( ! defined( 'WC_SHIPSTATION_PLUGIN_URL' ) ) {
     35    define( 'WC_SHIPSTATION_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     36}
    2737
    2838/**
     
    5060    }
    5161
    52     define( 'WC_SHIPSTATION_VERSION', '4.6.1' ); // WRCS: DEFINED_VERSION.
     62    define( 'WC_SHIPSTATION_VERSION', '4.7.0' ); // WRCS: DEFINED_VERSION.
    5363
    5464    if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
     
    6070    add_action( 'before_woocommerce_init', 'woocommerce_shipstation_before_woocommerce_init' );
    6171    add_action( 'after_setup_theme', 'woocommerce_shipstation_load_textdomain' );
     72    add_action( 'woocommerce_init', 'woocommerce_shipstation_load_rest_api' );
    6273}
    6374
     
    8293    require_once WC_SHIPSTATION_ABSPATH . 'includes/trait-woocommerce-order-util.php';
    8394    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-wc-shipstation-integration.php';
     95    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-checkout.php';
    8496    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-wc-shipstation-privacy.php';
     97}
     98
     99/**
     100 * Initialize REST API.
     101 *
     102 * @since 4.5.2
     103 */
     104function woocommerce_shipstation_load_rest_api() {
     105    // Load REST API loader class file.
     106    require_once WC_SHIPSTATION_ABSPATH . 'includes/class-rest-api-loader.php';
     107
     108    // Initialize REST API.
     109    $rest_loader = new REST_API_Loader();
     110    $rest_loader->init();
    85111}
    86112
  • woocommerce-shipstation-integration/trunk/assets/css/admin.css

    r3300481 r3313351  
    1 .shipstation-logo {
    2     width: 150px;
    3     margin: 16px 0 0 0;
    4 }
    5 
    6 .shipstation-external-link:after {
    7     font-family: "dashicons";
    8     content: "\f504";
    9     display: inline-block;
    10     vertical-align: bottom;
    11 }
    12 
    13 .woocommerce-shipstation-activation-notice-dismiss {
    14     position: relative;
    15     float: right;
    16     padding: 9px 0 9px 9px;
    17     text-decoration: none;
    18 }
     1.shipstation-logo{width:150px;margin:16px 0 0 0}.shipstation-external-link:after{font-family:dashicons;content:"";display:inline-block;vertical-align:bottom}.woocommerce-shipstation-activation-notice-dismiss{position:relative;float:right;padding:9px 0 9px 9px;text-decoration:none}
  • woocommerce-shipstation-integration/trunk/changelog.txt

    r3308688 r3313351  
    11*** ShipStation for WooCommerce ***
     2
     3= 4.7.0 - 2025-06-17 =
     4* Add   - REST API endpoints to update and retrieve product inventory data.
     5* Add   - Gift feature.
    26
    37= 4.6.1 - 2025-06-09 =
     
    610= 4.6.0 - 2025-06-02 =
    711* Add   - New hook `woocommerce_shipstation_shipnotify_status_updated` that will be called after the order status is changed.
     12* Add   - REST API endpoints to update and retrieve product inventory data.
    813
    914= 4.5.2 - 2025-05-26 =
  • woocommerce-shipstation-integration/trunk/includes/class-wc-shipstation-api.php

    r3111282 r3313351  
    1010}
    1111
    12 require_once WC_SHIPSTATION_ABSPATH . 'includes/api-requests/class-wc-shipstation-api-request.php';
     12require_once WC_SHIPSTATION_ABSPATH . 'includes/api/requests/class-wc-shipstation-api-request.php';
    1313
    1414/**
     
    9595            /* translators: 1: query string */
    9696            $this->log( sprintf( esc_html__( 'Input params: %s', 'woocommerce-shipstation-integration' ), http_build_query( $obfuscated_request ) ) );
    97             $request_class = include WC_SHIPSTATION_ABSPATH . 'includes/api-requests/class-wc-shipstation-api-' . $this->request['action'] . '.php';
     97            $request_class = include WC_SHIPSTATION_ABSPATH . 'includes/api/requests/class-wc-shipstation-api-' . $this->request['action'] . '.php';
    9898            $request_class->request();
    9999        } else {
  • woocommerce-shipstation-integration/trunk/includes/class-wc-shipstation-integration.php

    r3300481 r3313351  
    4848
    4949    /**
     50     * Gift enable flag.
     51     *
     52     * @var boolean
     53     */
     54    public static $gift_enabled = false;
     55
     56    /**
     57     * Order meta keys.
     58     *
     59     * @var array
     60     */
     61    public static array $order_meta_keys = array(
     62        'is_gift'      => 'shipstation_is_gift',
     63        'gift_message' => 'shipstation_gift_message',
     64    );
     65
     66    /**
    5067     * Constructor
    5168     */
     
    6986        self::$logging_enabled = 'yes' === $this->get_option( 'logging_enabled', 'yes' );
    7087        self::$shipped_status  = $this->get_option( 'shipped_status', 'wc-completed' );
     88        self::$gift_enabled    = 'yes' === $this->get_option( 'gift_enabled', 'no' );
    7189
    7290        // Force saved .
  • woocommerce-shipstation-integration/trunk/includes/data/data-settings.php

    r3054381 r3313351  
    6767        'default'     => 'wc-completed',
    6868    ),
     69    'gift_enabled'    => array(
     70        'title'       => __( 'Gift', 'woocommerce-shipstation-integration' ),
     71        'label'       => __( 'Enable Gift options at checkout page', 'woocommerce-shipstation-integration' ),
     72        'type'        => 'checkbox',
     73        'description' => __( 'Allow customer to mark their order as a gift and include a personalized message.', 'woocommerce-shipstation-integration' ),
     74        'desc_tip'    => __( 'Enable gift fields on the checkout page.', 'woocommerce-shipstation-integration' ),
     75        'default'     => 'no',
     76    ),
    6977    'logging_enabled' => array(
    7078        'title'       => __( 'Logging', 'woocommerce-shipstation-integration' ),
     
    7280        'type'        => 'checkbox',
    7381        'description' => __( 'Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'woocommerce-shipstation-integration' ),
    74         'desc_tip'    => 'Log all API interactions.',
     82        'desc_tip'    => __( 'Log all API interactions.', 'woocommerce-shipstation-integration' ),
    7583        'default'     => 'yes',
    7684    ),
  • woocommerce-shipstation-integration/trunk/languages/woocommerce-shipstation.pot

    r3308688 r3313351  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 4.6.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 4.7.0\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2025-06-09 19:53:14+00:00\n"
     8"POT-Creation-Date: 2025-06-17 15:22:22+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    1515"X-Generator: node-wp-i18n 1.2.7\n"
    1616
    17 #: includes/api-requests/class-wc-shipstation-api-export.php:145
     17#: includes/api/requests/class-wc-shipstation-api-export.php:146
    1818#. translators: 1: order id
    1919msgid "Order %s can not be found."
    2020msgstr ""
    2121
    22 #: includes/api-requests/class-wc-shipstation-api-export.php:441
     22#: includes/api/requests/class-wc-shipstation-api-export.php:453
    2323msgid "Total Discount"
    2424msgstr ""
    2525
    26 #: includes/api-requests/class-wc-shipstation-api-export.php:470
     26#: includes/api/requests/class-wc-shipstation-api-export.php:482
    2727msgid "Order has been exported to Shipstation"
    2828msgstr ""
    2929
    30 #: includes/api-requests/class-wc-shipstation-api-export.php:482
     30#: includes/api/requests/class-wc-shipstation-api-export.php:494
    3131#. translators: 1: total count
    3232msgid "Exported %s orders"
    3333msgstr ""
    3434
    35 #: includes/api-requests/class-wc-shipstation-api-request.php:54
     35#: includes/api/requests/class-wc-shipstation-api-request.php:54
    3636#. translators: 1: field name
    3737msgid "Missing required param: %s"
    3838msgstr ""
    3939
    40 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:177
     40#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:177
    4141msgid "Missing ShipNotify XML input."
    4242msgstr ""
    4343
    44 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:197
     44#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:197
    4545msgid "Missing SimpleXML extension for parsing ShipStation XML."
    4646msgstr ""
    4747
    48 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:204
     48#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:204
    4949msgid "ShipNotify XML: "
    5050msgstr ""
    5151
    52 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:210
     52#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:210
    5353#. translators: %s is an error message.
    5454msgid "Cannot parse XML : %s"
    5555msgstr ""
    5656
    57 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:231
     57#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:231
    5858#. translators: %1$s is order number, %2$d is order id
    5959msgid "Order number: %1$s or Order ID: %2$d can not be found."
    6060msgstr ""
    6161
    62 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:239
     62#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:239
    6363#. translators: 1: order id
    6464msgid "Invalid order ID: %s"
    6565msgstr ""
    6666
    67 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:248
     67#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:248
    6868msgid "ShipNotify Item: "
    6969msgstr ""
    7070
    71 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:261
     71#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:261
    7272#. translators: 1: item name
    7373msgid "Item %s is not shippable product. Skipping."
    7474msgstr ""
    7575
    76 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:279
     76#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:279
    7777#. translators: 1) shipped items 2) carrier's name 3) shipped date, 4) tracking
    7878#. number
     
    8080msgstr ""
    8181
    82 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:295
     82#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:295
    8383#. translators: 1) number of shipped items 2) total shipped items 3) order ID
    8484msgid "Shipped %1$d out of %2$d items in order %3$s"
    8585msgstr ""
    8686
    87 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:311
     87#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:311
    8888#. translators: 1) carrier's name 2) shipped date, 3) tracking number
    8989msgid "Items shipped via %1$s on %2$s with tracking number %3$s (Shipstation)."
    9090msgstr ""
    9191
    92 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:318
     92#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:318
    9393#. translators: 1: order id
    9494msgid "No items found - shipping entire order %d."
    9595msgstr ""
    9696
    97 #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:420
     97#: includes/api/requests/class-wc-shipstation-api-shipnotify.php:420
    9898#. translators: 1) order ID 2) shipment status
    9999msgid "Updated order %1$s to status %2$s"
     100msgstr ""
     101
     102#: includes/api/rest/class-inventory-controller.php:54
     103msgid "Current page of the collection."
     104msgstr ""
     105
     106#: includes/api/rest/class-inventory-controller.php:65
     107msgid "Maximum number of items to be returned in result set."
     108msgstr ""
     109
     110#: includes/api/rest/class-inventory-controller.php:89
     111msgid "ID of the product to retrieve stock data for."
     112msgstr ""
     113
     114#: includes/api/rest/class-inventory-controller.php:111
     115msgid "SKU of the product to retrieve stock data for."
     116msgstr ""
     117
     118#: includes/api/rest/class-inventory-controller.php:224
     119msgid "Product not found."
     120msgstr ""
     121
     122#: includes/api/rest/class-inventory-controller.php:285
     123msgid "Error retrieving products."
     124msgstr ""
     125
     126#: includes/api/rest/class-inventory-controller.php:339
     127msgid "Invalid item"
     128msgstr ""
     129
     130#: includes/api/rest/class-inventory-controller.php:347
     131msgid "Product ID is not numeric"
     132msgstr ""
     133
     134#: includes/api/rest/class-inventory-controller.php:355
     135msgid "Stock quantity is not set or not numeric"
     136msgstr ""
     137
     138#: includes/api/rest/class-inventory-controller.php:369
     139msgid "Product not found"
     140msgstr ""
     141
     142#: includes/api/rest/class-inventory-controller.php:388
     143msgid "Inventory updated successfully."
     144msgstr ""
     145
     146#: includes/api/rest/class-inventory-controller.php:392
     147msgid "No inventory updated due to errors."
     148msgstr ""
     149
     150#: includes/api/rest/class-inventory-controller.php:397
     151msgid "Inventory updated with some errors."
     152msgstr ""
     153
     154#: includes/api/rest/class-inventory-controller.php:402
     155msgid "No inventory changes made."
     156msgstr ""
     157
     158#: includes/class-checkout.php:125
     159msgid "Send as gift"
     160msgstr ""
     161
     162#: includes/class-checkout.php:126
     163msgid "Mark order as a gift"
     164msgstr ""
     165
     166#: includes/class-checkout.php:127
     167msgid "Gift orders include an optional personal message on the packing slip."
     168msgstr ""
     169
     170#: includes/class-checkout.php:133
     171#. translators: Aria-label for the gift message checkbox.
     172msgid ""
     173"Mark order as a gift. When enabled order will include an optional personal "
     174"message on the packing slip."
     175msgstr ""
     176
     177#: includes/class-checkout.php:140
     178msgid "Gift message"
     179msgstr ""
     180
     181#: includes/class-checkout.php:141
     182msgid "Add gift message"
     183msgstr ""
     184
     185#: includes/class-checkout.php:143
     186#. translators: %1$d is the maximum length of the gift message.
     187msgid "Use the space above to enter your gift message. Approx., %1$d characters."
     188msgstr ""
     189
     190#: includes/class-checkout.php:145
     191msgid "Message for the gift."
     192msgstr ""
     193
     194#: includes/class-checkout.php:149
     195#. translators: %1$d is the maximum length of the gift message.
     196msgid ""
     197"Gift message, optional. Use this field to enter your gift message. "
     198"Approximately %1$d characters."
     199msgstr ""
     200
     201#: includes/class-checkout.php:221
     202msgid "optional"
     203msgstr ""
     204
     205#: includes/class-checkout.php:357
     206#. translators: %1$d is the maximum length of the gift message.
     207msgid "Please ensure the gift message does not exceed %d characters."
     208msgstr ""
     209
     210#: includes/class-checkout.php:514
     211msgid "Yes"
     212msgstr ""
     213
     214#: includes/class-checkout.php:514
     215msgid "No"
     216msgstr ""
     217
     218#: includes/class-checkout.php:577 includes/class-checkout.php:877
     219#: includes/class-checkout.php:882
     220msgid "Additional information"
    100221msgstr ""
    101222
     
    118239msgstr ""
    119240
    120 #: includes/class-wc-shipstation-integration.php:54
     241#: includes/class-wc-shipstation-integration.php:71
    121242#: includes/class-wc-shipstation-privacy.php:22
    122243msgid "ShipStation"
    123244msgstr ""
    124245
    125 #: includes/class-wc-shipstation-integration.php:55
     246#: includes/class-wc-shipstation-integration.php:72
    126247msgid ""
    127248"ShipStation allows you to retrieve & manage orders, then print labels "
     
    129250msgstr ""
    130251
    131 #: includes/class-wc-shipstation-integration.php:203
     252#: includes/class-wc-shipstation-integration.php:221
    132253msgid "Action failed. Please refresh the page and retry."
    133254msgstr ""
    134255
    135 #: includes/class-wc-shipstation-integration.php:208
     256#: includes/class-wc-shipstation-integration.php:226
    136257msgid "Cheatin’ huh?"
    137258msgstr ""
    138259
    139 #: includes/class-wc-shipstation-integration.php:224
     260#: includes/class-wc-shipstation-integration.php:242
    140261msgid "ShipStation logo"
    141262msgstr ""
    142263
    143 #: includes/class-wc-shipstation-integration.php:234
     264#: includes/class-wc-shipstation-integration.php:252
    144265#. translators: %s: ShipStation URL
    145266msgid ""
     
    149270msgstr ""
    150271
    151 #: includes/class-wc-shipstation-integration.php:252
     272#: includes/class-wc-shipstation-integration.php:270
    152273#. translators: %s: ShipStation Auth Key
    153274msgid ""
     
    156277msgstr ""
    157278
    158 #: includes/class-wc-shipstation-integration.php:259
     279#: includes/class-wc-shipstation-integration.php:277
    159280msgid "Once connected you're good to go!"
    160281msgstr ""
    161282
    162 #: includes/class-wc-shipstation-integration.php:266
     283#: includes/class-wc-shipstation-integration.php:284
    163284#. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
    164285#. documentation URL
     
    242363
    243364#: includes/data/data-settings.php:70
     365msgid "Gift"
     366msgstr ""
     367
     368#: includes/data/data-settings.php:71
     369msgid "Enable Gift options at checkout page"
     370msgstr ""
     371
     372#: includes/data/data-settings.php:73
     373msgid ""
     374"Allow customer to mark their order as a gift and include a personalized "
     375"message."
     376msgstr ""
     377
     378#: includes/data/data-settings.php:74
     379msgid "Enable gift fields on the checkout page."
     380msgstr ""
     381
     382#: includes/data/data-settings.php:78
    244383msgid "Logging"
    245384msgstr ""
    246385
    247 #: includes/data/data-settings.php:71
     386#: includes/data/data-settings.php:79
    248387msgid "Enable Logging"
    249388msgstr ""
    250389
    251 #: includes/data/data-settings.php:73
     390#: includes/data/data-settings.php:81
    252391msgid ""
    253392"Note: this may log personal information. We recommend using this for "
     
    255394msgstr ""
    256395
    257 #: woocommerce-shipstation.php:37
     396#: includes/data/data-settings.php:82
     397msgid "Log all API interactions."
     398msgstr ""
     399
     400#: woocommerce-shipstation.php:47
    258401#. translators: %s WC download URL link.
    259402msgid ""
     
    262405msgstr ""
    263406
    264 #: woocommerce-shipstation.php:137
     407#: woocommerce-shipstation.php:163
    265408msgid "Settings"
    266409msgstr ""
    267410
    268 #: woocommerce-shipstation.php:138
     411#: woocommerce-shipstation.php:164
    269412msgid "Support"
    270413msgstr ""
    271414
    272 #: woocommerce-shipstation.php:139
     415#: woocommerce-shipstation.php:165
    273416msgid "Docs"
    274417msgstr ""
  • woocommerce-shipstation-integration/trunk/readme.txt

    r3308688 r3313351  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 4.6.1
     10Stable tag: 4.7.0
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7171== Changelog ==
    7272
     73= 4.7.0 - 2025-06-17 =
     74* Add   - REST API endpoints to update and retrieve product inventory data.
     75* Add   - Gift feature.
     76
    7377= 4.6.1 - 2025-06-09 =
    7478* Tweak - WooCommerce 9.9 compatibility.
     
    7680= 4.6.0 - 2025-06-02 =
    7781* Add   - New hook `woocommerce_shipstation_shipnotify_status_updated` that will be called after the order status is changed.
     82* Add   - REST API endpoints to update and retrieve product inventory data.
    7883
    7984= 4.5.2 - 2025-05-26 =
  • woocommerce-shipstation-integration/trunk/woocommerce-shipstation.php

    r3308688 r3313351  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 4.6.1
     5 * Version: 4.7.0
    66 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation.
    77 * Author: WooCommerce
     
    2323}
    2424
     25use WooCommerce\Shipping\ShipStation\REST_API_Loader;
     26
    2527define( 'WC_SHIPSTATION_FILE', __FILE__ );
    2628define( 'WC_SHIPSTATION_ABSPATH', trailingslashit( __DIR__ ) );
     29
     30if ( ! defined( 'WC_SHIPSTATION_PLUGIN_DIR' ) ) {
     31    define( 'WC_SHIPSTATION_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     32}
     33
     34if ( ! defined( 'WC_SHIPSTATION_PLUGIN_URL' ) ) {
     35    define( 'WC_SHIPSTATION_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     36}
    2737
    2838/**
     
    5060    }
    5161
    52     define( 'WC_SHIPSTATION_VERSION', '4.6.1' ); // WRCS: DEFINED_VERSION.
     62    define( 'WC_SHIPSTATION_VERSION', '4.7.0' ); // WRCS: DEFINED_VERSION.
    5363
    5464    if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
     
    6070    add_action( 'before_woocommerce_init', 'woocommerce_shipstation_before_woocommerce_init' );
    6171    add_action( 'after_setup_theme', 'woocommerce_shipstation_load_textdomain' );
     72    add_action( 'woocommerce_init', 'woocommerce_shipstation_load_rest_api' );
    6273}
    6374
     
    8293    require_once WC_SHIPSTATION_ABSPATH . 'includes/trait-woocommerce-order-util.php';
    8394    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-wc-shipstation-integration.php';
     95    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-checkout.php';
    8496    include_once WC_SHIPSTATION_ABSPATH . 'includes/class-wc-shipstation-privacy.php';
     97}
     98
     99/**
     100 * Initialize REST API.
     101 *
     102 * @since 4.5.2
     103 */
     104function woocommerce_shipstation_load_rest_api() {
     105    // Load REST API loader class file.
     106    require_once WC_SHIPSTATION_ABSPATH . 'includes/class-rest-api-loader.php';
     107
     108    // Initialize REST API.
     109    $rest_loader = new REST_API_Loader();
     110    $rest_loader->init();
    85111}
    86112
Note: See TracChangeset for help on using the changeset viewer.