Title: Javascript Error on Checkout Page
Last modified: March 13, 2024

---

# Javascript Error on Checkout Page

 *  [yatt](https://wordpress.org/support/users/yatt/)
 * (@yatt)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-checkout-page/)
 * I’m getting an error on the checkout page:
 * `Unexpected error in: szbd-shipping-message/szbd-shipping-message-block`
 * `Error: Cannot read properties of undefined (reading 'reject')`
 * This happens if the addresses is inside or outside of the shipping zone. The 
   map is also not displayed on the page. I have server mode enabled and one http
   restricted and one not restricted API key. The error is still present when using
   the default theme with all but Woocommerce.
   I can show the map through shortcode
   on other pages.Console error:
 * `TypeError: Cannot read properties of undefined (reading 'reject')
   at szbd-shipping-
   message-block-frontend.js?ver=971892d74041adbf884d:1:1064at data.min.js?ver=dc5f255634f3da29c8d5:
   9:1957at __unstableMarkListeningStores (data.min.js?ver=dc5f255634f3da29c8d5:
   2:22508)at Object.__unstableMarkListeningStores (data.min.js?ver=dc5f255634f3da29c8d5:
   2:22765)at l (data.min.js?ver=dc5f255634f3da29c8d5:9:1922)at data.min.js?ver=
   dc5f255634f3da29c8d5:9:2426at Je (data.min.js?ver=dc5f255634f3da29c8d5:9:2636)
   at Qe (data.min.js?ver=dc5f255634f3da29c8d5:9:2953)at component (szbd-shipping-
   message-block-frontend.js?ver=971892d74041adbf884d:1:1007)at wt (react-dom.min.
   js?ver=18.2.0:10:47637)
    -  This topic was modified 2 years, 2 months ago by [yatt](https://wordpress.org/support/users/yatt/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [arosoft](https://wordpress.org/support/users/arosoft/)
 * (@arosoft)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-checkout-page/#post-17499945)
 * HI, have you updated to latest version?
 *  Thread Starter [yatt](https://wordpress.org/support/users/yatt/)
 * (@yatt)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-checkout-page/#post-17500943)
 * Yes, the plugin and Woocommerce are up to date.
   After some further testing I 
   was able to remove the error by using the checkout shortcode, “woocommerce_checkout”,
   but the map still doesn’t show. It still restricts shipping if the address is
   not within the drawn area. When an address outside the area is entered, no shipping
   cost shows. When an address inside the area is entered, the shipping cost shows.
   I can display the map on the checkout page if I add the shortcode directly to
   the Woocommerce template file.
 *  Plugin Author [arosoft](https://wordpress.org/support/users/arosoft/)
 * (@arosoft)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-checkout-page/#post-17501787)
 * Hi, if you update to latest version now it should work with block checkout (without
   the “woocommerce_checkout” shortcode).
 * Im not sure what you mean with “When an address outside the area is entered, 
   no shipping cost shows”.
 * This depends on the shipping methods you added.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Javascript Error on Checkout Page’ is closed to new replies.

 * ![](https://ps.w.org/shipping-zones-by-drawing-for-woocommerce/assets/icon-256x256.
   png?rev=2034011)
 * [Shipping Zones by Drawing for WooCommerce](https://wordpress.org/plugins/shipping-zones-by-drawing-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shipping-zones-by-drawing-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [arosoft](https://wordpress.org/support/users/arosoft/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-checkout-page/#post-17501787)
 * Status: not resolved