PHP Fatal error – Uncaught Error: Call to a member function date() on null
-
Checking our logs we are seeing the below fatal error after upgrading to latest release:
[11-Nov-2022 09:40:25 UTC] PHP Fatal error: Uncaught Error: Call to a member function date() on null in /home/fanzone/public_html/wp-content/plugins/woocommerce/src/Admin/API/Reports/Customers/DataStore.php:738 Stack trace: #0 /home/fanzone/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php(199): Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore::update_registered_customer(142) #1 [internal function]: Automattic\WooCommerce\Internal\Admin\Schedulers\CustomersScheduler::import(142) #2 /home/fanzone/public_html/wp-content/plugins/woocommerce/src/Admin/Schedulers/SchedulerTraits.php(267): call_user_func_array(Array, Array) #3 /home/fanzone/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler::do_action_or_reschedule(142) #4 /home/fanzone/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #5 /home/fanzone/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #6 /home/fanzone/public_html/wp-content/p in /home/fanzone/public_html/wp-content/plugins/woocommerce/src/Admin/API/Reports/Customers/DataStore.php on line 738
-
I experience a similar problem. Did you find an answer?
Thx.
/Christianaccording to my debug report the error is on line 738
in this file
/wp-content/plugins/woocommerce/src/Admin/API/Reports/Customers/DataStore.php on line 738
I have replaced this line
'date_registered' => $customer->get_date_created( 'edit' )->date( TimeInterval::$sql_datetime_format ),
with
$customer->get_date_created( 'edit' ) ? $customer->get_date_created( 'edit' )->date( TimeInterval::$sql_datetime_format ) : null,
and it now appears to work
I am having the same problem, the line 738 is edited as suggested and I am still getting the same error.
Can someone help please?Hi @sacfc
Thanks for reaching out!
I’d like to understand your site properly, can you please share your System Status Report, that will help us further troubleshoot.
You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
. Once you’ve done that, you can paste it into your reply here.I’m glad you were able to find a solution and thanks for sharing it with the community too! ??
I understand you are experiencing the same issue and since every site is different and you’re not the person who originally started this topic then, per the forum guidelines, would you please start your own topic?
We’ll be more than happy to help there ??
Sure, here it is
### WordPress Environment ###WordPress address (URL): https://fanzone.stalbanscityfc.com
Site address (URL): https://fanzone.stalbanscityfc.com
WC Version: 7.1.0
REST API Version: ? 7.1.0
WC Blocks Version: ? 8.7.5
Action Scheduler Version: ? 3.5.2
Log Directory Writable: ?
WP Version: 6.1.1
WP Multisite: –
WP Memory Limit: 3 GB
WP Debug Mode: –
WP Cron: ?
Language: en_GB
External object cache: ?### Server Environment ###
Server Info: LiteSpeed
PHP Version: 7.4.33
PHP Post Max Size: 256 MB
PHP Time Limit: 400
PHP Max Input Vars: 1000
cURL Version: 7.71.0
OpenSSL/1.1.1pSUHOSIN Installed: –
MySQL Version: 5.7.40
Max Upload Size: 256 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: 7.1.0
WC Database Prefix: kjs_
Total Database Size: 876.00MB
Database Data Size: 625.78MB
Database Index Size: 250.22MB
kjs_woocommerce_sessions: Data: 1.52MB + Index: 0.05MB + Engine InnoDB
kjs_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
kjs_woocommerce_order_items: Data: 4.52MB + Index: 1.52MB + Engine InnoDB
kjs_woocommerce_order_itemmeta: Data: 79.59MB + Index: 21.06MB + Engine InnoDB
kjs_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
kjs_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_actionscheduler_actions: Data: 5.02MB + Index: 6.55MB + Engine InnoDB
kjs_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_actionscheduler_logs: Data: 4.52MB + Index: 3.03MB + Engine InnoDB
kjs_bv_activities_store: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_cli_cookie_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_cli_cookie_scan_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_cli_cookie_scan_cookies: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_cli_cookie_scan_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_cli_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_cocart_carts: Data: 2.02MB + Index: 0.06MB + Engine InnoDB
kjs_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_comments: Data: 13.52MB + Index: 9.09MB + Engine InnoDB
kjs_css_js_manager: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_emember_uploads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_fooeventspos_square_checkouts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_fooeventspos_square_devices: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_fooeventspos_square_refunds: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_fooevents_check_in: Data: 4.52MB + Index: 2.52MB + Engine InnoDB
kjs_forum_ads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_gla_budget_recommendations: Data: 0.20MB + Index: 0.11MB + Engine InnoDB
kjs_gla_merchant_issues: Data: 0.16MB + Index: 0.00MB + Engine InnoDB
kjs_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_litespeed_crawler: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_litespeed_crawler_blacklist: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_litespeed_img_optm: Data: 0.41MB + Index: 0.19MB + Engine InnoDB
kjs_litespeed_img_optming: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
kjs_litespeed_url: Data: 0.08MB + Index: 0.08MB + Engine InnoDB
kjs_litespeed_url_file: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
kjs_mailpoet_automations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_automation_runs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_automation_run_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_automation_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_automation_versions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_log: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_newsletters: Data: 7.52MB + Index: 0.03MB + Engine InnoDB
kjs_mailpoet_newsletter_links: Data: 4.52MB + Index: 3.33MB + Engine InnoDB
kjs_mailpoet_newsletter_option: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_newsletter_segment: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_newsletter_templates: Data: 7.52MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_scheduled_tasks: Data: 1.52MB + Index: 0.48MB + Engine InnoDB
kjs_mailpoet_scheduled_task_subscribers: Data: 45.58MB + Index: 15.52MB + Engine InnoDB
kjs_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_mailpoet_sending_queues: Data: 76.52MB + Index: 0.13MB + Engine InnoDB
kjs_mailpoet_settings: Data: 0.03MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_mailpoet_statistics_clicks: Data: 0.36MB + Index: 0.31MB + Engine InnoDB
kjs_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_statistics_newsletters: Data: 6.52MB + Index: 5.03MB + Engine InnoDB
kjs_mailpoet_statistics_opens: Data: 3.52MB + Index: 7.58MB + Engine InnoDB
kjs_mailpoet_statistics_unsubscribes: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
kjs_mailpoet_statistics_woocommerce_purchases: Data: 0.22MB + Index: 0.27MB + Engine InnoDB
kjs_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_mailpoet_subscribers: Data: 2.33MB + Index: 2.38MB + Engine InnoDB
kjs_mailpoet_subscriber_custom_field: Data: 0.09MB + Index: 0.05MB + Engine InnoDB
kjs_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_subscriber_segment: Data: 1.52MB + Index: 0.70MB + Engine InnoDB
kjs_mailpoet_subscriber_tag: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
kjs_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_mailpoet_user_agents: Data: 1.52MB + Index: 0.09MB + Engine InnoDB
kjs_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_options: Data: 38.48MB + Index: 1.64MB + Engine InnoDB
kjs_postmeta: Data: 216.73MB + Index: 116.30MB + Engine InnoDB
kjs_posts: Data: 16.52MB + Index: 8.06MB + Engine InnoDB
kjs_serial_numbers: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
kjs_serial_numbers_activations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_stock_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_termmeta: Data: 0.09MB + Index: 0.14MB + Engine InnoDB
kjs_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_term_relationships: Data: 0.33MB + Index: 0.17MB + Engine InnoDB
kjs_term_taxonomy: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
kjs_usermeta: Data: 20.55MB + Index: 14.03MB + Engine InnoDB
kjs_users: Data: 1.52MB + Index: 0.63MB + Engine InnoDB
kjs_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
kjs_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
kjs_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wc_customer_lookup: Data: 1.52MB + Index: 0.42MB + Engine InnoDB
kjs_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_wc_order_coupon_lookup: Data: 0.17MB + Index: 0.20MB + Engine InnoDB
kjs_wc_order_product_lookup: Data: 3.52MB + Index: 1.95MB + Engine InnoDB
kjs_wc_order_stats: Data: 2.52MB + Index: 1.20MB + Engine InnoDB
kjs_wc_order_tax_lookup: Data: 1.52MB + Index: 0.86MB + Engine InnoDB
kjs_wc_product_attributes_lookup: Data: 0.22MB + Index: 0.17MB + Engine InnoDB
kjs_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_wc_product_meta_lookup: Data: 0.20MB + Index: 0.33MB + Engine InnoDB
kjs_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_woocommerce_square_customers: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
kjs_woo_sales_country_region: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_woo_shippment_provider: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
kjs_woo_square_integration_deleted_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_woo_square_integration_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wpforms_entries: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
kjs_wpforms_entry_fields: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
kjs_wpforms_entry_meta: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
kjs_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wpmailsmtp_debug_events: Data: 8.52MB + Index: 0.00MB + Engine InnoDB
kjs_wpmailsmtp_emails_log: Data: 1.02MB + Index: 0.06MB + Engine InnoDB
kjs_wpmailsmtp_email_tracking_events: Data: 6.52MB + Index: 6.03MB + Engine InnoDB
kjs_wpmailsmtp_email_tracking_links: Data: 10.52MB + Index: 1.52MB + Engine InnoDB
kjs_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wpstg_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wp_auth_session_tbl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_wp_eMember_membership_tbl: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wp_eMember_members_tbl: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
kjs_wp_members_meta_tbl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
kjs_yoast_indexable: Data: 13.52MB + Index: 12.09MB + Engine InnoDB
kjs_yoast_indexable_hierarchy: Data: 2.52MB + Index: 2.52MB + Engine InnoDB
kjs_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
kjs_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
kjs_yoast_seo_links: Data: 0.09MB + Index: 0.06MB + Engine InnoDB### Post Type Counts ###
attachment: 589
cookielawinfo: 17
custom_css: 4
customize_changeset: 17
event_magic_tickets: 31942
feedzy_imports: 1
forum: 2
giftcard: 4
jp_img_sitemap: 1
jp_sitemap: 1
jp_sitemap_master: 1
mailpoet_page: 1
nav_menu_item: 25
page: 34
pms-discount-codes: 1
pms-subscription: 2
post: 2
product: 184
product_variation: 1600
reply: 4
revision: 23
shop_coupon: 21
shop_order: 19758
shop_order_refund: 119
shop_subscription: 8
topic: 2
wcccf: 6
wccvf: 1
wp_global_styles: 1
wpforms: 3### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?### Active Plugins (42) ###
weLaunch Framework: by weLaunch.io – 1.0.12
CoCart – Headless ecommerce: by Sébastien Dumont – 3.7.9
Change wp-admin login: by Nuno Morais Sarmento – 1.1.0
CookieYes | GDPR Cookie Consent: by CookieYes – 3.0.5
Disable User Password Reset Admin Notifications: by Chris Cook – 1.3
Free Downloads WooCommerce: by Square One Media – 3.5.1
Facebook for WooCommerce: by Facebook – 3.0.4
Flying Scripts: by WP Speed Matters – 1.2.3
FooEvents for WooCommerce: by FooEvents – 1.17.3
FooEvents Custom Attendee Fields: by FooEvents – 1.6.23
FooEvents Multi-Day: by FooEvents – 1.6.5
FooEvents PDF Tickets: by FooEvents – 1.9.21
FooEvents POS: by FooEvents – 1.0.2
Site Kit by Google: by Google – 1.88.0
JWT Authentication for WP-API: by Enrique Chavez – 1.3.2
LiteSpeed Cache: by LiteSpeed Technologies – 5.3
MailPoet Premium: by MailPoet – 4.0.0
MailPoet: by MailPoet – 4.0.0
Mesmerize Companion: by Extend Themes – 1.6.133
My Custom Functions: by Space X-Chimp – 4.51
Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5
Restrict – membership, site, content and user access restrictions for WordPress (Premium): by Restrict – 2.2.1
Use Any Font: by Dnesscarkey – 6.2.98
User Role Editor: by Vladimir Garagulya – 4.63.1
WooCommerce Dynamic Pricing & Discounts: by RightPress – 2.4.5
Serial Numbers for WooCommerce: by PluginEver – 1.4.1
Woocommerce Profile Photo: by Web For 99 – 1.1
WooCommerce Custom Add To Cart Button: by Barn2 Plugins – 1.1.3
WooCommerce Bulk Variations: by Barn2 Plugins – 2.1.5
Email Customizer for WooCommerce (Pro): by ThemeHigh – 3.6.0
WooCommerce Extra Product Options Pro: by ThemeHigh – 3.2.1
WooCommerce Fast Cart: by Barn2 Plugins – 1.1.7
WooCommerce Google Analytics Integration: by WooCommerce – 1.5.17
WooCommerce My Account: by WeLaunch – 1.1.0
WooCommerce Square: by WooCommerce – 3.3.0
Stock Manager for WooCommerce: by StoreApps – 2.10.0
WooCommerce: by Automattic – 7.1.0
Yoast SEO: by Team Yoast – 19.10
Super Page Cache for Cloudflare: by Optimole – 4.7.2
WP Mail SMTP Pro: by WPForms – 3.6.1
WPForms: by WPForms – 1.7.8
WP Stagecoach: by WP Stagecoach – 1.4.29### Inactive Plugins (0) ###
### Dropin Plugins (1) ###
object-cache.php: object-cache.php
### 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)
pw gift card (pw-gift-card)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)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: ?
Enforce Approved Product Download Directories: ?### WC Pages ###
Shop base: #98 – /shop/
Basket: #99 – /cart/
Checkout: #100 – /checkout/
My account: #101 – /my-account/
Terms and conditions: #1088 – /terms-and-conditions/### Theme ###
Name: Highlight PRO
Version: 1.1.48
Author URL: https://extendthemes.com/
Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build
personally we recommend using a child theme. See: How to create a child themeWooCommerce Support: ?
### Templates ###
Archive Template: Your theme has a woocommerce.php file. You will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
Overrides: highlight-pro/woocommerce/checkout/form-checkout.php
highlight-pro/woocommerce/checkout/thankyou.php
highlight-pro/woocommerce/loop/pagination.php
highlight-pro/woocommerce/order/order-details.php### Square ###
Environment: Production
Tokenization Enabled:
Debug Mode: Off### Admin ###
Enabled Features: activity-panels
analytics
coupons
customer-effort-score-tracks
experimental-products-task
experimental-import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
multichannel-marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
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-pageDisabled Features: minified-js
new-product-management-experience
settingsDaily Cron: ? Next scheduled: 2022-11-22 06:29:00 +00:00
Options: ?
Notes: 77
Onboarding: completed### Action Scheduler ###
Canceled: 53
Oldest: 2022-11-10 02:00:08 +0000
Newest: 2022-11-19 17:42:11 +0000Complete: 14,662
Oldest: 2022-10-22 08:01:38 +0100
Newest: 2022-11-22 05:47:57 +0000Failed: 91
Oldest: 2021-09-16 15:30:03 +0100
Newest: 2022-11-21 11:00:45 +0000Pending: 13
Oldest: 2022-11-22 06:09:22 +0000
Newest: 2022-11-28 14:37:21 +0000### CoCart ###
Version: 3.7.9
Database Version: 3.7.9
Install Date: 22 December 2021
Carts in Session: 610
Carts Active: 610 out of 610 in session.
Carts Expiring Soon: 11 out of 610 in session.
Carts Expired: 0 out of 610 in session.
Carts Source (by CoCart): 0
Carts Source (by Web): 452
Carts Source (by Other): 158### Status report information ###
Generated at: 2022-11-22 06:06:31 +00:00
`Sorry just re-read my response. This is the code to replace the above code with:
date_registered' => $customer->get_date_created( 'edit' ) ? $customer->get_date_created( 'edit' )->date( TimeInterval::$sql_datetime_format ) : null,
Hi,
got the same error when trying to change a customers user role.
I haven′t tried changing the php-code since that would be only a temporary solution until the next update, wouldn′t it?
Is this something that will be fixed by WooCommerce in the near future?Thanks ??
@trepidationcouk the ‘old’ line does not exist in DataStore.php file in my installation.
Any other ideas?@yorksett you’ll need this line in your wordpress root wp-config.php file
define( 'WP_DEBUG', true );
and hopefully it’ll show you the line in that(or other file) which is causing the error.Another solution is to wait for the next woocommerce update where hopefully they’ll fix it for everyone.
Otherwise all I’ve done is create a ternary i.e so the code has something to fall back on if it doesn’t have a value
We are also experiencing exactly the same error. Thanks @trepidationcouk for your temporary solution. It works nicely for now.
I have just been looking into this further and it would appear to be an oversight in WooCommerce coding based on the fact that earlier in the same DataStore.php file on line 573, they cater to the possibility of the registered date being null ie
$data['date_registered'] = $customer_user->get_date_created( 'edit' ) ? $customer_user->get_date_created( 'edit' )->date( TimeInterval::$sql_datetime_format ) : null;
And given that the default value for date_registered (in the wp_users table) is null, it makes sense that they need to cater for this. How do we make this something that gets fixed in the next WooCommerce update?
Thanks
Janette- This reply was modified 2 years ago by jtowell.
Hi there, @jtowell ??
I have just been looking into this further and it would appear to be an oversight in WooCommerce coding based on the fact that earlier in the same DataStore.php file on line 573, they cater to the possibility of the registered date being null
Thank you for looking further into this! While trying to reproduce this, on a test installation of mine, I was unable to.
WP_DEBUG
was set totrue
.And given that the default value for date_registered (in the wp_users table) is null, it makes sense that they need to cater for this. How do we make this something that gets fixed in the next WooCommerce update?
While investigating GitHub issues, I was not able to find one about it. Feel free to submit a new issue, using the green button over there.
Sorry for the late reply, we had a problem in our internal system recently.
Thank you. ??
@woo-hc – perhaps it would make sense for you to open the WC GH ticket, as this might be beyond the tech range of most normal WP users?
In an attempt to get this fixed as quickly as possible I have now created a GitHub issue for this Github Issue #35752
This is my first time creating an issue on github so hopefully I have done it all correctly.Interesting enough I can’t reproduce the error now. I could not get rid of Fatal error for several days and now its gone! It could have been settings on the server of who knows!
Thanks to everyone that tried to help me.
- The topic ‘PHP Fatal error – Uncaught Error: Call to a member function date() on null’ is closed to new replies.