Changeset 3317102
- Timestamp:
- 06/24/2025 03:32:41 PM (9 months ago)
- Location:
- woocommerce-shipstation-integration
- Files:
-
- 10 edited
- 1 copied
-
tags/4.7.2 (copied) (copied from woocommerce-shipstation-integration/trunk)
-
tags/4.7.2/changelog.txt (modified) (1 diff)
-
tags/4.7.2/includes/class-checkout.php (modified) (9 diffs)
-
tags/4.7.2/languages/woocommerce-shipstation.pot (modified) (4 diffs)
-
tags/4.7.2/readme.txt (modified) (2 diffs)
-
tags/4.7.2/woocommerce-shipstation.php (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/class-checkout.php (modified) (9 diffs)
-
trunk/languages/woocommerce-shipstation.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce-shipstation.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-shipstation-integration/tags/4.7.2/changelog.txt
r3314015 r3317102 1 1 *** ShipStation for WooCommerce *** 2 3 = 4.7.2 - 2025-06-24 = 4 * Fix - Fatal error on Checkout page. 2 5 3 6 = 4.7.1 - 2025-06-18 = -
woocommerce-shipstation-integration/tags/4.7.2/includes/class-checkout.php
r3314015 r3317102 12 12 } 13 13 14 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;15 14 use Exception; 16 15 use WC_Cart; … … 18 17 use WP_Error; 19 18 use WP_HTML_Tag_Processor; 20 use WP_Post;21 19 use Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFields; 22 20 use WC_ShipStation_Integration; … … 87 85 } 88 86 87 if ( ! self::cart_needs_shipping() ) { 88 return; 89 } 90 89 91 if ( self::is_block_checkout() ) { 90 92 wp_enqueue_style( 'shipstation-block-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/block-checkout.css', array(), WC_SHIPSTATION_VERSION ); … … 92 94 } 93 95 94 if ( self::is_classic_checkout() && self::cart_needs_shipping()) {96 if ( self::is_classic_checkout() ) { 95 97 wp_enqueue_style( 'shipstation-classic-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/classic-checkout.css', array(), WC_SHIPSTATION_VERSION ); 96 98 … … 255 257 256 258 // 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() ) { 258 260 return; 259 261 } 260 262 261 263 // 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() ) { 263 265 return; 264 266 } … … 549 551 $order = wc_get_order( $order ); 550 552 551 552 553 if ( ! $order instanceof WC_Order ) { 553 554 return; … … 748 749 */ 749 750 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(); 751 752 } 752 753 … … 757 758 */ 758 759 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' ); 760 767 } 761 768 … … 766 773 */ 767 774 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 ) { 771 780 return false; 772 781 } 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' ) ); 776 783 } 777 784 -
woocommerce-shipstation-integration/tags/4.7.2/languages/woocommerce-shipstation.pot
r3314015 r3317102 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ShipStation for WooCommerce 4.7. 1\n"5 "Project-Id-Version: ShipStation for WooCommerce 4.7.2\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "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" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 156 156 msgstr "" 157 157 158 #: includes/class-checkout.php:12 5158 #: includes/class-checkout.php:127 159 159 msgid "Send as gift" 160 160 msgstr "" 161 161 162 #: includes/class-checkout.php:12 6162 #: includes/class-checkout.php:128 163 163 msgid "Mark order as a gift" 164 164 msgstr "" 165 165 166 #: includes/class-checkout.php:12 7166 #: includes/class-checkout.php:129 167 167 msgid "Gift orders include an optional personal message on the packing slip." 168 168 msgstr "" 169 169 170 #: includes/class-checkout.php:13 3170 #: includes/class-checkout.php:135 171 171 #. translators: Aria-label for the gift message checkbox. 172 172 msgid "" … … 175 175 msgstr "" 176 176 177 #: includes/class-checkout.php:14 0177 #: includes/class-checkout.php:142 178 178 msgid "Gift message" 179 179 msgstr "" 180 180 181 #: includes/class-checkout.php:14 1181 #: includes/class-checkout.php:143 182 182 msgid "Add gift message" 183 183 msgstr "" 184 184 185 #: includes/class-checkout.php:14 3185 #: includes/class-checkout.php:145 186 186 #. translators: %1$d is the maximum length of the gift message. 187 187 msgid "Use the space above to enter your gift message. Approx., %1$d characters." 188 188 msgstr "" 189 189 190 #: includes/class-checkout.php:14 5190 #: includes/class-checkout.php:147 191 191 msgid "Message for the gift." 192 192 msgstr "" 193 193 194 #: includes/class-checkout.php:1 49194 #: includes/class-checkout.php:151 195 195 #. translators: %1$d is the maximum length of the gift message. 196 196 msgid "" … … 199 199 msgstr "" 200 200 201 #: includes/class-checkout.php:22 1201 #: includes/class-checkout.php:223 202 202 msgid "optional" 203 203 msgstr "" 204 204 205 #: includes/class-checkout.php:35 7205 #: includes/class-checkout.php:359 206 206 #. translators: %1$d is the maximum length of the gift message. 207 207 msgid "Please ensure the gift message does not exceed %d characters." 208 208 msgstr "" 209 209 210 #: includes/class-checkout.php:51 4210 #: includes/class-checkout.php:516 211 211 msgid "Yes" 212 212 msgstr "" 213 213 214 #: includes/class-checkout.php:51 4214 #: includes/class-checkout.php:516 215 215 msgid "No" 216 216 msgstr "" 217 217 218 #: includes/class-checkout.php:57 7 includes/class-checkout.php:881219 #: includes/class-checkout.php:8 86218 #: includes/class-checkout.php:578 includes/class-checkout.php:888 219 #: includes/class-checkout.php:893 220 220 msgid "Additional information" 221 221 msgstr "" -
woocommerce-shipstation-integration/tags/4.7.2/readme.txt
r3314015 r3317102 8 8 Requires PHP: 7.4 9 9 Requires Plugins: woocommerce 10 Stable tag: 4.7. 110 Stable tag: 4.7.2 11 11 License: GPLv3 12 12 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 70 70 71 71 == Changelog == 72 73 = 4.7.2 - 2025-06-24 = 74 * Fix - Fatal error on Checkout page. 72 75 73 76 = 4.7.1 - 2025-06-18 = -
woocommerce-shipstation-integration/tags/4.7.2/woocommerce-shipstation.php
r3314015 r3317102 3 3 * Plugin Name: ShipStation for WooCommerce 4 4 * Plugin URI: https://woocommerce.com/products/shipstation-integration/ 5 * Version: 4.7. 15 * Version: 4.7.2 6 6 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation. 7 7 * Author: WooCommerce … … 60 60 } 61 61 62 define( 'WC_SHIPSTATION_VERSION', '4.7. 1' ); // WRCS: DEFINED_VERSION.62 define( 'WC_SHIPSTATION_VERSION', '4.7.2' ); // WRCS: DEFINED_VERSION. 63 63 64 64 if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) { -
woocommerce-shipstation-integration/trunk/changelog.txt
r3314015 r3317102 1 1 *** ShipStation for WooCommerce *** 2 3 = 4.7.2 - 2025-06-24 = 4 * Fix - Fatal error on Checkout page. 2 5 3 6 = 4.7.1 - 2025-06-18 = -
woocommerce-shipstation-integration/trunk/includes/class-checkout.php
r3314015 r3317102 12 12 } 13 13 14 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;15 14 use Exception; 16 15 use WC_Cart; … … 18 17 use WP_Error; 19 18 use WP_HTML_Tag_Processor; 20 use WP_Post;21 19 use Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFields; 22 20 use WC_ShipStation_Integration; … … 87 85 } 88 86 87 if ( ! self::cart_needs_shipping() ) { 88 return; 89 } 90 89 91 if ( self::is_block_checkout() ) { 90 92 wp_enqueue_style( 'shipstation-block-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/block-checkout.css', array(), WC_SHIPSTATION_VERSION ); … … 92 94 } 93 95 94 if ( self::is_classic_checkout() && self::cart_needs_shipping()) {96 if ( self::is_classic_checkout() ) { 95 97 wp_enqueue_style( 'shipstation-classic-checkout', WC_SHIPSTATION_PLUGIN_URL . 'assets/css/classic-checkout.css', array(), WC_SHIPSTATION_VERSION ); 96 98 … … 255 257 256 258 // 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() ) { 258 260 return; 259 261 } 260 262 261 263 // 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() ) { 263 265 return; 264 266 } … … 549 551 $order = wc_get_order( $order ); 550 552 551 552 553 if ( ! $order instanceof WC_Order ) { 553 554 return; … … 748 749 */ 749 750 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(); 751 752 } 752 753 … … 757 758 */ 758 759 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' ); 760 767 } 761 768 … … 766 773 */ 767 774 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 ) { 771 780 return false; 772 781 } 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' ) ); 776 783 } 777 784 -
woocommerce-shipstation-integration/trunk/languages/woocommerce-shipstation.pot
r3314015 r3317102 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ShipStation for WooCommerce 4.7. 1\n"5 "Project-Id-Version: ShipStation for WooCommerce 4.7.2\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "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" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 156 156 msgstr "" 157 157 158 #: includes/class-checkout.php:12 5158 #: includes/class-checkout.php:127 159 159 msgid "Send as gift" 160 160 msgstr "" 161 161 162 #: includes/class-checkout.php:12 6162 #: includes/class-checkout.php:128 163 163 msgid "Mark order as a gift" 164 164 msgstr "" 165 165 166 #: includes/class-checkout.php:12 7166 #: includes/class-checkout.php:129 167 167 msgid "Gift orders include an optional personal message on the packing slip." 168 168 msgstr "" 169 169 170 #: includes/class-checkout.php:13 3170 #: includes/class-checkout.php:135 171 171 #. translators: Aria-label for the gift message checkbox. 172 172 msgid "" … … 175 175 msgstr "" 176 176 177 #: includes/class-checkout.php:14 0177 #: includes/class-checkout.php:142 178 178 msgid "Gift message" 179 179 msgstr "" 180 180 181 #: includes/class-checkout.php:14 1181 #: includes/class-checkout.php:143 182 182 msgid "Add gift message" 183 183 msgstr "" 184 184 185 #: includes/class-checkout.php:14 3185 #: includes/class-checkout.php:145 186 186 #. translators: %1$d is the maximum length of the gift message. 187 187 msgid "Use the space above to enter your gift message. Approx., %1$d characters." 188 188 msgstr "" 189 189 190 #: includes/class-checkout.php:14 5190 #: includes/class-checkout.php:147 191 191 msgid "Message for the gift." 192 192 msgstr "" 193 193 194 #: includes/class-checkout.php:1 49194 #: includes/class-checkout.php:151 195 195 #. translators: %1$d is the maximum length of the gift message. 196 196 msgid "" … … 199 199 msgstr "" 200 200 201 #: includes/class-checkout.php:22 1201 #: includes/class-checkout.php:223 202 202 msgid "optional" 203 203 msgstr "" 204 204 205 #: includes/class-checkout.php:35 7205 #: includes/class-checkout.php:359 206 206 #. translators: %1$d is the maximum length of the gift message. 207 207 msgid "Please ensure the gift message does not exceed %d characters." 208 208 msgstr "" 209 209 210 #: includes/class-checkout.php:51 4210 #: includes/class-checkout.php:516 211 211 msgid "Yes" 212 212 msgstr "" 213 213 214 #: includes/class-checkout.php:51 4214 #: includes/class-checkout.php:516 215 215 msgid "No" 216 216 msgstr "" 217 217 218 #: includes/class-checkout.php:57 7 includes/class-checkout.php:881219 #: includes/class-checkout.php:8 86218 #: includes/class-checkout.php:578 includes/class-checkout.php:888 219 #: includes/class-checkout.php:893 220 220 msgid "Additional information" 221 221 msgstr "" -
woocommerce-shipstation-integration/trunk/readme.txt
r3314015 r3317102 8 8 Requires PHP: 7.4 9 9 Requires Plugins: woocommerce 10 Stable tag: 4.7. 110 Stable tag: 4.7.2 11 11 License: GPLv3 12 12 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 70 70 71 71 == Changelog == 72 73 = 4.7.2 - 2025-06-24 = 74 * Fix - Fatal error on Checkout page. 72 75 73 76 = 4.7.1 - 2025-06-18 = -
woocommerce-shipstation-integration/trunk/woocommerce-shipstation.php
r3314015 r3317102 3 3 * Plugin Name: ShipStation for WooCommerce 4 4 * Plugin URI: https://woocommerce.com/products/shipstation-integration/ 5 * Version: 4.7. 15 * Version: 4.7.2 6 6 * Description: Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation. 7 7 * Author: WooCommerce … … 60 60 } 61 61 62 define( 'WC_SHIPSTATION_VERSION', '4.7. 1' ); // WRCS: DEFINED_VERSION.62 define( 'WC_SHIPSTATION_VERSION', '4.7.2' ); // WRCS: DEFINED_VERSION. 63 63 64 64 if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.