Error
-
Looks like this has happened to a couple of other users before but I’m very occasionally getting the following error:
2021-03-25T15:05:55+00:00 CRITICAL Uncaught Error: Cannot use object of type WP_Error as array in /public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php:149 Stack trace: #0 /public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-wc-referralcandy-integration.php(209): RC_Order->submit_purchase() #1 /public_html/wp/wp-includes/class-wp-hook.php(294): WC_Referralcandy_Integration->rc_submit_purchase(70991) #2 /public_html/wp/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /public_html/wp/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(363): do_action('woocommerce_ord...', 70991, Object(Automattic\WooCommerce\Admin\Overrides\Order)) #5 /public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(221): WC_Order->status_trans in /home/goodlifecompetit/public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php on line 149
Looking at the code, it seems like you need to check if the $response is not a WP_Error before #L149. Something like:
if ( is_wp_error( $response ) ) { return; }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Error’ is closed to new replies.