Home / Forums / WoodMart support forum / Bugs (Table Rate Shipping & author archives)
Home › Forums › WoodMart support forum › Bugs (Table Rate Shipping & author archives)
Bugs (Table Rate Shipping & author archives)
- This topic has 3 replies, 2 voices, and was last updated 4 days, 18 hours ago by
Serg Sokhatskyi.
-
AuthorPosts
-
October 4, 2026 at 7:55 pm #730512
dtech10Participantrebuilding the sites in a staging environment so far and we’ve discovered 2 bugs isolated to woodmart and confirmed by ensuring only woodmart and woocommerce are enabled, and Claude confirmed as well. I am pasting the details below:
Everything below was reproduced on our **staging site**, not the live store. Each issue was isolated by **deactivating every other plugin**: only WooCommerce stayed active, plus WoodMart Core and Table Rate where noted.
**Environment:**
– WordPress 7.1.2
– WooCommerce 11.1.2
– WoodMart 8.6.2, WoodMart Core 1.1.9
– WooCommerce Table Rate Shipping 3.7.4
– PHP 8.5.3, Apache—
### Issue 1: Fatal error when opening the WoodMart Cart layout in the block editor (WoodMart + Table Rate Shipping)
**What happens**
Opening our Cart layout (WoodMart → Layouts → Cart) in the block editor gives “There has been a critical error on this website”, and the editor never loads. The storefront cart works normally.**Isolation (staging site)**
| Active plugins | Result |
| WooCommerce + Table Rate Shipping + WoodMart Core only (WoodMart theme) | **Fatal error** |
| WooCommerce + WoodMart Core only (Table Rate deactivated) | Editor opens normally |
| WooCommerce + Table Rate Shipping, Twenty Twenty-Five theme, editing the Cart block | Editor opens normally |(WoodMart Core has to stay active, since it registers the Layouts post type.)
**Error**
`
Fatal error: Uncaught Error: Call to a member function get() on null
in wp-content/plugins/woocommerce-table-rate-shipping/includes/class-wc-table-rate-shipping.php:271
#0 class-wp-hook.php(353): WC_Table_Rate_Shipping->maybe_show_abort(”)
#1 class-wp-hook.php(377): WP_Hook->apply_filters(”, Array)
#2 plugin.php(523): WP_Hook->do_action(Array)
#3 themes/woodmart/inc/integrations/gutenberg/src/layouts/woo-hook/render.php(195): do_action(‘woocommerce_bef…’)
…
#11 class-wp-rest-posts-controller.php: apply_filters(‘the_content’, …)
#17 rest_preload_api_request(Array, ‘/wp/v2/woodmart…’)
#19 wp-admin/edit-form-blocks.php(132): block_editor_rest_api_preload(…)
`**Cause: two things combine**
1. **WoodMart:** the Cart layout contains a Woo hook block set towoocommerce_before_cart. When the editor loads, WordPress preloads the layout through the REST API from wp-admin, andwd_gutenberg_woo_hook()(inc/integrations/gutenberg/src/layouts/woo-hook/render.php, around line 195) runsdo_action( 'woocommerce_before_cart' ). In that admin/REST request WooCommerce hasn’t loaded a session or cart, soWC()->sessionis null. Normally this hook only fires fromtemplates/cart/cart.phpon the storefront, where a session always exists. That’s why a default theme with the Cart block doesn’t trigger it.
2. **Table Rate Shipping:**maybe_show_abort()is hooked towoocommerce_before_cart(line 134) andwoocommerce_before_checkout_form_cart_notices(line 135). On line 271 it callsWC()->session->get( self::$abort_key )without checking that the session exists. WooCommerce core’s own functions on the same hook already guard against this:wc_get_notices()returns early when! WC()->session.**Suggested fixes (either one prevents the crash)**
– **WoodMart:** when the Woo hook block renders cart or checkout hooks in the editor/REST context, load the cart and session first (e.g.wc_load_cart()), or skip storefront hooks there and show a placeholder.
– **Table Rate Shipping:** add a guard at the start ofmaybe_show_abort():
Â`php
 if ( ! WC()->session || ! WC()->cart ) {
   return;
 }
Â`**Steps to reproduce**
1. Activate the WoodMart theme, WoodMart Core, WooCommerce and Table Rate Shipping 3.7.4.
2. WoodMart → Layouts → add a Cart layout containing a Woo hook block set towoocommerce_before_cart.
3. Save, then reopen the layout in the block editor. The fatal error appears.**Current workaround:** deactivate Table Rate Shipping while editing the layout, then reactivate it.
I have attached a copy of the Table Rate Shipping plugin to this email. This is the official WooCommerce extension.
### Issue 2: PHP warning in
woodmart_page_title()on author archives with no posts (WoodMart)**What happens**
Visiting an author archive for a user with no blog posts logs:
`
Warning: Undefined array key 0 in wp-includes/class-wp-query.php on line 3754
`
Our store doesn’t use a blog. The admin user has published pages and products but no posts, and WordPress still lists/author/admin/in its core sitemap (wp-sitemap-users-1.xml).**Isolation (staging site)**
| Setup | Result |
| WoodMart theme, WooCommerce only (all other plugins deactivated) | Warning |
| WoodMart theme, no plugins at all | Warning |
| Twenty Twenty-Five theme, no plugins | No warning |**Backtrace**
`
Warning: Undefined array key 0 in wp-includes/class-wp-query.php:3754
  <- wp-includes/class-wp-query.php:3813 next_post()
  <- wp-includes/query.php:1025 the_post()
  <- wp-content/themes/woodmart/inc/template-tags/template-tags.php:1702 the_post()
  <- woodmart_page_title()
  <- wp-content/themes/woodmart/inc/template-tags/template-tags.php:1079 (woodmart_page_top_part)
  <- wp-content/themes/woodmart/header.php:30
`**Cause**
Ininc/template-tags/template-tags.php, theis_author()branch ofwoodmart_page_title()(around line 1702) callsthe_post()without checkinghave_posts(). On an author archive with zero posts,WP_Query::next_post()reads$this->posts[0], which doesn’t exist.**Suggested fix**
`php
if ( is_author() ) {
  $author = get_queried_object();
  if ( $author instanceof WP_User ) {
    $title = esc_html__( ‘Posts by ‘, ‘woodmart’ ) . ‘<span class=”vcard”><a class=”url fn n” href=”‘ . esc_url( get_author_posts_url( $author->ID ) ) . ‘” title=”‘ . esc_attr( $author->display_name ) . ‘” rel=”me”>’ . esc_html( $author->display_name ) . ‘</a></span>’;
  }
}
`
Alternatively, wrap the existingthe_post()/rewind_posts()block inif ( have_posts() ) { ... }.October 5, 2026 at 8:54 am #730525Hi there,
Thank you for the detailed report.
We have released patch #730522 to address these issues. Please apply it under Dashboard → WoodMart → Patcher, then test both cases again on your staging site.
Kind regards,
XTemos StudioOctober 5, 2026 at 9:07 am #730527
dtech10ParticipantThank you
October 7, 2026 at 9:22 am #730662You are always welcome. Feel free to contact us if you have any further questions.
-
AuthorPosts
The topic ‘Bugs (Table Rate Shipping & author archives)’ is closed to new replies.
- You must be logged in to create new topics. Login / Register