Fatal error: Uncaught Error: Call to a member function get_meta() on bool
-
When trying to preview WooCommerce email templates, the following message is shown: There was an error rendering the email preview. This doesn’t affect actual email delivery. Please contact the extension author for assistance.
When enabling WP debug mode, I can see the following error in the debug log:
Fatal error: Uncaught Error: Call to a member function get_meta() on bool in /data/sites/web/www/wp-content/plugins/sendcloud-shipping/includes/Repositories/class-checkout-payload–meta-repository.php:49 Stack trace: #0 /data/sites/web/www/wp-content/plugins/sendcloud-shipping/includes/Checkout/Shipping/class-order-view-extender.php(97): Sendcloud\Shipping\Repositories\Checkout_Payload_Meta_Repository->get_delivery_method_type(12345) #1 /data/sites/web/www/wp-content/plugins/sendcloud-shipping/includes/Checkout/Shipping/class-order-view-extender.php(57): Sendcloud\Shipping\Checkout\Shipping\Order_View_Extender->render(12345, ‘…’) #2 [internal function]: Sendcloud\Shipping\Checkout\Shipping\Order_View_Extender->add_delivery_date_info_in_mail(Object(WC_Order)) #3 /data/sites/web/www/wp-content/plugins/sendcloud-shipping/includes/Utility/class-logging-callable.php(28): call_user_func_array(Array, Array) #4 /data/sites/web/www/wp-includes/class-wp-hook.php(326): Sendcloud\Shipping\Utility\Logging_Callable->__invoke(Object(WC_Order)) #5 /data/sites/web/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /data/sites/web/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /data/sites/web/www/wp-content/plugins/woocommerce/templates/emails/email-order-details.php(160): do_action(‘…’, Object(WC_Order), false, false, Object(WC_Email_Customer_Processing_Order)) #8 /data/sites/web/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include(‘…’) #9 /data/sites/web/www/wp-content/plugins/woocommerce/includes/class-wc-emails.php(494): wc_get_template(‘…’, Array) #10 /data/sites/web/www/wp-includes/class-wp-hook.php(324): WC_Emails->order_details(Object(WC_Order), false, false, Object(WC_Email_Customer_Processing_Order)) #11 /data/sites/web/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #12 /data/sites/web/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 /data/sites/web/www/wp-content/plugins/woocommerce/templates/emails/customer-processing-order.php(59): do_action(‘…’, Object(WC_Order), false, false, Object(WC_Email_Customer_Processing_Order)) #14 /data/sites/web/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include(‘…’) #15 /data/sites/web/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(365): wc_get_template(‘…’, Array, ”, ”) #16 /data/sites/web/www/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-processing-order.php(109): wc_get_template_html(‘…’, Array) #17 /data/sites/web/www/wp-content/plugins/woocommerce/src/Internal/Admin/EmailPreview/EmailPreview.php(314): WC_Email_Customer_Processing_Order->get_content_html() #18 /data/sites/web/www/wp-content/plugins/woocommerce/src/Internal/Admin/EmailPreview/EmailPreview.php(246): Automattic\WooCommerce\Internal\Admin\EmailPreview\EmailPreview->render_preview_email() #19 /data/sites/web/www/wp-content/plugins/woocommerce/includes/admin/class-wc-admin.php(241): Automattic\WooCommerce\Internal\Admin\EmailPreview\EmailPreview->render() #20 /data/sites/web/www/wp-includes/class-wp-hook.php(324): WC_Admin->preview_emails(”) #21 /data/sites/web/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #22 /data/sites/web/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #23 /data/sites/web/www/wp-admin/admin.php(176): do_action(‘…’) #24 /data/sites/web/www/wp-admin/index.php(10): require_once(‘…’) #25 {main} thrown in /data/sites/web/www/wp-content/plugins/sendcloud-shipping/includes/Repositories/class-checkout-payload–meta-repository.php on line 49
We are using the latest versions of WooCommerce, WordPress and your plugin. PHP 8.2. I have seen a similar error in other plugin suppor topics, but could not find any support tickets for the SendCloud plugin. Could you please check if anything should be changed to fix this error from showing?
It seems all email are send correctly, but I would like the email preview to work as well.
Thank you!
The topic ‘Fatal error: Uncaught Error: Call to a member function get_meta() on bool’ is closed to new replies.