Please fix this bug: $order->ID to $order->order_id
-
Hello,
Could you please fix this bug:
$order->ID to $order->order_id
(Remember that $order is a stdClass, ->get_id() does also not work, or you need to use $the_order->get_id() )
Near line 152 in file: wc-frontend-manager\controllers\orders\wcfm-controller-wcpvendors-orders.php
The line should be:$wcfm_orders_json_arr = apply_filters( 'wcfm_orders_custom_columns_data_after', $wcfm_orders_json_arr, $index, $order->order_id, $order, $the_order );
And also near line 300:$wcfm_orders_json_arr = apply_filters( 'wcfm_orders_custom_columns_data_before', $wcfm_orders_json_arr, $index, $order->order_id, $order, $the_order );If you are making changes to that file, then PLEASE also look at line 270:
$gross_sales = $order->product_amount + $order->product_shipping_amount + $order->product_shipping_tax_amount + $order->product_tax_amount;Should be:
$gross_sales = (!empty($order->product_amount) ? $order->product_amount : 0) + (!empty($order->product_shipping_amount) ? $order->product_shipping_amount : 0) + (!empty($order->product_shipping_tax_amount) ? $order->product_shipping_tax_amount : 0) + (!empty($order->product_tax_amount) ? $order->product_tax_amount : 0) ;(otherwise, vendors are getting problems and the list of orders is not rendered! This is always a manual fix for us, remember this values could not exist!)
Thanks, great plugin!
You must be logged in to reply to this topic.