When the checkbox for writing to the WC table is checked, the “Server error 500”, while it does not go to automatic another page, but a notification is sent email to the buyer and seller by mail.
Can you fix it?
Without checking the checkbox in the Woo tables, it works well, but I want to receive orders through WС
Thanks for your help, we found the bug. This is a conflict with another plugin: BoxBerry
System report, fatal error: 2023-06-04T01:17:28+00:00 CRITICAL Uncaught TypeError: array_shift(): Argument #1 ($array) must be of type array, null given in wp-content/plugins/boxberry/boxberry-for-woocommerce .php:1203 Stack trace:
0 wp-content/plugins/boxberry/boxberry-for-woocommerce.php(1203): array_shift(NULL)1 wp-includes/class-wp-hook.php(310): boxberry_put_choice_code(3854)2 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)3 wp-includes/plugin.php(517): WP_Hook->do_action(Array)4 wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php(103): do_action('woocommerce_new…', 3854, Object(WC_Order))5 wp-content/plugins/woocommerce/includes/class-wc-data-store.php(186): WC_Order_Data_Store_CPT->create(Object(WC_Order))6 wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(214): WC_Data_Store->create(Object(WC_Order))7 wp-content/plugins/woocommerce/includes/class-wc-order.php(244): WC_Abstract_Order->save()8 wp-content/plugins/woocommerce/includes/wc-core-functions.php(133): WC_Order->save()9 wp-content/plugins/buy-one-click-woocommerce/src/Repository/Order.php(63): wc_create_order(Array)10 wp-content/plugins/buy-one-click-woocommerce/src/Repository/Order.php(181): Coderun\BuyOneClick\Repository\Order->create_order(Array)11 wp-content/plugins/buy-one-click-woocommerce/src/Controller/OrderController.php(148): Coderun\BuyOneClick\Repository\Order->set_order(Array)12 wp-includes/class-wp-hook.php(308): Coderun\BuyOneClick\Controller\OrderController->creatingOrder('')13 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)14 wp-includes/plugin.php(517): WP_Hook->do_action(Array)15 wp-admin/admin-ajax.php(188): do_action('wp_ajax_coderun…')16 {main}
thrown in wp-content/plugins/boxberry/boxberry-for-woocommerce.php on line 1203
Can you fix this or contact BoxBerry?
Hello! I see that because of the implementation of this plugin, there is only one option to fix this problem. You need to change the file wp-content/plugins/boxberry/boxberry-for-woocommerce.php on line 1203. Find the function “function boxberry_put_choice_code($order_id)“ and and prev “$shipping_method = array_shift($_POST[ 'shipping_method' ]);“ add the following code
if (!isset($_POST[ 'shipping_method' ])) { return; }