• Resolved kc_canada

    (@kwongchung)


    Hello,

    I found this warning in the Woocommerce>logs area: CRITICAL Uncaught Exception: Invalid data store. in /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php:101

    I currently have an issue syncing a third-party website (Printful.com) to my Woocommerce store. Just wondering if this info in the log might be the culprit.

    However, I don’t know what that CRITICAL message actually means.

    Can anyone help? FYI – there are more lines of info in the log – if needed I can paste it somewhere.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter kc_canada

    (@kwongchung)

    Below is the complete message found in my Woocommerce>Status>Logs :

    2023-08-06T05:46:02+00:00 CRITICAL Uncaught Exception: Invalid data store. in /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php:101
    Stack trace:
    #0 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Shipping_Zone_Data_Store->read(Object(WC_Shipping_Zone))
    #1 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping-zone.php(62): WC_Data_Store->read(Object(WC_Shipping_Zone))
    #2 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping-zones.php(32): WC_Shipping_Zone->__construct(Object(stdClass))
    #3 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php(315): WC_Shipping_Zones::get_zones('admin')
    #4 /home/vtp3ebb9fdgz/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Blocks\Shipping\ShippingController->hydrate_client_settings('index.php')
    #5 /home/vtp3ebb9fdgz/public_html in /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php on line 101
    
    2023-08-06T05:46:35+00:00 CRITICAL Uncaught Exception: Invalid data store. in /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php:101
    Stack trace:
    #0 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Shipping_Zone_Data_Store->read(Object(WC_Shipping_Zone))
    #1 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping-zone.php(62): WC_Data_Store->read(Object(WC_Shipping_Zone))
    #2 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping-zones.php(32): WC_Shipping_Zone->__construct(Object(stdClass))
    #3 /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php(315): WC_Shipping_Zones::get_zones('admin')
    #4 /home/vtp3ebb9fdgz/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Blocks\Shipping\ShippingController->hydrate_client_settings('index.php')
    #5 /home/vtp3ebb9fdgz/public_html in /home/vtp3ebb9fdgz/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php on line 101

    Hello @kwongchung

    Thank you for reaching out. We’ll be glad to help you resolve this.

    The error message you’re seeing is quite a generic error. Upon checking the full error you provided, it indicates that there is an issue with the WooCommerce shipping zone data store, and it occurs in the file class-wc-shipping-zone-data-store.php on line 101.

    I’d recommend running a full conflict test first to identify if it’s a plugin conflict, as it usually is, the culprit:

    1. Temporarily switch your theme to Storefront. If the issue is gone, it indicates that there is a conflict with your current theme.
    2. If it’s still having the issue, disable all plugins except for WooCommerce.
    3. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing the conflict. You can find a more detailed explanation on how to do a conflict test here.

    If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.

    Please try these steps and let us know if the issue persists.

    Thread Starter kc_canada

    (@kwongchung)

    Thanks for your reply, Darla.

    I’m already using Storefront, so that would not be the problem? I have also deactivated and reactivated each of my plugins and the problem is still there.

    The problem is the failed synchronization/connection between my third-party fulfillment website and my Woocommerce store. The plugin used for this sync is “Printful Integration for WooCommerce“. Printful says the problem is either an external conflict or server problem and not in their plugin. My web host at Godaddy says there isn’t anything at their end preventing the two parties from accessing each other.

    I did find a bunch of other logs in Woocommerce>Status>Logs (they’re all similar) in addition to the one above (printful-outgoing-api-errors-2023-08-05-603d611c7c6885f9cc3c27dd184857ce.log):

    2023-08-05T19:14:08+00:00 ERROR Array
    (
        [request] => Array
            (
                [timeout] => 10
                [user-agent] => Printful WooCommerce Plugin 2.2.2 (WP 6.2.2 + WC 7.9.0)
                [method] => GET
                [headers] => Array
                    (
                        [Authorization] => Bearer J8EpDj5sDwO9FYjz0fkx0UUcnUOSy4uYelRXhOR9
                    )
    
                [body] => 
                [path] => https://api.printful.com/store
            )
    
        [results] => Array
            (
                [code] => 401
                [result] => The access token provided is invalid.
                [error] => Array
                    (
                        [reason] => Unauthorized
                        [message] => The access token provided is invalid.
                    )
    
            )
    
    )
    
    2023-08-05T19:14:08+00:00 ERROR Array
    (
        [request] => Array
            (
                [timeout] => 10
                [user-agent] => Printful WooCommerce Plugin 2.2.2 (WP 6.2.2 + WC 7.9.0)
                [method] => GET
                [headers] => Array
                    (
                        [Authorization] => Bearer J8EpDj5sDwO9FYjz0fkx0UUcnUOSy4uYelRXhOR9
                    )
    
                [body] => 
                [path] => https://api.printful.com/store
            )
    
        [results] => Array
            (
                [code] => 401
                [result] => The access token provided is invalid.
                [error] => Array
                    (
                        [reason] => Unauthorized
                        [message] => The access token provided is invalid.
                    )
    
            )
    
    )
    
    2023-08-05T19:14:08+00:00 ERROR Array
    (
        [request] => Array
            (
                [timeout] => 10
                [user-agent] => Printful WooCommerce Plugin 2.2.2 (WP 6.2.2 + WC 7.9.0)
                [method] => GET
                [headers] => Array
                    (
                        [Authorization] => Bearer J8EpDj5sDwO9FYjz0fkx0UUcnUOSy4uYelRXhOR9
                    )
    
                [body] => 
                [path] => https://api.printful.com/store
            )
    
        [results] => Array
            (
                [code] => 401
                [result] => The access token provided is invalid.
                [error] => Array
                    (
                        [reason] => Unauthorized
                        [message] => The access token provided is invalid.
                    )
    
            )
    
    )
    
    2023-08-05T19:15:13+00:00 ERROR Array
    (
        [request] => Array
            (
                [timeout] => 10
                [user-agent] => Printful WooCommerce Plugin 2.2.2 (WP 6.2.2 + WC 7.9.0)
                [method] => GET
                [headers] => Array
                    (
                        [Authorization] => Bearer J8EpDj5sDwO9FYjz0fkx0UUcnUOSy4uYelRXhOR9
                    )
    
                [body] => 
                [path] => https://api.printful.com/store
            )
    
        [results] => Array
            (
                [code] => 401
                [result] => The access token provided is invalid.
                [error] => Array
                    (
                        [reason] => Unauthorized
                        [message] => The access token provided is invalid.
                    )
    
            )
    
    )

    Not sure if these 2 logs are connected or separate problems. But if you can help me get my Woocommerce connecting to my third-party’s website with the plugin. Thank you.

    • This reply was modified 1 year, 7 months ago by kc_canada.

    Hi there @kwongchung ??

    Thank you for reaching back, with further details on this! In the Printful API log, the following message appears:

    [reason] => Unauthorized
    [message] => The access token provided is invalid.

    From what I gather, this is to do with inputting the required credentials for connecting it successfully with your WooCommerce store, via their plugin.

    I was able to find the following guide, on their site, about how to connect your store with their service:

    https://www.printful.com/blog/how-to-setup-woocommerce-printful

    I hope that helps! Feel free to reach out to their support channel for anything further, as they would be in a better position to assist you.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – feel free to create a new topic if you need any further help.

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Found a Woocommerce logs warning “CRITICAL Uncaught Exception…”’ is closed to new replies.