Failure to show "no shipping options" method in the cart-shipping.php template #44920
Closed
5 tasks done
Labels
focus: cart
Issues related to the cart.
focus: checkout
Issues related to checkout page.
team: Rubik
Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues
type: bug
The issue is a confirmed bug.
type: community contribution
Prerequisites
Describe the bug
On the checkout page, when a cart has no matched shipping methods, we no longer see the "No shipping options were found for..." message. We just get a blank space where the message used to be.
The problem is this recent addition to check $available_methods
if ( isset( $available_methods ) && is_array( $available_methods ) ):
this needs to be something like...
if ( isset( $available_methods ) && is_array( $available_methods ) && count($available_methods)>0 )
Expected behavior
When there are no matched shipping methods for a cart (on the checkout page), we need the message shown to the customer.
Actual behavior
When there are no matched shipping methods for a cart (on the checkout page), we see a blank area next to the label "Shipping"
Steps to reproduce
Add items to your cart, go to the checkout and choose a shipping country that the site is not configured for (no matched shipping methods)
WordPress Environment
`
WordPress Environment
WordPress address (URL): http://leyland.local
Site address (URL): http://leyland.local
WC Version: 8.6.1
REST API Version: ✔ 8.6.1
WC Blocks Version: ✔ 11.8.0-dev
Action Scheduler Version: ✔ 3.7.1
Log Directory Writable: ✔
WP Version: 6.4.3
WP Multisite: –
WP Memory Limit: 384 MB
WP Debug Mode: –
WP Cron: –
Language: en_GB
External object cache: ✔
Server Environment
Server Info: Apache
PHP Version: 8.2.16
PHP Post Max Size: 128 MB
PHP Time Limit: 30
PHP Max Input Vars: 6000
cURL Version: 7.88.1
OpenSSL/3.0.11
SUHOSIN Installed: –
MySQL Version: 10.11.6-MariaDB-0+deb12u1
Max Upload Size: 128 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
Database
WC Database Version: 8.6.1
WC Database Prefix: wp_
Total Database Size: 52.07MB
Database Data Size: 41.23MB
Database Index Size: 10.84MB
wp_woocommerce_sessions: Data: 1.52MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.33MB + Index: 0.22MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.17MB + Index: 0.16MB + Engine InnoDB
wp_cleantalk_ac_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_connection_reports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_no_cookie_data: Data: 0.36MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_sessions: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_sfw: Data: 1.52MB + Index: 0.42MB + Engine InnoDB
wp_cleantalk_sfw_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_sfw_personal: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_cleantalk_spamscan_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cleantalk_ua_bl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_cleantalk_wc_spam_orders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cli_cookie_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cli_cookie_scan_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_cli_cookie_scan_cookies: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_cli_cookie_scan_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_cli_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_commercekit_ajs_product_index: Data: 0.02MB + Index: 0.16MB + Engine InnoDB
wp_commercekit_searches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commercekit_swatches_cache_count: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commercekit_waitlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commercekit_wishlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commercekit_wishlist_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB
wp_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_e_submissions: Data: 0.06MB + Index: 0.27MB + Engine InnoDB
wp_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_e_submissions_values: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_facetwp_index: Data: 0.08MB + Index: 0.08MB + Engine InnoDB
wp_ff_scheduled_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_draft_submissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_entry_details: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_forms: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_form_analytics: Data: 2.52MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_order_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_submissions: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_submission_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_subscriptions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_fluentform_transactions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_hwhal_hourly: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_hwhal_log_records: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_hwhal_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_hwhal_source_files: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_imagify_files: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
wp_imagify_folders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_litespeed_avatar: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_litespeed_crawler: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_litespeed_crawler_blacklist: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_litespeed_img_optming: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_litespeed_url: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
wp_litespeed_url_file: Data: 0.13MB + Index: 0.33MB + Engine InnoDB
wp_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_action_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_field_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_object_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_nf3_upgrades: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 5.44MB + Index: 0.19MB + Engine InnoDB
wp_postmark_log: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
wp_postmeta: Data: 15.36MB + Index: 3.86MB + Engine InnoDB
wp_posts: Data: 6.41MB + Index: 0.84MB + Engine InnoDB
wp_rank_math_internal_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_seopress_significant_keywords: Data: 0.17MB + Index: 0.20MB + Engine InnoDB
wp_termmeta: Data: 0.11MB + Index: 0.11MB + Engine InnoDB
wp_terms: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
wp_term_taxonomy: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
wp_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_umbrella_backup: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
wp_umbrella_log: Data: 0.41MB + Index: 0.13MB + Engine InnoDB
wp_umbrella_task_backup: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_usermeta: Data: 0.14MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.08MB + Index: 0.08MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_shipping_quotes: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wpgdprc_access_requests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpgdprc_consents: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpgdprc_delete_requests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpgdprc_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpil_broken_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpil_click_data: Data: 0.06MB + Index: 0.08MB + Engine InnoDB
wp_wpil_ignore_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpil_keywords: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpil_keyword_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpil_keyword_select_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpil_related_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpil_report_links: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
wp_wpil_target_keyword_data: Data: 1.52MB + Index: 0.92MB + Engine InnoDB
wp_wpil_urls: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpil_url_links: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpmelon_advbedit_temp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpsr_caches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpsr_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_yoast_indexable: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
Post Type Counts
acf-field: 4
acf-field-group: 1
acf-post-type: 1
acf-taxonomy: 1
attachment: 624
custom_css: 1
customize_changeset: 3
elementor_library: 21
elementor_snippet: 1
engine: 112
nav_menu_item: 59
of_rfq: 2
page: 16
post: 42
product: 75
revision: 420
seopress_404: 2892
shipping_zone: 6
shop_order: 8
shop_order_refund: 1
was: 7
whatsapp-accounts: 1
wp_navigation: 1
wp_social_reviews: 2
wp_template: 2
Security
Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
Active Plugins (30)
Query Monitor: by John Blackbourn – 3.15.0
Advanced Custom Fields PRO: by WP Engine – 6.2.6.1
Auto Image Attributes From Filename With Bulk Updater: by Arun Basil Lal – 4.4
Cart to Quote: by Power Plugins – 1.11.3
Classic Editor: by WordPress Contributors – 1.6.3
Anti-Spam by CleanTalk: by СleanTalk - Anti-Spam Protection – 6.27
Elementor Pro: by Elementor.com – 3.19.2
Elementor: by Elementor.com – 3.19.2
FacetWP - Elementor: by FacetWP
LLC – 1.9
FacetWP: by FacetWP
LLC – 4.2.11
Fluent Forms: by Contact Form - WPManageNinja LLC – 5.1.9
Fluent Forms Pro Add On Pack: by Fluent Forms – 5.1.7
Happy Elementor Addons: by Leevio – 3.10.2
Imagify: by Imagify – Optimize Images & Convert WebP – 2.1.3.1
Kadence WooCommerce Email Designer: by Kadence WP – 1.5.12
Kirki Customizer Framework: by Themeum – 5.0.0
Link Whisper: by Link Whisper – 2.4.0
Post Types Order: by Nsp Code – 2.1.8
Simple Page Ordering: by 10up – 2.6.3
SVG Support: by Benbodhi – 2.5.5
Ultimate Addons for Elementor: by Brainstorm Force – 1.36.29
WooCommerce Advanced Bulk Edit: by George Iron & Yas G. – 5.3.6.2
WooCommerce Advanced Shipping Zones: by Jeroen Sormani – 1.1.3
WooCommerce Advanced Shipping: by Jeroen Sormani – 1.1.2
WooCommerce Stripe Gateway: by WooCommerce – 7.9.3
WooCommerce: by Automattic – 8.6.1
SEOPress PRO: by The SEO Guys at SEOPress – 7.4.1
SEOPress: by The SEO Guys at SEOPress – 7.4
WP Social Ninja Pro: by WP Social Ninja Team - WPManageNinja LLC – 3.12.1
WP Social Ninja: by WP Social Ninja Team - WPManageNinja LLC – 3.12.1
Inactive Plugins (9)
ActiveCampaign Postmark (Official): by Andrew Yates & Matt Gibbs – 1.20.0
Analytify Dashboard: by Analytify – 5.2.1
Analytify Dashboard Widget: by Analytify – 5.2.0
Analytify Pro: by Analytify – 5.2.0
Analytify WooCommerce: by Analytify – 5.1.0
CommerceGurus CommerceKit: by CommerceGurus – 2.2.9
LiteSpeed Cache: by LiteSpeed Technologies – 6.1
Site Kit by Google: by Google – 1.120.0
WP Umbrella: by WP Umbrella - Backup & Manage WordPress – 2.14.2
Dropin Plugins (3)
advanced-cache.php: advanced-cache.php
db.php: Query Monitor Database Class (Drop-in)
object-cache.php: object-cache.php
Must Use Plugins (1)
Headwall Hosting: by headwalluk – 2.22.2
Settings
API Enabled: –
Force SSL: –
Currency: GBP (£)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to Woo.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –
WC Pages
Shop base: #11 - /shop/
Basket: #12 - /cart/
Checkout: #13 - /checkout/
My account: #14 - /my-account/
Terms and conditions: #279 - /terms-conditions/
Theme
Name: Shoptimizer Child Theme
Version: 1.2.2
Author URL:
Child Theme: ✔
Parent Theme Name: Shoptimizer
Parent Theme Version: 2.7.5
Parent Theme Author URL: https://www.commercegurus.com/
WooCommerce Support: ✔
Templates
Overrides: shoptimizer-child-theme/woocommerce/cart/cart-shipping.php
Admin
Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
product-variation-management
product-virtual-downloadable
product-external-affiliate
product-grouped
product-linked
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
Disabled Features: customize-store
minified-js
new-product-management-experience
product-pre-publish-modal
settings
async-product-editor-category-field
Daily Cron: ✔ Next scheduled: 2024-02-23 11:54:47 +00:00
Options: ✔
Notes: 118
Onboarding: completed
Action Scheduler
Complete: 657
Oldest: 2024-02-16 09:59:11 +0000
Newest: 2024-02-23 11:41:05 +0000
Failed: 38
Oldest: 2023-05-10 18:36:06 +0100
Newest: 2024-02-23 11:45:03 +0000
Pending: 2
Oldest: 2024-02-23 12:00:03 +0000
Newest: 2024-02-23 13:04:58 +0000
Status report information
Generated at: 2024-02-23 11:47:53 +00:00
`
Isolating the problem
The text was updated successfully, but these errors were encountered: