• Hi,

    I hope someone can help me solve this issue. My woocommerce has stopped sending emails for new orders to customers and admins, I have tried everything for conflicts, I am using SMTP, the system is sending emails properly and when I get a new order and I access the order and resend the emails they work fine, but are not sending automatically when an order is placed!!!

    Here is the last error log, I think this is for the last order…

    2025-02-18T00:02:47+00:00 Critical Uncaught Error: Cannot use object of type stdClass as array in /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-shipping.php:141
    Additional context
    {
    "error": {
    "type": 1,
    "file": "/home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-shipping.php",
    "line": 141
    },
    "remote-logging": true,
    "backtrace": [
    "",
    "#0 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php(801): WC_Order_Item_Shipping->set_taxes()",
    "#1 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-item-shipping-data-store.php(36): WC_Data->set_props()",
    "#2 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Order_Item_Shipping_Data_Store->read()",
    "#3 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item.php(105): WC_Data_Store->read()",
    "#4 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-factory.php(194): WC_Order_Item->__construct()",
    "#5 [internal function]: WC_Order_Factory::get_order_item()",
    "#6 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php(541): array_map()",
    "#7 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(224): Abstract_WC_Order_Data_Store_CPT->read_items()",
    "#8 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(911): WC_Data_Store->__call()",
    "#9 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(972): WC_Abstract_Order->get_items()",
    "#10 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(982): WC_Abstract_Order->get_shipping_methods()",
    "#11 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(2315): WC_Abstract_Order->get_shipping_method()",
    "#12 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(2401): WC_Abstract_Order->add_order_item_totals_shipping_row()",
    "#13 /home/texmexcu/public_html/wp-content/plugins/woocommerce/templates/emails/plain/email-order-details.php(37): WC_Order->get_order_item_totals()",
    "#14 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/texmexcu/…')",
    "#15 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-emails.php(426): wc_get_template()",
    "#16 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(324): WC_Emails->order_details()",
    "#17 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
    "#18 /home/texmexcu/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()",
    "#19 /home/texmexcu/public_html/wp-content/plugins/woocommerce/templates/emails/plain/admin-new-order.php(33): do_action()",
    "#20 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/texmexcu/…')",
    "#21 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(364): wc_get_template()",
    "#22 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-new-order.php(147): wc_get_template_html()",
    "#23 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(604): WC_Email_New_Order->get_content_plain()",
    "#24 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-new-order.php(112): WC_Email->get_content()",
    "#25 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(324): WC_Email_New_Order->trigger()",
    "#26 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
    "#27 /home/texmexcu/public_html/wp-includes/plugin.php(565): WP_Hook->do_action()",
    "#28 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-emails.php(159): do_action_ref_array()",
    "#29 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-background-emailer.php(59): WC_Emails::send_queued_transactional_email()",
    "#30 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/class-wc-background-emailer.php(156): WC_Background_Emailer->task()",
    "#31 /home/texmexcu/public_html/wp-content/plugins/woocommerce/includes/libraries/wp-background-process.php(447): WC_Background_Emailer->handle()",
    "#32 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(324): WP_Background_Process->handle_cron_healthcheck()",
    "#33 /home/texmexcu/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
    "#34 /home/texmexcu/public_html/wp-includes/plugin.php(565): WP_Hook->do_action()",
    "#35 /home/texmexcu/public_html/wp-cron.php(191): do_action_ref_array()",
    "#36 {main}",
    "thrown"
    ]
    }

    Can anyone Help? Point me in the right way to look for a solution? I am stumped.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for sharing the details of the issue.

    This error indicates that WooCommerce is trying to access a value as an array, but it’s actually an object (stdClass). Specifically, the error occurs in class-wc-order-item-shipping.php on line 141, likely when WooCommerce is processing shipping-related data for an order.

    Regarding the issue where New Order emails are not being sent automatically when an order is placed, I understand that resending them manually works fine.

    To begin troubleshooting, could you please confirm if the New Order email notification is enabled? You can check this in WooCommerce → Settings → Emails → New Order.

    Additionally, please follow these steps:

    1. Check WooCommerce Scheduled Actions
      • Go to WooCommerce → Status → Scheduled Actions
      • Look for any pending or failed email-related actions (e.g., woocommerce_new_order)
      • If actions are stuck, try manually running them to see if emails are sent
    2. Verify WP Cron is Running
      • Use a plugin like WP Crontrol (link) to check if WP Cron is working correctly
      • If WP Cron is disabled, it could prevent automated emails from being sent

    If everything is stepup correctly, could you please share the System Status Report?which you can find via WooCommerce > Status. Please use?https://pastebin.com/?or?https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.???????????????????????????????????????????????????????????????????????????

    Thread Starter adessowebs

    (@adessowebs)

    Hello,

    thank you for your reply, I have checked the things you suggested and cannot find anything, you are correct, the emails are not sending automatically to the customer or admin when an order is placed and the emails are all enabled to send from Woocommerce. As I said once an order is placed I can go into the orders page and edit the order I can send order details to the customer and this works perfectly. I cannot figure it out. Any help you can give is greatly appreciated.

    Here is my system status report

    https://pastebin.com/ktZSC26i

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello adessowebs,

    Thank you for your reply.

    I understand that emails are not sent automatically to customers when a new order is placed.
    This sounds like a problem with WP Cron or Scheduled Actions.

    To investigate the issue, please share a screenshot of WooCommerce > Status > Scheduled Actions page.
    You may use https://snipboard.io to share images with me.

    Once I have more information, I will be in a better position to assist you further.

    Best regards.

    Thread Starter adessowebs

    (@adessowebs)

    Hello Zubair Zahid

    Thanks, here is a screenshot of the failed actions, https://snipboard.io/PZ6QuA.jpg

    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @adessowebs,

    Here’s a clearer version with better flow:

    I’ve checked your screenshot and noticed that wp_mail_smtp_admin_notifications_update has failed. This suggests that WP Mail SMTP is having trouble updating admin notifications, which could be affecting WooCommerce emails.

    To resolve this, first, manually run the failed action by going to WooCommerce > Status > Scheduled Actions, locating wp_mail_smtp_admin_notifications_update under “Failed,” and clicking Run to execute it.

    Next, check your WP Mail SMTP settings by navigating to WP Mail SMTP > Settings, ensuring your SMTP configuration is correct, and sending a test email to confirm it works.

    If the issue persists, temporarily disable WP Mail SMTP and check if WooCommerce emails send automatically. If they do, the issue is likely with WP Mail SMTP.

    You can also clear and restart scheduled actions by installing the WP Crontrol plugin. Go to Tools > Cron Events, find the failed action, and try running it again. If it keeps failing, delete it and let WP Mail SMTP regenerate it.

    Additionally, review your WooCommerce email settings by going to WooCommerce > Settings > Emails, ensuring that new order emails are enabled, and verifying that the recipient email addresses are correct.

    Lastly, check the WooCommerce status logs under WooCommerce > Status > Logs for any fatal error or errors related to email sending, which may provide further insights into the issue. Please share it using https://pastebin.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.