Plugin Directory

Changeset 3317102


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

Tagging version 4.7.2

Location:
woocommerce-shipstation-integration
Files:
10 edited
1 copied

Legend:

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

    r3314015 r3317102  
    11*** ShipStation for WooCommerce ***
     2
     3= 4.7.2 - 2025-06-24 =
     4* Fix   - Fatal error on Checkout page.
    25
    36= 4.7.1 - 2025-06-18 =
  • woocommerce-shipstation-integration/tags/4.7.2/includes/class-checkout.php

    r3314015 r3317102  
    1212}
    1313
    14 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
    1514use Exception;
    1615use WC_Cart;
     
    1817use WP_Error;
    1918use WP_HTML_Tag_Processor;
    20 use WP_Post;
    2119use Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFields;
    2220use WC_ShipStation_Integration;
     
    8785        }
    8886
     87        if ( ! self::cart_needs_shipping() ) {
     88            return;
     89        }
     90
    8991        if ( self::is_block_checkout() ) {
    9092            wp_enqueue_style( 'shipstation-block-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/block-checkout.css', array(), WC_SHIPSTATION_VERSION );
     
    9294        }
    9395
    94         if ( self::is_classic_checkout() && self::cart_needs_shipping() ) {
     96        if ( self::is_classic_checkout() ) {
    9597            wp_enqueue_style( 'shipstation-classic-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/classic-checkout.css', array(), WC_SHIPSTATION_VERSION );
    9698
     
    255257
    256258        // Don't deregister fields in admin or on irrelevant frontend pages.
    257         if ( is_admin() || ( ! is_wc_endpoint_url() && ! self::is_checkout() ) ) {
     259        if ( is_admin() || ! self::is_checkout() ) {
    258260            return;
    259261        }
    260262
    261263        // Keep fields if we're on a regular checkout page and the cart needs shipping.
    262         if ( self::is_checkout() && ! is_wc_endpoint_url() && self::cart_needs_shipping() ) {
     264        if ( self::cart_needs_shipping() ) {
    263265            return;
    264266        }
     
    549551        $order = wc_get_order( $order );
    550552
    551 
    552553        if ( ! $order instanceof WC_Order ) {
    553554            return;
     
    748749     */
    749750    private static function is_checkout(): bool {
    750         return self::is_block_checkout() || self::is_classic_checkout() || is_checkout();
     751        return self::is_block_checkout() || self::is_classic_checkout();
    751752    }
    752753
     
    757758     */
    758759    private static function is_block_checkout(): bool {
    759         return has_block( 'woocommerce/checkout' );
     760        if (
     761            ! function_exists( 'is_checkout' )
     762            || ! function_exists( 'has_block' )
     763        ) {
     764            return false;
     765        }
     766        return is_checkout() && has_block( 'woocommerce/checkout' );
    760767    }
    761768
     
    766773     */
    767774    private static function is_classic_checkout(): bool {
    768         $post = get_queried_object();
    769 
    770         if ( ! $post instanceof WP_Post ) {
     775        if (
     776            ! function_exists( 'is_checkout' )
     777            || ! function_exists( 'wc_post_content_has_shortcode' )
     778            || ! function_exists( 'has_block' )
     779        ) {
    771780            return false;
    772781        }
    773 
    774         // @phpstan-ignore-next-line
    775         return CartCheckoutUtils::is_checkout_page() && ( has_shortcode( $post->post_content, 'woocommerce_checkout' ) || has_block( 'woocommerce/classic-shortcode', $post ) );
     782        return is_checkout() && ( wc_post_content_has_shortcode( 'woocommerce_checkout' ) || has_block( 'woocommerce/classic-shortcode' ) );
    776783    }
    777784
  • woocommerce-shipstation-integration/tags/4.7.2/languages/woocommerce-shipstation.pot

    r3314015 r3317102  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 4.7.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 4.7.2\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2025-06-18 16:21:23+00:00\n"
     8"POT-Creation-Date: 2025-06-24 15:32:25+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    156156msgstr ""
    157157
    158 #: includes/class-checkout.php:125
     158#: includes/class-checkout.php:127
    159159msgid "Send as gift"
    160160msgstr ""
    161161
    162 #: includes/class-checkout.php:126
     162#: includes/class-checkout.php:128
    163163msgid "Mark order as a gift"
    164164msgstr ""
    165165
    166 #: includes/class-checkout.php:127
     166#: includes/class-checkout.php:129
    167167msgid "Gift orders include an optional personal message on the packing slip."
    168168msgstr ""
    169169
    170 #: includes/class-checkout.php:133
     170#: includes/class-checkout.php:135
    171171#. translators: Aria-label for the gift message checkbox.
    172172msgid ""
     
    175175msgstr ""
    176176
    177 #: includes/class-checkout.php:140
     177#: includes/class-checkout.php:142
    178178msgid "Gift message"
    179179msgstr ""
    180180
    181 #: includes/class-checkout.php:141
     181#: includes/class-checkout.php:143
    182182msgid "Add gift message"
    183183msgstr ""
    184184
    185 #: includes/class-checkout.php:143
     185#: includes/class-checkout.php:145
    186186#. translators: %1$d is the maximum length of the gift message.
    187187msgid "Use the space above to enter your gift message. Approx., %1$d characters."
    188188msgstr ""
    189189
    190 #: includes/class-checkout.php:145
     190#: includes/class-checkout.php:147
    191191msgid "Message for the gift."
    192192msgstr ""
    193193
    194 #: includes/class-checkout.php:149
     194#: includes/class-checkout.php:151
    195195#. translators: %1$d is the maximum length of the gift message.
    196196msgid ""
     
    199199msgstr ""
    200200
    201 #: includes/class-checkout.php:221
     201#: includes/class-checkout.php:223
    202202msgid "optional"
    203203msgstr ""
    204204
    205 #: includes/class-checkout.php:357
     205#: includes/class-checkout.php:359
    206206#. translators: %1$d is the maximum length of the gift message.
    207207msgid "Please ensure the gift message does not exceed %d characters."
    208208msgstr ""
    209209
    210 #: includes/class-checkout.php:514
     210#: includes/class-checkout.php:516
    211211msgid "Yes"
    212212msgstr ""
    213213
    214 #: includes/class-checkout.php:514
     214#: includes/class-checkout.php:516
    215215msgid "No"
    216216msgstr ""
    217217
    218 #: includes/class-checkout.php:577 includes/class-checkout.php:881
    219 #: includes/class-checkout.php:886
     218#: includes/class-checkout.php:578 includes/class-checkout.php:888
     219#: includes/class-checkout.php:893
    220220msgid "Additional information"
    221221msgstr ""
  • woocommerce-shipstation-integration/tags/4.7.2/readme.txt

    r3314015 r3317102  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 4.7.1
     10Stable tag: 4.7.2
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7070
    7171== Changelog ==
     72
     73= 4.7.2 - 2025-06-24 =
     74* Fix   - Fatal error on Checkout page.
    7275
    7376= 4.7.1 - 2025-06-18 =
  • woocommerce-shipstation-integration/tags/4.7.2/woocommerce-shipstation.php

    r3314015 r3317102  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 4.7.1
     5 * Version: 4.7.2
    66 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation.
    77 * Author: WooCommerce
     
    6060    }
    6161
    62     define( 'WC_SHIPSTATION_VERSION', '4.7.1' ); // WRCS: DEFINED_VERSION.
     62    define( 'WC_SHIPSTATION_VERSION', '4.7.2' ); // WRCS: DEFINED_VERSION.
    6363
    6464    if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
  • woocommerce-shipstation-integration/trunk/changelog.txt

    r3314015 r3317102  
    11*** ShipStation for WooCommerce ***
     2
     3= 4.7.2 - 2025-06-24 =
     4* Fix   - Fatal error on Checkout page.
    25
    36= 4.7.1 - 2025-06-18 =
  • woocommerce-shipstation-integration/trunk/includes/class-checkout.php

    r3314015 r3317102  
    1212}
    1313
    14 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
    1514use Exception;
    1615use WC_Cart;
     
    1817use WP_Error;
    1918use WP_HTML_Tag_Processor;
    20 use WP_Post;
    2119use Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFields;
    2220use WC_ShipStation_Integration;
     
    8785        }
    8886
     87        if ( ! self::cart_needs_shipping() ) {
     88            return;
     89        }
     90
    8991        if ( self::is_block_checkout() ) {
    9092            wp_enqueue_style( 'shipstation-block-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/block-checkout.css', array(), WC_SHIPSTATION_VERSION );
     
    9294        }
    9395
    94         if ( self::is_classic_checkout() && self::cart_needs_shipping() ) {
     96        if ( self::is_classic_checkout() ) {
    9597            wp_enqueue_style( 'shipstation-classic-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/classic-checkout.css', array(), WC_SHIPSTATION_VERSION );
    9698
     
    255257
    256258        // Don't deregister fields in admin or on irrelevant frontend pages.
    257         if ( is_admin() || ( ! is_wc_endpoint_url() && ! self::is_checkout() ) ) {
     259        if ( is_admin() || ! self::is_checkout() ) {
    258260            return;
    259261        }
    260262
    261263        // Keep fields if we're on a regular checkout page and the cart needs shipping.
    262         if ( self::is_checkout() && ! is_wc_endpoint_url() && self::cart_needs_shipping() ) {
     264        if ( self::cart_needs_shipping() ) {
    263265            return;
    264266        }
     
    549551        $order = wc_get_order( $order );
    550552
    551 
    552553        if ( ! $order instanceof WC_Order ) {
    553554            return;
     
    748749     */
    749750    private static function is_checkout(): bool {
    750         return self::is_block_checkout() || self::is_classic_checkout() || is_checkout();
     751        return self::is_block_checkout() || self::is_classic_checkout();
    751752    }
    752753
     
    757758     */
    758759    private static function is_block_checkout(): bool {
    759         return has_block( 'woocommerce/checkout' );
     760        if (
     761            ! function_exists( 'is_checkout' )
     762            || ! function_exists( 'has_block' )
     763        ) {
     764            return false;
     765        }
     766        return is_checkout() && has_block( 'woocommerce/checkout' );
    760767    }
    761768
     
    766773     */
    767774    private static function is_classic_checkout(): bool {
    768         $post = get_queried_object();
    769 
    770         if ( ! $post instanceof WP_Post ) {
     775        if (
     776            ! function_exists( 'is_checkout' )
     777            || ! function_exists( 'wc_post_content_has_shortcode' )
     778            || ! function_exists( 'has_block' )
     779        ) {
    771780            return false;
    772781        }
    773 
    774         // @phpstan-ignore-next-line
    775         return CartCheckoutUtils::is_checkout_page() && ( has_shortcode( $post->post_content, 'woocommerce_checkout' ) || has_block( 'woocommerce/classic-shortcode', $post ) );
     782        return is_checkout() && ( wc_post_content_has_shortcode( 'woocommerce_checkout' ) || has_block( 'woocommerce/classic-shortcode' ) );
    776783    }
    777784
  • woocommerce-shipstation-integration/trunk/languages/woocommerce-shipstation.pot

    r3314015 r3317102  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ShipStation for WooCommerce 4.7.1\n"
     5"Project-Id-Version: ShipStation for WooCommerce 4.7.2\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-shipstation\n"
    8 "POT-Creation-Date: 2025-06-18 16:21:23+00:00\n"
     8"POT-Creation-Date: 2025-06-24 15:32:25+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    156156msgstr ""
    157157
    158 #: includes/class-checkout.php:125
     158#: includes/class-checkout.php:127
    159159msgid "Send as gift"
    160160msgstr ""
    161161
    162 #: includes/class-checkout.php:126
     162#: includes/class-checkout.php:128
    163163msgid "Mark order as a gift"
    164164msgstr ""
    165165
    166 #: includes/class-checkout.php:127
     166#: includes/class-checkout.php:129
    167167msgid "Gift orders include an optional personal message on the packing slip."
    168168msgstr ""
    169169
    170 #: includes/class-checkout.php:133
     170#: includes/class-checkout.php:135
    171171#. translators: Aria-label for the gift message checkbox.
    172172msgid ""
     
    175175msgstr ""
    176176
    177 #: includes/class-checkout.php:140
     177#: includes/class-checkout.php:142
    178178msgid "Gift message"
    179179msgstr ""
    180180
    181 #: includes/class-checkout.php:141
     181#: includes/class-checkout.php:143
    182182msgid "Add gift message"
    183183msgstr ""
    184184
    185 #: includes/class-checkout.php:143
     185#: includes/class-checkout.php:145
    186186#. translators: %1$d is the maximum length of the gift message.
    187187msgid "Use the space above to enter your gift message. Approx., %1$d characters."
    188188msgstr ""
    189189
    190 #: includes/class-checkout.php:145
     190#: includes/class-checkout.php:147
    191191msgid "Message for the gift."
    192192msgstr ""
    193193
    194 #: includes/class-checkout.php:149
     194#: includes/class-checkout.php:151
    195195#. translators: %1$d is the maximum length of the gift message.
    196196msgid ""
     
    199199msgstr ""
    200200
    201 #: includes/class-checkout.php:221
     201#: includes/class-checkout.php:223
    202202msgid "optional"
    203203msgstr ""
    204204
    205 #: includes/class-checkout.php:357
     205#: includes/class-checkout.php:359
    206206#. translators: %1$d is the maximum length of the gift message.
    207207msgid "Please ensure the gift message does not exceed %d characters."
    208208msgstr ""
    209209
    210 #: includes/class-checkout.php:514
     210#: includes/class-checkout.php:516
    211211msgid "Yes"
    212212msgstr ""
    213213
    214 #: includes/class-checkout.php:514
     214#: includes/class-checkout.php:516
    215215msgid "No"
    216216msgstr ""
    217217
    218 #: includes/class-checkout.php:577 includes/class-checkout.php:881
    219 #: includes/class-checkout.php:886
     218#: includes/class-checkout.php:578 includes/class-checkout.php:888
     219#: includes/class-checkout.php:893
    220220msgid "Additional information"
    221221msgstr ""
  • woocommerce-shipstation-integration/trunk/readme.txt

    r3314015 r3317102  
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
    10 Stable tag: 4.7.1
     10Stable tag: 4.7.2
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7070
    7171== Changelog ==
     72
     73= 4.7.2 - 2025-06-24 =
     74* Fix   - Fatal error on Checkout page.
    7275
    7376= 4.7.1 - 2025-06-18 =
  • woocommerce-shipstation-integration/trunk/woocommerce-shipstation.php

    r3314015 r3317102  
    33 * Plugin Name: ShipStation for WooCommerce
    44 * Plugin URI: https://woocommerce.com/products/shipstation-integration/
    5  * Version: 4.7.1
     5 * Version: 4.7.2
    66 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation.
    77 * Author: WooCommerce
     
    6060    }
    6161
    62     define( 'WC_SHIPSTATION_VERSION', '4.7.1' ); // WRCS: DEFINED_VERSION.
     62    define( 'WC_SHIPSTATION_VERSION', '4.7.2' ); // WRCS: DEFINED_VERSION.
    6363
    6464    if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
Note: See TracChangeset for help on using the changeset viewer.