CRITICAL Uncaught Error: Call to undefined method WP_Error::get_data()
-
My POS has occasional errors when pressing the button to finalize a purchase (just before finalizing the payment). Always in the same moment. The screen simply hangs, but it doesn’t display any error. We can’t find what’s causing it. Sometimes it works sometimes it doesn’t but everyday is getting worse and worse.
We currently do not have a payment gateway, all payments are cash and we only have 200 products, just a small business.
I have already update all my plugins, included woocommerce. Also I have tried to disable some of them to make sure it is not part of the problem.
It’s weird. The only clue we can find is this error message in woocommerce log but we are not sure if it’s related to the main problem because there’s no coincidence with timestamp.2022-10-13T20:35:01+00:00 CRITICAL Uncaught Error: Call to undefined method WP_Error::get_data() in /usr/home/tevaterra.cat/web/wp-content/plugins/woocommerce-pos/includes/apiv2/class-wc-pos-products.php:148 Stack trace: #0 /usr/home/tevaterra.cat/web/wp-includes/class-wp-hook.php(307): WC_POS_APIv2_Products->product_response(Object(WP_Error), Object(WC_Product_Variable), Object(WP_REST_Request)) #1 /usr/home/tevaterra.cat/web/wp-includes/plugin.php(191): WP_Hook->apply_filters(Object(WP_REST_Response), Array) #2 /usr/home/tevaterra.cat/web/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php(190): apply_filters('woocommerce_res...', Object(WP_REST_Response), Object(WC_Product_Variable), Object(WP_REST_Request)) #3 /usr/home/tevaterra.cat/web/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php(391): WC_REST_Products_V2_Controller->prepare_object_for_response(Object(WC_Product_Variable), Object(WP_REST_Request)) #4 /usr/home/tevaterra.c a /usr/home/tevaterra.cat/web/wp-content/plugins/woocommerce-pos/includes/apiv2/class-wc-pos-products.php a la línia 148
We would like to continue using this plugin and we are considering buying the PRO version but we need to fix this issue.
In the other hand, if I display the code of the page in the browser when its looped i see nothing remarcable:
`<html class=”no-js”>
<head>
<title>Punt de venda – tevaterra.cat</title>
<meta charset=”UTF-8″ /><meta name=”viewport” content=”width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0″ />
<meta name=”apple-mobile-web-app-capable” content=”yes” /><!– For iPad with high-resolution Retina display running iOS ≥ 7: –>
<link rel=”apple-touch-icon-precomposed” href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-152.png”>
<link rel=”apple-touch-icon-precomposed” sizes=”152×152″ href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-152.png”><!– For iPad with high-resolution Retina display running iOS ≤ 6: –>
<link rel=”apple-touch-icon-precomposed” sizes=”144×144″ href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-144.png”><!– For iPhone with high-resolution Retina display running iOS ≥ 7: –>
<link rel=”apple-touch-icon-precomposed” sizes=”120×120″ href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-120.png”><!– For iPhone with high-resolution Retina display running iOS ≤ 6: –>
<link rel=”apple-touch-icon-precomposed” sizes=”114×114″ href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-114.png”><!– For first- and second-generation iPad: –>
<link rel=”apple-touch-icon-precomposed” sizes=”72×72″ href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-72.png”><!– For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: –>
<link rel=”apple-touch-icon-precomposed” href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-57.png”><!– IE 10 Metro tile icon –>
<meta name=”msapplication-TileColor” content=”#323A46″>
<meta name=”msapplication-TileImage” content=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/favicon-144.png”><link rel=”stylesheet” href=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/css/pos.min.css?ver=0.4.27″ type=”text/css” />
<script src=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/js/vendor/modernizr.custom.min.js?ver=0.4.27″></script>
</head>
<body><div id=”page”></div>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/backbone.radio/1.0.2/backbone.radio.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/backbone.marionette/2.4.3/backbone.marionette.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.3/handlebars.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/idbwrapper/1.6.0/idbstore.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/accounting.js/0.4.1/accounting.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery-color/2.1.2/jquery.color.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js”></script>
<script src=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/js/vendor/jquery.scrollIntoView.min.js?ver=0.4.27″></script>
<script src=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/assets/js/app.min.js?ver=0.4.27″></script>
<script src=”https://www.tevaterra.cat/wp-content/plugins/woocommerce-pos/languages/js/ca.js”></script><script>POS.start({“ajaxurl”:”\/wp-admin\/admin-ajax.php”,”nonce”:”38d4489990″});</script>
<iframe name=”iframe” style=”visibility: hidden; right: 0px; bottom: 0px;”></iframe>
</body>
</html>`Any help is welcome.
Thanks!.
- The topic ‘CRITICAL Uncaught Error: Call to undefined method WP_Error::get_data()’ is closed to new replies.