new order – status changed but woocommerce_order_status_changed not fired
-
A few days ago something apparently changed in woocommerce or in my payment gateway (although neither had an update). Suddenly a new order does not generate a new order email to the customer.
And this behaviour occurs on all my woocommerce powered sites.I researched the problem.
The issue happens only when the customer returns from the payment gateway after a positively executed payment (visa, paypal, …). Basically: when the order status changes from pending to processing IN COMBINATION with returning from the gateway.In other cases (f.e. the status changes from ‘pending’ to ‘on-hold’ because the customer chose a deferred payment by manual bank transfer), the correct emails are sent without any problem.
Things I have already checked:
1) It’s not a mail server problem. The initial new order mail is actually not sent out by WP (I installed wp mail logging).2) Upon returning from the gateway, the order status is automatically and correctly changed from ‘pending’ to ‘processing’.
3) But -weirdly- if I would then manually change the order status back from processing to pending + then again from pending to processing, the mail would be sent (and that is visible in the mail logs)
4) I wrote a function.php snippet to explicitly trigger the mail to be sent when an order has its status changed to processing:
function forcesendmail ( $order_id, $old_status, $new_status ){ $order = new WC_Order($order_id); if( $new_status == "processing" ) { WC()->mailer()->emails['WC_Email_Customer_Processing_Order']->trigger($order_id); } } add_action( 'woocommerce_order_status_changed', 'forcesendmail', 99, 3 );
The code works BUT…
a) it’s not triggered when returning from the gateway
b) it IS triggered when I do the manual order status change to pending and then back to processing. (by the way, the mail is sent twice then. Which makes sense because this status change is also what happens in point 3) above)So, in summary:
– upon returning from the payment gateway, woocommerce changes correctly the order status from pending to processing
– but the woocommerce_order_status_changed hook seems not to be triggered
– resulting in not triggering the new order mail to be sentAny ideas or suggestions ?
-
Hi there ??
This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
You can also visit the WooCommerce Facebook group or the
#developers
channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.Cheers!
Hello Gabriel,
Thanks for the reply !
I am a bit surprised that it seems to be an exceptional issue. Since it appeared quite suddenly and on all my sites at the same time, I would have imagined more people had the same problem.
Maybe the title of this support post was not clear or catchy enough to attract attention from other people experiencing the same?
Is there any way to change the title to “New Order mail not sent – woocommerce_order_status_changed problem”(or do I wait and repost it after some time ?)
Best regards
Peter
Hi Peter ??
This is strange, is this only happening with a specific payment gateway?
Let’s check if there is an error on the WooCommerce Logs. So please, provide us the following:
- System Status: You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
- Error log: share a copy of the fatal error log found under WooCommerce > System Status > Logs (if available)
Cheers ??
Hello Gabriel,
It happens with both my regular payment gateway and with Paypal.
Here is the system report from one of my sites that has the issue:
### WordPress Environment ### WordPress address (URL): https://www.MYDOMAIN.COM Site address (URL): https://www.MYDOMAIN.COM WC Version: 4.9.2 REST API Version: ? 4.9.2 WC Blocks Version: ? 4.0.0 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? 1.8.3 Log Directory Writable: ? WP Version: 5.6.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: nl_NL External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.2.34 PHP Post Max Size: 32 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.5.5-10.4.17-MariaDB-log-cll-lve Max Upload Size: 32 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.9.2 WC Database Prefix: wp_ Totale databasegrootte: 245.66MB Database datagrootte: 145.08MB Database index grootte: 100.58MB wp_woocommerce_sessions: Data: 0.05MB + Index: 0.02MB + 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.20MB + Index: 0.09MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 2.52MB + Index: 3.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.05MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + 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.06MB + Index: 0.11MB + 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.05MB + Index: 0.03MB + Engine InnoDB wp_blc_filters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_blc_instances: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_blc_links: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wp_blc_synch: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.05MB + Index: 0.09MB + Engine InnoDB wp_contactformmaker: Data: 0.28MB + Index: 0.00MB + Engine InnoDB wp_contactformmaker_blocked: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_contactformmaker_submits: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_contactformmaker_themes: Data: 1.50MB + Index: 0.00MB + Engine InnoDB wp_contactformmaker_views: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cp_calculated_fields_form_discount_codes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cp_calculated_fields_form_posts: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_cp_calculated_fields_form_revision: Data: 0.33MB + Index: 0.00MB + Engine InnoDB wp_cp_calculated_fields_form_settings: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wp_duplicator_pro_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_duplicator_pro_packages: Data: 0.08MB + Index: 0.02MB + Engine InnoDB wp_hustle_entries: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_hustle_entries_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_hustle_modules: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_hustle_modules_meta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_hustle_tracking: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_icl_cms_nav_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_languages_translations: Data: 0.19MB + Index: 0.08MB + Engine InnoDB wp_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_mo_files_domains: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_strings: Data: 12.52MB + Index: 15.09MB + Engine InnoDB wp_icl_string_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_pages: Data: 73.59MB + Index: 71.16MB + Engine InnoDB wp_icl_string_positions: Data: 1.52MB + Index: 0.23MB + Engine InnoDB wp_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_translations: Data: 8.52MB + Index: 4.03MB + Engine InnoDB wp_icl_string_urls: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_icl_translate: Data: 3.52MB + Index: 0.02MB + Engine InnoDB wp_icl_translate_job: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translations: Data: 0.08MB + Index: 0.22MB + Engine InnoDB wp_icl_translation_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_downloads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_status: Data: 2.52MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ms_snippets: 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.08MB + 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.11MB + Index: 0.00MB + Engine InnoDB wp_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_form_meta: Data: 0.06MB + 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.14MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 4.39MB + Index: 0.33MB + Engine InnoDB wp_postmeta: Data: 8.52MB + Index: 1.84MB + Engine InnoDB wp_posts: Data: 2.52MB + Index: 0.70MB + Engine InnoDB wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.06MB + Index: 0.09MB + Engine InnoDB wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_snippets: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + 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_usermeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcuf_upload_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.17MB + Index: 0.19MB + Engine InnoDB wp_wc_order_stats: Data: 0.13MB + Index: 0.14MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + 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_wfBlockedIPLog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfBlocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfConfig: Data: 3.45MB + Index: 0.00MB + Engine InnoDB wp_wfCrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfFileChanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfFileMods: Data: 6.52MB + Index: 0.00MB + Engine InnoDB wp_wfHits: Data: 1.08MB + Index: 0.23MB + Engine InnoDB wp_wfHoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfKnownFileList: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_wfLiveTrafficHuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfLocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfLogins: Data: 0.36MB + Index: 0.13MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfNotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfPendingIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfReverseCache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfSNIPCache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfStatus: Data: 0.13MB + Index: 0.11MB + Engine InnoDB wp_wfTrafficRates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_multisafepay: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpml_mails: Data: 1.50MB + Index: 0.00MB + Engine InnoDB wp_yoast_indexable: Data: 1.52MB + Index: 0.31MB + 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.14MB + Index: 0.11MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### amn_exact-metrics: 1 attachment: 777 nav_menu_item: 39 nf_sub: 7 page: 33 popup: 1 popup_theme: 6 post: 1 product: 41 revision: 48 shop_coupon: 1 shop_order: 40 uni_cpo_option: 7 wpforms: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (54) ### ManageWP - Worker: door GoDaddy – 4.9.7 Query Monitor: door John Blackbourn – 3.6.7 WPML Multilingual CMS: door OnTheGoSystems – 4.4.9 404 pagina - je slimme aangepaste 404 foutpagina: door Peter Raschendorfer – 11.3.0 Advanced Custom Fields Multilingual: door OnTheGoSystems – 1.7.5 Autoptimize: door Frank Goossens (futtta) – 2.8.1 Better Font Awesome: door Mickey Kay – 1.7.4 Booster Plus for WooCommerce: door Pluggabl LLC – 5.3.7 Buttonizer - Smart Floating Action Button (Premium): door Buttonizer – 2.2.5 Calculated Fields Form: door CodePeople – 5.0.564 Klassieke editor: door WordPress-bijdragers – 1.6 Codefragmenten: door Code Snippets Pro – 2.14.0 Display PHP Version: door David Gwyer – 1.5 Duplicator Pro: door Snap Creek – 4.0.1.2 Duplicator Pro: door Snap Creek – 4.0.1.2 Enhanced E-commerce for Woocommerce store: door Tatvic – 2.3.6.1 Enhanced Media Library: door wpUXsolutions – 2.8.2 Max Mega Menu - Pro Addon: door megamenu.com – 2.2 Max Mega Menu: door megamenu.com – 2.9.2 MultiSafepay: door MultiSafepay – 3.8.0 Ninja Forms: door Saturday Drive – 3.4.34 Pages In Widgets: door Jayden Major – 1.9.4 PHP-compatibiliteitschecker: door WP-engine – 1.5.0 Post Duplicator: door Metaphor Creations – 2.22 Product CSV Import Export (BASIC): door WebToffee – 1.8.8 Re-add text underline and justify: door Brice Capobianco – 0.3 Really Simple SSL: door Really Simple Plugins – 4.0.7 Redirection: door John Godley – 5.0.1 Regenerate Thumbnails: door Alex Mills (Viper007Bond) – 3.1.4 Page Builder by SiteOrigin: door SiteOrigin – 2.11.8 SiteOrigin Widgets Bundel: door SiteOrigin – 1.17.11 Tracking Code Manager PRO: door IntellyWP – 2.0.0 Virtue/Ascend/Pinnacle Toolkit: door Kadence WP – 4.9.6 WC Speed Drain Repair: door WP Fix It – 1.3 Widget Logic: door WPChef – 5.10.4 Widgets for SiteOrigin: door WPinked – 1.4.7 WooCommerce Google Ads Conversion Tracking: door Wolf+B?r Agency – 1.8.13 Booster for WooCommerce: door Pluggabl LLC – 5.3.7 WooCommerce Multilingual: door OnTheGoSystems – 4.11.1 WooCommerce: door Automattic – 4.9.2 (update naar versie 5.0.0 is beschikbaar) Wordfence Security: door Wordfence – 7.4.14 Yoast SEO: door Team Yoast – 15.7 WP Add Mime Types: door Kimiya Kitani – 2.5.8 WP Database Backup: door Prashant Walke – 5.7.1 WP Fastest Cache Premium: door Emre Vona – 1.5.9 WP Fastest Cache: door Emre Vona – 0.9.1.4 WP Mail Logging: door MailPoet – 1.9.7 WP-Optimize - Clean, Compress, Cache: door David Anderson Ruhani Rabin Team Updraft – 3.1.6 WPML CMS Nav: door OnTheGoSystems – 1.5.5 WPML Media: door OnTheGoSystems – 2.6.3 WPML Sticky Links: door OnTheGoSystems – 1.5.4 WPML String Translation: door OnTheGoSystems – 3.1.7 WPML Translation Management: door OnTheGoSystems – 2.10.5 WPML Widgets: door Jeroen Sormani – 1.0.6 ### Inactive Plugins (3) ### Broken Link Checker: door WPMU DEV – 1.11.15 Hustle: door WPMU DEV – 7.4.0 Plugins List: door David Artiss – 2.4.4 ### Dropin Plugins (1) ### db.php: Query Monitor Database Class ### Must Use Plugins (1) ### ManageWP - Worker Loader: door GoDaddy – ### Settings ### API Enabled: ? Force SSL: – Currency: EUR (€) Currency Position: left_space 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 WooCommerce.com: – ### WC Pages ### Winkelbasis: #13 - /shop/ Winkelmand: #11 - /cart/ Afrekenen: #16 - /checkout/ Mijn account: ? Pagina niet ingesteld Algemene voorwaarden: #20 - /terms-and-conditions/ ### Theme ### Name: Virtue Version: 3.4.4 Author URL: https://kadencewp.com/ Child Theme: ? – Als je wijzigingen aanbrengt in WooCommerce of in een hoofdthema dat je niet zelf gebouwd hebt raden we het gebruik van een child thema aan. Zie: Hoe maak je een child thema WooCommerce Support: ? ### Templates ### Overrides: virtue/woocommerce/archive-product.php virtue/woocommerce/content-product.php virtue/woocommerce/content-single-product.php virtue/woocommerce/loop/loop-end.php virtue/woocommerce/loop/loop-start.php virtue/woocommerce/loop/price.php virtue/woocommerce/loop/rating.php virtue/woocommerce/loop/sale-flash.php virtue/woocommerce/single-product/add-to-cart/external.php virtue/woocommerce/single-product/add-to-cart/grouped.php virtue/woocommerce/single-product/add-to-cart/simple.php virtue/woocommerce/single-product/add-to-cart/variable.php virtue/woocommerce/single-product/price.php virtue/woocommerce/single-product/product-image.php virtue/woocommerce/single-product/product-thumbnails.php virtue/woocommerce/single-product/sale-flash.php virtue/woocommerce/single-product.php virtue/woocommerce/content-product_cat.php versie 2.6.1 is verouderd. De hoofdversie is 4.7.0 virtue/woocommerce/taxonomy-product_cat.php versie 1.6.4 is verouderd. De hoofdversie is 4.7.0 virtue/woocommerce/taxonomy-product_tag.php versie 1.6.4 is verouderd. De hoofdversie is 4.7.0 Outdated Templates: ? Leer hoe te updaten ### Action Scheduler ### Voltooien: 113 Oldest: 2021-01-11 12:30:06 +0000 Newest: 2021-02-10 14:48:43 +0000
And here is the error log from the last 2 days.
2021-02-10T14:30:41+00:00 CRITICAL Uncaught Error: Call to a member function get_items() on boolean in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:1938
Stack trace:
#0 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-items.php(75): WC_Order->get_qty_refunded_for_item(3895)
#1 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/drt12677…’)
#2 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3247): wc_get_template(’emails/email-or…’, Array)
#3 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-details.php(56): wc_get_email_order_items(Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
#4 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/ho in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php op de lijn 19382021-02-09T05:22:51+00:00 CRITICAL Uncaught Error: Call to a member function get_items() on boolean in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:1938
Stack trace:
#0 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-items.php(75): WC_Order->get_qty_refunded_for_item(3880)
#1 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/drt12677…’)
#2 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3247): wc_get_template(’emails/email-or…’, Array)
#3 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-details.php(56): wc_get_email_order_items(Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
#4 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/ho in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php op de lijn 19382021-02-09T16:33:25+00:00 CRITICAL Uncaught Error: Call to a member function get_items() on boolean in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:1938
Stack trace:
#0 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-items.php(75): WC_Order->get_qty_refunded_for_item(3886)
#1 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/drt12677…’)
#2 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3247): wc_get_template(’emails/email-or…’, Array)
#3 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-details.php(56): wc_get_email_order_items(Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
#4 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/ho in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php op de lijn 19382021-02-09T18:18:02+00:00 CRITICAL Uncaught Error: Call to a member function get_items() on boolean in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:1938
Stack trace:
#0 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-items.php(75): WC_Order->get_qty_refunded_for_item(3892)
#1 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/drt12677…’)
#2 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3247): wc_get_template(’emails/email-or…’, Array)
#3 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/templates/emails/email-order-details.php(56): wc_get_email_order_items(Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
#4 /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/ho in /home/drt12677/domains/MYDOMAIN.COM/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php op de lijn 1938These are indeed the time stamps of when the orders came in and the issue happened.
Moreover, I noted in my initial message that some cases (f.e. the status changes from ‘pending’ to ‘on-hold’ because the customer chose a deferred payment by manual bank transfer), the correct emails are sent without any problem. I had one such order on 9/2/21. For that order, there is no mentioning in the above error log.
So, most probably, above are indeed the errors for my problem !
It would be really great if this helps !
Best regards
Peter
- The topic ‘new order – status changed but woocommerce_order_status_changed not fired’ is closed to new replies.