Error when export order
-
Hi there,
This is my evn:
WC: 6.8 WP: 6.0.2 PHP: 8.1.8 Plugins: - Advanced Order Export For WooCommerce: 3.3.2
When I run an export, I got the error message:
2022-09-28T08:16:20+00:00 CRITICAL Uncaught TypeError: Unsupported operand types: string - int in /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-order-fields.php:270 Stack trace: #0 /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-data-extractor.php(1743): WC_Order_Export_Order_Fields->get() #1 /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-engine.php(513): WC_Order_Export_Data_Extractor::fetch_order_data() #2 /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php(86): WC_Order_Export_Engine::build_file() #3 /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/class-wc-order-export-admin.php(511): WC_Order_Export_Admin_Tab_Abstract->ajax_export_part() #4 /usr/share/nginx/html/wp-includes/class-wp-hook.php(307): WC_Order_Export_Admin->ajax_gate() #5 /usr/share/nginx/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #6 /usr/share/nginx/html/wp-includes/plugin.php(476): WP_Hook->do_action() #7 /usr/share/nginx/html/wp-admin/admin-ajax.php(187): do_action() #8 {main} thrown in /usr/share/nginx/html/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-order-fields.php on line 270
I fixed it by myself
wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-order-fields.php line 270: $row[$field] = ( method_exists($this->order,"get_shipping_total") ? $this->order->get_shipping_total() : $this->order->get_total_shipping() ) - $this->order->get_total_shipping_refunded(); This is what I fixed: $row[$field] = (int)( method_exists($this->order,"get_shipping_total") ? $this->order->get_shipping_total() : $this->order->get_total_shipping() ) - $this->order->get_total_shipping_refunded();
Please address on this issue.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Error when export order’ is closed to new replies.