{"id":16250602,"date":"2022-12-01T09:35:44","date_gmt":"2022-12-01T09:35:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/critical-error-when-paying-by-card\/"},"modified":"2022-12-01T09:35:44","modified_gmt":"2022-12-01T09:35:44","slug":"critical-error-when-paying-by-card","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/critical-error-when-paying-by-card\/","title":{"rendered":"Critical Error when paying by card"},"content":{"rendered":"<p>Hello, when some customers pay by card, their cards get declined and the website throws critical error, as the log states:<\/p>\n<pre><code>2022-12-01T08:49:42+00:00 CRITICAL Uncaught Error: Cannot use object of type Paypal_Checkout_For_Woocommerce_Settings as array in \/home\/labsolus\/www\/wp-content\/plugins\/woocommerce\/includes\/rest-api\/Controllers\/Version3\/class-wc-rest-payment-gateways-controller.php:92\nStack trace:\n#0 \/home\/labsolus\/www\/wp-content\/plugins\/woocommerce\/includes\/rest-api\/Controllers\/Version3\/class-wc-rest-payment-gateways-controller.php(46): WC_REST_Payment_Gateways_Controller-&gt;get_settings(Object(Paypal_Checkout_For_Woocommerce_Gateway))\n#1 \/home\/labsolus\/www\/wp-content\/plugins\/woocommerce\/includes\/rest-api\/Controllers\/Version2\/class-wc-rest-payment-gateways-v2-controller.php(127): WC_REST_Payment_Gateways_Controller-&gt;prepare_item_for_response(Object(Paypal_Checkout_For_Woocommerce_Gateway), Object(WP_REST_Request))\n#2 \/home\/labsolus\/www\/wp-includes\/rest-api\/class-wp-rest-server.php(1171): WC_REST_Payment_Gateways_V2_Controller-&gt;get_items(Object(WP_REST_Request))\n#3 \/home\/labsolus\/www\/wp-includes\/rest-api\/class-wp-rest-server.php(1018): WP_REST_Server-&gt;respond_to_request(Object(WP_REST_Request), &#039;\/wc\/v3\/payment_...&#039;, Array, NULL)\n#4 \/home\/labsolus\/www\/wp-includes\/rest-api\/class-wp-rest-server.php(442): WP_REST_Server-&gt;dispatch(Object(WP_REST_Request))\n#5 \/home\/labsolus\/www\/wp-includes\/rest-api.php(410): WP_REST_Server-&gt;serve_request(&#039;\/wc\/v3\/payment_...&#039;)\n#6 \/home\/labsolus\/www\/wp-includes\/class-wp-hook.php(308): rest_api_loaded(Object(WP))\n#7 \/home\/labsolus\/www\/wp-includes\/class-wp-hook.php(332): WP_Hook-&gt;apply_filters(NULL, Array)\n#8 \/home\/labsolus\/www\/wp-includes\/plugin.php(565): WP_Hook-&gt;do_action(Array)\n#9 \/home\/labsolus\/www\/wp-includes\/class-wp.php(399): do_action_ref_array(&#039;parse_request&#039;, Array)\n#10 \/home\/labsolus\/www\/wp-includes\/class-wp.php(780): WP-&gt;parse_request(&#039;&#039;)\n#11 \/home\/labsolus\/www\/wp-includes\/functions.php(1332): WP-&gt;main(&#039;&#039;)\n#12 \/home\/labsolus\/www\/wp-blog-header.php(16): wp()\n#13 \/home\/labsolus\/www\/index.php(17): require(&#039;\/home\/labsolus\/...&#039;)\n#14 {main}\n  thrown dans \/home\/labsolus\/www\/wp-content\/plugins\/woocommerce\/includes\/rest-api\/Controllers\/Version3\/class-wc-rest-payment-gateways-controller.php \u00e0 la ligne 92<\/code><\/pre>\n<p>I can&#8217;t find any solution, help ?<\/p>\n","protected":false},"template":"","class_list":["post-16250602","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16250602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16250602\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16250602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}